/* ═══════════════════════════════════════════════════════════
   Singular House CRM — Design System
   ═══════════════════════════════════════════════════════════ */

/* === Architectural Monolith — utility shadows & helpers === */
.custom-shadow {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
.custom-shadow-lg {
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}
.glass-sidebar { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.material-symbols-outlined { font-family: 'Material Symbols Outlined' !important; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; text-transform: none !important; }

/* ── New Design System Base ── */

body { font-family: 'Manrope', sans-serif; -webkit-font-smoothing: antialiased; }

.material-symbols-outlined { font-family: 'Material Symbols Outlined' !important; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; text-transform: none !important; }

.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.sidebar-scroll:hover::-webkit-scrollbar-thumb { background: #94a3b8; }

/* ── Sections ── */
/* ── Sections ── */
:root {
  /* Cap 290: 10px em todos os lados, no CRM inteiro. Antes era
     clamp(12px, 1.5vw, 24px) e chegava a 24px nas telas largas. */
  --section-pad: 10px;
}
.section { display: none !important; content-visibility: hidden; }
.section.active {
  display: flex !important;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden !important;
  content-visibility: visible;
}

.section-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--section-pad);
  display: flex;
  flex-direction: column;
}

.section-body.gap-6 {
  gap: 24px;
}

/* Tailwind static build omits !important on .hidden — restore expected behavior */
.hidden { display: none !important; }

/* Cap 43 — Arbitrary classes used in condominios.js innerHTML (not scanned by Tailwind build) */
.text-\[8px\] { font-size: 8px; line-height: 1rem; }
.min-w-\[36px\] { min-width: 36px; }
.border-\[#1B4FD8\] { border-color: #1B4FD8; }

/* Cap 56 — Height/max-height utilities missing from Tailwind static build */
.h-60 { height: 15rem; }
.max-h-96 { max-height: 24rem; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

:root {
  /* Tema clean como fallback */
  --bg: #EEF2F7; --surface: #fff; --surface-2: #F5F8FC; --border: #DDE4EF;
  --text: #0D1B2A; --text-2: #4A5568; --text-3: #94A3B8;
  --accent: #1B4FD8; --accent-soft: #EBF0FF; --accent-h: #1440B8;
  --sidebar: #fff; --header: #fff;
  --shadow: 0 1px 4px rgba(0,0,0,.06),0 4px 16px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 24px rgba(0,0,0,.12);
  /* Aliases backward-compat */
  --card: var(--surface); --card2: var(--surface-2); --card-bg: var(--surface);
  --card-border: var(--border); --muted: var(--text-3); --primary: var(--accent);
  --sidebar-w: 230px; --top-h: 64px; --overlay: rgba(0,0,0,.4);
  /* Tokens semanticos */
  --success: #34D399; --danger: #EF4444; --warn: #F59E0B; --ok: #10B981;
  --purple: #8B5CF6; --info: #60A5FA; --pink: #EC4899;
  --alta: #EF4444; --media: #F59E0B; --baixa: #3B82F6; --fin: #64748B;
  /* Log tokens */
  --log-ok: #4ADE80; --log-err: #F87171; --log-warn: #FBBF24;
  --log-muted: #64748B; --log-info: #38BDF8; --log-purple: #C084FC;
  --log-normal: #CBD5E1; --log-bg: #0A0F1A;
  /* Alert system */
  --danger-bg: rgba(239,68,68,0.1); --danger-border: rgba(239,68,68,0.2);
  --warning-bg: rgba(245,158,11,0.1); --warning-border: rgba(245,158,11,0.2);
  --info-bg: rgba(59,130,246,0.1); --info-border: rgba(59,130,246,0.2);
  --ok-bg: rgba(16,185,129,0.1); --ok-border: rgba(16,185,129,0.2);
  /* Tokens de forma/espacamento */
  --radius: 8px; --radius-card: 8px; --radius-btn: 6px;
  --radius-pill: 4px; --radius-chip: 20px;
  --topbar-h: 64px; --sidebar-w-collapsed: 56px;
  --font-mono: 'JetBrains Mono', monospace;
  --font: 'Manrope', 'Segoe UI', sans-serif;
}

body, #sidebar, .sidebar, .topbar, .card, .section-body {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

[data-theme="clean"] {
  --bg: #f3f4f6;
  --bg-gradient: linear-gradient(135deg, #e0e7ff 0%, #f3f4f6 50%, #faf5ff 100%);
  --surface: rgba(255, 255, 255, 0.75);
  --surface-2: rgba(243, 244, 246, 0.6);
  --border: rgba(229, 231, 235, 0.8);
  --text: #0f172a;
  --text-2: #334155;
  --text-3: #64748b;
  --accent: #1B4FD8;
  --accent-soft: rgba(27, 79, 216, 0.08);
  --accent-h: #113ca4;
  --sidebar: rgba(255, 255, 255, 0.7);
  --header: rgba(255, 255, 255, 0.7);
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.03);
  --card: rgba(255, 255, 255, 0.85);
  --card2: rgba(243, 244, 246, 0.85);
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(229, 231, 235, 0.6);
  --muted: var(--text-3);
  --primary: var(--accent);
  --sidebar-w: 230px;
  --top-h: 64px;
  --overlay: rgba(0, 0, 0, 0.4);
  --glass-blur: blur(12px);
}

[data-theme="navy"] {
  --bg:#071424; --surface:#0C1E38; --surface-2:#102444; --border:#1A3458;
  --text:#E8E2D4; --text-2:#8AA4C0; --text-3:#4A6880;
  --accent:#C8A44A; --accent-soft:rgba(200,164,74,.14); --accent-h:#B8923A;
  --sidebar:#050F1C; --header:#081628;
  --shadow:0 2px 8px rgba(0,0,0,.3),0 4px 24px rgba(0,0,0,.2);
  --shadow-lg:0 8px 40px rgba(0,0,0,.4);
  --card:var(--surface); --card2:var(--surface-2); --card-bg:var(--surface);
  --card-border:var(--border); --muted:var(--text-3); --primary:var(--accent);
  --sidebar-w:230px; --top-h:64px; --overlay:rgba(0,0,0,.6);
}

[data-theme="graphite"] {
  --bg: #090d16;
  --bg-gradient: radial-gradient(circle at top left, #0e1726 0%, #090d16 60%, #05070a 100%);
  --surface: rgba(17, 24, 39, 0.8);
  --surface-2: rgba(24, 31, 48, 0.6);
  --border: rgba(99, 102, 241, 0.15);
  --text: #f9fafb;
  --text-2: #e5e7eb;
  --text-3: #9ca3af;
  --accent: #6366F1;
  --accent-soft: rgba(99, 102, 241, 0.15);
  --accent-h: #818cf8;
  --sidebar: rgba(10, 15, 30, 0.85);
  --header: rgba(10, 15, 30, 0.85);
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.1);
  --card: rgba(24, 31, 48, 0.85);
  --card2: rgba(17, 24, 39, 0.85);
  --card-bg: rgba(24, 31, 48, 0.85);
  --card-border: rgba(99, 102, 241, 0.15);
  --muted: var(--text-3);
  --primary: var(--accent);
  --sidebar-w: 230px;
  --top-h: 64px;
  --overlay: rgba(0, 0, 0, 0.6);
  --glow: 0 0 12px rgba(99, 102, 241, 0.4);
  --glass-blur: blur(16px);
}

/* Filtros do logo SVG por tema */
[data-theme="clean"] .logo-img { filter:brightness(0); }
[data-theme="navy"] .logo-img,
[data-theme="graphite"] .logo-img { filter:brightness(0) invert(1); }

/* Glassmorphism global application across components */
.card, .stat-card, .dash-stat-card, .pilar-panel, .x-card, .ai-card, .config-card, .crm-detail-wrap {
  backdrop-filter: var(--glass-blur, none);
  -webkit-backdrop-filter: var(--glass-blur, none);
}
button { font-family: var(--font); }
html, body {
  font-size: 13px;
  line-height: 1.5;
}

/* ── Layout ─────────────────────────────────────────── */
#app { display: flex; height: 100vh; width: 100%; }

/* Sidebar */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar);
  backdrop-filter: var(--glass-blur, none);
  -webkit-backdrop-filter: var(--glass-blur, none);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 10;
  overflow: hidden;
  transition: width .35s cubic-bezier(.4,0,.2,1), min-width .35s cubic-bezier(.4,0,.2,1);
}

#sidebar.collapsed {
  width: 56px;
  min-width: 56px;
}

.sidebar-logo {
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: padding .35s cubic-bezier(.4,0,.2,1);
}

#sidebar.collapsed .sidebar-logo {
  padding: 8px 10px 8px;
  text-align: center;
}

.sidebar-logo .logo-mark {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
  line-height: 1.15;
  text-align: left;
}

.sidebar-logo .logo-sub {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  text-align: left;
  transition: opacity .25s, height .25s, margin .25s;
}

#sidebar.collapsed .sidebar-logo .logo-mark { text-align: center; }
#sidebar.collapsed .sidebar-logo .logo-sub { opacity: 0; height: 0; margin: 0; overflow: hidden; }

nav { padding: 4px 0; overflow-y: auto; }
.sidebar-spacer { flex: 1; cursor: pointer; min-height: 20px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
  border-left: 3px solid transparent;
  transition: padding .35s cubic-bezier(.4,0,.2,1), gap .35s cubic-bezier(.4,0,.2,1), color .15s, background .15s, border-color .15s;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}

.nav-text {
  overflow: hidden;
  white-space: nowrap;
  max-width: 180px;
  opacity: 1;
  transition: opacity .3s cubic-bezier(.4,0,.2,1), max-width .35s cubic-bezier(.4,0,.2,1);
}

#sidebar.collapsed .nav-item {
  padding: 6px 0;
  justify-content: center;
  border-left-width: 0;
  gap: 0;
}

#sidebar.collapsed .nav-text {
  opacity: 0;
  max-width: 0;
}

#sidebar.collapsed .nav-item .nav-icon { font-size: 22px; width: auto; transition: font-size .35s cubic-bezier(.4,0,.2,1); }
.nav-icon-agenda { font-size: 22px; }

.nav-icon-wpp {
  background: #25D366;
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-icon-wpp svg { display: block; }
#sidebar.collapsed .nav-item .nav-icon-wpp { width: 24px; height: 24px; border-radius: 7px; }
#sidebar.collapsed .nav-icon-wpp svg { width: 15px; height: 15px; }
#sidebar.collapsed .nav-item .badge { display: none; }
#sidebar.collapsed #wpp-status-dot { display: none !important; }
#sidebar.collapsed #wpp-status-dot { display: none !important; }

.nav-item:hover { color: var(--text); background: var(--card2); }

.nav-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

#sidebar.collapsed .nav-item.active { border-left-color: transparent; background: color-mix(in srgb, var(--accent) 15%, transparent); }

.nav-item .nav-icon { font-size: 20px; width: 24px; text-align: center; flex-shrink: 0; transition: font-size .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1); }
.nav-item .nav-icon-wpp { width: 22px; height: 22px; font-size: inherit; flex-shrink: 0; text-align: unset; }

.sidebar-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding .35s cubic-bezier(.4,0,.2,1);
}

#sidebar.collapsed .sidebar-footer { padding: 8px 4px; justify-content: center; }
#sidebar.collapsed .sidebar-footer .text-muted { display: none; }
#sidebar.collapsed .sidebar-footer button:not(.icon-btn):not(.avatar-btn) { padding: 6px 0; justify-content: center; }
#sidebar.collapsed .sidebar-footer button:not(.icon-btn):not(.avatar-btn) .nav-text { opacity: 0; max-width: 0; overflow: hidden; }
#sidebar.collapsed .sidebar-footer button:not(.icon-btn):not(.avatar-btn) .material-symbols-outlined { font-family: 'Material Symbols Outlined' !important; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; text-transform: none !important; }

/* Collapsed theme picker */
#sidebar.collapsed .theme-picker {
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  gap: 5px;
  margin: 4px 4px;
}
#sidebar.collapsed .theme-dot { width: 18px; height: 18px; }

/* Main area */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Header fica fixo aqui */
  height: 100vh;
}

/* Top bar */
#topbar {
  height: var(--top-h);
  min-height: var(--top-h);
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}

#topbar h1 { font-size: 16px; font-weight: 600; flex: 1; }

/* ══ Fase 2 — App Shell: Sidebar + Topbar ════════════════════ */

/* Sidebar container (class-based, works alongside #sidebar id) */
.sidebar {
  width: 230px; min-width: 230px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: width .3s cubic-bezier(.4,0,.2,1), min-width .3s;
  overflow: hidden; z-index: 10;
}
.sidebar.collapsed { width: 56px; min-width: 56px; }

/* Logo area */
.sidebar-logo {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  cursor: pointer; user-select: none;
  display: flex; flex-direction: row; align-items: center; gap: 10px;
}
.sidebar.collapsed .sidebar-logo { justify-content: center; padding: 10px 8px; gap: 0; }
.logo-img { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; transition: filter .2s; }
.logo-name {
  font-size: 15px; font-weight: 800; letter-spacing: 0.2px; white-space: nowrap; overflow: hidden;
  transition: opacity .2s, max-width .3s; color: var(--text);
}
.sidebar.collapsed .logo-name { opacity: 0; max-width: 0; }

/* Nav groups scroll container */
.nav-groups { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0; }
.nav-group { margin-bottom: 4px; }
.nav-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--text-3); padding: 8px 16px 4px;
  text-transform: uppercase; white-space: nowrap; overflow: hidden;
  transition: opacity .2s, max-width .3s, height .2s, padding .2s;
}
.sidebar.collapsed .nav-group-label { opacity: 0; max-width: 0; padding: 0; height: 0; }

/* Nav items */
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 14px; cursor: pointer;
  color: var(--text-2); border-left: 2px solid transparent;
  transition: all .12s; white-space: nowrap;
  font-size: 12.5px; font-weight: 500; position: relative;
}
.nav-item:hover { color: var(--text); background: color-mix(in srgb, var(--text) 4%, transparent); }
.nav-item.active {
  color: var(--accent); border-left-color: var(--accent);
  background: var(--accent-soft); font-weight: 700;
}
.sidebar.collapsed .nav-item { padding: 8px 0; justify-content: center; gap: 0; border-left-width: 0; }
.sidebar.collapsed .nav-item.active { background: var(--accent-soft); border-left-width: 0; }

/* Nav label (replaces .nav-text) */
.nav-label { overflow: hidden; max-width: 150px; opacity: 1; transition: opacity .2s, max-width .3s; }
.sidebar.collapsed .nav-label { opacity: 0; max-width: 0; }

/* Icon box: 28×28, colored, rounded */
.nav-icon-box {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px; transition: transform .12s;
}
.nav-item:hover .nav-icon-box { transform: scale(1.05); }

/* Nav badge */
.nav-badge {
  margin-left: auto; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 10px;
}
.sidebar.collapsed .nav-badge { display: none; }

/* Sidebar footer */
.sidebar-footer {
  padding: 10px 14px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; overflow: hidden;
}
.sidebar.collapsed .sidebar-footer { justify-content: center; padding: 10px 8px; }
.sidebar-user-info { overflow: hidden; transition: opacity .2s, max-width .3s; }
.sidebar.collapsed .sidebar-user-info { opacity: 0; max-width: 0; }
.sidebar-username { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.sidebar-role-txt { font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* Topbar */
.topbar {
  position: relative; z-index: 150;
  height: var(--top-h); min-height: var(--top-h); max-height: var(--top-h);
  background: var(--header);
  backdrop-filter: var(--glass-blur, none);
  -webkit-backdrop-filter: var(--glass-blur, none);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; padding: 0 18px;
  flex-shrink: 0; overflow: visible;
}
.sidebar-toggle-mobile { display: none !important; }
.topbar-left { display: flex; align-items: center; gap: 6px; order: 1; flex-shrink: 0; }
.topbar-center { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; order: 2; }
.topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; order: 3; margin-left: auto; }
#header-tabs { order: 4; width: 100%; }
.topbar-title { font-size: 17px; font-weight: 700; letter-spacing: 0; white-space: nowrap; flex-shrink: 0; color: var(--text); }
.topbar-search-center { flex: 1; display: flex; justify-content: center; }
.search-wrap {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 12px;
  width: 100%; max-width: 480px; height: 30px; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s; color: var(--text-3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--text-2); }
.search-input {
  background: transparent; border: none !important; outline: none !important;
  font-size: 13.5px; color: var(--text); width: 100%;
  font-family: var(--font);
  box-shadow: none !important;
}
.search-input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.search-input::placeholder { color: var(--text-3); font-weight: 400; }
.topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; }

/* ── Gear Dropdown ── */
.gear-dropdown-wrap { position: relative; }
.gear-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: var(--bg, #fff) !important; border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px; z-index: 100; overflow: hidden;
}
.gear-dropdown button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 14px; border: none; background: none;
  font-size: 13px; color: var(--text, #0f172a); cursor: pointer; text-align: left;
}
.gear-dropdown button:hover { background: var(--surface-2, #f1f5f9); }
.gear-dropdown-danger { color: #ef4444 !important; }
.gear-dropdown-divider { height: 1px; background: var(--border, #e2e8f0); margin: 0; }

/* ── Topbar search em temas escuros ── */
[data-theme="navy"] .search-wrap,
[data-theme="graphite"] .search-wrap {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}
[data-theme="navy"] .search-input,
[data-theme="graphite"] .search-input {
  color: var(--text) !important;
}
[data-theme="navy"] .search-input::placeholder,
[data-theme="graphite"] .search-input::placeholder {
  color: #64748b !important;
}
}

/* ── Sidebar auto-dimensionável ── */
.sidebar .nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 8px 14px !important;
  margin: 2px 0 !important;
}
.sidebar .nav-icon-box {
  width: 28px !important;
  height: 28px !important;
}
.sidebar .nav-label {
  font-size: 15px !important;
}
/* ══ RADAR SECTION LAYOUT ════════════════════════════════ */
#section-radar.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 50px);
  overflow: hidden;
  /* Break out of #content px-8 py-6 padding for true full-bleed hero */
  margin: -24px -32px 0;
  width: calc(100% + 64px);
}

/* ══ GEOSAMPA SECTION LAYOUT (mirrors #section-radar) ════ */
#section-geosampa.active {
  display: flex; flex-direction: column;
  height: calc(100vh - 44px); overflow: hidden;
  margin: -24px -32px 0; width: calc(100% + 64px);
}
#geo-content-scroll { flex: 1; overflow-y: auto; padding: 24px 32px; }

/* ══ CONDOMINIOS SECTION LAYOUT ══════════════════════════ */
#section-condominios.active {
  display: flex;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  /* Cap 290: era #EEF2F7 fixo — o valor do tema claro. No tema escuro isso
     virava uma faixa branca em volta dos cards. */
  background: var(--bg) !important;
}
#condo-content-scroll {
  flex: 1;
  overflow-y: auto !important;
}

/* ══ CAMPANHAS SECTION LAYOUT ═════════════════════════════ */
/* Sem padding próprio (nem #content) — hero fica flush sem precisar de margem
   negativa. Overflow:hidden delega o scroll pros wrappers internos
   (#camp-view-resumo, #cc-detail, etc.), evitando o "double scroll" que
   cortava os cards de resposta. */
#section-campanhas_condominio.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#section-campanhas_condominio .crm-hero-sep {
  background: rgba(255,255,255,.22);
}

/* ══ GEOSAMPA HERO BAR ════════════════════════════════════ */
#geo-hero {
  background: #0D1B2A; border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 10px 16px; display: flex; align-items: center;
  gap: 0; flex-shrink: 0;
}
.geo-hero-label {
  padding-right: 18px; border-right: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.5);
}
.geo-hero-stat {
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; padding: 6px 20px;
}
.geo-hero-stat span { color:#fff; font-size:22px; font-weight:800; line-height:1; }
.geo-hero-stat label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .9px; color: rgba(255,255,255,.4); margin-bottom: 3px; display:block;
}
.geo-hero-sep {
  width: 1px; background: rgba(255,255,255,.1);
  align-self: stretch; margin: 4px 0;
}
#gh-condos   { color: #e2e8f0; }
#gh-names    { color: #818cf8; }
#gh-month    { color: #38bdf8; }
#gh-assertiva{ color: #c084fc; }

/* ══ HERO BAR GLOBAL (PADRÃO ESCURO) ═════════════════════════ */
/* Full-bleed: grudada no topo/laterais da seção, sem arredondar — mesmo padrão em todas as telas. */
.crm-hero {
  background: #000000; border-bottom: 1px solid rgba(255,255,255,.08);
  min-height: 50px; display: flex; align-items: center; justify-content: space-between;
  gap: 0; flex-shrink: 0; overflow: hidden;
  padding: var(--section-pad); margin: 0;
}
.crm-hero-label {
  padding-right: 18px; border-right: 1px solid rgba(255,255,255,.3);
  flex-shrink: 0; min-width: 200px; display: flex; flex-direction: column; justify-content: center;
}
.crm-hero-label-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; color: #ffffff; margin-bottom: 1px; line-height: 1;
}
.crm-hero-label-sub { font-size: 10px; color: rgba(255,255,255,.75); line-height: 1; }
.crm-hero-metrics { 
  display: flex; flex: 1; align-items: center; overflow-x: auto; 
  padding: 0; margin-left: 10px; justify-content: flex-start; height: 100%;
}
.crm-hero-metrics::-webkit-scrollbar { display: none; }
.crm-hero-metric {
  display: flex; align-items: center; gap: 8px;
  justify-content: center; padding: 0 12px; cursor: pointer;
  border-radius: 6px; transition: background .15s;
  position: relative; user-select: none; height: 38px; white-space: nowrap;
}
.crm-hero-metric:hover { background: rgba(255,255,255,.07); }
.crm-hero-metric.active { background: rgba(255,255,255,.1); }
.crm-hero-metric-text { display: flex; flex-direction: column; justify-content: center; }
.crm-hero-metric-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .9px; color: rgba(255,255,255,.4); margin-bottom: 2px; line-height: 1;
}
.crm-hero-metric-value { font-weight: 800; line-height: 1; font-size: 16px; font-family: 'JetBrains Mono', monospace; color: #fff; }
.crm-hero-sep {
  width: 1px; background: rgba(255,255,255,.3);
  height: 20px; margin: 0 4px; flex-shrink: 0;
}
.crm-hero-actions {
  display: flex; gap: 7px; padding-left: 12px; height: 100%;
  border-left: 1px solid rgba(255,255,255,.3); flex-shrink: 0;
  align-items: center; margin-left: auto;
}
.crm-hero-btn-primary {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 6px; padding: 5px 11px; font-size: 11px;
  font-weight: 700; cursor: pointer; font-family: var(--font);
  white-space: nowrap; transition: opacity .12s;
}
.crm-hero-btn-primary:hover { opacity: .88; }
.crm-hero-btn-outline {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.15); border-radius: 6px;
  padding: 5px 10px; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: var(--font); white-space: nowrap;
  transition: all .12s;
}
.crm-hero-btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ══ RADAR HERO BAR (REMOVED - USING GLOBAL CRM-HERO) ═══════════════════════════════════════ */

.radar-hero-btn-primary {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 6px; padding: 5px 11px; font-size: 11px;
  font-weight: 700; cursor: pointer; font-family: var(--font);
  white-space: nowrap; transition: opacity .12s;
}
.radar-hero-btn-primary:hover { opacity: .88; }
.radar-hero-btn-outline {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.15); border-radius: 6px;
  padding: 5px 10px; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: var(--font); white-space: nowrap;
  transition: all .12s;
}
.radar-hero-btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Coverage strip */
#radar-coverage {
  display: flex; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); margin: 10px 10px 0;
  flex-shrink: 0; overflow: hidden;
}
.radar-cov-item {
  flex: 1; padding: 10px 16px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.radar-cov-item:last-child { border-right: none; }
.radar-cov-value { font-weight: 800; line-height: 1; font-size: 18px; }
.radar-cov-label {
  font-size: 9px; color: var(--text-3); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Condo list */
.radar-condo-item {
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
  border-left: 3px solid transparent;
}
.radar-condo-item:hover { background: var(--surface-2); }
.radar-condo-item.active {
  border-left-color: var(--accent); background: var(--accent-soft);
}
.radar-condo-name-row { display: flex; align-items: center; gap: 7px; }
.radar-condo-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.radar-condo-stats { display: flex; gap: 5px; }
.radar-condo-stat {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 5px; text-align: center;
}
.radar-condo-stat-val { font-size: 11px; font-weight: 800; line-height: 1.1; }
.radar-condo-stat-lbl {
  font-size: 8px; color: var(--text-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: .3px; margin-top: 1px;
}
.radar-condo-bar {
  height: 3px; border-radius: 2px; background: var(--border); overflow: hidden;
}
.radar-condo-bar-fill { height: 100%; border-radius: 2px; transition: width .4s; }

/* Bounce toolbar */
.radar-bounce-toolbar {
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); flex-shrink: 0;
}

/* ══ CONFIG SECTION ═══════════════════════════════════════ */
.config-section-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow); overflow: hidden;
}
.config-section-card.danger { border-color: rgba(239,68,68,.3); }
.config-card-header {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); font-size: 12px; font-weight: 600;
  color: var(--text-2); cursor: default;
}
.config-card-header.collapsible { cursor: pointer; }
.config-card-header.collapsible:hover { background: var(--card2); }
.config-card-body { padding: 14px 18px; }
.config-btn-primary {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 6px; padding: 7px 14px; font-size: 12px;
  font-weight: 600; cursor: pointer; font-family: var(--font);
  transition: background .15s;
}
.config-btn-primary:hover { background: var(--accent-h); }
.config-btn-outline {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; color: var(--text-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 7px 14px; font-size: 12px;
  font-weight: 600; cursor: pointer; font-family: var(--font);
  transition: all .15s;
}
.config-btn-outline:hover { background: var(--surface-2); color: var(--text); }
.config-btn-danger {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(239,68,68,.1); color: #EF4444; border: 1px solid rgba(239,68,68,.2);
  border-radius: 6px; padding: 7px 14px; font-size: 12px;
  font-weight: 600; cursor: pointer; font-family: var(--font);
  transition: all .15s;
}
.config-btn-danger:hover { background: rgba(239,68,68,.2); }

/* Header tabs */
.header-tab {
  padding: 10px 16px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-3); border: none; background: none;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all .15s; font-family: var(--font);
  white-space: nowrap;
}
.header-tab:hover { color: var(--text); }
.header-tab.active {
  color: var(--accent); border-bottom-color: var(--accent);
}
#header-tabs {
  align-self: stretch; display: flex; align-items: stretch;
}
.topbar-user-chip {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer; padding: 4px 8px; border-radius: 8px;
  transition: background .12s; position: relative;
}
.topbar-user-chip:hover { background: var(--surface-2); }
.topbar-user-info { display: flex; flex-direction: column; gap: 1px; }
.topbar-user-name { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.topbar-user-role { font-size: 10px; color: var(--text-3); white-space: nowrap; }
.topbar-user-chevron { color: var(--text-3); transition: transform .15s; }
.topbar-user-chip.open .topbar-user-chevron { transform: rotate(180deg); }
.topbar-user-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-lg);
  min-width: 220px; z-index: 200; display: none;
  animation: fadeIn .12s ease;
}
.topbar-user-dropdown.open { display: block; }
.topbar-dropdown-header {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.topbar-dropdown-name { font-size: 13px; font-weight: 700; color: var(--text); }
.topbar-dropdown-email { font-size: 11px; color: var(--text-3); }
.topbar-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: 13px; color: var(--text-2);
  cursor: pointer; transition: background .1s;
}
.topbar-dropdown-item:hover { background: var(--surface-2); }
.topbar-dropdown-danger { color: var(--danger); }
.topbar-dropdown-danger:hover { background: rgba(239,68,68,.08); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
#dash-alerts-area { animation: slideInDown 0.4s ease-out; }
.inline-exp-row { animation: fadeIn 0.2s ease-out; }
/* Timeline vs Audit containers */
#lead-history-content-container { position: relative; }
#audit-list-container { font-family: var(--font); }
.icon-btn {
  background: transparent; border: none; cursor: pointer;
  color: var(--text-3); display: flex; align-items: center; justify-content: center;
  padding: 5px; border-radius: 6px; transition: all .15s; position: relative;
  font-family: var(--font);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #EF4444; border: 1.5px solid var(--header);
}
.avatar-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; transition: opacity .15s; flex-shrink: 0;
  font-family: var(--font);
}
.avatar-btn:hover { opacity: .85; }

/* ════════════════════════════════════════════════════════════ */

/* Content area that scrolls */
#content {
  flex: 1;
  overflow: hidden; /* Lock global scrolling to allow robust individual section viewports */
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Definições de section movidas para o topo do arquivo */

.section-inner {
  padding: 24px;
}


/* ── Components ─────────────────────────────────────── */

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 11px 15px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-link {
  font-size: 11px; font-weight: 600; color: var(--accent);
  cursor: pointer; transition: opacity .12s;
}
.card-link:hover { opacity: .7; }

.card-body { padding: 20px; }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
#stats-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
@media (min-width: 900px) {
  #stats-grid { grid-template-columns: repeat(5, 1fr); }
  #imoveis-stats-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ── Imóveis: toolbar (busca livre + chips de status) ──────────
   Cap 290: os 7 selects de filtro saíram — 17 imóveis cabem numa tela. */
.imv-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.imv-search {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 420px;
}
.imv-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-3);
  pointer-events: none;
}
.imv-search input {
  width: 100%;
  height: 32px;
  padding: 4px 10px 4px 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
}
.imv-search input:focus {
  outline: none;
  border-color: var(--accent);
}
.imv-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.imv-chip {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.imv-chip:hover { background: var(--card2); color: var(--text); }
.imv-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.imv-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}
.imv-btn-sync {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  gap: 5px;
}
.imv-btn-sync:hover { background: var(--accent-h); }
.imv-btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  gap: 5px;
}
.imv-toolbar .imv-btn-outline.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Imóveis Grid View ── */
.imoveis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
}

/* Card de imóvel — mesmo esqueleto do card de condomínio:
   foto com badges sobrepostos → bloco de texto → grid de métricas → rodapé. */
.imv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform .15s, box-shadow .15s;
}
.imv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.imv-card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}
.imv-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imv-card-photo-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 55%);
  pointer-events: none;
}
.imv-card-nophoto {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-3);
}
.imv-card-nophoto .material-symbols-outlined { font-size: 34px; opacity: .5; }
.imv-card-nophoto span:last-child { font-size: 10px; font-weight: 600; }

.imv-card-badges {
  position: absolute;
  top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.imv-card-badges-left { left: 8px; align-items: flex-start; }
.imv-card-badges-right { right: 8px; align-items: flex-end; }
.imv-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(3px);
  white-space: nowrap;
}
.imv-badge .material-symbols-outlined { font-size: 11px; }
.imv-badge-mine { background: var(--accent); }
.imv-badge-code {
  background: rgba(255,255,255,.92);
  color: #1e293b;
  font-size: 10px;
  letter-spacing: .04em;
}
.imv-card-condo {
  position: absolute;
  left: 8px;
  bottom: 7px;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
  overflow: hidden;
}
.imv-card-condo span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.imv-card-condo .material-symbols-outlined { font-size: 14px; flex-shrink: 0; }

.imv-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.imv-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.imv-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.imv-card-bairro {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  background: var(--bg);
}
.imv-card-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  margin: 0 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.imv-metrics {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  table-layout: fixed;
}
.imv-metrics td {
  width: 50%;
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.imv-metrics td:first-child { border-right: 1px solid var(--border); }
.imv-metrics tr:last-child td { border-bottom: none; }
.imv-metrics tr:first-child td { background: var(--card2); }
.imv-metric-lbl {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2px;
}
.imv-metric-val {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.imv-metric-price { color: var(--accent); }

.imv-card-owner {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-2);
  min-width: 0;
}
.imv-card-owner .material-symbols-outlined { font-size: 14px; color: var(--text-3); flex-shrink: 0; }
.imv-card-owner-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.imv-card-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  background: var(--card2);
  flex-shrink: 0;
}
.imv-card-act {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.imv-card-act:last-child { border-right: none; }
.imv-card-act .material-symbols-outlined { font-size: 13px; }
.imv-card-act:hover { background: var(--accent); color: #fff; }
.imv-card-act-primary { background: #0D1B2A; color: #fff; }
.imv-card-act-primary:hover { background: var(--accent); color: #fff; }
[data-theme="navy"] .imv-card-act-primary,
[data-theme="graphite"] .imv-card-act-primary { background: var(--accent); }
[data-theme="navy"] .imv-card-act-primary:hover,
[data-theme="graphite"] .imv-card-act-primary:hover { background: var(--accent-h); }
.imv-card-act:disabled { opacity: .4; cursor: not-allowed; }
.imv-card-act:disabled:hover { background: transparent; color: var(--text-2); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: 16px;
  text-align: center;
  gap: 16px;
  grid-column: 1 / -1;
}
.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.empty-state p {
  color: var(--muted);
  max-width: 400px;
  margin: 0;
  line-height: 1.5;
}

@media (min-width: 1200px) {
  #stats-grid { grid-template-columns: repeat(6, 1fr); }
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
  display: flex;
  flex-direction: column;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--accent); }

.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
  height: 2.6em;
  overflow: hidden;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font);
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }
.btn-primary:active { transform: scale(.97); filter: brightness(.9); }

.wpp-compose-wrap {
  position: relative;
}
.wpp-compose-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  max-height: 150px;
  font-size: 13px;
  padding: 8px 44px 8px 10px;
  border-radius: 18px;
}
.wpp-compose-input:focus {
  outline: none;
  border-color: var(--accent);
}
.wpp-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #25d366;
  color: #fff;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.wpp-send-btn:hover { filter: brightness(.95); }
.wpp-send-btn:active { transform: translateY(-50%) scale(.94); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--card2); color: var(--text); }
.btn-ghost:active { transform: scale(.97); }
.btn-ghost.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 4px 10px; font-size: 12px; }

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
  transition: all .15s;
}
.btn-icon:hover { background: var(--card2); color: var(--text); }
.btn-icon:active { transform: scale(.9); }

/* Inputs */
input, select, textarea {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  outline: none !important;
  box-shadow: 0 0 0 3px var(--accent-soft);
  transition: border-color .15s, box-shadow .15s;
}

select option { background: var(--card2); }

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.form-group { margin-bottom: 14px; }

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.form-grid-2 .form-group { margin-bottom: 0; }
@media (max-width: 720px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input { width: auto; min-width: 140px; }

/* Badge / pill */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-alta  { background: rgba(239,68,68,.15);  color: #EF4444; }
.badge-media { background: rgba(245,158,11,.15); color: #F59E0B; }
.badge-baixa { background: rgba(59,130,246,.15); color: #3B82F6; }
.badge-fin   { background: rgba(100,116,139,.15); color: #94A3B8; }

/* Badge — Prioridade (redesign) */
.badge-prio-alta  { background: rgba(239,68,68,.12); color: #EF4444; }
.badge-prio-media { background: rgba(245,158,11,.12); color: #F59E0B; }
.badge-prio-baixa { background: rgba(96,165,250,.12); color: #60A5FA; }

/* Badge — Etapa do Lead */
.badge-etapa-proprietario { background: rgba(148,163,184,.12); color: #94A3B8; }
.badge-etapa-contactado   { background: rgba(96,165,250,.12); color: #60A5FA; }
.badge-etapa-interessado  { background: rgba(167,139,250,.12); color: #A78BFA; }
.badge-etapa-proposta     { background: rgba(245,158,11,.12); color: #F59E0B; }
.badge-etapa-fechado      { background: rgba(52,211,153,.12); color: #34D399; }

/* Buttons — Accent & Outline */
.btn-accent {
  background: var(--accent); color: #fff; border: none;
  padding: 6px 14px; border-radius: 6px; font-size: 12px;
  font-weight: 600; cursor: pointer; font-family: var(--font);
  transition: background .12s; display: inline-flex; align-items: center; gap: 5px;
}
.btn-accent:hover { background: var(--accent-h, #1440B8); }
.btn-outline {
  background: transparent; color: var(--text-2); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 6px; font-size: 12px;
  font-weight: 600; cursor: pointer; font-family: var(--font);
  transition: all .12s; display: inline-flex; align-items: center; gap: 5px;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline:disabled { opacity: .45; cursor: not-allowed; }
.btn-outline:disabled:hover { border-color: var(--border); color: var(--text-2); }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3);
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap; text-align: left;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table tr.selected td { background: var(--accent-soft); }

/* Pill button */
.pill-btn {
  padding: 3px 10px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; font-size: 11px; font-weight: 600;
  cursor: pointer; color: var(--text-3); font-family: var(--font);
  transition: all .12s;
}
.pill-btn.active, .pill-btn:hover {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* Toggle button */
.toggle-btn {
  padding: 3px 10px; border-radius: 4px; border: 1px solid var(--border);
  background: transparent; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  cursor: pointer; color: var(--text-3); font-family: var(--font);
  transition: all .12s;
}
.toggle-btn.active {
  background: var(--surface); color: var(--accent);
  box-shadow: var(--shadow); border-color: var(--border);
}

/* Table */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  background: var(--card2);
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
  cursor: pointer;
}

tbody tr:hover { background: var(--card2); }
tbody tr.selected { background: color-mix(in srgb, var(--accent) 12%, transparent); }

#geo-table tbody tr {
  /* remove tr border to prevent double border conflicts with td */
  border-bottom: none;
}

#geo-table tbody td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

tbody td {
  padding: 11px 14px;
  font-size: 13px;
  vertical-align: middle;
}

#geo-table tbody tr { background-color: var(--surface); }
#geo-table tbody tr:nth-child(even) { background-color: var(--surface-2); }
#geo-table tbody tr:hover { background-color: color-mix(in srgb, var(--surface-2) 90%, var(--accent)) !important; }

.td-main { font-weight: 500; }

/* ── CRM Split ───────────────────────────────────────── */
#crm-split {
  display: flex;
  flex: 1;
  overflow: hidden;
}

#crm-list {
  width: 55%;
  min-width: 55%;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#crm-list-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#crm-table-wrap {
  flex: 1;
  overflow-y: auto;
}

#crm-detail {
  width: 330px;
  min-width: 330px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg);
}

.detail-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  gap: 8px;
}

.detail-empty .de-icon { font-size: 40px; opacity: .3; }

.detail-section { margin-bottom: 20px; }
/* Cap 303 — sem uppercase: a ficha não tem mais nada em caixa alta. */
.detail-section h3 {
  font-size: 12px;
  letter-spacing: .01em;
  color: var(--text-2);
  margin-bottom: 10px;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-field { }
.detail-field .df-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}
.detail-field .df-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.detail-actions { display: flex; gap: 8px; margin-top: 16px; }

/* Edit inline */
.edit-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.edit-row > * { flex: 1; }

/* ── Communication tabs (Shared Header tabs) ── */
.comunicacao-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  margin-bottom: 16px;
  overflow-x: auto;
}
.comunicacao-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
}
.comunicacao-tab-btn span {
  font-size: 18px;
}
.comunicacao-tab-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}
.comunicacao-tab-btn.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-soft);
}

.email-filters button {
  background: var(--surface-2);
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
}
.email-filters button:hover {
  border-color: var(--text-3);
  color: var(--text-2);
}

/* ── Email Split ─────────────────────────────────────── */
#email-split {
  display: flex;
  flex: 1;
  overflow: hidden;
}

#email-list-panel {
  width: 38%;
  min-width: 280px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#email-list-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
}

#email-list-inner { flex: 1; overflow-y: auto; }

.email-row {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.email-row:hover {
  background: var(--card2);
  transform: translateX(3px);
}
.email-row.selected {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-left-color: var(--accent);
}
.email-row.unread {
  border-left-color: var(--accent);
}
.email-row.unread .er-subject { font-weight: 700; color: var(--text); }
.email-row.unread .er-from { font-weight: 700; }

.er-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.er-from { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.er-date { font-size: 11px; color: var(--muted); white-space: nowrap; }
.er-subject { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.er-snippet {
  font-size: 11px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  opacity: .75;
  line-height: 1.4;
}

.unread-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.lead-tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  background: rgba(16,185,129,.15);
  color: var(--ok);
  margin-left: 4px;
  font-weight: 600;
}

/* Email viewer */
#email-viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#email-viewer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

#ev-subject { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
#ev-meta { font-size: 12px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
#ev-actions { margin-top: 12px; display: flex; gap: 8px; }

#email-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.email-turn { margin-bottom: 20px; }

.et-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.et-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.et-name { font-weight: 600; font-size: 13px; }
.et-date { font-size: 11px; color: var(--muted); margin-left: auto; }

.et-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.et-quoted {
  margin-top: 12px;
  padding: 12px 16px;
  border-left: 3px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
  background: var(--card2);
  border-radius: 0 6px 6px 0;
  max-height: 200px;
  overflow-y: auto;
}

/* Reply panel */
#reply-panel {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  background: var(--card);
  display: none;
}

#reply-panel.open { display: block; }

#reply-body {
  resize: vertical;
  min-height: 90px;
  margin-bottom: 10px;
}

/* ── Comissões ───────────────────────────────────────── */
#com-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

#com-form-wrap { width: 300px; min-width: 260px; }
#com-list-wrap { flex: 1; min-width: 300px; }

.com-total-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.com-total-item {
  flex: 1;
  min-width: 140px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.ct-label { font-size: 11px; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.ct-value { font-size: 22px; font-weight: 700; color: var(--ok); }
.ct-value.pend { color: var(--warn); }

/* Status badge */
.status-receber { color: var(--warn); }
.status-recebido { color: var(--ok); }

/* ── Dashboard ──────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  #crm-split { flex-direction: column; }
  #crm-list { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid var(--border); max-height: 50%; }
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--muted);
  gap: 10px;
  font-size: 13px;
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  background: var(--card2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  box-shadow: var(--shadow);
  animation: slideUp .2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 320px;
}

.toast.ok   { border-left: 3px solid var(--ok);   }
.toast.err  { border-left: 3px solid var(--danger); }
.toast.warn { border-left: 3px solid var(--warn);  }

.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast.ok .toast-icon   { color: var(--ok); }
.toast.err .toast-icon  { color: var(--danger); }
.toast.warn .toast-icon { color: var(--warn); }

.toast-exit {
  animation: toastExit .25s ease forwards;
  pointer-events: none;
}

@keyframes toastExit {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Modal */
#modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 200;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
}

#modal-overlay.open {
  display: flex;
  opacity: 1;
  animation: modalFadeIn .2s ease forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#modal-overlay .modal-box {
  animation: modalBoxIn .25s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes modalBoxIn {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-box {
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--bg);
  background-image: linear-gradient(var(--card), var(--card));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal-box h2 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ── Theme picker ───────────────────────────────────────── */
.theme-picker {
  display: flex; gap: 7px; flex-wrap: wrap;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  border-radius: 8px;
  margin: 4px 8px;
}
.theme-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,.18);
  box-shadow: 0 0 0 1px rgba(0,0,0,.25), inset 0 1px 2px rgba(255,255,255,.15);
  transition: transform .15s, border-color .15s, box-shadow .15s;
  flex-shrink: 0;
}
.theme-dot:hover { transform: scale(1.25); border-color: rgba(255,255,255,.4); }
.theme-dot.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--accent), inset 0 1px 2px rgba(255,255,255,.15); }

.cfg-theme-swatch:hover { transform: scale(1.12); }
.cfg-swatch-active { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent), 0 2px 8px rgba(0,0,0,.3) !important; }

.theme-more-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--card2);
  border: 2px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color .15s, border-color .15s;
  line-height: 1;
  padding: 0;
}
.theme-more-btn:hover { color: var(--text); border-color: var(--accent); }
#sidebar.collapsed .theme-more-btn { width: 18px; height: 18px; font-size: 11px; }

/* ── Global progress bar (topbar) ────────────────────────── */
#global-progress {
  display: none;
  align-items: center;
  gap: 8px;
  position: relative;
  flex-shrink: 1;
  min-width: 0;
}
#global-progress.flex { display: flex; }

/* Assertiva — lista de candidatos na seleção manual */
.assertiva-candidatos-lista {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 10px;
  text-align: left;
}
.assertiva-candidato-item {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  background: var(--surface);
  transition: background .1s, border-color .1s;
}
.assertiva-candidato-item:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}
.assertiva-candidato-titulo {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.assertiva-candidato-campo {
  font-size: 11px;
  color: var(--text-3);
}
.assertiva-candidato-campo span { color: var(--text-2); }
.assertiva-timer-txt {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 10px;
  text-align: center;
}
#gp-pills-host {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.gp-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 14px;
  min-width: 220px;
  max-width: clamp(220px, 26vw, 340px);
  flex-shrink: 1;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .2s ease;
}
@media (max-width: 640px) {
  .gp-pill { max-width: 90vw; }
}
.gp-pill:hover { background: var(--accent-soft); }
.gp-overflow-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: background .2s ease;
}
.gp-overflow-badge:hover { background: var(--accent-soft); }
#gp-overflow-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.18));
  padding: 8px;
  min-width: 280px;
  max-width: min(90vw, 380px);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 60;
}
.gp-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
}
.gp-dropdown-item:hover { background: var(--surface-2); }
.gp-cancel-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  border-radius: 4px;
}
.gp-cancel-btn:hover { color: var(--danger); background: var(--danger-bg); }
.gp-cancel-btn-on-dark { color: rgba(255,255,255,0.6); }
.gp-cancel-btn-on-dark:hover { color: #fff; background: var(--danger); }
.gp-icon {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--accent);
  animation: spin 2s linear infinite;
}
.gp-body { flex: 1; min-width: 0; }
.gp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 1px;
}
.gp-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.gp-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: -0.3px;
}
.gp-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gp-bar-wrap {
  flex: 1;
  min-width: 0;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.gp-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
  min-width: 2px;
}
.gp-indeterminate .gp-bar {
  width: 30% !important;
  animation: gp-slide 1.4s ease-in-out infinite;
}
@keyframes gp-slide {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(240%); }
  100% { transform: translateX(-100%); }
}
.gp-eta {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  max-width: 40%;
}
.gp-detail {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  max-width: 45%;
}

/* ── Email HTML viewer ───────────────────────────────────── */
.email-header-card {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.email-header-row {
  display: flex; gap: 6px; font-size: 12px; margin-bottom: 3px;
}
.email-header-row .eh-label {
  color: var(--muted); min-width: 40px; font-weight: 600;
}
.email-header-row .eh-val { color: var(--text); flex: 1; word-break: break-all; }

.email-view-toggle {
  display: flex; gap: 6px; padding: 8px 20px;
  background: var(--card2); border-bottom: 1px solid var(--border);
}
.evt-btn {
  padding: 4px 12px; border-radius: 6px; font-size: 12px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; font-family: var(--font);
  transition: all .15s;
}
.evt-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.evt-btn:hover:not(.active) { background: var(--card); color: var(--text); }

.email-attachments {
  padding: 8px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; flex-wrap: wrap; background: var(--card2);
}
.attach-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 6px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
}

#email-iframe {
  flex: 1; border: none; width: 100%;
  background: #fff;
  min-height: 400px;
}

/* ── Notes timeline ─────────────────────────────────────── */
.note-item {
  padding: 10px 14px;
  background: var(--card2);
  border-radius: 8px;
  margin-bottom: 8px;
  position: relative;
}
.note-item .note-date { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.note-item .note-text { font-size: 13px; line-height: 1.5; }
.note-item .note-del {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 14px; padding: 2px 4px;
  border-radius: 4px; opacity: 0; transition: opacity .15s;
}
.note-item:hover .note-del { opacity: 1; }
.note-item .note-del:hover { color: var(--danger); background: rgba(239,68,68,.1); }

.note-input-row {
  display: flex; gap: 8px; margin-top: 10px; align-items: flex-start;
}
.note-input-row textarea { flex: 1; min-height: 60px; resize: vertical; }

/* ── Disparo ─────────────────────────────────────────────── */
#disparo-split {
  display: grid;
  grid-template-columns: minmax(640px, 1fr) 420px;
  gap: 14px;
  flex: 1;
  overflow: hidden;
}

#disparo-leads-panel {
  width: 340px; min-width: 260px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}

.disparo-leads-header {
  padding: 12px; display: flex; gap: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.disparo-select-bar {
  padding: 8px 12px; display: flex; gap: 6px; align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--card2);
}

#disparo-leads-list { flex: 1; overflow-y: auto; }

.disp-lead-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
}
.disp-lead-row:hover { background: var(--card2); }
.disp-lead-row input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; accent-color: var(--accent); }
.disp-lead-info { flex: 1; min-width: 0; }
.disp-lead-nome { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disp-lead-sub { font-size: 11px; color: var(--muted); }
.disp-no-email { opacity: .4; }

#disparo-compose {
  flex: 1; overflow-y: auto;
}
.disparo-compose-inner { padding: 20px; max-width: 980px; }

#disparo-preview-pane {
  border-left: 1px solid var(--border);
  padding: 20px 20px 20px 6px;
  overflow-y: auto;
}

#disp-preview-card {
  position: sticky;
  top: 10px;
}

@media (max-width: 1200px) {
  #disparo-split {
    grid-template-columns: 1fr;
  }
  #disparo-preview-pane {
    border-left: 0;
    padding: 0 20px 20px;
  }
}

.var-chip {
  display: inline-block;
  padding: 2px 8px; border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent);
  font-size: 12px; font-family: monospace;
  cursor: default;
}

/* ── Radar ───────────────────────────────────────────────── */
.radar-group {
  margin-bottom: 20px;
}
.radar-group-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--card2); border-radius: 8px 8px 0 0;
  border: 1px solid var(--border); border-bottom: none;
  font-weight: 600; font-size: 13px;
}
.radar-group-count {
  background: var(--danger); color: #fff;
  border-radius: 20px; padding: 2px 8px; font-size: 11px; font-weight: 700;
}
.radar-group-body {
  border: 1px solid var(--border); border-radius: 0 0 8px 8px; overflow: hidden;
}
.radar-item {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 12px;
}
.radar-item:last-child { border-bottom: none; }
.radar-email { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.radar-reason { font-size: 12px; color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); padding: 4px 8px; border-radius: 6px; border-left: 3px solid var(--warn); }
.radar-cand-reason { font-size: 11px; color: var(--warn); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radar-lead { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: rgba(16,185,129,.15); color: var(--ok); margin-left: 6px; }
.radar-date { font-size: 11px; color: var(--muted); white-space: nowrap; margin-left: auto; flex-shrink: 0; }
/* Radar tabela compacta */
#radar-tabela-wrap table tbody tr { border-bottom: 1px solid var(--border); }
#radar-tabela-wrap table tbody tr:last-child { border-bottom: none; }
#radar-tabela-wrap table tbody tr:hover { background: var(--card2); }
#radar-tabela-wrap table td { padding: 7px 12px; vertical-align: middle; }

/* Radar candidates list */
.radar-cand-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background .1s;
  width: 100%;
  box-sizing: border-box;
}
.radar-cand-row:hover { background: var(--card2); }
.radar-cand-cb {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
  width: 15px; height: 15px;
  cursor: pointer;
}
.radar-cand-info { flex: 1; min-width: 0; overflow: hidden; }
.radar-cand-main { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; flex-wrap: wrap; }
.radar-cand-email { font-weight: 600; font-size: 13px; color: var(--text); }
.radar-cand-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.radar-cand-snippet { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .75; }

/* ── IPTU ────────────────────────────────────────────────── */
#iptu-layout {
  display: flex; flex: 1; gap: 0; overflow: hidden;
}

#iptu-controls {
  width: 400px; min-width: 340px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px;
  display: flex; flex-direction: column;
  gap: 4px;
}

#iptu-monitor {
  flex: 1; overflow-y: auto;
  padding: 24px;
  display: flex; flex-direction: column;
}

/* Drop zone */
#iptu-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  font-size: 13px;
}
#iptu-drop-zone:hover,
#iptu-drop-zone.drag-over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.iptu-drop-icon { font-size: 32px; margin-bottom: 8px; }

/* Mode buttons */
.iptu-mode-btn {
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 2px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  transition: all .15s;
  text-align: left;
}
.iptu-mode-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.iptu-mode-btn.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.iptu-mode-desc { font-size: 11px; font-weight: 400; color: var(--muted); }
.iptu-mode-btn.active .iptu-mode-desc { color: var(--accent); opacity: .75; }

/* Log terminal */
.iptu-log-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  background: var(--log-bg);
  min-height: 280px;
  max-height: 420px;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 0 0 var(--radius) var(--radius);
}
.iptu-log-body .l-ok     { color: var(--log-ok); }
.iptu-log-body .l-err    { color: var(--log-err); }
.iptu-log-body .l-warn   { color: var(--log-warn); }
.iptu-log-body .l-muted  { color: var(--log-muted); }
.iptu-log-body .l-iptu   { color: var(--log-info); }
.iptu-log-body .l-purple { color: var(--log-purple); }
.iptu-log-body .l-normal { color: var(--log-normal); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Misc */
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 12px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mb-16 { margin-bottom: 16px; }
.fw-600 { font-weight: 600; }
.ml-auto { margin-left: auto; }

/* ── Email UI Layout (CSS Vanilla) ───────────────────────── */
.section-email {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#section-email .crm-hero {
  min-height: 56px;
  overflow: visible;
}

.email-container {
  flex: 1;
  overflow: hidden;
  min-height: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.email-split {
  flex: 1;
  display: flex;
  min-height: 500px;
}

.email-list-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.email-list-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  gap: 8px;
}

.email-search-wrap {
  flex: 1;
  position: relative;
}

.email-search-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
}

.email-search-input {
  width: 100%;
  padding: 6px 12px 6px 32px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background-color: var(--surface);
  border: 1px solid var(--border);
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.email-search-input:focus {
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.2);
}

.email-btn-sync {
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.email-sync-progress {
  font-size: 11px;
  color: var(--muted);
  align-self: center;
}

.email-btn-compose {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s;
}

.email-filters {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.email-filter-btn {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  transition: all 0.2s;
}
.email-filter-btn:hover { background: var(--surface-2); }
.email-filter-btn.active { background: var(--surface-2); border-color: var(--border); color: var(--text); }

.email-list-inner {
  flex: 1;
  overflow-y: auto;
}

/* ── Email Resizer ───────────────────────────── */
.email-resizer {
  width: 10px;
  cursor: col-resize;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}
.email-resizer::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -5px; right: -5px;
  z-index: 11;
}
.resizer-handle {
  width: 2px;
  height: 100%;
  background-color: transparent;
  transition: background-color 0.2s;
}
.email-resizer:hover .resizer-handle,
body.is-resizing .resizer-handle {
  background-color: var(--accent);
}

body.is-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}
body.is-resizing iframe {
  pointer-events: none !important;
}

/* ── Email Viewer ───────────────────────────── */
.email-viewer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.email-viewer-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0.8;
}
.email-viewer-empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
  opacity: 0.3;
}
.email-viewer-empty p {
  font-size: 12px;
  font-weight: 500;
}

/* Cabeçalho do Email (Otimizado) */
.email-header-card {
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.email-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.email-header-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.email-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.email-viewer-subject {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eh-label {
  font-weight: 700;
  color: var(--muted);
}
.eh-val {
  font-weight: 500;
  color: var(--text-2);
}

.email-view-toggle { display: none; } /* Ocultado conforme plano */

/* Exibição limpa de email fallback */
.email-thread-plain {
  padding: 20px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface);
  flex: 1;
  overflow-y: auto;
}
.email-thread-plain hr {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 24px 0;
}

/* ── Compose drawer ──────────────────────────────────────── */
#section-email { position: relative; }
.compose-drawer {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 520px;
  max-width: calc(100% - 40px);
  max-height: calc(100vh - 100px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}
.compose-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card2);
  border-bottom: 1px solid var(--border);
}
.compose-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}
.compose-footer {
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  background: var(--card2);
}


#modal-fields .form-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 24px;
}
.empty-state-icon {
  font-size: 48px; color: var(--text-3); opacity: .35; margin-bottom: 12px;
}
.empty-state-title {
  font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px;
}
.empty-state-desc {
  font-size: 12px; color: var(--text-3); max-width: 320px; line-height: 1.5;
}

/* ── Score bar ───────────────────────────────────────────── */
.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.score-bar-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s;
}
.score-label {
  font-size: 11px;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}

/* ── Lead frio badge ─────────────────────────────────────── */
.badge-frio {
  background: rgba(56,189,248,.15);
  color: #38BDF8;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
}

/* ── Tags ────────────────────────────────────────────────── */
.tags-wrap { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag-chip {
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tag-chip .tag-del {
  cursor: pointer;
  opacity: .7;
  font-size: 10px;
}
.tag-chip .tag-del:hover { opacity: 1; }
.tag-input-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.tag-input-row input { flex: 1; }

/* ── Kanban board ────────────────────────────────────────── */
#crm-kanban {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 16px;
  height: calc(100vh - 160px);
  align-items: flex-start;
}
.kanban-col {
  flex-shrink: 0;
  width: 220px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}
.kanban-col-header {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.kanban-col-count {
  margin-left: auto;
  background: var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
}
.kanban-cards {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kanban-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.kanban-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.kanban-card-name {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kanban-card-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Agenda section ──────────────────────────────────────── */
.agenda-split {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .agenda-split { grid-template-columns: 1fr; }
}
.agenda-calendar-panel { min-width: 0; }
.agenda-list-panel { min-width: 0; min-height: 400px; }
.agenda-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: border-color .15s;
  margin-bottom: 10px;
}
.agenda-item:hover { border-color: var(--accent); }
.agenda-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.agenda-body { flex: 1; min-width: 0; }
.agenda-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.agenda-acao {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agenda-condo { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Calendar grid ──────────────────────────────────────── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
}
.cal-day {
  position: relative;
  text-align: center;
  font-size: 14px;
  padding: 10px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s, color .12s;
  color: var(--text);
}
.cal-day:hover { background: var(--card2); }
.cal-day.other-month { color: var(--muted); opacity: .4; }
.cal-day.today {
  font-weight: 700;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.cal-day.selected {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.cal-day .cal-dot {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.cal-day.selected .cal-dot { background: #fff; }
.cal-day .cal-dot-multi {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
}
.cal-dot-multi span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.cal-day.selected .cal-dot-multi span { background: #fff; }
.cal-day.holiday { color: var(--danger); font-weight: 600; }
.cal-day.holiday.selected { color: #fff; }
.cal-day .cal-dot.dot-alta { background: var(--alta); }
.cal-day .cal-dot.dot-media { background: var(--media); }
.cal-day .cal-dot.dot-baixa { background: var(--baixa); }
.cal-day.selected .cal-dot.dot-alta,
.cal-day.selected .cal-dot.dot-media,
.cal-day.selected .cal-dot.dot-baixa { background: #fff; }
.cal-day .cal-dot.dot-holiday { background: var(--danger); }

/* ── Templates panel ─────────────────────────────────────── */
.templates-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}
.templates-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--card2);
  border-bottom: 1px solid var(--border);
}
.templates-list { display: flex; flex-direction: column; }
.template-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .1s;
}
.template-row:last-child { border-bottom: none; }
.template-row:hover { background: var(--card2); }
.template-name { flex: 1; font-size: 13px; font-weight: 600; }
.template-sub { font-size: 11px; color: var(--muted); }
.template-del {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 13px;
  opacity: .6;
  transition: opacity .1s;
}
.template-del:hover { opacity: 1; }

/* ── CRM view toggle ─────────────────────────────────────── */
.btn-toggle-group { display: flex; gap: 4px; }
.btn-toggle-group .btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Funil horizontal (redesign) ──────────────────────────── */
.funil-rows { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.funil-row {
  display: grid; grid-template-columns: 100px 1fr 40px;
  align-items: center; gap: 10px;
}
.funil-stage-label { font-size: 11px; font-weight: 600; color: var(--text-2); text-align: right; white-space: nowrap; }
.funil-bar-wrap {
  display: flex; align-items: center; gap: 6px;
  height: 22px; background: var(--surface-2); border-radius: 4px; overflow: hidden;
  position: relative;
}
.funil-bar-track { flex: 1; height: 100%; overflow: hidden; }
.funil-bar {
  height: 100%; border-radius: 4px;
  display: flex; align-items: center; padding-left: 8px;
  font-size: 11px; font-weight: 700; color: #fff;
  transition: width .5s ease;
}
.funil-conv {
  font-size: 10px; font-weight: 700; color: var(--text-3);
  padding: 0 6px; white-space: nowrap; flex-shrink: 0;
}
.funil-stage-value { font-size: 12px; font-weight: 800; color: var(--text); text-align: right; }
.funil-conversion-chip {
  text-align: center; font-size: 10px; font-weight: 700;
  color: var(--text-3); padding: 2px 0; letter-spacing: .02em;
}

/* ── Documentos ──────────────────────────────────────────── */
.doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.doc-row:last-child { border-bottom: none; }
.doc-icon { font-size: 18px; flex-shrink: 0; }
.doc-name { flex: 1; font-weight: 500; word-break: break-all; }
.doc-meta { font-size: 11px; color: var(--muted); }
.doc-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s;
  font-size: 12px;
  color: var(--muted);
}
.doc-upload-zone:hover { border-color: var(--accent); color: var(--text); }

/* ── Campanha card ───────────────────────────────────────── */
.campanha-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.campanha-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.campanha-subject { font-size: 14px; font-weight: 700; flex: 1; }
.campanha-date { font-size: 11px; color: var(--muted); }
.campanha-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
}
.campanha-stat { display: flex; flex-direction: column; align-items: center; }
.campanha-stat-val { font-size: 18px; font-weight: 700; }
.campanha-stat-lbl { color: var(--muted); font-size: 10px; }

/* ── Bounces por condo ───────────────────────────────────── */
.condo-bounce-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.condo-bounce-row:last-child { border-bottom: none; }
.condo-bounce-name { width: 180px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.condo-bounce-bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.condo-bounce-bar-fill { height: 100%; border-radius: 3px; transition: width .4s; }
.condo-bounce-pct { width: 40px; text-align: right; font-weight: 700; }

/* ── WhatsApp button ─────────────────────────────────────── */
.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s;
}
.btn-wa:hover { opacity: .85; }

/* ═══════════════════════════════════════════════════════════
   NOVOS MÓDULOS — Imóveis · Agenda Eventos · Metas · WhatsApp
   ═══════════════════════════════════════════════════════════ */

/* Dashboard greeting */
.dash-greeting { font-size:20px;font-weight:700;margin-bottom:16px;color:var(--text); }

/* Modal genérico overlay */
.modal-overlay-generic {
  position:fixed;inset:0;background:var(--overlay);
  display:flex;align-items:center;justify-content:center;
  z-index:1000;padding:20px;box-sizing:border-box;
  animation: modalFadeIn .2s ease forwards;
}
.modal-overlay-generic .modal-box {
  animation: modalBoxIn .25s cubic-bezier(.4,0,.2,1) forwards;
}
.modal-lg { max-width:680px;width:100%; }
.modal-fields-grid {
  display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px;
}

/* Agenda layout (eventos) */
.agenda-layout {
  display:grid;grid-template-columns:340px 1fr;gap:16px;
}
@media(max-width:900px){ .agenda-layout{ grid-template-columns:1fr; } }

/* Calendário eventos */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-header-cell {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 0;
}
.cal-cell {
  min-height: 52px;
  border-radius: 8px;
  padding: 6px 4px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.cal-cell:hover {
  background: var(--surface-2, #F8FAFC);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  border-color: var(--border);
}
.cal-cell.hoje {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.05);
}
.cal-cell.selected {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  transform: scale(1.02);
}
.cal-cell.selected .cal-day-num {
  color: #fff !important;
}
.cal-cell.empty {
  cursor: default;
  opacity: 0.15;
  background: transparent;
  border: none;
}
.cal-cell.empty:hover {
  transform: none;
  box-shadow: none;
}
.cal-cell.has-event {
  background: var(--surface);
  border-color: rgba(0,0,0,0.06);
}
.cal-day-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.cal-event-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--dot-color, #ccc);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.cal-cell.selected .cal-event-dot {
  background-color: #fff !important;
}
.cal-cell.holiday {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.03);
}
.cal-cell.holiday .cal-day-num {
  color: var(--danger);
}
.cal-cell.holiday.selected {
  background: var(--danger) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.cal-cell.holiday.selected .cal-day-num {
  color: #fff !important;
}
.cal-holiday-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--danger);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.cal-cell.selected .cal-holiday-dot {
  background-color: #fff !important;
}

/* Timeline premium */
.agenda-timeline {
  position: relative;
  padding-left: 24px;
  margin-top: 10px;
}
.agenda-timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}
.agenda-timeline-item {
  position: relative;
  margin-bottom: 16px;
}
.agenda-timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--timeline-c, var(--border));
  z-index: 2;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.agenda-timeline-item:hover::before {
  transform: scale(1.3);
  background: var(--timeline-c, var(--border));
}
.agenda-timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--timeline-c, var(--border)) !important;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.agenda-timeline-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: var(--border);
}
.agenda-timeline-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
}

/* Evento item na lista */
.agenda-evento-item {
  padding:10px 12px;border-radius:8px;border:1px solid var(--border);
  margin-bottom:8px;background:var(--card2);
}

/* Metas */
.metas-cards-grid {
  display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px;
}
.meta-card .card-header { font-weight:700; }
.meta-row { margin-bottom:4px; }
.meta-bar-track {
  height:8px;background:var(--border);border-radius:4px;overflow:hidden;
}
.meta-bar-fill {
  height:100%;border-radius:4px;transition:width .5s;
}

/* WhatsApp */
.wpp-menu { }  /* uses .modal-overlay-generic */
.wpp-tmpl {
  display:flex;gap:10px;padding:10px 12px;border-radius:8px;
  border:1px solid var(--border);margin-bottom:8px;cursor:pointer;
  transition:border-color .15s,background .15s;
}
.wpp-tmpl:hover { border-color:var(--accent);background:var(--card2); }
.wpp-tmpl-num {
  width:22px;height:22px;border-radius:50%;background:var(--accent);
  color:#fff;font-size:11px;font-weight:700;display:flex;
  align-items:center;justify-content:center;flex-shrink:0;
}
.wpp-tmpl-text { font-size:13px;line-height:1.5;color:var(--text); }

/* ── Importar Base ────────────────────────────────────────── */
.base-dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 32px 20px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.base-dropzone:hover, .base-dropzone.dragover {
  border-color: var(--accent); background: rgba(59,130,246,.06);
}
.base-drop-icon { font-size: 32px; margin-bottom: 8px; }
.base-drop-label { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.base-drop-link { color: var(--accent); cursor: pointer; text-decoration: underline; }

.base-preview-stats {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.base-stat {
  flex: 1; min-width: 100px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase;
}
.base-stat-num { font-size: 28px; font-weight: 800; line-height: 1; }
.base-stat.atualizar .base-stat-num { color: #3B82F6; }
.base-stat.novos .base-stat-num     { color: #10B981; }
.base-stat.conflitos .base-stat-num { color: #F59E0B; }

.base-group { margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.base-group-header {
  padding: 8px 14px; font-size: 13px; font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.base-group-header.atualizar { background: rgba(59,130,246,.1); color: #3B82F6; }
.base-group-header.novos     { background: rgba(16,185,129,.1); color: #10B981; }
.base-group-header.conflitos { background: rgba(245,158,11,.1); color: #F59E0B; }
.base-group-list { max-height: 200px; overflow-y: auto; }
.base-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 14px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.base-row:last-child { border-bottom: none; }
.base-row-nome { font-weight: 500; color: var(--text); }
.base-row-meta { color: var(--muted); font-size: 12px; }
.text-warn { color: var(--warn) !important; }
.text-ok { color: var(--ok); }
.text-alta { color: var(--alta); }
.sh-animate-pulse { animation: sh-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }

/* ── Modo Privacidade ─────────────────────────────────────── */
/* Modo privacidade — borra todos os dados sensíveis em todas as seções */
.privacy-mode .section.active .card-body,
.privacy-mode .section.active .stat-value,
.privacy-mode .section.active .stat-number,
.privacy-mode .section.active .stats-grid,
.privacy-mode .section.active .table-wrap,
.privacy-mode .section.active #crm-split,
.privacy-mode .section.active #crm-kanban,
.privacy-mode .section.active #agenda-eventos-list,
.privacy-mode .section.active canvas,
.privacy-mode [data-private],
.privacy-mode .wpp-tmpl-text {
  filter: blur(6px);
  user-select: none;
  transition: filter .2s;
}
.privacy-mode .section.active .card-body:hover,
.privacy-mode .section.active .stat-value:hover,
.privacy-mode .section.active .stat-number:hover,
.privacy-mode .section.active .stats-grid:hover,
.privacy-mode .section.active .table-wrap:hover,
.privacy-mode .section.active #crm-split:hover,
.privacy-mode .section.active #crm-kanban:hover,
.privacy-mode .section.active #agenda-eventos-list:hover,
.privacy-mode .section.active canvas:hover,
.privacy-mode [data-private]:hover,
.privacy-mode .wpp-tmpl-text:hover {
  filter: blur(0);
}

/* ═══════════════════════════════════════════════════════════
   MODAL GENÉRICO (usado pelo Pipeline e futuras features)
   ═══════════════════════════════════════════════════════════ */

.modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: color .15s, background .15s;
}
.modal-close:hover { color: var(--text); background: var(--card2); }

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   PIPELINE DE LEADS — Kanban
   ═══════════════════════════════════════════════════════════ */

.pipeline-kanban {
  display: flex;
  flex-direction: row;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  align-items: flex-start;
  min-height: calc(100vh - 200px);
}

.pipeline-col {
  flex-shrink: 0;
  width: 260px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 210px);
  transition: border-color .15s;
}

.pipeline-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.pipeline-col-count {
  margin-left: auto;
  background: var(--border);
  color: var(--muted);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
}

.pipeline-cards {
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: background .15s;
}

.pipeline-cards.drag-over {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 0 0 10px 10px;
}

.pipeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: grab;
  user-select: none;
  transition: border-color .15s, box-shadow .15s, transform .1s, opacity .15s;
}

.pipeline-card:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
  transform: translateY(-1px);
}

.pipeline-card.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.pipeline-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.pipeline-card-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.pipeline-card-footer {
  font-size: 10px;
  color: var(--muted);
  padding-top: 6px;
  border-top: 1px solid var(--border);
  text-align: right;
}

/* ── Condomínios Premium ────────────────────────────────── */
.condo-sheet {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s;
}
.condo-sheet:hover { border-color: var(--accent); }

.condo-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 20%, transparent);
}

.condo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  padding: 24px;
}

.condo-info-box {
  padding: 12px;
  background: var(--card2);
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: background .15s;
}
.condo-info-box:hover { background: color-mix(in srgb, var(--card2) 80%, var(--accent)); }

.condo-info-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; }
.condo-info-value { font-size: 13px; font-weight: 600; color: var(--text); }

.amenities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 24px;
}
.amenity-item {
  font-size: 12px;
  padding: 5px 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}
.amenity-item.active {
  color: var(--ok);
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 8%, transparent);
}

/* ── Radar Classes ───────────────────────────────────────── */
.radar-view-toggle {
  display:flex; gap: 8px; margin-bottom:12px; background:color-mix(in srgb, var(--card) 40%, transparent); padding:4px; border-radius:8px; border:1px solid var(--border); width:max-content;
}
.radar-view-toggle button {
  padding: 6px 12px; border-radius:6px; border:none; background:transparent; color:var(--muted); cursor:pointer; font-size:13px; font-weight:600; transition:all 0.15s;
}
.radar-view-toggle button:hover {
  color: var(--text); background:var(--card);
}
.radar-view-toggle button.active {
  background:var(--accent); color:#fff; box-shadow:0 1px 3px rgba(0,0,0,.15);
}
.radar-card-base {
  font-size:11px; color:var(--muted); margin-top:8px; padding-top:8px; border-top:1px dashed var(--border);
}

/* ── CRM Phase 4 Classes ────────────────────────────────────── */
.crm-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.inline-exp-row {
  transition: all 0.2s ease-out;
}

.inline-exp-row td {
  border-top: none !important;
}

.tag-chip {
  padding: 2px 8px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
}

/* ── Radar Accordion Styles ───────────────────────────────── */
.radar-condo-details {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.radar-condo-details summary {
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.radar-condo-details summary::-webkit-details-marker {
  display: none;
}

.radar-mini-line {
  font-size: 11px;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
}

.radar-mini-line:last-child {
  border-bottom: none;
}

/* ══ Fase 3 — Dashboard ══════════════════════════════════════ */

.dash-greeting {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.dash-stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.dash-stats-grid > .dash-stat-card {
  flex: 1 1 calc(20% - 12px);
  min-width: 160px;
  max-width: 100%;
}
@media (max-width: 1100px) {
  .dash-stats-grid > .dash-stat-card { flex: 1 1 calc(33.333% - 12px); }
}
@media (max-width: 700px) {
  .dash-stats-grid > .dash-stat-card { flex: 1 1 calc(50% - 12px); }
}

.dash-stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column; gap: 4px; cursor: pointer;
}
.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.dash-stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.dash-stat-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.dash-stat-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-3);
}

.dash-stat-value {
  font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.1;
}

.dash-stat-delta {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.dash-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.dash-card-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  margin-top: 2px;
}

.dash-card-body {
  padding: 14px 18px;
}

.dash-main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 14px;
}
@media (max-width: 1024px) {
  .dash-main-grid { grid-template-columns: 1fr; }
}

.dash-pilar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dash-pilar-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
}

.dash-pilar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 900px) {
  .dash-pilar-grid { grid-template-columns: repeat(2, 1fr); }
}

.dash-pilar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-funil-bars {
  display: flex;
  gap: 8px;
  height: 180px;
  align-items: flex-end;
  padding: 0 8px;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
}
.dash-table th {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  text-align: left;
}
.dash-table td {
  font-size: 11px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  vertical-align: middle;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: var(--surface-2); }

.dash-bar-track {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}
.dash-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .5s;
}

.dash-visit-item {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.dash-visit-item:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.dash-visit-date {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-insight {
  background: var(--accent);
  border-radius: 8px;
  padding: 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.badge-hard {
  color: #EF4444;
  background: rgba(239,68,68,.1);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
}

.badge-soft {
  color: #F59E0B;
  background: rgba(245,158,11,.1);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
}

.badge-unknown {
  color: #94A3B8;
  background: rgba(148,163,184,.1);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVO MOBILE — To-do 9
   ═══════════════════════════════════════════════════════════ */

/* ≤768px: Sidebar off-screen, search hidden, grids compactos */
@media (max-width: 768px) {
  /* Sidebar: super-minimizada por padrão (56px) fixa à esquerda */
  #sidebar {
    position: relative;
    left: auto; top: auto; bottom: auto;
    width: 56px !important;
    min-width: 56px !important;
    transform: none !important;
    box-shadow: none;
    z-index: 10;
    transition: width .35s cubic-bezier(.4,0,.2,1);
  }
  /* Quando aberto pelo hamburguer/logo, vira um overlay flutuante completo */
  #sidebar.mobile-open {
    position: fixed !important;
    left: 0 !important; top: 0 !important; bottom: 0 !important;
    width: 260px !important;
    min-width: 260px !important;
    transform: translateX(0) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,.15) !important;
    z-index: 100 !important;
  }
  /* Forçar colapso físico em mobile caso esteja recolhido */
  #sidebar.collapsed {
    position: relative;
    width: 56px !important;
    min-width: 56px !important;
    transform: none !important;
    box-shadow: none !important;
  }
  #sidebar.collapsed.mobile-open {
    position: fixed !important;
    left: 0 !important; top: 0 !important; bottom: 0 !important;
    width: 260px !important;
    min-width: 260px !important;
    transform: translateX(0) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,.15) !important;
    z-index: 100 !important;
  }


  /* Overlay quando sidebar aberta */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 99;
  }
  .sidebar-overlay.active {
    display: block;
  }

  /* Topbar: botão hamburger visível */
  .sidebar-toggle-mobile {
    display: flex !important;
  }

  /* Topbar search: oculta em mobile */
  .topbar-search-center {
    display: none;
  }

  /* Stat cards: 2 colunas */
  #stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Dashboard grid: empilha */
  .dash-grid {
    grid-template-columns: 1fr !important;
  }
  .dash-main-grid {
    grid-template-columns: 1fr !important;
  }

  /* CRM split: Sliding Dual-Pane */
  #crm-split {
    flex-direction: row !important;
    width: 200% !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  #crm-list {
    width: 50% !important;
    min-width: 50% !important;
    max-width: 50% !important;
    border-right: none !important;
    border-bottom: none !important;
    max-height: none !important;
    flex-shrink: 0 !important;
  }
  .crm-resizer {
    display: none !important;
  }
  #crm-detail {
    width: 50% !important;
    min-width: 50% !important;
    max-width: 50% !important;
    flex-shrink: 0 !important;
  }
  #crm-split.detail-open {
    transform: translateX(-50%) !important;
  }
  .btn-back {
    display: flex;
  }


  /* Kanban: colunas menores */
  .kanban-col {
    width: 180px;
  }

  /* Pipeline: colunas menores */
  .pipeline-col {
    min-width: 160px;
  }

  /* Cards de agenda: empilham */
  .agenda-split {
    grid-template-columns: 1fr !important;
  }

  /* Formulários: 1 coluna */
  .form-grid-2 {
    grid-template-columns: 1fr !important;
  }

  /* Filtros: wrap */
  .filter-bar {
    flex-wrap: wrap;
  }

  /* Pilar grid: 2 colunas */
  .dash-pilar-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Imóveis grid: 1 coluna */
  .imoveis-grid {
    grid-template-columns: 1fr !important;
  }

  /* Disparo split: empilha */
  #disparo-split {
    grid-template-columns: 1fr !important;
  }

  /* Email split: empilha */
  #email-split {
    flex-direction: column !important;
  }

  /* Padding legad removido de .section */
}

/* ══ REDESIGN — Components adicionais ═══════════════════════ */

/* Insight card */
.insight-card {
  border-left: 3px solid var(--accent);
  background: var(--surface);
}
.insight-header {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 15px; border-bottom: 1px solid var(--border);
  font-size: 11.5px; font-weight: 700; color: var(--accent);
}
.insight-body {
  padding: 14px 15px; font-size: 12.5px; line-height: 1.6;
  color: var(--text-2);
}

/* Visita row */
.visita-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; transition: background .1s;
}
.visita-row:hover { background: var(--surface-2); }
.visita-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* CRM filter card */
.crm-filter-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow); overflow: hidden;
}
.crm-filter-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; font-size: 13px; color: var(--text-2);
  font-weight: 500; transition: background .1s;
}
.crm-filter-row:last-child { border-bottom: none; }
.crm-filter-row:hover { background: var(--surface-2); }
.crm-filter-chevron { font-size: 18px; color: var(--text-3); }
.crm-action-bar {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
}
.crm-view-tabs {
  display: flex; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px; gap: 1px;
}
.crm-view-tab {
  padding: 4px 10px; border-radius: 4px; border: none;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; cursor: pointer; color: var(--text-3);
  background: transparent; font-family: var(--font); transition: all .12s;
}
.crm-view-tab.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }

/* CRM table styles */
#crm-table-wrap table { width: 100%; border-collapse: collapse; }
#crm-table-wrap th {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3);
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap; text-align: left;
}
#crm-table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
#crm-table-wrap tbody tr:hover td { background: var(--surface-2); }
#crm-table-wrap tbody tr.selected td { background: var(--accent-soft); }
.crm-table th {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3);
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.crm-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.crm-table tr:hover td { background: var(--surface-2); }
.crm-table tr.selected td { background: var(--accent-soft); }
.crm-avatar-lg {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.crm-lead-name { font-weight: 700; font-size: 13px; color: var(--text); }
.crm-lead-condo { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* CRM split */
.crm-section-body { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
#crm-split {
  display: flex; gap: 16px;
  height: calc(100vh - var(--top-h, 50px) - 200px);
  min-height: 400px;
}
#crm-detail { width: 330px; min-width: 330px; }

/* Email split */
.email-split {
  display: flex; gap: 0; height: calc(100vh - 200px);
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: var(--surface);
}
.email-list-panel {
  width: 300px; min-width: 300px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.email-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
}
.email-row:hover { background: var(--surface-2); }
.email-row.unread .email-from { font-weight: 800; }
.unread-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.email-from { font-size: 12px; font-weight: 600; color: var(--text); }
.email-time { font-size: 10px; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.email-subject { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-snippet { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-viewer-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.email-viewer-header { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.email-viewer-body { flex: 1; overflow-y: auto; padding: 18px; font-size: 13px; line-height: 1.65; }

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 24px; text-align: center;
  color: var(--text-3);
}
.empty-state .material-symbols-outlined { font-size: 48px; margin-bottom: 12px; opacity: .4; }
.empty-state p { font-size: 13px; max-width: 280px; }

/* Condomínios hero */
#section-condominios.active { display: flex; flex-direction: column; }
.condos-hero { background: #0D1B2A; padding: 14px 24px; display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
.condos-hero-val { font-size: 20px; font-weight: 800; color: #fff; }
.condos-hero-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; color: rgba(255,255,255,.5); }
.condos-content { padding: 16px 24px; flex: 1; overflow-y: auto; }
.condos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1200px) and (min-width: 768px) {
  #condos-list {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
}
/* Card de condomínio — sem utilitários Tailwind, tudo em classes próprias
   (o build purgado do Tailwind saiu em 02/06/2026; ver <head> do index.html). */
.condos-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}
.condo-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; height: 100%;
  cursor: pointer;
}
.condo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.condo-card-photo {
  width: 100%; height: 100%; display: block;
  object-fit: cover; background: var(--surface-2);
}
.condo-card-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.2), rgba(0,0,0,0));
}
.condo-card-nophoto {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--surface-2); color: var(--text-3);
}
.condo-card-nophoto .material-symbols-outlined { font-size: 36px; opacity: .55; }
.condo-card-nophoto span:last-child { font-size: 10px; font-weight: 600; }

.condo-card-badges { position: absolute; top: 10px; z-index: 2; display: flex; gap: 4px; }
.condo-card-badges-left { left: 10px; flex-direction: column; align-items: flex-start; }
.condo-card-badges-right { right: 10px; }
.condo-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 4px;
  font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(3px); white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.condo-badge-glass   { background: rgba(255,255,255,.2); }
.condo-badge-blue    { background: rgba(59,130,246,.8); }
.condo-badge-amber   { background: rgba(245,158,11,.9); }
.condo-badge-red     { background: rgba(239,68,68,.8); }
.condo-badge-emerald { background: rgba(5,150,105,.9); }
.condo-badge-orange  { background: rgba(249,115,22,.9); }
.condo-badge-purple  { background: rgba(168,85,247,.9); }
.condo-badge-green   { background: rgba(22,163,74,.9); }

.condo-stat-box {
  min-width: 36px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(3px);
}
.condo-stat-lbl {
  font-size: 8px; font-weight: 700; text-transform: uppercase;
  color: #94a3b8; letter-spacing: .5px; line-height: 1; margin-bottom: 2px;
}
.condo-stat-val { font-size: 13px; font-weight: 900; color: #334155; line-height: 1; }
.condo-stat-val-alert { color: #dc2626; }

.condo-card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.condo-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 6px;
}
.condo-card-name {
  display: flex; align-items: center; gap: 4px; min-width: 0; margin: 0;
  font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.2;
}
.condo-card-name .material-symbols-outlined { font-size: 18px; color: var(--text-3); flex-shrink: 0; }
.condo-card-name-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.condo-card-bairro {
  flex-shrink: 0;
  font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--bg);
  border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px;
}
.condo-card-addr {
  font-size: 11px; font-weight: 500; color: var(--text-2);
  margin: 0 0 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.condo-metrics {
  width: 100%; border-collapse: collapse; table-layout: fixed;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  margin-bottom: 12px;
}
.condo-metrics td {
  width: 50%; padding: 7px 8px;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.condo-metrics td:first-child { border-right: 1px solid var(--border); }
.condo-metrics tr:last-child td { border-bottom: none; }
.condo-metrics tr:first-child td { background: var(--card2); }
.condo-metric-lbl {
  font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 2px;
}
.condo-metric-val {
  font-size: 12px; font-weight: 800; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.condo-metric-accent { color: var(--accent); }

.condo-amenities { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.condo-amenity {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 4px; font-size: 9px; font-weight: 700;
  background: var(--card2); color: var(--text-3); border: 1px solid var(--border);
}
.condo-amenity .material-symbols-outlined { font-size: 10px; }
.condo-amenity-more { font-size: 9px; font-weight: 700; color: var(--text-3); align-self: center; }

.condo-card-footer {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border); background: var(--card2); flex-shrink: 0;
}
.condo-card-act {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  padding: 12px 4px; border: none; border-right: 1px solid var(--border);
  background: transparent; color: var(--text-2);
  font-family: inherit; font-size: 10px; font-weight: 900;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .15s, color .15s;
}
.condo-card-act:last-child { border-right: none; }
.condo-card-act .material-symbols-outlined { font-size: 13px; }
.condo-card-act:hover { background: var(--accent); color: #fff; }
/* Cap 290: era `background: var(--text)` — no tema escuro o --text é quase
   branco e o botão virava uma barra branca dentro do card. */
.condo-card-act-primary { background: #0D1B2A; color: #fff; }
.condo-card-act-primary:hover { background: var(--accent); color: #fff; }
[data-theme="navy"] .condo-card-act-primary,
[data-theme="graphite"] .condo-card-act-primary { background: var(--accent); }
[data-theme="navy"] .condo-card-act-primary:hover,
[data-theme="graphite"] .condo-card-act-primary:hover { background: var(--accent-h); }

/* Config theme cards */
.theme-cards-row { display: flex; gap: 12px; }

/* ══ Classes ausentes (Seção 4 do plano) ════════════════════ */

/* CRM filters (legacy compat) */
.crm-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-select {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; font-weight: 600; background: var(--surface-2);
  color: var(--text); font-family: var(--font); cursor: pointer;
}
.crm-detail-wrap { width: 330px; min-width: 330px; }

/* ── Ficha do proprietário — Cap 303 ─────────────────────── */
.lead-name { font-size: 16px; font-weight: 700; color: var(--text); }
.lead-subtitle { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.lead-score-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 12px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
}
.lead-score-dot { width: 6px; height: 6px; border-radius: 50%; }

.lead-badge {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 10px; vertical-align: middle;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
  margin-left: 6px;
}
.lead-badge-pilar {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.lead-warn-banner {
  margin-bottom: 10px; padding: 8px 12px; border-radius: 6px; font-size: 12px;
  background: color-mix(in srgb, var(--media, #f59e0b) 14%, transparent);
  border-left: 3px solid var(--media, #f59e0b); color: var(--text);
}

.lead-tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--border);
  margin: 10px 0 12px; overflow-x: auto;
}
.lead-tab {
  padding: 7px 13px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: var(--text-3); cursor: pointer; border: none; background: transparent;
  font-family: var(--font); border-bottom: 2px solid transparent; transition: color .12s;
}
.lead-tab:hover:not(.active) { color: var(--text); }
.lead-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  text-decoration: none; max-width: 100%;
}
.contact-chip a { color: var(--text); text-decoration: none; }
.contact-chip:hover { border-color: var(--accent); }
.chip-icon { font-size: 15px; color: var(--text-3); }
.chip-action {
  margin-left: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; text-decoration: none;
}
.chip-action-wa {
  background: color-mix(in srgb, var(--ok) 18%, transparent);
  color: var(--ok);
}

.valor-mercado-box {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2);
}
.valor-mercado-valor {
  font-size: 17px; font-weight: 700; color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}
.valor-mercado-fonte { font-size: 11px; color: var(--text-3); margin-top: 3px; }

/* Detail tabs */
.detail-tab {
  padding: 6px 12px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-3); cursor: pointer; border: none;
  background: transparent; font-family: var(--font);
  border-bottom: 2px solid transparent; transition: all .12s;
}
.detail-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.detail-section-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-3); margin: 12px 0 6px;
}

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 20px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px;
  width: 2px; background: var(--border);
}
.timeline-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 0; position: relative;
}
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
  position: absolute; left: -17px; top: 9px; z-index: 1;
}
.theme-card { border: 2px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; width: 160px; transition: border-color .15s; }
.theme-card.active { border-color: var(--accent); }
.theme-card-preview { height: 80px; display: flex; }
.theme-preview-clean { background: #EEF2F7; }
.theme-preview-navy { background: #071424; }
.theme-preview-graphite { background: #10161E; }
.tp-sidebar { width: 32px; flex-shrink: 0; }
.theme-preview-clean .tp-sidebar { background: #fff; border-right: 1px solid #DDE4EF; }
.theme-preview-navy .tp-sidebar { background: #050F1C; }
.theme-preview-graphite .tp-sidebar { background: #0D131C; }
.theme-card-label { padding: 8px 10px; font-size: 12px; font-weight: 600; display: flex; justify-content: space-between; }
.theme-check { color: var(--accent); }

/* ≤900px: splits intermediários empilham */
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  #crm-split { flex-direction: column; }
  #crm-list { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid var(--border); max-height: 50%; }
  .agenda-split { grid-template-columns: 1fr; }
  .dash-pilar-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ─────────────────────────────────────────────────────────
   Cap 20b — Classes novas (merge de 06/05/2026)
   Blast Radius L0 — apenas CSS, sem quebra de existentes
   ───────────────────────────────────────────────────────── */

/* Componentes Globais */
.progress-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px; box-shadow: var(--shadow); }
.progress-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 12px 0 6px; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width .4s cubic-bezier(.4,0,.2,1); }
.scan-anim { animation: scanpulse 1.5s ease-in-out infinite; }
@keyframes scanpulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* Dashboard Grid 2-colunas */
.dash-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-col-main { display: flex; flex-direction: column; gap: 14px; }
.dash-col-side { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 900px) { .dash-2col { grid-template-columns: 1fr; } }

/* CRM Split & Resizer */
.crm-split { display: flex; gap: 12px; height: calc(100vh - var(--top-h) - 210px); min-height: 400px; }
.crm-resizer { width: 5px; cursor: col-resize; background: transparent; flex-shrink: 0; transition: background .15s; position: relative; z-index: 5; }
.crm-resizer:hover, .crm-resizer.active { background: var(--accent); }
.crm-resizer::before { content: ""; position: absolute; left: -2px; right: -2px; top: 0; bottom: 0; }
.crm-table-wrap { flex: 1; min-width: 0; overflow: hidden; }
.crm-table-wrap .data-table { table-layout: fixed; }
.crm-table-wrap .data-table th, .crm-table-wrap .data-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-table-wrap .data-table td.cell-name { white-space: normal; }
.detail-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.detail-tabs { display: flex; border-bottom: 1px solid var(--border); }
.detail-body { flex: 1; padding: 12px 14px; overflow-y: auto; }

/* E-mails */
.email-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.email-row-meta { display: flex; align-items: center; gap: 4px; }
.email-list-header { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.email-list-inner { flex: 1; overflow-y: auto; }
.email-filters { display: flex; gap: 4px; padding: 7px 10px; border-bottom: 1px solid var(--border); overflow-x: auto; background: var(--surface); }
.email-viewer-inner { display: flex; flex-direction: column; height: 100%; }
.email-viewer-subject { font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.email-viewer-meta { font-size: 11.5px; color: var(--text-2); display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.email-reply-box { padding: 10px 18px 14px; border-top: 1px solid var(--border); }

/* Sidebar & Layout */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.section-content { padding: 18px; display: flex; flex-direction: column; gap: 14px; }

/* Bounce tags */
.bounce-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--font); transition: all .15s; line-height: 1.4; }
.bounce-tag-ok   { background: rgba(52,211,153,.12); color: #34D399; border: 1px solid rgba(52,211,153,.25); }
.bounce-tag-warn { background: rgba(245,158,11,.12);  color: #F59E0B; border: 1px solid rgba(245,158,11,.25); }
.bounce-tag-crit { background: rgba(239,68,68,.12);   color: #EF4444; border: 1px solid rgba(239,68,68,.25); }

/* Drawer edição condomínio */
.editar-ficha-drawer         { position: fixed; inset: 0; z-index: 999; display: flex; justify-content: flex-end; }
.editar-ficha-drawer-backdrop{ position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.editar-ficha-drawer-panel   { position: relative; width: 420px; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; height: 100%; box-shadow: -8px 0 40px rgba(0,0,0,.25); overflow: hidden; }

/* Radar row */
.radar-row { display: grid; grid-template-columns: 1fr 130px 100px 100px; align-items: center; gap: 8px; padding: 7px 14px; border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); transition: background .1s; }
.radar-row:hover   { background: var(--surface-2); }
.radar-row:last-child { border-bottom: none; }

/* Cap 31 — Respostas Hub */
.filter-chips-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-chip { padding: 4px 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 13px; transition: all .15s; }
.filter-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.filter-chip:hover:not(.active) { background: var(--surface-2); }

.resposta-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 8px; transition: box-shadow .15s; }
.resposta-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.resposta-intent-badge { padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.resposta-intent-badge.positivo  { background: #22c55e22; color: #16a34a; }
.resposta-intent-badge.neutro    { background: #f59e0b22; color: #d97706; }
.resposta-intent-badge.negativo  { background: #ef444422; color: #dc2626; }
.resposta-intent-badge.convertido { background: #3b82f622; color: #2563eb; }

/* Cap 303 — badges de identidade do card de resposta (canal, código SH, telefone) */
.resp-badge {
  padding: 2px 7px; border-radius: 12px; font-size: 10.5px; font-weight: 600;
  white-space: nowrap; border: 1px solid var(--border); color: var(--text-2);
  background: var(--surface-2);
}
.resp-badge-wpp {
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}
.resp-badge-email { color: var(--text-3); }
.resp-badge-sh {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.resp-badge-tel { padding: 2px 5px; }

@media (max-width: 900px) {
  .camp-resposta-grid { grid-template-columns: 1fr !important; }
}

.camp-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.camp-tab { padding: 8px 16px; border: none; background: transparent; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; font-size: 14px; transition: color .15s; }
.camp-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.camp-tab:hover:not(.active) { color: var(--text); }

/* Por Condomínio — checkboxes e cabeçalhos de seção (Elegíveis/Já-captados/Excluídos) */
.cc-check {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; aspect-ratio: 1 / 1; flex-shrink: 0; margin: 0; padding: 0;
  border: 1.5px solid var(--border); border-radius: 4px; background: var(--surface);
  cursor: pointer; position: relative; transition: background .12s, border-color .12s;
}
.cc-check:checked { background: var(--ok); border-color: var(--ok); }
.cc-check:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.cc-check-accent:checked { background: var(--accent); border-color: var(--accent); }

.cc-section-header {
  padding: 11px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cc-section-header .material-symbols-outlined { font-size: 16px; }
.cc-section-header .cc-section-count { font-weight: 400; text-transform: none; letter-spacing: normal; color: var(--text-3); margin-left: 2px; }
.cc-section-header.cc-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); border-bottom-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.cc-section-header.cc-accent { color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-bottom-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.cc-section-header.cc-danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border-bottom-color: color-mix(in srgb, var(--danger) 30%, transparent); }

/* ── Vínculo campanha ↔ condomínio: selo de origem + linhas da auditoria ── */
.cc-selo {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; line-height: 1.4;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent;
}
.cc-selo-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.cc-selo-sugerido { color: var(--warn, #f59e0b); background: color-mix(in srgb, var(--warn, #f59e0b) 12%, transparent); border-color: color-mix(in srgb, var(--warn, #f59e0b) 35%, transparent); }
.cc-selo-alerta { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: color-mix(in srgb, var(--danger) 35%, transparent); white-space: normal; }
.cc-selo-venda { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }

.cc-aud-linha {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 15px; border-bottom: 1px solid var(--border);
}
.cc-aud-linha:last-child { border-bottom: none; }

/* ── Campanhas: página de altura fixa, rolagem por dentro dos cards ──
   Sem isso o grid do Resumo cresce com o conteúdo e empurra a página inteira. */
#camp-view-resumo { overflow: hidden; }
#camp-resumo-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#camp-view-resumo > #campanhas-progress-banner,
#camp-view-resumo > #campanhas-gmail-preview,
#camp-resumo-body > .card { flex-shrink: 0; }
#camp-view-resumo > #campanhas-criar-panel { flex-shrink: 0; max-height: 100%; overflow-y: auto; }
#camp-view-resumo .camp-grid-resumo {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px; flex: 1; min-height: 0; align-items: stretch;
}
#camp-view-resumo .camp-grid-resumo > .card {
  display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
#camp-view-resumo .camp-grid-resumo > .card > .card-body {
  flex: 1; min-height: 0; overflow-y: auto;
}
/* Última linha de qualquer lista não deixa borda solta no rodapé do card.
   !important porque as linhas são geradas com border-bottom inline no JS. */
#camp-view-resumo .camp-grid-resumo > .card > .card-body > :last-child { border-bottom: none !important; }

#cc-tab-body > .campanha-card:last-child { margin-bottom: 0; }

.cc-th { padding: 8px 12px; font-weight: 700; font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

/* GeoSampa — drag-and-drop reorder */
tr.geo-drop-target { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft) !important; }

/* ═══════════════════════════════════════════════════════════
   Dashboard Refino v2 — New Classes
   Blast Radius L0 — CSS only, no breaking changes
   ═══════════════════════════════════════════════════════════ */

/* ── Nav icon chip (colored sidebar icons) ─────────── */
.nav-icon-chip {
  width: var(--chip-size, 28px); height: var(--chip-size, 28px);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform .14s, box-shadow .14s;
  background: color-mix(in srgb, var(--nav-c, var(--accent)) 24%, var(--surface));
  color: var(--nav-c, var(--accent));
}
.nav-icon-chip .material-symbols-outlined { font-size: var(--chip-icon, 18px); font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.nav-item:hover .nav-icon-chip { transform: scale(1.06); }
.nav-item.active .nav-icon-chip { box-shadow: 0 0 0 2px var(--surface), 0 2px 6px color-mix(in srgb, var(--nav-c, var(--accent)) 40%, transparent); }

/* Nav item with --nav-c color tinting */
.sidebar .nav-item[style*="--nav-c"] {
  background: color-mix(in srgb, var(--nav-c) 4%, var(--surface));
  border-radius: 8px; border-left: none; margin: var(--item-gap, 3px) 8px !important;
  padding: 6px !important;
}
.sidebar .nav-item[style*="--nav-c"]:hover { background: color-mix(in srgb, var(--nav-c) 8%, var(--surface)); }
.sidebar .nav-item[style*="--nav-c"].active {
  background: color-mix(in srgb, var(--nav-c) 14%, var(--surface));
  font-weight: 800; box-shadow: 0 1px 3px color-mix(in srgb, var(--nav-c) 18%, transparent);
}

/* Reorder da sidebar (arrastar e soltar) */
.sidebar .nav-item:active { cursor: grabbing; }
.sidebar .nav-item.is-dragging { opacity: .5; cursor: grabbing; }

/* Nested sidebar submenu (ex.: Resumo/Por Condomínio/Disparo/Radar sob Campanhas) */
.nav-submenu {
  display: flex; flex-direction: column;
  margin: 2px 8px 4px 24px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
  gap: 1px;
}
.nav-submenu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 500; color: var(--text-2);
  cursor: pointer; white-space: nowrap;
  transition: background .12s, color .12s;
}
.nav-submenu-item .material-symbols-outlined { font-size: 15px; }
.nav-submenu-item:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.nav-submenu-item.active {
  color: var(--nav-c, var(--accent)); font-weight: 700;
  background: color-mix(in srgb, var(--nav-c, var(--accent)) 9%, transparent);
}
#sidebar.collapsed .nav-submenu { display: none !important; }

/* NOVO badge on nav items */
.nav-item.new-flag::after {
  content: "NOVO"; position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  font-size: 8px; font-weight: 800; letter-spacing: .5px;
  background: var(--nav-c, var(--accent)); color: #fff;
  padding: 1px 4px; border-radius: 3px;
}
.sidebar.collapsed .nav-item.new-flag::after { display: none; }

/* ── Stat-cards grid (responsive columns) ──────────── */
.dash-stats-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(var(--cols, 5), 1fr);
  grid-auto-rows: minmax(96px, auto); margin-bottom: 14px;
}
.mini-stats-grid {
  max-height: 334px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.mini-stats-grid::-webkit-scrollbar {
  width: 6px;
}
.mini-stats-grid::-webkit-scrollbar-track {
  background: transparent;
}
.mini-stats-grid::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 3px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 13px 14px; box-shadow: var(--shadow);
  position: relative; transition: all .15s; cursor: pointer;
  grid-column: span var(--span, 1);
}
.stat-card:hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); transform: translateY(-1px); }
.stat-card:hover .nav-hint { opacity: 1; }
.stat-card.is-dragging { opacity: .4; }
.stat-card.is-drop-target { border-style: dashed; border-color: var(--accent); }
.stat-card.ag-selected {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4), var(--shadow) !important;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(59, 130, 246, 0.08) 100%) !important;
}
.stat-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.stat-icon { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon .material-symbols-outlined { font-size: 17px; }
.stat-tag { font-size: 9px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; }
.stat-tag.t-accent { background: var(--accent-soft); color: var(--accent); }
.stat-tag.t-warn { background: rgba(245,158,11,.15); color: #B45309; }
.stat-tag.t-crit { background: rgba(239,68,68,.13); color: #B91C1C; }
.stat-tag.t-ok { background: rgba(16,185,129,.13); color: #047857; }
.stat-tag.t-muted { background: var(--surface-2); color: var(--text-3); }
.stat-label { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); margin-bottom: 3px; }
.stat-value-row { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-meta { font-size: 10.5px; color: var(--text-3); margin-top: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Drag handles & nav hint */
.stat-card .resize-handle {
  position: absolute; right: 0; top: 0; bottom: 0; width: 8px;
  cursor: ew-resize; opacity: 0; background: linear-gradient(90deg, transparent, rgba(27,79,216,.15));
}
.stat-card:hover .resize-handle { opacity: 1; }
.nav-hint {
  position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%);
  font-size: 9.5px; font-weight: 700; color: #fff; background: var(--text);
  padding: 3px 7px; border-radius: 4px; white-space: nowrap;
  opacity: 0; transition: opacity .15s; pointer-events: none; letter-spacing: .3px; z-index: 5;
}
.nav-hint::before {
  content: ""; position: absolute; left: 50%; top: -3px;
  transform: translateX(-50%) rotate(45deg); width: 6px; height: 6px; background: var(--text);
}

/* ── Trash zone (replaces + Adicionar during drag) ─── */
.trash-zone {
  display: none; align-items: center; gap: 7px;
  padding: 6px 14px; background: rgba(239,68,68,.08);
  color: var(--crit, #EF4444); border: 1.5px dashed var(--crit, #EF4444);
  border-radius: 8px; font-size: 11.5px; font-weight: 700;
  cursor: default; transition: all .15s;
}
.trash-zone .material-symbols-outlined { font-size: 18px; font-variation-settings: 'FILL' 1, 'wght' 500; }
body.dragging-stat .trash-zone { display: inline-flex; }
body.dragging-stat .add-card-btn { display: none; }
.trash-zone.is-over {
  background: var(--crit, #EF4444); color: #fff;
  border-style: solid; transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(239,68,68,.35);
}

/* ── Add card dropdown ─────────────────────────────── */
.add-card-wrap { position: relative; }
.add-card-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; color: var(--accent); border: 1px dashed var(--accent);
  border-radius: 6px; padding: 5px 11px; font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: var(--font);
}
.add-card-btn:hover { background: var(--accent-soft); }
.add-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 320px; max-height: 380px; background: var(--bg) !important;
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18); z-index: 30;
  overflow: hidden; display: none; flex-direction: column;
}
.add-card-wrap.open .add-dropdown { display: flex; }
.add-dd-head {
  padding: 11px 14px 8px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.add-dd-list { overflow-y: auto; padding: 4px; }
.add-dd-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: 7px; cursor: pointer; transition: background .12s;
}
.add-dd-item:hover { background: var(--surface-2); }
.add-dd-item .ico {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.add-dd-item .ico .material-symbols-outlined { font-size: 16px; }
.add-dd-item .info { flex: 1; min-width: 0; }
.add-dd-item .name { font-size: 11.5px; font-weight: 700; color: var(--text); }
.add-dd-item .desc { font-size: 10.5px; color: var(--text-3); line-height: 1.35; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-dd-item .plus { color: var(--accent); font-size: 18px; font-weight: 800; }

/* ── Dashboard greeting & tabs ─────────────────────── */
.dash-greeting-row {
  display: flex; align-items: center; gap: 18px; margin-bottom: 14px; flex-wrap: wrap;
}
.dash-greeting-text { font-size: 15px; color: var(--text); flex-shrink: 0; }
.dash-greeting-text .name { font-weight: 800; }
.dash-greeting-text .muted { opacity: .5; }
.dash-greeting-divider { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; }
.dash-tabs { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.dash-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  color: var(--text-3); background: transparent; border: none;
  border-radius: 6px; cursor: pointer; font-family: var(--font);
  transition: all .12s;
}
.dash-tab .material-symbols-outlined { font-size: 14px; }
.dash-tab:hover { color: var(--text-2); background: var(--surface-2); }
.dash-greeting-spacer { flex: 1; }

/* ── Columns Slider Styles ── */
.dash-cols-slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
}
#cols-range {
  -webkit-appearance: none;
  width: 70px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
}
#cols-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform .1s, background .15s;
}
#cols-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-light, #3B82F6);
}

/* ── Pulsing AO VIVO Dot & Badge Animations ── */
@keyframes live-pulse-grow {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}
.live-pulse-dot {
  animation: live-pulse-grow 2s infinite;
}

/* ── Pilar panel (expanded) ────────────────────────── */
.pilar-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow);
  margin-bottom: 14px; overflow: hidden;
}
.pilar-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
}
.pilar-head-l {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-2);
}
.pilar-head-l .material-symbols-outlined { font-size: 15px; color: var(--accent); }
.pilar-head-l .live {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(16,185,129,.12); color: var(--ok, #10B981);
  padding: 2px 8px; border-radius: 10px; font-size: 9px; letter-spacing: .5px;
}
.pilar-head-l .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok, #10B981); box-shadow: 0 0 0 3px rgba(16,185,129,.25);
  animation: pilar-pulse 1.8s infinite;
}
@keyframes pilar-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.pilar-head-r { font-size: 11px; font-weight: 700; color: var(--accent); cursor: pointer; }
.pilar-metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; }
.pilar-metric {
  padding: 12px 14px; border-right: 1px solid var(--border);
  cursor: pointer; transition: background .12s; position: relative;
}
.pilar-metric:last-child { border-right: none; }
.pilar-metric:hover { background: var(--surface-2); }
.pilar-metric-label {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-3); margin-bottom: 4px;
}
.pilar-metric-value { font-size: 18px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.pilar-metric-delta { font-size: 10px; font-weight: 600; margin-top: 3px; }
.pilar-metric-delta.up { color: var(--ok, #10B981); }
.pilar-metric-delta.down { color: var(--crit, #EF4444); }
.pilar-metric-delta.muted { color: var(--text-3); }
.pilar-spark { position: absolute; right: 8px; top: 10px; width: 42px; height: 18px; opacity: .55; }

/* ── Extras grid (funil, bounces, IA, etc.) ────────── */
.extras-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 12px; margin-top: 14px; }
.extras-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.x-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: all .15s; position: relative;
}
.x-card:hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.x-card-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.x-card-title {
  font-size: 11.5px; font-weight: 800; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .6px;
  display: flex; align-items: center; gap: 7px;
}
.x-card-title .material-symbols-outlined { font-size: 15px; color: var(--accent); }
.x-card-link { font-size: 10.5px; font-weight: 700; color: var(--accent); cursor: pointer; }
.x-card-body { padding: 12px 14px; }

/* Funil rows */
.fun-row { display: grid; grid-template-columns: 96px 1fr 28px; align-items: center; gap: 8px; margin-bottom: 7px; }
.fun-row:last-child { margin-bottom: 0; }
.fun-lbl { font-size: 11px; color: var(--text-2); text-align: right; }
.fun-bar { position: relative; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.fun-fill { height: 100%; border-radius: 3px; }
.fun-n { font-size: 11px; font-weight: 800; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Origem rows */
.org-row { margin-bottom: 8px; }
.org-row:last-child { margin-bottom: 0; }
.org-head { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 3px; }
.org-head .org-lbl { font-weight: 600; color: var(--text-2); }
.org-head .org-n { color: var(--text-3); }
.org-track { height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.org-fill { height: 100%; }

/* AI Insight card */
.ai-card { background: linear-gradient(135deg, var(--surface), var(--accent-soft)); border: 1px solid var(--border); border-left: 3px solid var(--accent); }
.ai-head {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px 4px;
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.1px; color: var(--accent);
}
.ai-head .material-symbols-outlined { font-size: 14px; }
.ai-body { padding: 0 14px 12px; font-size: 11.5px; line-height: 1.5; color: var(--text-2); }
.ai-body b { color: var(--text); font-weight: 700; }
.ai-cta { margin-top: 8px; font-size: 10.5px; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: 3px; }

/* Alert rows */
.alert-row {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 14px; border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  cursor: pointer; transition: background .12s;
}
.alert-row:last-child { border-bottom: none; }
.alert-row:hover { background: var(--surface-2); }
.alert-ico { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alert-ico .material-symbols-outlined { font-size: 14px; }
.alert-ico.crit { background: rgba(239,68,68,.13); color: var(--crit, #EF4444); }
.alert-ico.warn { background: rgba(245,158,11,.13); color: var(--warn, #F59E0B); }
.alert-ico.info { background: rgba(99,102,241,.13); color: var(--info, #6366F1); }
.alert-ico.ok { background: rgba(16,185,129,.13); color: var(--ok, #10B981); }
.alert-body { flex: 1; min-width: 0; }
.alert-t { font-size: 11.5px; font-weight: 700; color: var(--text); line-height: 1.3; }
.alert-m { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.alert-m b { color: var(--text-2); font-weight: 700; }

/* Visit rows */
.visit-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent); }
.visit-row:last-child { border-bottom: none; }
.visit-icon { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.visit-icon .material-symbols-outlined { font-size: 14px; }
.visit-info { flex: 1; min-width: 0; }
.visit-name { font-size: 11.5px; font-weight: 700; color: var(--text); line-height: 1.2; }
.visit-sub { font-size: 10px; color: var(--text-3); font-weight: 500; }
.visit-when { font-size: 10px; font-weight: 700; color: var(--text-2); white-space: nowrap; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }

/* Bounce table */
.bnc-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.bnc-table th { padding: 6px 14px; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); background: var(--surface-2); text-align: left; border-bottom: 1px solid var(--border); }
.bnc-table td { padding: 7px 14px; border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent); }
.bnc-table tr:last-child td { border-bottom: none; }
.bnc-table .who { font-weight: 700; color: var(--text); font-size: 11px; }
.bnc-table .who-sub { font-size: 10px; color: var(--text-3); font-weight: 500; }
.bnc-badge { display: inline-block; font-size: 9.5px; font-weight: 800; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .4px; }
.bnc-badge.warn { background: rgba(245,158,11,.15); color: #B45309; }
.bnc-badge.crit { background: rgba(239,68,68,.13); color: #B91C1C; }
.bnc-link { color: var(--accent); font-weight: 700; font-size: 10.5px; cursor: pointer; }

/* ── Topbar user block ─────────────────────────────── */
.user-block { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; margin-right: 2px; }
.user-block .user-name { font-size: 11.5px; font-weight: 700; color: var(--text); white-space: nowrap; }
.user-block .user-role { font-size: 9.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }

/* ── Responsive: stat grid & extras ────────────────── */
@media (max-width: 1200px) { .dash-stats-grid { --cols: 4; } }
@media (max-width: 900px) {
  .dash-stats-grid { --cols: 3; }
  .extras-grid { grid-template-columns: 1fr; }
  .pilar-metrics { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .dash-stats-grid { --cols: 2; }
  .pilar-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* ── Radar de Preços (Cap 39) ──────────────────────────────── */
.rp-loading {
  text-align: center;
  padding: 24px;
  color: var(--text-3);
  font-size: 0.88rem;
}
.rp-valor {
  font-weight: 600;
  color: var(--text);
}
.rp-condo-cell {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
#rp-tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
#rp-tbody tr:hover {
  background: var(--surface-2);
}
#rp-tbody td {
  padding: 9px 12px;
  color: var(--text-2);
  font-size: 0.85rem;
}
#rp-tbody td:first-child { color: var(--text); }


/* ───────────────────────────────────────────────────────────
 * Cap 47 — WhatsApp Tier 2 (Inbox + Chats + Approval)
 * ─────────────────────────────────────────────────────────── */
.wpp-cat-chip { padding:3px 7px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text-2);font-size:10px;cursor:pointer;transition:all .15s;white-space:nowrap;letter-spacing:-.02em }
.wpp-cat-chip:hover { background:var(--surface-2) }
.wpp-cat-chip.wpp-cat-active { background:var(--accent);color:#fff;border-color:var(--accent) }
.wpp-cat-select { font-size:10px;padding:2px 4px;border-radius:6px;border:1px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer;text-transform:uppercase;letter-spacing:.04em;font-weight:600 }

.wpp-header-name { display:inline-block;vertical-align:middle;max-width:min(60vw,380px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap }

.wpp-chat-item { padding:10px 12px;border-bottom:1px solid var(--border);cursor:pointer;display:flex;flex-direction:column;gap:2px;transition:background .12s }
.wpp-chat-item:hover { background:var(--surface-2) }
.wpp-chat-item.wpp-chat-active { background:var(--accent-soft);border-left:3px solid var(--accent) }
.wpp-chat-item-row { display:flex;justify-content:space-between;align-items:center;gap:6px;width: 100% !important; min-width: 0 !important; }
.wpp-chat-item-name { font-weight:600;font-size:13px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex: 1 !important; min-width: 0 !important; }
.wpp-chat-item-time { font-size:10px;color:var(--text-3);flex-shrink:0 }
.wpp-chat-item-preview { font-size:11px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap }
.wpp-chat-item-meta { display:flex;justify-content:space-between;align-items:center;gap:6px;margin-top:2px;min-height:16px }
.wpp-cat-badge { font-size:9px;padding:1px 5px;border-radius:8px;font-weight:600;text-transform:uppercase }
.wpp-cat-badge.proprietario   { background:#3b82f622;color:#2563eb }
.wpp-cat-badge.lead           { background:#06b6d422;color:#0891b2 }
.wpp-cat-badge.corretor_pilar { background:#8b5cf622;color:#7c3aed }
.wpp-cat-badge.corretor       { background:#f59e0b22;color:#d97706 }
.wpp-cat-badge.zelador        { background:#22c55e22;color:#16a34a }
.wpp-cat-badge.bot_radar_pilar{ background:#11182722;color:#111827 }
.wpp-cat-badge.desconhecido   { background:#94a3b822;color:#475569 }
.wpp-unread-dot { background:#22c55e;color:#fff;font-size:10px;padding:1px 6px;border-radius:9px;font-weight:700;min-width:18px;text-align:center }
/* Código do imóvel na Pilar (SH6004) — marca que o número é dono de imóvel da carteira */
.wpp-pilar-badge {
  display:inline-block; font-size:9px; padding:1px 5px; border-radius:8px; font-weight:700;
  letter-spacing:.02em; background:#0ea5e922; color:#0284c7; margin-left:4px;
  font-family:'JetBrains Mono', monospace;
}

.wpp-msg-bubble {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.45;
  word-wrap: break-word;
  position: relative;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.wpp-msg-recv {
  background: #FFFFFF;
  color: #111B21;
  border: none;
  align-self: flex-start;
  border-top-left-radius: 0;
  margin-left: 10px;
}

.wpp-msg-recv::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 0px solid transparent;
  border-right: 8px solid #FFFFFF;
  border-bottom: 8px solid transparent;
}

.wpp-msg-sent {
  background: #D9FDD3;
  color: #111B21;
  align-self: flex-end;
  border-top-right-radius: 0;
  margin-right: 10px;
}

.wpp-msg-sent::before {
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-top: 0px solid transparent;
  border-left: 8px solid #D9FDD3;
  border-bottom: 8px solid transparent;
}

.wpp-msg-ts {
  display: block;
  font-size: 10px;
  color: rgba(17, 27, 33, 0.45);
  margin-top: 4px;
  text-align: right;
  user-select: none;
}

.wpp-msg-sent .wpp-msg-ts {
  color: rgba(17, 27, 33, 0.4);
}

.wpp-msg-tick {
  font-size: 14px !important;
  vertical-align: middle;
  margin-left: 3px;
}

.wpp-tick-read {
  color: #53BDEB;
}

.wpp-tick-error {
  color: #EF4444;
}

#wpp-chat-msgs {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  gap: 4px;
  background-color: #efeae2;
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 0);
  background-size: 24px 24px;
}
.wpp-msg-day { text-align:center;font-size:10px;color:var(--text-3);margin:8px 0;padding:2px 8px;background:var(--surface-2);border-radius:10px;align-self:center;text-transform:uppercase;letter-spacing:.5px }
.wpp-msg-img { max-width:280px;max-height:280px;border-radius:6px;display:block;cursor:pointer;box-shadow:0 1px 2px 0 rgba(0,0,0,.05);transition:filter .15s cubic-bezier(.4,0,.2,1) }
.wpp-msg-img:hover { filter:brightness(.95) }

/* Álbuns de Fotos e Galeria */
.wpp-msg-album { display:grid;grid-template-columns:1fr 1fr;gap:2px;max-width:280px;border-radius:6px;overflow:hidden;position:relative }
.wpp-msg-album-tile { position:relative;aspect-ratio:1;cursor:pointer }
.wpp-msg-album-tile img { width:100%;height:100%;object-fit:cover;display:block;transition:filter .15s }
.wpp-msg-album-tile:hover img { filter:brightness(.95) }
.wpp-msg-album-more { position:absolute;inset:0;background:rgba(0,0,0,.5);color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:600;pointer-events:none }
.wpp-msg-album-dl { position:absolute;bottom:8px;right:8px;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:rgba(255,255,255,.9);color:#333;border:none;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:background .2s;z-index:2;padding:0 }
.wpp-msg-album-dl:hover { background:#fff }
[data-theme="navy"] .wpp-msg-album-dl, [data-theme="graphite"] .wpp-msg-album-dl { background:rgba(30,41,59,.9);color:#e2e8f0 }

.wpp-msg-album-folder { position:absolute;bottom:8px;right:40px;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:rgba(255,255,255,.9);color:#333;border:none;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:background .2s;z-index:2;padding:0 }
.wpp-msg-album-folder:hover { background:#fff }
[data-theme="navy"] .wpp-msg-album-folder, [data-theme="graphite"] .wpp-msg-album-folder { background:rgba(30,41,59,.9);color:#e2e8f0 }


.wpp-gallery-modal { position:fixed;inset:0;background:rgba(0,0,0,.92);z-index:99999;display:flex;flex-direction:column;animation:fadeIn .2s }
.wpp-gallery-toolbar { display:flex;align-items:center;padding:16px;color:#fff;font-size:14px;font-weight:500;background:linear-gradient(rgba(0,0,0,.5),transparent);cursor:default }
.wpp-gallery-img { flex:1;width:100%;object-fit:contain;min-height:0;user-select:none }
.wpp-gallery-nav { position:absolute;top:50%;transform:translateY(-50%);color:#fff;cursor:pointer;padding:16px;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.1);border-radius:50%;transition:background .2s }
.wpp-gallery-nav:hover { background:rgba(0,0,0,.4) }
.wpp-gallery-nav.left { left:16px }
.wpp-gallery-nav.right { right:16px }
.wpp-gallery-thumbs { display:flex;gap:8px;padding:16px;overflow-x:auto;background:linear-gradient(transparent,rgba(0,0,0,.5));scrollbar-width:none }
.wpp-gallery-thumbs::-webkit-scrollbar { display:none }
.wpp-gallery-thumb { height:64px;min-width:64px;object-fit:cover;border-radius:4px;cursor:pointer;opacity:.5;transition:opacity .2s;box-sizing:border-box }
.wpp-gallery-thumb.active, .wpp-gallery-thumb:hover { opacity:1;border:2px solid #fff }
.wpp-gallery-error { flex:1;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px }

.wpp-msg-sticker { max-width:120px;max-height:120px;display:block;object-fit:contain }
.wpp-msg-caption { margin-top:4px;font-size:13px;font-weight:500 }
.wpp-msg-doc { display:flex;align-items:center;gap:12px;background:#f1f5f9;padding:10px;border-radius:6px;border:1px solid rgba(226,232,240,.6);max-width:320px }
[data-theme="navy"] .wpp-msg-doc,
[data-theme="graphite"] .wpp-msg-doc { background:rgba(30,41,59,.80);border-color:rgba(51,65,85,.50) }
.wpp-msg-doc-icon { color:#ef4444;font-size:24px;flex-shrink:0 }
.wpp-msg-doc-info { flex:1;min-width:0 }
.wpp-msg-doc-name { font-size:12px;font-weight:600;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis }
[data-theme="navy"] .wpp-msg-doc-name,
[data-theme="graphite"] .wpp-msg-doc-name { color:#e2e8f0 }
.wpp-msg-doc-label { font-size:10px;color:#94a3b8;font-weight:700;text-transform:uppercase;letter-spacing:.05em }
.wpp-msg-doc-dl { display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9999px;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);color:#475569;flex-shrink:0;transition:background-color .15s cubic-bezier(.4,0,.2,1) }
.wpp-msg-doc-dl:hover { background:#f8fafc }
[data-theme="navy"] .wpp-msg-doc-dl,
[data-theme="graphite"] .wpp-msg-doc-dl { background:#334155;color:#e2e8f0 }
.wpp-msg-doc-dl .material-symbols-outlined { font-size:18px }

.wpp-msg-contact { display:flex;align-items:center;gap:12px;background:#f1f5f9;padding:10px;border-radius:6px;border:1px solid rgba(226,232,240,.6);max-width:320px;margin-bottom:4px }
[data-theme="navy"] .wpp-msg-contact,
[data-theme="graphite"] .wpp-msg-contact { background:rgba(30,41,59,.80);border-color:rgba(51,65,85,.50) }
.wpp-msg-contact-icon { color:#0ea5e9;font-size:24px;flex-shrink:0 }
.wpp-msg-contact-info { flex:1;min-width:0 }
.wpp-msg-contact-name { font-size:12px;font-weight:600;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis }
[data-theme="navy"] .wpp-msg-contact-name,
[data-theme="graphite"] .wpp-msg-contact-name { color:#e2e8f0 }
.wpp-msg-contact-label { font-size:10px;color:#94a3b8;font-weight:700;text-transform:uppercase;letter-spacing:.05em }
.wpp-msg-contact-add { display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9999px;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);color:#475569;flex-shrink:0;border:none;cursor:pointer;transition:background-color .15s cubic-bezier(.4,0,.2,1) }
.wpp-msg-contact-add:hover { background:#f8fafc }
[data-theme="navy"] .wpp-msg-contact-add,
[data-theme="graphite"] .wpp-msg-contact-add { background:#334155;color:#e2e8f0 }
.wpp-msg-contact-add .material-symbols-outlined { font-size:18px }
.wpp-msg-audio { display:flex;flex-direction:column;gap:6px;width:100%;min-width:220px }
.wpp-msg-audio-label { display:flex;align-items:center;gap:6px;color:#059669;font-weight:900;text-transform:uppercase;letter-spacing:.05em;font-size:10px }
[data-theme="navy"] .wpp-msg-audio-label,
[data-theme="graphite"] .wpp-msg-audio-label { color:#34d399 }
.wpp-msg-audio-icon { font-size:12px;font-weight:700;animation:sh-pulse 2s cubic-bezier(.4,0,.6,1) infinite }
.wpp-msg-audio audio { width:100%;height:32px;margin-top:2px }
.wpp-msg-video { display:flex;flex-direction:column;gap:6px;max-width:280px }
.wpp-msg-video video { border-radius:4px;max-width:100%;max-height:192px;margin-top:4px;box-shadow:0 1px 2px 0 rgba(0,0,0,.05) }

.wpp-checklist-item { display:flex;align-items:center;gap:6px;font-size:12px;cursor:pointer }
.wpp-checklist-ok { color:#16a34a }
.wpp-checklist-miss { color:#dc2626 }

.wpp-inbox { display: grid; grid-template-columns: 340px 1fr; }
@media (max-width: 768px) {
  .wpp-inbox { grid-template-columns: 1fr; }
  .wpp-msg-album { max-width: 220px; }
  .wpp-gallery-thumb { height: 48px; min-width: 48px; }
}

.wpp-pending-card { background:var(--surface);border:1px solid #F59E0B;border-radius:6px;padding:8px 12px;display:flex;flex-direction:column;gap:6px }
.wpp-pending-card-row { display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;min-width:0 }
.wpp-pending-card-name { font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0 }
.wpp-pending-card-actions { display:flex;gap:4px }
.wpp-pending-card-actions button { padding:4px 8px;font-size:11px }

/* Sidebar componente <wpp-conversa> dentro da ficha */
.wpp-sidebar-box { border:1px solid var(--border);border-radius:6px;background:var(--surface);overflow:hidden;margin-top:12px }
.wpp-sidebar-header { padding:8px 10px;background:var(--surface-2);border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:600 }
.wpp-sidebar-list { max-height:200px;overflow-y:auto;padding:6px 10px;display:flex;flex-direction:column;gap:4px }
.wpp-sidebar-msg { font-size: 11px; padding: 6px 10px; border-radius: 6px; line-height: 1.4; word-wrap: break-word; }
.wpp-sb-recv { background: var(--surface-2) !important; color: var(--text) !important; align-self: flex-start; max-width: 85%; }
.wpp-sb-sent { background: #D9FDD3 !important; color: #111B21 !important; align-self: flex-end; max-width: 85%; }

/* Barra de Busca de WhatsApp em Alto Contraste */
#wpp-chats-search {
  background-color: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm, 6px) !important;
  padding: 8px 12px !important;
}
#wpp-chats-search:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
  outline: none !important;
}
.wpp-sidebar-compose { padding:6px 10px;border-top:1px solid var(--border);display:flex;gap:4px }
.wpp-sidebar-compose textarea { flex:1;font-size:11px;resize:none;height:36px }

/* Cap 51 — Avatar, imóvel badge, template popover */
.wpp-avatar { width:36px;height:36px;border-radius:50%;flex-shrink:0;object-fit:cover;display:inline-flex;align-items:center;justify-content:center;font-weight:600;font-size:13px;color:#fff;user-select:none }
.wpp-avatar-c0 { background:#3B82F6 }
.wpp-avatar-c1 { background:#10B981 }
.wpp-avatar-c2 { background:#F59E0B }
.wpp-avatar-c3 { background:#EF4444 }
.wpp-avatar-c4 { background:#8B5CF6 }
.wpp-avatar-c5 { background:#EC4899 }
.wpp-avatar-c6 { background:#14B8A6 }
.wpp-avatar-c7 { background:#F97316 }
.wpp-imovel-badge { font-size:11px;background:var(--accent-soft);color:var(--accent);padding:2px 8px;border-radius:6px;display:inline-block }
.wpp-popover { position:absolute;top:32px;right:0;width:280px;max-height:calc(100vh - 300px);overflow-y:auto;background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.12);padding:8px;z-index:100 }
.wpp-tpl-item:hover { background:var(--surface-2) }

/* ── Cap B2 — Proprietário detalhe ─────────────────────────── */
.prop-detail-wrap { padding: 16px; max-width: 1600px; margin: 0 auto; }
.prop-detail-header { display:flex; align-items:flex-start; gap:12px; margin-bottom:16px; }
.prop-back-btn { background:var(--surface-2); border:1px solid var(--border); color:var(--text); border-radius:8px; padding:6px 10px; cursor:pointer; }
.prop-back-btn:hover { background:var(--surface); }
.prop-header-main { flex:1; display:flex; gap:14px; align-items:center; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:14px 16px; }
.prop-avatar { width:52px; height:52px; border-radius:50%; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:700; flex-shrink:0; }
.prop-name { font-size:20px; font-weight:700; margin:0 0 4px 0; color:var(--text); outline:none; }
.prop-name:focus { background:var(--surface-2); border-radius:4px; padding:2px 6px; }
.prop-meta-row { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
.prop-badge { font-size:11px; padding:2px 8px; border-radius:10px; background:var(--surface-2); color:var(--text-2); border:1px solid var(--border); }
.prop-badge-stage { background:rgba(99,102,241,0.12); color:#3730a3; border-color:rgba(99,102,241,0.2); }
.prop-badge-prio { background:rgba(234,88,12,0.12); color:#9a3412; border-color:rgba(234,88,12,0.2); }
.prop-contact-row { display:flex; flex-wrap:wrap; gap:14px; font-size:12px; color:var(--muted); }
.prop-contact-row [contenteditable='true']:focus { background:var(--surface-2); outline:none; padding:1px 4px; border-radius:3px; }
.prop-grid { display:grid; grid-template-columns: 1fr 1.6fr 1fr; gap:14px; align-items:start; }
@media (max-width: 1200px) { .prop-grid { grid-template-columns: 1fr 1fr; } .prop-col-wide { grid-column: span 2; } }
@media (max-width: 800px) { .prop-grid { grid-template-columns: 1fr; } .prop-col-wide { grid-column: auto; } }
.prop-col { display:flex; flex-direction:column; gap:12px; }
.prop-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.prop-ficha { padding:10px 16px; }
.prop-ficha-row { display:flex; justify-content:space-between; gap:10px; padding:6px 0; border-bottom:1px dashed var(--border); font-size:13px; }
.prop-ficha-row:last-child { border-bottom:none; }
.prop-ficha-label { color:var(--muted); }
.prop-ficha-value { color:var(--text); text-align:right; max-width:60%; word-break:break-word; outline:none; }
.prop-ficha-value:focus { background:var(--surface-2); padding:1px 6px; border-radius:3px; }
.prop-tl-filters { display:flex; gap:4px; flex-wrap:wrap; }
.prop-tl-filter { background:transparent; border:1px solid var(--border); color:var(--text-2); border-radius:6px; padding:2px 8px; font-size:10.5px; cursor:pointer; }
.prop-tl-filter.active { background:var(--accent); color:#fff; border-color:var(--accent); }
.prop-tl-item { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid var(--border); }
.prop-tl-item:last-child { border-bottom:none; }
.prop-tl-icon { font-size:18px; width:28px; text-align:center; flex-shrink:0; }
.prop-tl-body { flex:1; min-width:0; }
.prop-tl-title { font-size:12.5px; font-weight:600; color:var(--text); }
.prop-tl-snippet { font-size:12px; color:var(--text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.prop-tl-ts { font-size:10.5px; color:var(--muted); margin-top:2px; }
.prop-next-item { padding:6px 0; border-bottom:1px dashed var(--border); }
.prop-next-item:last-child { border-bottom:none; }
.prop-note { padding:6px 0; border-bottom:1px dashed var(--border); }
.prop-note:last-child { border-bottom:none; }

/* ══════════════════════════════════════════════════════════
   SISTEMA DE ONBOARDING E MELHORIAS DE UI/UX — SINGULAR HOUSE
   ══════════════════════════════════════════════════════════ */

/* ── 1. Card de Dicas do Dashboard ── */
.stat-card[data-key="dicas"] {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%) !important;
  border: 1px solid rgba(139, 92, 246, 0.2) !important;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.05), var(--shadow) !important;
  padding: 14px 18px !important;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.stat-card[data-key="dicas"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.12), var(--shadow-lg) !important;
}
.dicas-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.dicas-header-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--purple);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}
.dicas-progress-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(139, 92, 246, 0.08);
}
.dicas-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple) 0%, var(--accent) 100%);
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
}
.dicas-body-container {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 8px 0;
  min-height: 54px;
}
.dicas-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
  margin: 0;
  font-weight: 500;
  opacity: 1;
  transition: opacity 0.25s ease-in-out;
}
.dicas-text.fade-out {
  opacity: 0;
}
.dicas-footer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}
.dicas-counter {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-3);
}
.dicas-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dicas-control-btn {
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 18px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dicas-control-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple);
}
.dicas-control-btn.active-play {
  color: var(--accent);
  background: rgba(27, 79, 216, 0.08);
}

/* ── 2. Onboarding Interativo (Balões) ── */

/* ── 3. Redesenho Modal Boas Vindas ── */
#modal-welcome-overlay {
  background: rgba(10, 15, 30, 0.5) !important;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#modal-welcome-overlay .modal-box {
  width: 880px;
  max-width: 95vw;
  padding: 0 !important;
  border-radius: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}
.pilar-split-layout {
  display: flex;
  min-height: 440px;
}
.pilar-left-panel {
  flex: 1;
  background: linear-gradient(135deg, var(--accent) 0%, #6366F1 100%);
  color: #fff;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.pilar-left-panel::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  bottom: -40px;
  right: -40px;
  border-radius: 50%;
}
.pilar-brand-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pilar-brand-logo-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pilar-brand-logo-circle .material-symbols-outlined {
  font-size: 20px;
  color: #fff;
}
.pilar-brand-name {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.pilar-benefits-container {
  margin: 30px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pilar-benefit-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pilar-benefit-icon {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.pilar-benefit-icon .material-symbols-outlined {
  font-size: 14px;
}
.pilar-benefit-info {
  display: flex;
  flex-direction: column;
}
.pilar-benefit-title {
  font-size: 12.5px;
  font-weight: 700;
}
.pilar-benefit-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  margin-top: 2px;
}
.pilar-security-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 20px;
  align-self: flex-start;
  border: 1px solid rgba(255,255,255,0.05);
}
.pilar-right-panel {
  flex: 1.15;
  background: var(--surface);
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pilar-form-header {
  margin-bottom: 20px;
}
.pilar-form-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.pilar-form-subtitle {
  font-size: 12px;
  color: var(--text-3);
  margin: 4px 0 0;
  line-height: 1.4;
}

/* Stepper horizontal */
.pilar-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  position: relative;
}
.pilar-stepper-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 1;
  transform: translateY(-50%);
}
.pilar-stepper-line-progress {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.4s ease;
}
.pilar-step {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-3);
  z-index: 2;
  transition: all 0.3s ease;
}
.pilar-step.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(27, 79, 216, 0.12);
}
.pilar-step.completed {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Inputs Premium com Ícone Embutido */
.pilar-input-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.pilar-input-container label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pilar-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.pilar-input-wrapper input {
  width: 100%;
  height: 38px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 0 12px 0 34px !important;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
}
.pilar-input-wrapper input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 1.5px rgba(27, 79, 216, 0.08);
}
.pilar-input-icon {
  position: absolute;
  left: 10px;
  color: var(--text-3);
  font-size: 18px !important;
  pointer-events: none;
  transition: color 0.2s ease;
}
.pilar-input-wrapper input:focus + .pilar-input-icon {
  color: var(--accent);
}

/* Erros Estilizados */
.pilar-error-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  animation: pilarSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pilar-error-banner .material-symbols-outlined {
  color: var(--danger);
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.pilar-error-text {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--danger);
  font-weight: 600;
  margin: 0;
}

.pilar-footer-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

@keyframes pilarSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsividade do modal em split */
@media (max-width: 700px) {
  .pilar-split-layout {
    flex-direction: column;
    min-height: auto;
  }
  .pilar-left-panel {
    padding: 24px;
    min-height: 160px;
  }
  .pilar-benefits-container {
    display: none; /* Oculta benefícios no celular para poupar espaço vertical */
  }
  .pilar-right-panel {
    padding: 24px;
  }
}

/* ── 4. Erros Estilizados para Onboarding Pilar ── */
#pilar-onboarding-msg:not(:empty) {
  background: var(--danger-bg, rgba(239, 68, 68, 0.08));
  border: 1px solid var(--danger-border, rgba(239, 68, 68, 0.2));
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 14px;
  color: var(--danger, #EF4444);
  font-size: 11.5px;
  line-height: 1.4;
  font-weight: 600;
  animation: pilarSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#pilar-onboarding-msg:not(:empty)::before {
  content: "warning";
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ==========================================================================
   CAPÍTULO 76 - PREMIUM UX UPGRADE: DASHBOARD, CRM, AGENDA & CHECKLIST MODAL
   ========================================================================== */

/* --- 1. Dashboard Redimensionável e Grip Handle --- */
.dash-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  align-items: stretch !important;
  scrollbar-width: thin;
  padding-right: 4px;
}

.mini-stats-grid {
  max-height: 400px !important;
  overflow-y: auto !important;
}

.complex-stats-grid {
  max-height: none !important;
  overflow-y: visible !important;
}

.stat-card {
  grid-column: span var(--span, 1) !important;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.dash-stats-grid > .stat-card {
  display: flex;
  flex-direction: column !important;
  height: 100% !important;
}

.dash-stats-grid > .stat-card .stat-meta {
  margin-top: auto !important;
  padding-top: 4px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: var(--accent);
}

.stat-card .resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 14px !important; /* Ampliado para 14px para área de detecção ativa */
  cursor: col-resize !important;
  opacity: 0;
  background: transparent;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  z-index: 10;
}

.stat-card:hover .resize-handle {
  opacity: 1;
}

.stat-card .resize-handle::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  border-radius: 2px;
  background-color: var(--text-3, #94A3B8);
  transition: background-color 0.2s ease, height 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card .resize-handle:hover::before {
  background-color: var(--accent) !important;
  height: 32px !important;
}

/* --- 2. Dropdown / Modal Checklist Estilo Premium --- */
#add-card-wrap.open #add-dropdown {
  display: flex;
  flex-direction: column;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Estilos extras para o modal checklist se usar a classe */
.checklist-modal-content {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* --- 3. CRM - Cabeçalhos de Grupo de Condomínio Collapsáveis --- */
.crm-group-header {
  background-color: var(--surface-2, #F8FAFC) !important;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.crm-group-header:hover {
  background-color: var(--border, #F1F5F9) !important;
}

.crm-group-header td {
  padding: 12px 16px !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  border-bottom: 2px solid var(--border) !important;
}

.crm-group-header .group-title-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-group-header .group-chevron {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 18px;
  color: var(--accent);
}

.crm-group-header.collapsed .group-chevron {
  transform: rotate(-90deg);
}

/* --- 4. CRM - Gaveta de Filtros Drawer --- */
#crm-filters-drawer {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0;
  overflow: hidden;
}

#crm-filters-drawer.open {
  max-height: 300px;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  opacity: 1;
  overflow: visible;
}

#crm-toggle-filters.active {
  background-color: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}

#crm-toggle-filters .filter-count-badge {
  background: #EF4444;
  color: white;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 800;
  position: absolute;
  top: -6px;
  right: -6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* --- 5. Agenda - Grid Triplo de Alta Fidelidade --- */
.agenda-layout-grid {
  display: grid;
  grid-template-columns: 330px 380px 1fr;
  gap: 20px;
  align-items: start;
  width: 100%;
}

@media (max-width: 1200px) {
  .agenda-layout-grid {
    grid-template-columns: 320px 1fr;
  }
  .agenda-col-right {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .agenda-layout-grid {
    grid-template-columns: 1fr;
  }
  .agenda-col-left, .agenda-col-center, .agenda-col-right {
    grid-column: span 1;
  }
}

/* Estilização da Coluna 3 - Hub de Atividades */
.agenda-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}

@media (max-width: 900px) {
  .agenda-hub-grid {
    grid-template-columns: 1fr;
  }
}

.agenda-hub-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  max-height: 640px;
}

.agenda-hub-col-header {
  padding: 12px 14px;
  background: var(--surface-2, #F8FAFC);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 3px solid var(--col-c);
}

.agenda-hub-col-header .material-symbols-outlined {
  color: var(--col-c);
}

.agenda-hub-col-header .hub-count-badge {
  background: var(--border);
  color: var(--text-3);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

.agenda-hub-col-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}

/* Agenda Cards Estilo Premium */
.agenda-hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--card-c, var(--accent)) !important;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agenda-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: var(--border);
  border-left-color: var(--card-c) !important;
}

.agenda-hub-card-date {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.agenda-hub-card-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.agenda-hub-card-meta {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.agenda-hub-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.agenda-hub-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* Custom Scrollbar Fina e Premium */
.agenda-hub-col-body::-webkit-scrollbar,
#agenda-eventos-list::-webkit-scrollbar {
  width: 5px;
}
.agenda-hub-col-body::-webkit-scrollbar-track,
#agenda-eventos-list::-webkit-scrollbar-track {
  background: transparent;
}
.agenda-hub-col-body::-webkit-scrollbar-thumb,
#agenda-eventos-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}
.agenda-hub-col-body::-webkit-scrollbar-thumb:hover,
#agenda-eventos-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.16);
}

/* --- CRM Searchable Condo Modal --- */
.condo-modal-item {
  width: 100% !important;
  text-align: left !important;
  background: none !important;
  border: none !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: flex;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
}
.condo-modal-item:hover {
  background: #f1f5f9 !important;
  color: var(--accent) !important;
  padding-left: 18px !important;
}
.condo-modal-item.active {
  background: #eff6ff !important;
  color: var(--accent) !important;
  font-weight: 600 !important;
}

/* --- Agenda Compact Stats Grid --- */
.agenda-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  margin-top: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 500px) {
  .agenda-stats-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 501px) and (max-width: 900px) {
  .agenda-stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

.agenda-stats-grid .stat-card {
  padding: 10px 12px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  display: flex;
  flex-direction: column !important;
  justify-content: space-between !important;
}

.agenda-stats-grid .stat-card .stat-label {
  font-size: 10px !important;
  height: auto !important;
  margin-bottom: 4px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
}

.agenda-stats-grid .stat-card .stat-value {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1 !important;
}

.agenda-stats-grid .stat-card .stat-sub {
  font-size: 9px !important;
  color: #94a3b8 !important;
  margin-top: 2px !important;
}

/* ── Cinematic Login Screen (Chapter 79 Custom Theme) ── */
#login-screen {
  display: flex;
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #111a2e 0%, #070a14 100%);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  padding: 20px;
}

.login-card {
  background: rgba(17, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 48px;
  width: 440px;
  max-width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: loginFadeIn 0.6s ease-out;
}

@keyframes loginFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo-img {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px auto;
  filter: drop-shadow(0 0 12px rgba(27, 79, 216, 0.3));
}

.login-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 14px;
  color: #94a3b8;
  margin: 0;
  font-weight: 500;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(7, 10, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 14px;
  color: #ffffff;
  margin-top: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.login-input:focus {
  border-color: var(--accent);
  background: rgba(7, 10, 20, 0.9);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  margin-bottom: 20px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(27, 79, 216, 0.3);
}

.login-btn:hover {
  background: var(--accent-h);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(27, 79, 216, 0.4);
}

.login-btn:active {
  transform: translateY(1px);
}

.login-link {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 600;
}

.login-link:hover {
  color: #60a5fa;
}

#login-msg {
  font-size: 13px;
  color: #f87171;
  text-align: center;
  min-height: 20px;
  margin-top: 12px;
  font-weight: 500;
}







/* Hide scrollbar utility */
.hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ==========================================================================
   APP-LIKE VIEWPORTS & FLEX RESPONSIVENESS OVERRIDES
   ========================================================================== */

/* Bloqueio de scroll externo para Seções Complexas */
#section-pipeline.active,
#section-crm.active {
  display: flex;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 0 !important;
}

/* Pipeline Kanban Layout Responsivo */
#pipeline-content-scroll {
  flex: 1 !important;
  display: flex;
  flex-direction: column !important;
  overflow: hidden !important;
  min-height: 0 !important;
}

.pipeline-kanban {
  display: flex;
  flex-direction: row !important;
  gap: 14px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 4px 2px 16px !important;
  align-items: stretch !important;
  flex: 1 !important;
  min-height: 0 !important;
  height: auto !important;
}

.pipeline-col {
  flex-shrink: 0 !important;
  width: 260px !important;
  display: flex;
  flex-direction: column !important;
  max-height: 100% !important;
  height: 100% !important;
}

/* CRM Split & Outras Visões Responsivas */
#section-crm.active > .crm-body-wrap {
  display: flex;
  flex-direction: column !important;
  flex: 1 !important;
  min-height: 0 !important;
  height: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
}
#section-crm.active > .crm-body-wrap > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.crm-split {
  display: flex;
  gap: 12px !important;
  flex: 1 !important;
  min-height: 0 !important;
  height: auto !important;
}

#crm-kanban {
  flex: 1 !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-x: auto !important;
  padding: 16px 0 !important;
}

#crm-cards {
  flex: 1 !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  padding-bottom: 24px !important;
}

/* ══ CONDOMINIOS CARD PHOTOS ASPECT RATIO ══════════════════ */
.condo-card-photo-wrap {
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  width: 100%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* ══ RESPONSIVE VIEWPORT EDGE-TO-EDGE OVERRIDES (<1100px) ═══ */
@media (max-width: 1100px) {
  /* Margins/paddings edge-to-edge removidos (substituído por .section-body e clamp()) */

  /* Herobars edge-to-edge padding */
  #crm-hero,
  #agenda-macro-metrics,
  #imoveis-hero,
  #email-hero,
  #ferramentas-hero,
  #geo-hero,
  #pipeline-hero,
  #wpp-macro-metrics,
  #condos-hero,
  #condos-details-hero {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

.crm-control-bar {
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  margin: 0 !important;
}
#crm-filters-drawer {
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  margin: 0 !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}
#crm-table-wrap th:first-child,
#crm-table-wrap td:first-child {
  padding-left: 16px !important;
}
#crm-table-wrap th:last-child,
#crm-table-wrap td:last-child {
  padding-right: 16px !important;
}
#crm-kanban { padding: 16px 16px !important; }
#crm-cards { padding: 16px 16px 24px 16px !important; }

@media (max-width: 1300px) {
  .crm-col-bairro, .crm-col-origem, .crm-col-imovel, .crm-col-score, .crm-col-action {
    display: none !important;
  }
}
@media (max-width: 1000px) {
  .crm-col-pilar_stage, .crm-col-valor {
    display: none !important;
  }
}
@media (max-width: 850px) {
  .crm-col-condominio, .crm-col-prioridade {
    display: none !important;
  }
}

@media (max-width: 1200px) and (min-width: 768px) {
  #condos-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}


/* ══ ACCORDION SIDEBAR & VERTICAL RESIZER OVERRIDES (CRM) ══════════════════ */
.crm-split {
  display: flex;
  gap: 0 !important;
  flex: 1 !important;
  min-height: 0 !important;
  height: auto !important;
  border-top: 1px solid var(--border) !important;
  background: var(--bg) !important;
  overflow: hidden !important;
}

#crm-table-wrap {
  display: flex;
  flex-direction: column !important;
  width: 350px !important;
  min-width: 250px !important;
  max-width: 600px !important;
  flex-shrink: 0 !important;
  background: var(--surface) !important;
  border-right: 1px solid var(--border) !important;
  overflow-y: auto !important;
  height: 100% !important;
}

#crm-detail {
  flex: 1 !important;
  min-width: 0 !important;
  width: auto !important;
  overflow-y: auto !important;
  background: var(--bg) !important;
  height: 100% !important;
}

.crm-sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  user-select: none;
}

.crm-sidebar-condo-group {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid transparent;
  transition: all 0.2s ease-in-out;
}

.crm-sidebar-condo-group:hover {
  border-color: rgba(0, 0, 0, 0.05);
}

.crm-sidebar-condo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #F8FAFC;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.crm-sidebar-condo-header:hover {
  background: #F1F5F9;
}

.crm-sidebar-condo-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.crm-condo-icon {
  font-size: 18px;
  color: var(--accent, #1B4FD8);
}

.crm-condo-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #0F172A);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-condo-badge {
  font-size: 11px;
  font-weight: 600;
  background: rgba(27, 79, 216, 0.1);
  color: var(--accent, #1B4FD8);
  padding: 1px 6px;
  border-radius: 12px;
}

.crm-condo-chevron {
  font-size: 18px;
  color: var(--muted, #64748B);
  transition: transform 0.2s ease;
}

.crm-sidebar-condo-group.collapsed .crm-condo-chevron {
  transform: rotate(-90deg);
}

.crm-sidebar-condo-group.collapsed .crm-sidebar-owners-list {
  display: none !important;
}

.crm-sidebar-owners-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 4px 12px;
  border-left: 1.5px solid var(--border, #E2E8F0);
  margin-left: 20px;
  margin-top: 2px;
}

.crm-sidebar-owner-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  border: 1px solid transparent;
}

.crm-sidebar-owner-item:hover {
  background: #F8FAFC;
}

.crm-sidebar-owner-item.selected {
  background: rgba(27, 79, 216, 0.05) !important;
  border-color: rgba(27, 79, 216, 0.12) !important;
}

.crm-sidebar-owner-item.selected .crm-sidebar-owner-name span {
  color: var(--accent, #1B4FD8) !important;
  font-weight: 700 !important;
}

.crm-sidebar-owner-prio-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.crm-sidebar-owner-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.crm-sidebar-owner-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text, #0F172A);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.crm-sidebar-owner-sub {
  font-size: 11px;
  color: var(--muted, #64748B);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.crm-sidebar-pilar-tag {
  font-size: 9px;
  font-weight: 600;
  color: #3730A3;
  background: #E0E7FF;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
}

.crm-sidebar-cold-tag {
  font-size: 9px;
  font-weight: 600;
  color: #1E3A8A;
  background: #DBEAFE;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
}

/* Draggable Resizer Bar */
.crm-resizer {
  width: 6px !important;
  background: rgba(0, 0, 0, 0.02) !important;
  border-left: 1px solid var(--border) !important;
  cursor: col-resize !important;
  flex-shrink: 0 !important;
  position: relative;
  z-index: 10;
  transition: all 0.15s;
}

.crm-resizer:hover, .crm-resizer.active {
  background: var(--accent, #1B4FD8) !important;
  opacity: 0.8;
  width: 6px !important;
}

/* ───────────────────────────────────────────────────────────
   Dashboard Premium Custom Additions
   ─────────────────────────────────────────────────────────── */

/* Glowing Pulsing LED for Superdolan Dot */
#superdolan-dot {
  display: inline-block;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  transition: all 0.3s ease;
}

#superdolan-dot.bg-emerald-400 {
  background-color: #10B981 !important;
  box-shadow: 0 0 6px #10B981, 0 0 10px rgba(16, 185, 129, 0.4);
  animation: led-pulse 1.4s infinite alternate;
}

#superdolan-dot.bg-red-500 {
  background-color: #EF4444 !important;
  box-shadow: 0 0 6px #EF4444, 0 0 10px rgba(239, 68, 68, 0.4);
  animation: led-pulse 1.4s infinite alternate;
}

#superdolan-dot.bg-amber-400 {
  background-color: #F59E0B !important;
  box-shadow: 0 0 6px #F59E0B, 0 0 10px rgba(245, 158, 11, 0.4);
  animation: led-pulse 1.4s infinite alternate;
}

@keyframes led-pulse {
  from { opacity: 0.6; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.1); }
}

/* Constrain Mini Stat Cards height & hide scrollbars */
.stat-card:not(.complex-card) {
  max-height: 106px !important;
  overflow: hidden !important;
}

/* ══ MOBILE NAV — esconde em desktop (substitui md:hidden do Tailwind) ══ */
@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none !important;
  }
  .mobile-drawer-overlay {
    display: none !important;
  }
  .mobile-drawer {
    display: none !important;
  }
}

/* ══ MOBILE NAV — estilos para telas pequenas ══ */
@media (max-width: 767px) {
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-card, #fff);
    border-top: 1px solid var(--border);
    height: 56px;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
  }
  /* Evita que o conteúdo fique escondido atrás da barra inferior */
  #main {
    padding-bottom: 56px;
  }
  /* Esconde sidebar desktop em mobile */
  #sidebar {
    display: none !important;
  }
}

/* Hotfix - Missing Tailwind Classes for Disparo */
.col-span-12 { grid-column: span 12 / span 12; }
.max-w-\[1600px\] { max-width: 1600px; }

@media (min-width: 1024px) {
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
}

/* ───────────────────────────────────────────────────────────
   SH UTILITY CLASSES (Migrated from Tailwind Arbitrary)
   ─────────────────────────────────────────────────────────── */

/* Grupo A — Cores que seguem o tema */
.sh-bg-accent { background-color: var(--accent); }
.sh-text-accent { color: var(--accent); }
.sh-border-accent { border-color: var(--accent); }
.sh-border-t-accent { border-top-color: var(--accent); }
.sh-hover-text-accent:hover { color: var(--accent); }
.sh-hover-border-accent:hover { border-color: var(--accent); }
.group:hover .sh-group-hover-text-accent { color: var(--accent); }
.sh-bg-danger { background-color: var(--danger); }
.sh-text-danger { color: var(--danger); }
.sh-bg-page { background-color: var(--bg); }
.sh-border-base { border-color: var(--border); }
.sh-bg-surface { background-color: var(--surface) !important; }
.sh-bg-surface-2 { background-color: var(--surface-2) !important; }
.sh-hover-bg-surface-2:hover { background-color: var(--surface-2) !important; }
.sh-text-primary { color: var(--text) !important; }
.sh-text-secondary { color: var(--text-2) !important; }
.sh-text-muted { color: var(--text-3) !important; }

/* Grupo B — Cores fixas de marca/contexto */
.sh-bg-hero { background-color: #0B131E; }
.sh-bg-hero-alt { background-color: #0B1B2E; }
.sh-bg-hero-sub { background-color: #1E293B; }
.sh-bg-indigo-soft { background-color: #F0F4FF; }
.sh-bg-slate-soft { background-color: #F1F5F9; }
.sh-bg-yellow { background-color: #FACC15; }
.sh-hover-bg-yellow:hover { background-color: #EAB308; }
.sh-hover-bg-slate:hover { background-color: #475569; }
.sh-text-slate { color: #475569; }
.sh-text-indigo-dark { color: #312E81; }
.sh-text-indigo { color: #4F46E5; }
.sh-text-google-red { color: #EA4335; }
.sh-border-indigo-soft { border-color: #E0E7FF; }
.sh-border-emerald-soft { border-color: #ECFDF5; }
.sh-border-t-wpp { border-top-color: #25D366; }

/* Grupo C — Tamanhos de Fonte */
.sh-text-8 { font-size: 8px; }
.sh-text-9 { font-size: 9px; }
.sh-text-10 { font-size: 10px; }
.sh-text-11 { font-size: 11px; }
.sh-text-12 { font-size: 12px; }
.sh-text-14 { font-size: 14px; }
.sh-text-15 { font-size: 15px; }
.sh-text-16 { font-size: 16px; }
.sh-text-18 { font-size: 18px; }
.sh-text-20 { font-size: 20px; }

/* Grupo D — Dimensões e Layout */
.sh-min-w-10 { min-width: 10px; }
.sh-min-w-36 { min-width: 36px; }
.sh-min-w-150 { min-width: 150px; }
.sh-min-w-190 { min-width: 190px; }
.sh-min-w-200 { min-width: 200px; }
.sh-min-w-220 { min-width: 220px; }
.sh-min-w-320 { min-width: 320px; }
.sh-min-h-200 { min-height: 200px; }
.sh-min-h-500 { min-height: 500px; }
.sh-max-h-120 { max-height: 120px; }
.sh-max-h-400 { max-height: 400px; }
.sh-max-h-85vh { max-height: 85vh; }
.sh-max-w-120 { max-width: 120px; }
.sh-max-w-200 { max-width: 200px; }
.sh-max-w-280 { max-width: 280px; }
.sh-max-w-320 { max-width: 320px; }
.sh-max-w-1600 { max-width: 1600px; }
.sh-max-w-90vw { max-width: 90vw; }

/* Grupo E — Miscelânea */
.sh-rounded-4 { border-radius: 4px; }
.sh-z-top { z-index: 9999; }
.sh-shadow-geo { box-shadow: 0 0 15px rgba(0,0,0,0.5); }
.sh-shadow-modal { box-shadow: 0 10px 40px rgba(0,0,0,0.3); }

/* Dimensões de Altura e Pseudo-Elementos */
.sh-h-320 { height: 320px; }
.sh-h-350 { height: 350px; }
.sh-h-calc-120 { height: calc(100vh - 120px); }
.sh-h-calc-280 { height: calc(100vh - 280px); }
.sh-after-empty::after { content: ''; }
.sh-after-t-2::after { top: 2px; }
.sh-after-l-2::after { left: 2px; }

/* SweetAlert2 Theme Integration */
.swal2-popup { background: var(--bg) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: 12px !important; }
.swal2-title, .swal2-content, .swal2-html-container { color: var(--text) !important; }
.swal2-icon.swal2-question { border-color: var(--text-3) !important; color: var(--text-3) !important; }
.swal2-icon.swal2-success { border-color: var(--success) !important; color: var(--success) !important; }
.swal2-icon.swal2-error { border-color: var(--danger) !important; color: var(--danger) !important; }
.swal2-icon.swal2-warning { border-color: var(--warn) !important; color: var(--warn) !important; }
.swal2-icon.swal2-info { border-color: var(--info) !important; color: var(--info) !important; }
.swal2-confirm { background: var(--accent) !important; color: #fff !important; }
.swal2-cancel { background: var(--surface-2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; }

/* Fix for Tailwind missing classes */
.bg-pink-600 { background-color: #db2777 !important; }
.hover\:bg-pink-700:hover { background-color: #be185d !important; }
.bg-cyan-500 { background-color: #06b6d4 !important; }
.hover\:bg-cyan-600:hover { background-color: #0891b2 !important; }

/* ══════════════════════════════════════════════════════════
   GMAIL STYLE TOP ACTION BAR & TOOLBAR
   ══════════════════════════════════════════════════════════ */
.gmail-top-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: var(--surface-2, var(--surface));
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.gmail-tb-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gmail-tb-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-2, var(--text));
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, color 0.15s ease;
  font-size: 18px;
  padding: 0;
  outline: none;
}

.gmail-tb-btn:hover {
  background-color: var(--card2, rgba(128, 128, 128, 0.15));
  color: var(--text);
}

.gmail-tb-btn:active {
  transform: scale(0.93);
  background-color: rgba(128, 128, 128, 0.25);
}

.gmail-tb-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.gmail-tb-btn .material-symbols-outlined {
  font-size: 20px;
}

.gmail-tb-divider {
  width: 1px;
  height: 20px;
  background-color: var(--border);
  margin: 0 4px;
}

.gmail-tb-counter {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2, var(--muted));
  margin-right: 6px;
  user-select: none;
}

.btn-captacao-accent {
  width: auto;
  border-radius: 16px;
  padding: 0 12px;
  height: 32px;
  background: var(--accent-soft, rgba(37, 99, 235, 0.1));
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-captacao-accent:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Snooze Popover */
.snooze-popover-card {
  position: fixed;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  width: 240px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
}

.snooze-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 6px 14px;
}

.snooze-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 9px 14px;
  background: transparent;
  border: none;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.snooze-option:hover {
  background: var(--card2, rgba(128, 128, 128, 0.1));
}

.snooze-sub {
  font-size: 11px;
  color: var(--muted);
}

.snooze-dt-input {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}

/* @media print para impressão limpa de e-mail */
@media print {
  body * {
    visibility: hidden;
  }
  #section-email, #email-container, #email-viewer, #email-viewer * {
    visibility: visible;
  }
  #email-viewer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #fff !important;
    color: #000 !important;
    border: none !important;
    box-shadow: none !important;
  }
  .gmail-top-toolbar, .email-header-actions, #inbox-filter-bar, #email-list-panel, #email-hero {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Grupo F — Utilitários que faltavam no build purgado do Tailwind
   ---------------------------------------------------------------
   `static/css/tailwind.min.css` é um build de 02/06/2026 que não
   contém spacing com meio passo, valores arbitrários, cores com
   opacidade nem NENHUMA variante `hover:`. Tudo isso era no-op no
   Mapeamento. Aqui ficam os equivalentes nativos, no padrão `sh-*`
   (o número é o valor em px, como em `.sh-text-10`).
   ═══════════════════════════════════════════════════════════════ */

/* Spacing fino */
.sh-px-2 { padding-left: 2px; padding-right: 2px; }
.sh-py-2 { padding-top: 2px; padding-bottom: 2px; }
.sh-px-6 { padding-left: 6px; padding-right: 6px; }
.sh-mx-2 { margin-left: 2px; margin-right: 2px; }
.sh-ml-2 { margin-left: 2px; }
.sh-p-6  { padding: 6px; }

.sh-bg-transparent { background-color: transparent; }

/* Cores de contexto que faltavam */
.sh-bg-pink-soft { background-color: #FCE7F3; }
.sh-text-pink    { color: #BE185D; }

/* Fundos e bordas com opacidade (chips de status da fila) */
.sh-bg-emerald-10    { background-color: rgba(16, 185, 129, .10); }
.sh-bg-emerald-20    { background-color: rgba(16, 185, 129, .20); }
.sh-border-emerald-30 { border-color: rgba(16, 185, 129, .30); }
.sh-border-amber-30   { border-color: rgba(245, 158, 11, .30); }
.sh-border-indigo-30  { border-color: rgba(165, 180, 252, .30); }
.sh-border-purple-30  { border-color: rgba(216, 180, 254, .30); }
.sh-border-slate-30   { border-color: rgba(203, 213, 225, .30); }
.sh-bg-slate-10      { background-color: rgba(100, 116, 139, .10); }
.sh-border-slate-500-30 { border-color: rgba(100, 116, 139, .30); }
.sh-bg-blue-10       { background-color: rgba(59, 130, 246, .10); }
.sh-border-blue-30   { border-color: rgba(59, 130, 246, .30); }
.sh-bg-cyan-10       { background-color: rgba(6, 182, 212, .10); }
.sh-border-cyan-30   { border-color: rgba(6, 182, 212, .30); }
.sh-bg-red-10        { background-color: rgba(239, 68, 68, .10); }

/* Hover — fundo */
.sh-hover-bg-slate-50:hover   { background-color: #F8FAFC; }
.sh-hover-bg-slate-500:hover  { background-color: #64748B; }
.sh-hover-bg-slate-800:hover  { background-color: #1E293B; }
.sh-hover-bg-emerald:hover      { background-color: #059669; }
.sh-hover-bg-emerald-dark:hover { background-color: #047857; }
.sh-hover-bg-red:hover        { background-color: #DC2626; }
.sh-hover-bg-red-dark:hover   { background-color: #B91C1C; }
.sh-hover-bg-indigo:hover     { background-color: #4338CA; }
.sh-hover-bg-blue:hover       { background-color: #1D4ED8; }
.sh-hover-bg-purple:hover     { background-color: #7E22CE; }
.sh-hover-bg-pink:hover       { background-color: #DB2777; }
.sh-hover-bg-pink-dark:hover  { background-color: #BE185D; }
.sh-hover-bg-cyan:hover       { background-color: #0891B2; }
.sh-hover-bg-amber:hover      { background-color: #D97706; }

/* Hover — texto */
.sh-hover-text-white:hover      { color: #FFFFFF; }
.sh-hover-text-slate-300:hover  { color: #CBD5E1; }
.sh-hover-text-slate-600:hover  { color: #475569; }
.sh-hover-text-slate-800:hover  { color: #1E293B; }
.sh-hover-text-red:hover        { color: #EF4444; }
.sh-hover-text-blue:hover       { color: #3B82F6; }
.sh-hover-text-amber:hover      { color: #FBBF24; }

/* Hover — borda */
.sh-hover-border-slate:hover      { border-color: #94A3B8; }
.sh-hover-border-slate-500:hover  { border-color: #64748B; }
.sh-hover-border-amber:hover      { border-color: #FBBF24; }
.sh-hover-border-indigo:hover     { border-color: #818CF8; }
.sh-hover-border-purple:hover     { border-color: #C084FC; }

/* Realce do chip de status ao passar o mouse */
.sh-hover-ring:hover {
  box-shadow: 0 0 0 1px var(--surface), 0 0 0 3px #A5B4FC;
}

/* Estados */
.sh-active-grab:active { cursor: grabbing; }
.sh-disabled:disabled  { opacity: .3; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════
   MAPEAMENTO — Modal Consulta IPTU
   Substitui as classes Tailwind que não existem no build purgado
   (pl-12, top-4, text-[18px]) e que faziam o botão de copiar
   renderizar em cima do rótulo.
   ═══════════════════════════════════════════════════════════════ */
.iptu-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 10px);
  padding: 16px 56px 16px 16px;
}

.iptu-card-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  border-radius: var(--radius-btn, 8px);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.iptu-card-copy:hover {
  background: var(--surface);
  color: var(--primary);
}
.iptu-card-copy .material-symbols-outlined { font-size: 18px; }
.iptu-card-copy.is-copied { color: #16A34A; }

.iptu-field + .iptu-field { margin-top: 12px; }

.iptu-field-label {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.iptu-field-value {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

/* Aviso de IPTU que não está na base do CRM */
.iptu-card-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.iptu-card-note .material-symbols-outlined { font-size: 16px; }

/* Estados de erro / sem dados / carregando do mesmo modal */
.iptu-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 10px);
  text-align: center;
}
.iptu-state-title { font-size: 14px; font-weight: 800; }
.iptu-state-desc  { font-size: 11px; color: var(--muted); max-width: 40ch; }
.iptu-state .material-symbols-outlined { font-size: 30px; }

.iptu-state-erro  { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.iptu-state-erro .iptu-state-title,
.iptu-state-erro .material-symbols-outlined { color: var(--danger); }

.iptu-state-alerta { background: color-mix(in srgb, var(--warn, #F59E0B) 10%, var(--surface)); }
.iptu-state-alerta .iptu-state-title,
.iptu-state-alerta .material-symbols-outlined { color: var(--warn, #F59E0B); }

.iptu-state-load .material-symbols-outlined {
  color: var(--primary);
  font-size: 40px;
  animation: iptu-spin .9s linear infinite;
}
@keyframes iptu-spin { to { transform: rotate(360deg); } }


