/* =====================================================
   Go Base — Design System
   ===================================================== */

:root {
  --bg-base:         #0a1610;
  --bg-card:         #0f1f17;
  --bg-card-hover:   #132519;
  --bg-sidebar:      #0c1a14;
  --border:          #1a3828;
  --border-hover:    #244434;
  --text-primary:    #ffffff;
  --text-secondary:  #6b8f7d;
  --text-muted:      #2e5040;
  --accent:          #059669;
  --accent-light:    #34d399;
  --accent-dim:      rgba(5, 150, 105, 0.12);
  --sidebar-w:       56px;
  --topbar-h:        48px;
  --kanban-search-h: 96px;  /* search bar area height in kanban view */
  --radius:          10px;

  /* Spacing scale: 4, 8, 12, 16, 20, 24, 32px */
  /* Radius scale:  4px | 8px | 10px (--radius) | 14px | 50% */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-family: 'Outfit', 'Inter', system-ui, sans-serif; }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  padding-left: var(--sidebar-w);
}

/* ===================== FOCUS VISIBLE ===================== */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===================== SIDEBAR ===================== */

.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  z-index: 50;
  transition: width 0.2s ease;
}

.sidebar-logo {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px; color: white;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(5, 150, 105, 0.35);
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  flex: 1; width: 100%;
}

.sidebar-btn {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--text-secondary);
  background: transparent;
  border: none; cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-btn:hover { color: white; background: var(--border); }

.sidebar-btn.active-tab {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 18px rgba(5, 150, 105, 0.45);
}

.sidebar-divider {
  width: 24px; height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.sidebar-bottom {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  padding-bottom: 6px;
}

.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border: 1.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  color: white;
  cursor: pointer;
  flex-shrink: 0;
  transition: box-shadow 0.15s;
}
.sidebar-avatar:hover { box-shadow: 0 0 12px rgba(5,150,105,0.5); }

/* ===== USER ROW (bottom sidebar) ===== */

.sidebar-user-row {
  display: flex; align-items: center;
  gap: 8px;
  width: 32px;
  overflow: hidden;
  border-radius: 8px;
  padding: 3px 0;
}

.sidebar-user-email {
  font-size: 11px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; opacity: 0; width: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.sidebar-logout-btn {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: var(--text-secondary);
  background: transparent; border: none; cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: all 0.15s ease;
}
.sidebar-logout-btn:hover { color: #f87171; background: rgba(248,113,113,0.08); }

/* ===== AVATAR MENU (legado) ===== */

.sidebar-avatar-wrap {
  position: relative;
}

.avatar-menu {
  position: fixed;
  bottom: 60px;
  left: 64px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  padding: 6px;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: none;
  z-index: 200;
}
.avatar-menu.open { display: block; }

.avatar-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px;
  border-radius: 7px;
  font-size: 13px; font-weight: 500;
  color: var(--text-primary);
  background: transparent; border: none;
  cursor: pointer; text-align: left;
  transition: background 0.15s;
}
.avatar-menu-item:hover { background: var(--border); }
.avatar-menu-item i { font-size: 16px; }

.avatar-menu-user {
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.avatar-menu-email {
  font-size: 11px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 160px;
}
.avatar-menu-role {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent-light); margin-top: 2px;
}

/* ===== SIDEBAR EXPANDIDA ===== */

.sidebar-header {
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  width: 100%; padding: 0 12px;
  margin-bottom: 20px;
  overflow: hidden;
}

.sidebar-brand {
  font-weight: 800; font-size: 14px; color: white;
  white-space: nowrap; opacity: 0; width: 0; overflow: hidden;
  transition: opacity 0.2s ease, width 0.2s ease, margin 0.2s ease;
  pointer-events: none;
}

.sidebar-label {
  font-size: 13px; font-weight: 500;
  color: inherit;
  white-space: nowrap; opacity: 0; width: 0; overflow: hidden;
  transition: opacity 0.2s ease, width 0.2s ease;
  pointer-events: none;
}

.sidebar-toggle-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--border);
  border: 1px solid var(--border-hover);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover { color: white; background: var(--border-hover); }

/* Estado expandido */
.sidebar.expanded {
  width: 200px;
  align-items: flex-start;
}

.sidebar.expanded .sidebar-header { justify-content: flex-start; }
.sidebar.expanded .sidebar-logo { flex-shrink: 0; }
.sidebar.expanded .sidebar-brand { opacity: 1; width: auto; margin-left: 10px; }

.sidebar.expanded .sidebar-nav { align-items: flex-start; padding: 0 8px; }
.sidebar.expanded .sidebar-btn {
  width: 100%; justify-content: flex-start;
  gap: 10px; padding: 0 10px;
}
.sidebar.expanded .sidebar-label { opacity: 1; width: auto; }

.sidebar.expanded .sidebar-bottom {
  width: 100%; align-items: flex-start; padding: 0 8px 6px;
}
.sidebar.expanded .sidebar-divider { width: 100%; margin: 4px 0 8px; }

.sidebar.expanded .sidebar-user-row {
  width: 100%; padding: 4px 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.sidebar.expanded .sidebar-user-email { opacity: 1; width: auto; pointer-events: auto; }
.sidebar.expanded .sidebar-logout-btn { opacity: 1; pointer-events: auto; }

/* layout adjustments handled via JS in toggleSidebar() */

/* ===== TEAM MEMBER CARDS ===== */

.team-member-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.team-member-card:hover { border-color: var(--border-hover); }

.team-member-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}
.team-member-header:hover { background: rgba(255,255,255,0.03); }

.team-member-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white;
  flex-shrink: 0;
}

.team-member-info { flex: 1; overflow: hidden; }
.team-member-name { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.team-member-sub  { display: block; font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.team-member-caret {
  font-size: 14px; color: var(--text-secondary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.team-member-detail {
  padding: 0 12px 12px;
  border-top: 1px solid var(--border);
}

.team-detail-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
  color: var(--text-secondary);
}
.team-detail-row i { font-size: 16px; flex-shrink: 0; }
.team-detail-input { flex: 1; }

.team-detail-actions {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px;
}
.team-detail-actions .settings-btn-remove {
  width: auto; height: auto;
  padding: 6px 12px;
  font-size: 11px; font-weight: 600;
  gap: 4px;
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 6px;
  color: #f87171;
}

/* Formulário de adição de equipe */
.settings-add-team-wrap {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}
.settings-add-team-wrap .modal-input { width: 100%; }
.settings-add-team-wrap .btn-primary { align-self: flex-end; }

/* ===================== TOPBAR ===================== */

.topbar {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  height: var(--topbar-h);
  background: rgba(10, 22, 16, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 40;
  display: flex; align-items: center;
  padding: 0 20px; gap: 12px;
}

.topbar-filter { display: flex; align-items: center; gap: 8px; }

.topbar-label {
  color: var(--text-secondary);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  white-space: nowrap;
}

.topbar-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  color: white;
  font-size: 12px;
  font-family: inherit;
  outline: none; cursor: pointer;
  transition: border-color 0.15s;
}

.topbar-select:hover, .topbar-select:focus { border-color: var(--accent); }
.topbar-select option { background: var(--bg-card); }

.topbar-divider { width: 1px; height: 20px; background: var(--border); }

/* ===================== MAIN ===================== */

main { padding-top: var(--topbar-h); min-height: 100vh; }

/* ===================== DASHBOARD ALERTS ===================== */

.dash-alerts {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}

.dash-alert-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s;
  flex: 1; min-width: 200px;
}
.dash-alert-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.dash-alert-card.empty {
  cursor: default;
  justify-content: center; gap: 8px;
  border-left: 3px solid #34d399;
}
.dash-alert-card.empty:hover { transform: none; box-shadow: none; }

.dash-alert-icon { font-size: 22px; flex-shrink: 0; }
.dash-alert-text { flex: 1; min-width: 0; }
.dash-alert-titulo { font-size: 13px; font-weight: 700; color: white; }
.dash-alert-sub { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.dash-alert-arrow { color: var(--text-muted); font-size: 14px; flex-shrink: 0; }

/* ===================== DASHBOARD KPIs ===================== */

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dash-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.dash-kpi::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.dash-kpi:hover { border-color: var(--border-hover); }
.dash-kpi:hover::before { opacity: 1; }

.dash-kpi-clickable { cursor: pointer; user-select: none; }
.dash-kpi-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dash-kpi-alert { border-left: 3px solid #f87171; }

.dash-kpi-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}

.dash-kpi-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.07em;
  display: flex; align-items: center; gap: 4px;
}
.dash-kpi-label i { font-size: 13px; }

.dash-kpi-value {
  font-size: 1.8rem; font-weight: 800;
  color: white; line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.dash-kpi-sub {
  font-size: 10px; color: var(--text-muted);
}

.dash-kpi-var {
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 2px;
}
.dash-kpi-var.up { color: #34d399; background: rgba(52,211,153,0.12); }
.dash-kpi-var.down { color: #f87171; background: rgba(248,113,113,0.12); }
.dash-kpi-var.neutral { color: var(--text-muted); }

/* ===================== DASHBOARD PERFORMANCE ===================== */

.dash-perf-list { display: flex; flex-direction: column; gap: 8px; }

.dash-perf-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.dash-perf-row:last-child { border-bottom: none; }

.dash-perf-pos { width: 24px; text-align: center; font-size: 14px; flex-shrink: 0; }
.dash-perf-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px; flex-shrink: 0;
}
.dash-perf-info { flex: 1; min-width: 0; }
.dash-perf-name { font-size: 13px; font-weight: 700; color: white; }
.dash-perf-role { font-size: 10px; color: var(--text-secondary); margin-top: 1px; }

.dash-perf-bar-wrap {
  width: 100px; height: 6px;
  background: var(--border); border-radius: 3px;
  overflow: hidden; flex-shrink: 0;
}
.dash-perf-bar { height: 100%; border-radius: 3px; transition: width 0.4s ease; }

.dash-perf-metrics {
  display: flex; gap: 8px; flex-shrink: 0;
}
.dash-perf-metric {
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 3px;
  background: rgba(255,255,255,0.04);
  padding: 3px 8px; border-radius: 4px;
  white-space: nowrap;
}
.dash-perf-metric i { font-size: 12px; color: var(--text-muted); }

.dash-perf-receita {
  font-size: 12px; font-weight: 700; color: #34d399;
  width: 80px; text-align: right; flex-shrink: 0;
}

/* ===================== DASHBOARD TRENDS ROW ===================== */

.dash-trends-row {
  display: flex; gap: 12px;
  margin-top: 12px;
}

/* ===================== CHART CARDS ===================== */

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.chart-title {
  font-size: 10px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 12px;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.chart-canvas-wrap {
  height: 210px;
  position: relative;
}

.chart-canvas-wrap.center {
  display: flex;
  justify-content: center;
}

/* ===================== KANBAN ===================== */

.kanban-wrapper {
  display: flex; gap: 12px;
  height: calc(100vh - var(--topbar-h) - 120px);
  overflow-x: auto; padding-bottom: 16px;
}

.kanban-wrapper::-webkit-scrollbar { height: 6px; }
.kanban-wrapper::-webkit-scrollbar-track { background: transparent; }
.kanban-wrapper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.kanban-column {
  display: flex; flex-direction: column;
  width: 268px; flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.kanban-column[data-status="novo"]             { border-top: 2px solid #475569; }
.kanban-column[data-status="contatado"]        { border-top: 2px solid #3b82f6; }
.kanban-column[data-status="agendado"]         { border-top: 2px solid #f59e0b; }
.kanban-column[data-status="reuniao_realizada"]{ border-top: 2px solid #a855f7; }
.kanban-column[data-status="venda_efetivada"]  { border-top: 2px solid var(--accent); }
.kanban-column[data-status="farmer"]           { border-top: 2px solid #f59e0b; }
.kanban-column[data-status="removido"]         { border-top: 2px solid #ef4444; }

.kanban-col-header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}

.kanban-col-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  display: flex; align-items: center; gap: 8px;
  color: var(--text-secondary);
}

.col-count {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 100px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
}

.sortable-list {
  flex: 1; overflow-y: auto;
  padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sortable-list::-webkit-scrollbar { width: 3px; }
.sortable-list::-webkit-scrollbar-track { background: transparent; }
.sortable-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Empty state */
.kanban-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px 12px; gap: 8px;
  color: var(--text-muted);
  text-align: center;
}

.kanban-empty i { font-size: 24px; opacity: 0.5; }
.kanban-empty p { font-size: 11px; line-height: 1.5; }

.sortable-list:has([data-id]) .kanban-empty { display: none; }

/* ===================== LEAD CARDS ===================== */

.lead-card {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative; overflow: hidden;
  flex-shrink: 0; /* nunca comprime — scroll cuida do overflow */
}

.lead-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--col-color, var(--border));
  opacity: 0; transition: opacity 0.15s;
}

.lead-card:hover {
  border-color: var(--col-color, var(--border-hover));
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.lead-card:hover::after { opacity: 1; }

.lead-card-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}

.lead-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: white;
  flex-shrink: 0;
}

.lead-name {
  color: white;
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lead-meta {
  color: var(--text-secondary);
  font-size: 10px; margin-top: 4px;
}

.lead-badges {
  display: flex; flex-wrap: wrap; gap: 4px;
}

/* ===================== BADGES ===================== */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 600;
  font-family: inherit;
}

/* Category badges */
.badge-psicologa    { background: rgba(109,40,217,0.15); color: #a78bfa; border: 1px solid rgba(109,40,217,0.25); }
.badge-nutricionista{ background: rgba(5,150,105,0.15);  color: #34d399; border: 1px solid rgba(5,150,105,0.25); }
.badge-coach        { background: rgba(217,119,6,0.15);  color: #fbbf24; border: 1px solid rgba(217,119,6,0.25); }
.badge-terapeuta    { background: rgba(236,72,153,0.15); color: #f472b6; border: 1px solid rgba(236,72,153,0.25); }
.badge-outros       { background: rgba(71,85,105,0.18);  color: #94a3b8; border: 1px solid rgba(71,85,105,0.28); }

/* Operator badges */
.badge-seller  { background: rgba(71,85,105,0.18); color: #94a3b8; border: 1px solid rgba(71,85,105,0.28); }
.badge-closer  { background: rgba(5,150,105,0.12); color: #34d399; border: 1px solid rgba(5,150,105,0.22); }

/* Source badges by type */
.badge-fonte       { background: rgba(71,85,105,0.18); color: #94a3b8; border: 1px solid rgba(71,85,105,0.28); }
.badge-fonte-ia    { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.badge-fonte-typebot { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.25); }
.badge-fonte-manual { background: rgba(71,85,105,0.18); color: #94a3b8; border: 1px solid rgba(71,85,105,0.28); }
.badge-qualificado { background: rgba(5,150,105,0.13); color: #34d399; border: 1px solid rgba(5,150,105,0.22); }

/* Temperature badges */
.badge-temp { gap: 4px; }
.badge-temp-quente { background: rgba(5,150,105,0.12); color: #34d399; border: 1px solid rgba(5,150,105,0.25); }
.badge-temp-morno  { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.28); }
.badge-temp-frio   { background: rgba(96,165,250,0.12); color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }

/* Card temperature states */
.lead-card.card-morno { border-color: rgba(251,191,36,0.35); }
.lead-card.card-frio  { border-color: rgba(96,165,250,0.4); box-shadow: 0 0 0 1px rgba(96,165,250,0.1) inset; }

/* Follow-up badges */
.badge-followup-alert { background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.28); gap: 4px; }
.badge-followup-today { background: rgba(251,191,36,0.12);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.28);  gap: 4px; }

/* ===================== SEARCH ===================== */

.search-bar {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
  margin-bottom: 16px; width: 300px;
  transition: border-color 0.15s;
}

.search-bar:focus-within { border-color: var(--accent); }
.search-bar i { color: var(--text-secondary); font-size: 14px; flex-shrink: 0; }

.search-input {
  background: none; border: none; outline: none;
  color: white; font-family: inherit; font-size: 13px; width: 100%;
}

.search-input::placeholder { color: var(--text-secondary); }

/* ===================== MODALS ===================== */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  position: relative; width: 100%;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.15s;
}

.modal-close:hover { background: rgba(255,255,255,0.1); color: white; }

.modal-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.06em;
  display: block; margin-bottom: 8px;
}

.modal-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
  color: white; font-family: inherit; font-size: 13px;
  outline: none; transition: border-color 0.15s;
}

.modal-input:focus { border-color: var(--accent); }
.modal-input option { background: var(--bg-card); }

/* ===== VALIDAÇÃO — campo obrigatório vazio ===== */
@keyframes input-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.input-error {
  border-color: #f87171 !important;
  animation: input-shake 0.35s ease;
}
.input-error:focus { border-color: #f87171 !important; }

/* ===================== BUTTONS ===================== */

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: white;
  border: none; border-radius: 8px;
  padding: 8px 16px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}

.btn-primary:hover { background: #047857; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(5,150,105,0.25); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 16px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}

.btn-secondary:hover { background: rgba(255,255,255,0.09); color: white; border-color: var(--border-hover); }
.btn-secondary:active { background: rgba(255,255,255,0.04); transform: translateY(0); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(239,68,68,0.13); color: #f87171;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px; padding: 8px 16px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}

.btn-danger:hover { background: rgba(239,68,68,0.25); border-color: rgba(239,68,68,0.5); color: #fca5a5; }
.btn-danger:active { background: rgba(239,68,68,0.18); }

/* ===================== DROP ZONE ===================== */

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 24px; text-align: center;
  cursor: pointer; transition: all 0.2s;
}

.drop-zone:hover { border-color: var(--accent); background: var(--accent-dim); }

/* ===================== INFO CELLS ===================== */

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.info-cell {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 12px;
}

.info-cell-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.info-cell-value { font-size: 13px; color: white; font-weight: 500; line-height: 1.4; }

/* ===================== NOTIFICATION BELL ===================== */

.notif-bell {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  transition: background .15s;
}

.notif-bell:hover { background: var(--border); }

.notif-bell-icon {
  font-size: 18px;
  color: var(--text-secondary);
  transition: color .15s;
}

.notif-bell:hover .notif-bell-icon { color: var(--text-primary); }

.notif-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: #ef4444;
  color: white;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 1;
}

.notif-badge:empty { display: none; }

/* ===================== TOAST ===================== */

.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; font-family: inherit;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  max-width: 320px; pointer-events: auto;
  animation: toastIn 0.3s ease-out;
}

.toast-success { background: var(--bg-card); border: 1px solid rgba(5,150,105,0.5); color: white; }
.toast-success .t-icon { color: var(--accent-light); font-size: 18px; }
.toast-error   { background: var(--bg-card); border: 1px solid rgba(239,68,68,0.5); color: white; }
.toast-error   .t-icon { color: #f87171; font-size: 18px; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===================== SORTABLE ===================== */

.sortable-ghost {
  opacity: 0.25;
  background: var(--accent-dim) !important;
  border-color: var(--accent) !important;
}

.sortable-drag {
  background: var(--bg-card) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6) !important;
  cursor: grabbing !important;
  transform: rotate(1.5deg) !important;
}

/* ===================== ANIMATIONS ===================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.25s ease-out forwards; }

@keyframes skeletonPulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.65; }
}

.skeleton {
  background: var(--border);
  border-radius: 4px;
  animation: skeletonPulse 1.6s ease-in-out infinite;
}

/* ===================== SECTION TITLE ===================== */

.section-title {
  font-size: 10px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* (dashboard sections and kpi-clickable removed in dashboard redesign v2) */

/* ===================== LEADS LIST MODAL ===================== */

.leads-list-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.leads-list-row:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(2px);
}

/* ===================== QUALIFICATION BADGES ===================== */

.badge-qualif-ultra { background: rgba(15,110,86,0.2); color: #0F6E56; border: 1px solid rgba(15,110,86,0.4); }
.badge-qualif       { background: rgba(29,158,117,0.18); color: #1D9E75; border: 1px solid rgba(29,158,117,0.35); }
.badge-qualif-pot   { background: rgba(239,159,39,0.15); color: #EF9F27; border: 1px solid rgba(239,159,39,0.3); }
.badge-qualif-des   { background: rgba(226,75,74,0.15); color: #E24B4A; border: 1px solid rgba(226,75,74,0.3); }
.badge-qualif-override { position: relative; }
.badge-qualif-override::after { content: '✎'; margin-left: 4px; font-size: 9px; opacity: 0.7; }
.qualif-divergente { outline: 1px dashed rgba(239,159,39,0.5); outline-offset: 2px; }

/* Qualification breakdown bars */
.qualif-bar-row { display: flex; align-items: center; gap: 8px; font-size: 10px; }
.qualif-bar-label { width: 80px; color: var(--text-secondary); flex-shrink: 0; text-align: right; }
.qualif-bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.qualif-bar-fill { height: 100%; border-radius: 3px; transition: width .3s ease; }
.qualif-bar-pts { width: 32px; color: var(--text-secondary); font-size: 9px; flex-shrink: 0; }

/* (widget system and charts-grid-3 removed in dashboard redesign v2) */

/* ===================== SETTINGS ===================== */

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.settings-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; color: white;
}

.settings-list {
  padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 48px;
}

.settings-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s;
}

.settings-item:hover { border-color: var(--border-hover); }

.settings-item-name {
  flex: 1; font-size: 13px; font-weight: 500; color: white;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.settings-item-key {
  font-size: 10px; color: var(--text-muted);
  font-family: monospace; flex-shrink: 0;
}

.settings-col-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}

.settings-btn-remove {
  width: 24px; height: 24px; border-radius: 4px; flex-shrink: 0;
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}

.settings-btn-remove:hover {
  background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #f87171;
}

.settings-add-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}

.settings-empty {
  font-size: 12px; color: var(--text-muted);
  padding: 12px 4px; text-align: center;
}

/* ===================== IMPORT PREVIEW ===================== */

.preview-section-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 8px;
}

.preview-toggle-btn {
  font-size: 10px; font-weight: 600;
  color: var(--text-secondary);
  background: none; border: none; cursor: pointer;
  padding: 2px 6px; border-radius: 4px;
  transition: color 0.15s;
}
.preview-toggle-btn:hover { color: white; }

.preview-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 200px; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.preview-list::-webkit-scrollbar { width: 3px; }
.preview-list::-webkit-scrollbar-track { background: transparent; }
.preview-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.preview-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer;
  transition: border-color 0.15s;
}
.preview-row:hover { border-color: var(--border-hover); }

.preview-row input[type="checkbox"] {
  width: 14px; height: 14px; cursor: pointer;
  accent-color: var(--accent); flex-shrink: 0;
}

.preview-dup-reason {
  font-size: 10px; color: #fbbf24;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 4px; padding: 2px 6px;
  white-space: nowrap; flex-shrink: 0;
}

.preview-empty {
  font-size: 12px; color: var(--text-muted);
  text-align: center; padding: 16px;
}

/* ===================== BULK SELECTION ===================== */

/* Card checkbox indicator */
.card-sel-check {
  display: none;
  position: absolute;
  top: 8px; right: 8px;
  width: 18px; height: 18px;
  border: 2px solid var(--border-hover);
  border-radius: 4px;
  background: var(--bg-card);
  align-items: center; justify-content: center;
  font-size: 10px; color: transparent;
  transition: all .12s;
  pointer-events: none;
  z-index: 2;
}

/* Show checkboxes in selection mode */
.kanban-wrapper.selection-mode .lead-card {
  cursor: pointer;
  position: relative;
}

.kanban-wrapper.selection-mode .card-sel-check {
  display: flex;
}

/* Selected card */
.lead-card.card-selected {
  border-color: var(--accent) !important;
  background: rgba(5,150,105,0.08);
}

.lead-card.card-selected .card-sel-check {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

/* Kanban selection toolbar button */
.kanban-select-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  transition: all .12s;
  white-space: nowrap;
}

.kanban-select-btn:hover { border-color: var(--border-hover); color: white; }
.kanban-select-btn.active { border-color: var(--accent); color: var(--accent-light); background: rgba(5,150,105,0.1); }

/* Temperature filter buttons */
.temp-filter-btn {
  padding: 4px 8px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  display: flex; align-items: center; gap: 4px;
}
.temp-filter-btn:hover { border-color: var(--border-hover); color: white; }
.temp-filter-btn.temp-filter-active { border-color: var(--accent); color: var(--accent-light); background: var(--accent-dim); }

/* Lead score badge */
.badge-score {
  background: transparent;
  border: none;
  padding: 0 2px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--score-color, #64748b);
}

/* Floating bulk action bar */
.bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: #0f2318;
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  min-width: 480px;
  flex-wrap: wrap;
}

.bulk-bar.hidden { display: none !important; }

.bulk-bar-count {
  font-size: 12px; font-weight: 700; color: var(--accent-light);
  white-space: nowrap; flex-shrink: 0;
  padding-right: 8px;
  border-right: 1px solid var(--border);
}

.bulk-bar-label {
  font-size: 10px; color: var(--text-secondary);
  white-space: nowrap; flex-shrink: 0;
}

.bulk-bar select {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: white;
  font-size: 11px;
  font-family: inherit;
  padding: 5px 8px;
  cursor: pointer;
}

.bulk-bar select:focus { outline: none; border-color: var(--accent); }

.bulk-bar-divider {
  width: 1px; height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

/* Contact table checkboxes */
.contacts-table .col-check {
  width: 36px;
  padding: 8px 4px 8px 12px;
}

.contacts-table input[type="checkbox"] {
  width: 14px; height: 14px;
  cursor: pointer;
  accent-color: var(--accent);
}

.contacts-table tr.row-selected td {
  background: rgba(5,150,105,0.06);
}

/* ===================== CONTACTS TABLE ===================== */

.contacts-toolbar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}

.inline-filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.inline-filter-bar .topbar-select {
  min-width: 120px;
}

.contacts-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  flex: 1; max-width: 340px;
}

.contacts-search input {
  background: none; border: none; outline: none;
  color: white; font-size: 13px; font-family: inherit; width: 100%;
}

.contacts-search input::placeholder { color: var(--text-secondary); }

.contacts-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.contacts-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}

.contacts-table th {
  background: rgba(0,0,0,0.2);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.contacts-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(26,56,40,0.5);
  color: var(--text-primary);
  vertical-align: middle;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-table tr:last-child td { border-bottom: none; }

.contacts-table tbody tr {
  cursor: pointer;
  transition: background .12s;
}

.contacts-table tbody tr:hover { background: var(--bg-card-hover); }

.contacts-table .cell-muted { color: var(--text-secondary); }

.contacts-count {
  font-size: 11px; color: var(--text-secondary); margin-left: auto;
}

/* Edit modal for contacts */
.contact-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===================== CONVERSATIONS ===================== */

.conv-layout {
  display: flex;
  height: calc(100vh - var(--topbar-h) - 48px);
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.conv-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conv-sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; color: white;
  display: flex; align-items: center; gap: 8px;
}

.conv-search {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}

.conv-search input {
  background: none; border: none; outline: none;
  color: white; font-size: 12px; font-family: inherit; flex: 1;
}
.conv-search input::placeholder { color: var(--text-secondary); }

.conv-list {
  overflow-y: auto; flex: 1;
}

.conv-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(26,56,40,0.4);
  cursor: pointer;
  transition: background .12s;
  display: flex; align-items: center; gap: 8px;
}

.conv-item:hover { background: var(--bg-card-hover); }
.conv-item.active { background: rgba(5,150,105,0.1); border-left: 2px solid var(--accent); }

.conv-avatar {
  width: 36px; height: 36px;
  background: var(--accent-dim);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--accent-light);
  flex-shrink: 0;
}

.conv-item-info { flex: 1; min-width: 0; }

.conv-item-name {
  font-size: 12px; font-weight: 600; color: white;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.conv-item-preview {
  font-size: 10px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}

.conv-item-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  flex-shrink: 0;
}

.conv-time { font-size: 10px; color: var(--text-muted); }

.conv-platform-icon { font-size: 13px; }

/* Chat panel */
.conv-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conv-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}

.conv-header-name {
  font-size: 13px; font-weight: 700; color: white;
}

.conv-header-sub {
  font-size: 10px; color: var(--text-secondary);
}

.conv-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conv-empty {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

.msg-bubble {
  max-width: 72%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.msg-out {
  align-self: flex-end;
  background: rgba(5,150,105,0.18);
  border: 1px solid rgba(5,150,105,0.3);
  color: white;
  border-bottom-right-radius: 4px;
}

.msg-in {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.msg-note {
  align-self: center;
  background: rgba(251,191,36,0.07);
  border: 1px solid rgba(251,191,36,0.15);
  color: #fbbf24;
  font-size: 11px;
  max-width: 90%;
  border-radius: 8px;
  text-align: center;
}

.msg-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

.msg-in .msg-meta { text-align: left; }

.conv-input-bar {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex; align-items: flex-end; gap: 8px;
  flex-shrink: 0;
}

.conv-input-bar textarea {
  flex: 1;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: white;
  font-family: inherit;
  font-size: 12px;
  padding: 8px 12px;
  resize: none;
  min-height: 36px;
  max-height: 100px;
  line-height: 1.4;
}

.conv-input-bar textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.conv-type-btns {
  display: flex; gap: 4px; flex-shrink: 0;
}

.conv-type-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all .15s;
}

.conv-type-btn:hover { border-color: var(--border-hover); color: white; }
.conv-type-btn.active { background: rgba(5,150,105,0.15); border-color: var(--accent); color: var(--accent-light); }

.conv-integration-banner {
  padding: 8px 16px;
  background: rgba(251,191,36,0.05);
  border-bottom: 1px solid rgba(251,191,36,0.1);
  font-size: 10px;
  color: #fbbf24;
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}

/* Unread badge */
.conv-unread-badge {
  background: var(--accent);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.conv-item-unread .conv-item-name { color: white; font-weight: 700; }
.conv-item-unread .conv-item-preview { color: var(--text-primary); font-weight: 500; }

/* Platform label in chat header */
.conv-platform-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-secondary);
}

/* Platform hint in input bar */
.conv-input-platform-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  padding: 0 4px;
}

/* Message sender name */
.msg-sender {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

/* Message status icons */
.msg-status {
  font-size: 11px;
  margin-left: 4px;
  vertical-align: middle;
}

.msg-status-sent { color: var(--text-muted); }
.msg-status-delivered { color: var(--text-secondary); }
.msg-status-read { color: #4ade80; }
.msg-status-failed { color: #f87171; }

/* Platform badge in message */
.msg-platform-badge {
  display: inline-flex;
  margin-right: 4px;
  vertical-align: middle;
}

.msg-platform-badge .conv-platform-icon { font-size: 10px; }

/* Message media */
.msg-media {
  margin: 4px 0;
}

.msg-media img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 6px;
  cursor: pointer;
  object-fit: cover;
}

.msg-media audio {
  width: 100%;
  height: 32px;
}

/* Outgoing messages — direction aliases */
.msg-outgoing {
  align-self: flex-end;
  background: rgba(5,150,105,0.18);
  border: 1px solid rgba(5,150,105,0.3);
  color: white;
  border-bottom-right-radius: 4px;
}

.msg-incoming {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

/* ===================== SETTINGS CFG LAYOUT ===================== */

.cfg-layout {
  display: flex;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

.cfg-nav {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.cfg-nav-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 10px;
  margin-bottom: 10px;
}

.cfg-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  background: transparent; border: none;
  cursor: pointer; text-align: left;
  transition: background 0.15s, color 0.15s;
}
.cfg-nav-item:hover { background: var(--border); color: var(--text-primary); }
.cfg-nav-item.active {
  background: rgba(5,150,105,0.12);
  color: var(--accent-light);
}
.cfg-nav-item i { font-size: 16px; flex-shrink: 0; }

.cfg-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
}

.cfg-panel {}

.cfg-panel-header {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cfg-panel-icon {
  font-size: 28px;
  margin-top: 2px;
  flex-shrink: 0;
}

.cfg-panel-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.cfg-panel-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.cfg-list {
  max-width: 560px;
  margin-bottom: 16px;
}

.cfg-metas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  max-width: 760px;
}

/* ===================== SETTINGS INLINE EDIT ===================== */

.settings-item-edit-input {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: white;
  font-family: inherit;
  font-size: 12px;
  padding: 3px 8px;
  outline: none;
}

.settings-btn-edit {
  width: 24px; height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: all .12s;
}

.settings-btn-edit:hover { color: #60a5fa; border-color: #60a5fa; background: rgba(96,165,250,0.1); }

.settings-btn-save {
  width: 24px; height: 24px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: rgba(5,150,105,0.15);
  color: var(--accent-light);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.settings-btn-save:hover { background: rgba(5,150,105,0.3); }

/* ===================== COLUMN DRAG HANDLE ===================== */

.kanban-col-drag-handle {
  font-size: 16px;
  color: var(--text-muted);
  cursor: grab;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color .12s;
}

.kanban-col-drag-handle:hover { color: var(--text-secondary); }
.kanban-col-drag-handle:active { cursor: grabbing; }

.col-sortable-ghost {
  opacity: 0.4;
  background: rgba(5,150,105,0.08);
  border: 1px dashed var(--accent);
}

/* ===================== FOLLOW-UP PANEL ===================== */

.followup-panel {
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.followup-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 4px;
  font-size: 11px; font-weight: 700; color: #f87171;
  text-transform: uppercase; letter-spacing: .05em;
}

.followup-count {
  background: rgba(248,113,113,0.18); color: #f87171;
  border-radius: 10px; padding: 0 6px; font-size: 10px; font-weight: 700;
}

.followup-group-label {
  padding: 4px 16px 2px;
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
}

.followup-overdue-label { color: #f87171; }
.followup-today-label   { color: #fbbf24; }

.followup-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; cursor: pointer;
  border-radius: 8px; margin: 1px 6px;
  transition: background .12s;
}

.followup-item:hover { background: var(--bg-card-hover); }

.followup-item-name {
  font-size: 11px; color: white; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}

.followup-item-date {
  font-size: 10px; font-weight: 700; flex-shrink: 0; margin-left: 8px;
}

.followup-item-overdue .followup-item-date { color: #f87171; }
.followup-item-today   .followup-item-date { color: #fbbf24; }
.followup-item-upcoming .followup-item-date { color: var(--text-secondary); }

/* Note template quick buttons */
.note-template-btn {
  padding: 3px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
}
.note-template-btn:hover { border-color: var(--accent); color: var(--accent-light); background: var(--accent-dim); }

/* ===================== UTILITY CLASSES (inline → CSS) ===================== */

/* Small button variant */
.btn-sm {
  padding: 4px 12px;
  font-size: 11px;
  gap: 4px;
}

/* Dashboard header row */
.dash-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* (customize panel removed in dashboard redesign v2) */

/* Section page headers (Contatos, Conversas, Settings) */
.page-header {
  margin-bottom: 16px;
  display: flex; align-items: center;
  justify-content: space-between;
}

.page-title {
  font-size: 20px; font-weight: 800;
  color: white; margin-bottom: 4px;
  letter-spacing: -0.03em;
}

.page-title-sm { font-size: 16px; }

.page-subtitle {
  font-size: 11px; color: var(--text-secondary);
}

.page-subtitle-md { font-size: 12px; }

/* Custom date filter container */
.filter-custom-dates {
  display: none; align-items: center; gap: 4px;
}

.filter-date-sep {
  color: var(--text-muted); font-size: 10px;
}

.topbar-date-input {
  cursor: pointer; padding: 4px 8px;
}

/* Follow-up alert in topbar */
.followup-alert {
  display: none; align-items: center; gap: 4px;
  cursor: pointer;
}

.followup-alert-icon { color: #f87171; font-size: 16px; }
.followup-alert-count { font-size: 11px; font-weight: 700; color: #f87171; }

/* Global search */
.global-search-wrap {
  display: flex; align-items: center; gap: 8px;
  position: relative; margin-left: auto;
}

.search-bar-inline {
  margin-bottom: 0; width: 200px;
}

.global-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px); right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 500;
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}

/* Kanban toolbar */
.kanban-toolbar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}

.temp-filter-group { display: flex; gap: 4px; }

/* Metas — grid de meses (config) */
.metas-meses-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.meta-mes-item { display: flex; flex-direction: column; gap: 2px; }
.meta-mes-label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.meta-mes-input { width: 100% !important; font-size: 12px !important; padding: 6px 8px !important; }
@media (max-width: 640px) { .metas-meses-grid { grid-template-columns: repeat(3, 1fr); } }

/* Metas — botões de período */
.metas-periodo-btns { display: flex; gap: 4px; }
.metas-periodo-btn { padding: 4px 12px; font-size: 11px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; transition: all .15s; }
.metas-periodo-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

/* Metas — barra de progresso (compartilhada) */
.metas-barra-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.metas-barra-label { font-size: 11px; color: var(--text-secondary); min-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metas-barra-track { flex: 1; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.metas-barra-fill { height: 100%; border-radius: 5px; transition: width .5s ease; }
.metas-barra-valores { font-size: 11px; color: var(--text-muted); min-width: 110px; text-align: right; white-space: nowrap; }
.metas-barra-pct { font-size: 11px; font-weight: 700; min-width: 45px; text-align: right; }

/* Metas — Barra Termômetro (dashboard) */
.metas-termometro-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.metas-termometro-card.metas-clickable { cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.metas-termometro-card.metas-clickable:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.metas-termometro-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.metas-termometro-title { font-size: 14px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.metas-ver-time { font-size: 11px; color: var(--accent-light); font-weight: 500; display: flex; align-items: center; gap: 4px; }
.metas-termometro-bar-wrap { height: 36px; background: var(--border); border-radius: 18px; overflow: hidden; margin: 6px 0; }
.metas-termometro-bar { height: 100%; border-radius: 18px; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; transition: width .5s ease; min-width: 40px; }
.metas-termometro-pct { font-weight: 700; color: #fff; font-size: 13px; }
.metas-termometro-footer { display: flex; justify-content: space-between; margin-top: 6px; }
.metas-termometro-valor { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.metas-termometro-sub { font-size: 10px; color: var(--text-muted); }

/* Metas — Minhas Metas (card individual) */
.metas-minhas-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.metas-minhas-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.metas-minhas-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.metas-minhas-nome { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.metas-minhas-role { font-size: 10px; color: var(--accent-light); }

/* Metas — Tela Completa (admin) */
.metas-tela-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.metas-back-btn { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent-light); background: none; border: none; cursor: pointer; font-weight: 500; padding: 0; font-family: inherit; }
.metas-back-btn:hover { text-decoration: underline; }
.metas-tela-titulo { font-size: 16px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 6px; flex: 1; }
.metas-tela-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.metas-tela-section-titulo { font-size: 11px; font-weight: 700; color: var(--text-secondary); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px; display: flex; align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }

/* Metas — Cards de configuração */
.metas-member-card { flex: 1; min-width: 200px; max-width: 280px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; transition: border-color .2s; }
.metas-member-card:hover { border-color: var(--accent); }
.metas-member-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.metas-member-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.metas-member-name { font-size: 11px; font-weight: 600; color: var(--text-primary); }
.metas-member-role { font-size: 9px; padding: 1px 6px; border-radius: 4px; font-weight: 500; }
.metas-member-meta-row { font-size: 10px; color: var(--text-secondary); margin-bottom: 3px; }
.metas-member-meta-row span { color: var(--text-primary); font-weight: 500; }
.metas-member-edit { display: block; text-align: center; margin-top: 8px; font-size: 10px; color: var(--accent-light); cursor: pointer; font-weight: 500; }
.metas-member-edit:hover { text-decoration: underline; }

/* Settings page */
.settings-page { max-width: 1400px; margin: 0 auto; }
.settings-page-header { margin-bottom: 24px; }
.settings-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: start; }

/* Settings icon colors */
.icon-blue   { color: #60a5fa; font-size: 16px; }
.icon-green  { color: #34d399; font-size: 16px; }
.icon-purple { color: #a855f7; font-size: 16px; }
.icon-amber  { color: #fbbf24; font-size: 16px; }
.icon-accent { color: var(--accent-light); font-size: 16px; }

/* Settings inline utilities */
.settings-card-gap { margin-bottom: 16px; }
.settings-input-flex { flex: 1; }
.btn-add { padding: 8px 16px; }

/* Search icon in search bars */
.search-icon { color: var(--text-secondary); font-size: 12px; flex-shrink: 0; }
.search-icon-lg { font-size: 16px; }

/* Conversation empty state */
.conv-empty-icon { font-size: 40px; }
.conv-empty-title { font-size: 13px; font-weight: 600; color: white; }
.conv-empty-desc { font-size: 11px; color: var(--text-secondary); text-align: center; max-width: 220px; }

/* Ranking content */
.ranking-content { padding: 0 16px 16px; }

/* Loading state */
.loading-cell { text-align: center; padding: 32px; color: var(--text-muted); }

/* Settings description */
.settings-desc {
  font-size: 11px; color: var(--text-secondary);
  padding: 0 16px 12px; line-height: 1.5;
}

/* Settings add-row variants */
.settings-add-row-wrap { gap: 8px; flex-wrap: wrap; }
.settings-add-row-padded { padding: 0 16px 16px; gap: 8px; }

/* Inline label */
.label-inline {
  font-size: 10px; color: var(--text-secondary);
  white-space: nowrap;
}
.label-inline-md { font-size: 11px; }

/* More icon colors */
.icon-orange { color: #fb923c; font-size: 16px; }
.icon-pink   { color: #f472b6; font-size: 16px; }

/* Settings team goals list */
.settings-goals-list {
  padding: 0 16px 8px;
  display: flex; flex-direction: column; gap: 8px;
}

/* Color picker */
.color-picker {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none; padding: 2px;
  cursor: pointer;
}

/* Modal sections */
.modal-section { padding: 24px; }
.modal-section-flex { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-heading { font-size: 16px; font-weight: 700; color: white; margin-bottom: 4px; }
.modal-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-footer { display: flex; gap: 8px; padding-top: 4px; border-top: 1px solid var(--border); }
.btn-full { width: 100%; justify-content: center; }
.btn-flex { flex: 1; justify-content: center; }

/* Drop zone icon */
.drop-zone-icon { font-size: 32px; color: var(--text-secondary); display: block; margin-bottom: 8px; }
.drop-zone-text { font-size: 12px; color: var(--text-secondary); }

/* Product price row */
.product-price-row { display: flex; align-items: center; gap: 8px; }
.product-price-input { width: 90px; }

/* Mapping grid */
.mapping-grid { display: flex; flex-direction: column; gap: 8px; }

/* ===================== LOGIN PAGE ===================== */

.login-page {
  padding-left: 0;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0a1610 0%, #0f2418 50%, #0a1610 100%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%; max-width: 380px;
  box-shadow: 0 0 80px rgba(5, 150, 105, 0.08), 0 24px 64px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; align-items: center; gap: 0;
}

.login-logo {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 22px; color: white;
  box-shadow: 0 0 24px rgba(5, 150, 105, 0.4);
  margin-bottom: 16px;
}

.login-title {
  font-size: 22px; font-weight: 800; color: white;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 12px; color: var(--text-secondary);
  margin-bottom: 28px;
}

.login-form { width: 100%; display: flex; flex-direction: column; gap: 16px; }

.login-field { display: flex; flex-direction: column; gap: 6px; }

.login-input-wrap {
  position: relative; display: flex; align-items: center;
}
.login-input-wrap > i {
  position: absolute; left: 10px;
  color: var(--text-secondary); font-size: 16px; pointer-events: none;
}
.login-input { padding-left: 34px !important; }

.login-eye {
  position: absolute; right: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 16px; padding: 4px;
  display: flex; align-items: center;
  transition: color 0.15s;
}
.login-eye:hover { color: white; }

.login-error {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 8px;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  color: #f87171; font-size: 12px;
}
.login-error i { font-size: 16px; flex-shrink: 0; }

.login-btn { margin-top: 4px; justify-content: center; gap: 8px; }

/* ===================== TABLE EMPTY STATE ===================== */

.table-empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 48px 16px;
  color: var(--text-muted); text-align: center;
}
.table-empty-state i { font-size: 28px; opacity: 0.5; }
.table-empty-state p { font-size: 12px; }

/* Pagination controls */
.pagination-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 12px 0;
}
.pagination-controls .btn-sm {
  display: inline-flex; align-items: center; gap: 4px;
}
.pagination-info {
  font-size: 12px; color: var(--text-secondary);
}

/* preview empty state */
.preview-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; padding: 20px 16px;
  color: var(--text-muted); font-size: 12px; text-align: center;
}
.preview-empty i { font-size: 22px; opacity: 0.5; }

/* contacts load more */
.contacts-load-more-wrap {
  display: flex; justify-content: center;
  padding: 12px 0 4px;
}

/* kanban column empty state */
.kanban-empty-col {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; padding: 32px 12px;
  color: var(--text-muted); text-align: center;
}
.kanban-empty-col i { font-size: 22px; opacity: 0.5; }
.kanban-empty-col span { font-size: 11px; }

/* conversations empty list */
.conv-list-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 32px 16px;
  color: var(--text-muted); text-align: center;
}
.conv-list-empty i { font-size: 28px; opacity: 0.5; }
.conv-list-empty p { font-size: 11px; line-height: 1.5; }

/* dashboard empty state */
.dash-empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; padding: 64px 24px;
  color: var(--text-muted); text-align: center;
}
.dash-empty-state i { font-size: 40px; opacity: 0.4; }
.dash-empty-state p { font-size: 13px; line-height: 1.6; max-width: 320px; }
.dash-empty-state .btn-sm {
  margin-top: 4px; color: var(--accent-light);
  border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 6px 16px; font-size: 12px; background: var(--accent-dim);
  cursor: pointer; transition: all 0.15s;
}
.dash-empty-state .btn-sm:hover { background: var(--accent); color: #fff; }

/* ===================== PROFILE AVATAR ===================== */

.profile-avatar-wrap {
  position: relative; flex-shrink: 0;
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: var(--accent-light);
  overflow: hidden;
  border: 2px solid var(--border);
}
.profile-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.profile-avatar-edit {
  position: absolute; bottom: -2px; right: -2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer;
  border: 2px solid var(--bg-card);
  transition: background 0.15s;
}
.profile-avatar-edit:hover { background: var(--accent-light); }

/* ===================== FORM VALIDATION ===================== */

.modal-input.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}
.modal-input.is-invalid:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}
.field-error {
  font-size: 11px; color: #ef4444;
  margin-top: 3px; display: none;
}
.field-error.visible { display: block; }

/* global search empty */
.search-empty {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 12px;
  font-size: 12px; color: var(--text-muted);
}
.search-empty i { font-size: 16px; flex-shrink: 0; }

/* ===================== RESPONSIVE — MOBILE ===================== */

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  body {
    padding-left: 0 !important;
    padding-bottom: 56px;
  }

  /* Sidebar vira bottom nav */
  .sidebar {
    top: auto; bottom: 0; left: 0; right: 0;
    width: 100% !important;
    height: 56px;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--border);
    padding: 0 12px;
    z-index: 60;
    overflow: hidden;
  }

  .sidebar-header, .sidebar-brand,
  .sidebar-bottom, .sidebar-divider,
  .sidebar-toggle-btn { display: none !important; }

  /* Anula estado expandido no mobile */
  .sidebar.expanded {
    width: 100% !important;
    align-items: center;
  }
  .sidebar.expanded .sidebar-nav {
    flex-direction: row;
    align-items: center;
    padding: 0;
  }
  .sidebar.expanded .sidebar-btn {
    width: 44px; height: 44px;
    justify-content: center; gap: 0; padding: 0;
  }
  .sidebar.expanded .sidebar-label { display: none !important; }

  .sidebar-nav {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%; flex: 1; padding: 0;
  }

  .sidebar-btn { width: 44px; height: 44px; font-size: 20px; }
  .sidebar-label { display: none; }

  /* Topbar */
  .topbar { left: 0; padding: 0 12px; gap: 8px; }
  .topbar-filter, .topbar-divider { display: none; }
  .global-search-wrap { flex: 1; }
  .search-bar-inline { width: 100%; }

  /* Dashboard KPIs */
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }

  /* Charts */
  .charts-grid { grid-template-columns: 1fr; }

  /* Dashboard Trends */
  .dash-trends-row { flex-direction: column; }

  /* Alerts */
  .dash-alerts { flex-direction: column; }
  .dash-alert-card { min-width: unset; }

  /* Kanban */
  .search-bar { width: 100%; max-width: 100%; }
  .kanban-toolbar { flex-wrap: wrap; }
  .kanban-wrapper { height: calc(100vh - var(--topbar-h) - 180px); }
  .kanban-column { width: 240px; }
  .temp-filter-group { order: 1; }

  /* Contacts */
  .contacts-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .contacts-toolbar { flex-wrap: wrap; }
  .contacts-search { max-width: 100%; }
  .inline-filter-bar { padding: 8px 12px; gap: 6px; }
  .inline-filter-bar .topbar-select { min-width: 90px; font-size: 11px; }

  /* Conversations: stack vertically */
  .conv-layout { flex-direction: column; height: auto; min-height: calc(100vh - var(--topbar-h) - 48px); }
  .conv-sidebar { width: 100%; max-height: 35vh; border-right: none; border-bottom: 1px solid var(--border); }
  .conv-main { min-height: 50vh; }

  /* Prospecção */
  .prosp-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .prosp-tab { white-space: nowrap; flex-shrink: 0; }
  .prosp-cat-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

  /* Page padding */
  .p-6 { padding: 12px !important; }
  .page-title { font-size: 18px; }

  /* Performance table */
  .perf-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Metas */
  .metas-tela-header { flex-wrap: wrap; gap: 8px; }

  /* Modals: slide up full-width */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    border-radius: 14px 14px 0 0;
    max-height: 92vh; overflow-y: auto;
    width: 100%; max-width: 100%;
  }
}

@media (max-width: 480px) {
  .dash-kpi-value { font-size: 1.4rem; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }

  /* Kanban: narrower columns */
  .kanban-column { width: 220px; }

  /* Contacts: hide less important columns */
  .contacts-table .col-cidade,
  .contacts-table .col-fonte { display: none; }

  /* Conversations: more space for chat */
  .conv-sidebar { max-height: 30vh; }

  /* Single column KPIs on very small screens */
  .metas-meses-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Bia Prospect ─────────────────────────── */

.prosp-tabs { display:flex; gap:4px; margin-bottom:20px; border-bottom:1px solid var(--border); padding-bottom:8px; }
.prosp-tab { padding:6px 14px; border-radius:var(--radius); font-size:12px; color:var(--text-secondary); background:transparent; border:none; cursor:pointer; display:flex; align-items:center; gap:6px; transition:all 0.15s; font-family:inherit; }
.prosp-tab:hover { color:var(--text-primary); background:var(--bg-card-hover); }
.prosp-tab.active { color:var(--accent-light); background:var(--accent-dim); font-weight:600; }

.prosp-section { margin-bottom:16px; }

.prosp-cat-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:8px; }
.prosp-cat-chip { padding:10px 12px; border-radius:var(--radius); border:1px solid var(--border); background:var(--bg-card); cursor:pointer; display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text-secondary); transition:all 0.15s; }
.prosp-cat-chip:hover { border-color:var(--border-hover); color:var(--text-primary); }
.prosp-cat-chip.selected { border-color:var(--accent); background:var(--accent-dim); color:var(--accent-light); font-weight:600; }

.prosp-progress { margin-top:16px; }

/* Timeline de progresso */
.prosp-timeline { display:flex; flex-direction:column; gap:0; }
.prosp-step { display:flex; align-items:flex-start; gap:12px; padding:10px 0; position:relative; opacity:0.3; transition:opacity 0.3s ease; }
.prosp-step:not(:last-child)::after { content:''; position:absolute; left:15px; top:38px; bottom:-2px; width:2px; background:var(--border); transition:background 0.3s ease; }
.prosp-step.active { opacity:1; }
.prosp-step.active::after { background:var(--accent); }
.prosp-step.done { opacity:0.7; }
.prosp-step.done .prosp-step-icon { background:var(--accent); color:#fff; border-color:var(--accent); }
.prosp-step.done::after { background:var(--accent); }
.prosp-step.error .prosp-step-icon { background:#ef4444; color:#fff; border-color:#ef4444; }
.prosp-step.error .prosp-step-detail { color:#ef4444; }
.prosp-step-icon { width:32px; height:32px; border-radius:50%; background:var(--bg-card); border:2px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:14px; color:var(--text-secondary); flex-shrink:0; transition:all 0.3s ease; }
.prosp-step.active .prosp-step-icon { border-color:var(--accent); color:var(--accent-light); animation:prosp-pulse 1.5s ease-in-out infinite; }
@keyframes prosp-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(5,150,105,0.4)} 50%{box-shadow:0 0 0 8px rgba(5,150,105,0)} }
.prosp-step-content { padding-top:4px; }
.prosp-step-title { font-size:13px; font-weight:600; color:var(--text-primary); }
.prosp-step-detail { font-size:11px; color:var(--text-secondary); margin-top:2px; min-height:16px; }

.prosp-info-block { margin-top:24px; padding:16px; border-radius:var(--radius); background:var(--accent-dim); border:1px solid rgba(5,150,105,0.2); }
.prosp-info-title { font-size:13px; font-weight:600; color:var(--accent-light); margin-bottom:10px; display:flex; align-items:center; gap:6px; }
.prosp-info-steps { font-size:12px; color:var(--text-secondary); padding-left:18px; display:flex; flex-direction:column; gap:6px; }
.prosp-info-steps li { line-height:1.5; }

.prosp-stats-bar { display:flex; gap:16px; margin-bottom:16px; padding:12px; background:var(--bg-card); border-radius:var(--radius); border:1px solid var(--border); }
.prosp-stat { font-size:12px; color:var(--text-secondary); }
.prosp-stat strong { color:var(--text-primary); font-size:16px; margin-right:4px; }

.prosp-results-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; gap:12px; }

.prosp-leads-grid { display:flex; flex-direction:column; gap:8px; }

.prosp-lead-card { padding:14px; border-radius:var(--radius); background:var(--bg-card); border:1px solid var(--border); transition:all 0.15s; position:relative; }
.prosp-lead-card:hover { border-color:var(--border-hover); }
.prosp-lead-name { font-size:13px; font-weight:600; color:var(--text-primary); }
.prosp-lead-meta { font-size:11px; color:var(--text-secondary); margin-top:2px; }
.prosp-lead-ig a { color:#f472b6; text-decoration:none; }
.prosp-lead-confianca { font-size:10px; font-weight:700; padding:2px 8px; border-radius:10px; }
.prosp-confianca-high { background:rgba(5,150,105,0.15); color:#34d399; }
.prosp-confianca-med { background:rgba(251,191,36,0.15); color:#fbbf24; }
.prosp-confianca-low { background:rgba(248,113,113,0.15); color:#f87171; }

.prosp-lead-expand { margin-top:10px; padding-top:10px; border-top:1px solid var(--border); font-size:11px; color:var(--text-secondary); }

.prosp-card-approved { border-color:var(--accent) !important; background:rgba(5,150,105,0.05); }
.prosp-card-rejected { border-color:#ef4444 !important; opacity:0.5; }

.prosp-card-status-badge { position:absolute; top:10px; right:10px; font-size:10px; font-weight:700; padding:2px 8px; border-radius:4px; display:flex; align-items:center; gap:4px; }
.prosp-badge-approved { background:rgba(5,150,105,0.15); color:#34d399; }
.prosp-badge-rejected { background:rgba(239,68,68,0.15); color:#f87171; }

.prosp-historico-list { display:flex; flex-direction:column; gap:8px; }
.prosp-historico-card { padding:14px; border-radius:var(--radius); background:var(--bg-card); border:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.prosp-historico-card:hover { border-color:var(--border-hover); }

/* =====================================================
   DESIGN POLISH — Shimmer, Empty States, Spacing
   ===================================================== */

/* ===================== SHIMMER / SKELETON ===================== */

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}

.skeleton * { visibility: hidden; }

.skeleton-text {
  height: 12px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-text.w-33 { width: 33%; }

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-kpi {
  height: 100px;
  border-radius: var(--radius);
}

.skeleton-card {
  height: 88px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.skeleton-row {
  height: 44px;
  border-radius: 6px;
  margin-bottom: 4px;
}

/* ===================== EMPTY STATES ===================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}

.empty-state-icon {
  font-size: 48px;
  color: var(--text-muted);
  opacity: 0.6;
}

.empty-state-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-state-sub {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.5;
}

.empty-state-action {
  margin-top: 8px;
}

/* ===================== LOGIN PAGE POLISH ===================== */

.login-page {
  background: linear-gradient(135deg, #0a1610 0%, #0f2418 50%, #0a1610 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0;
}

.login-card {
  backdrop-filter: blur(20px);
  border: 1px solid rgba(26, 56, 40, 0.6);
  box-shadow: 0 0 80px rgba(5, 150, 105, 0.08), 0 24px 64px rgba(0,0,0,0.5);
}

.login-logo {
  box-shadow: 0 0 30px rgba(5, 150, 105, 0.4), 0 0 60px rgba(5, 150, 105, 0.15);
}

.login-title {
  letter-spacing: -0.03em;
  font-weight: 800;
}

/* ===================== TOPBAR SECTION TITLE ===================== */

.topbar-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.topbar-section-icon {
  font-size: 16px;
  color: var(--accent-light);
  margin-right: 8px;
}

/* ===================== BIA MANAGER ===================== */

.bm-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.bm-title {
  font-size: 20px; font-weight: 800; color: white;
  letter-spacing: -0.03em;
}
.bm-subtitle {
  font-size: 12px; color: var(--text-secondary); margin-top: 2px;
}
.bm-header-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.bm-last-analysis {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}

/* Overview cards */
.bm-cards-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 24px;
}
.bm-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; align-items: center; gap: 14px;
  transition: border-color 0.15s;
}
.bm-card:hover { border-color: var(--border-hover); }
.bm-card-icon {
  font-size: 24px; color: var(--accent);
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bm-card-value {
  font-size: 22px; font-weight: 800; color: white;
  letter-spacing: -0.03em; line-height: 1;
}
.bm-card-label {
  font-size: 11px; color: var(--text-secondary); margin-top: 2px;
}

/* Table */
.bm-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.bm-section-title {
  font-size: 14px; font-weight: 700; color: white;
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.bm-section-title i { color: var(--accent); font-size: 18px; }

.bm-table-wrap { overflow-x: auto; }
.bm-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.bm-table th {
  text-align: left; padding: 8px 10px;
  color: var(--text-secondary); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.bm-table td {
  padding: 10px; border-bottom: 1px solid rgba(26,56,40,0.4);
  color: var(--text-primary); white-space: nowrap;
}
.bm-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.bm-table-empty {
  text-align: center; padding: 24px !important;
  color: var(--text-muted); font-style: italic;
}
.bm-cell-name { font-weight: 600; }

.bm-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bm-badge-sdr { background: rgba(96,165,250,0.15); color: #60a5fa; }
.bm-badge-closer { background: rgba(52,211,153,0.15); color: #34d399; }

.bm-perf-good { color: #34d399; font-weight: 700; }
.bm-perf-neutral { color: var(--text-primary); font-weight: 600; }
.bm-perf-bad { color: #f87171; font-weight: 700; }

/* AI Insights */
.bm-insights-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.bm-insight-card {
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  transition: border-color 0.15s;
}
.bm-insight-card:hover { border-color: var(--border-hover); }

.bm-insight-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.bm-insight-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: white; flex-shrink: 0;
}
.bm-insight-name { font-size: 13px; font-weight: 700; color: white; }
.bm-insight-role { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }

.bm-insight-summary {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  margin-bottom: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.bm-insight-section { margin-bottom: 10px; }
.bm-insight-label {
  font-size: 10px; font-weight: 700; color: var(--accent-light);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 6px; display: flex; align-items: center; gap: 4px;
}
.bm-priority-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.bm-priority-list li {
  font-size: 12px; color: var(--text-primary); line-height: 1.4;
  padding-left: 14px; position: relative;
}
.bm-priority-list li::before {
  content: ''; position: absolute; left: 0; top: 6px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.bm-coaching-tip {
  font-size: 12px; color: #fbbf24; line-height: 1.4;
  background: rgba(251,191,36,0.06); border-radius: 6px;
  padding: 8px 10px; border-left: 3px solid #fbbf24;
}
.bm-insight-text {
  font-size: 12px; color: var(--text-secondary); line-height: 1.4;
}

/* Org insights */
.bm-org-insights {
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.bm-org-insights-title {
  font-size: 13px; font-weight: 700; color: white;
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.bm-insights-list { margin-bottom: 12px; }
.bm-insights-list:last-child { margin-bottom: 0; }
.bm-insight-item {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  padding: 4px 0; display: flex; align-items: flex-start; gap: 6px;
}
.bm-insight-item i { color: var(--accent); margin-top: 2px; flex-shrink: 0; }

/* Empty & loading states */
.bm-empty-insights {
  text-align: center; padding: 32px;
  color: var(--text-muted); font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.bm-empty-insights i { font-size: 32px; }

.bm-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 48px; color: var(--text-secondary); font-size: 13px;
}
.bm-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 48px; color: var(--text-muted); font-size: 13px; text-align: center;
}
.bm-empty i { font-size: 32px; }

@keyframes bm-spin { to { transform: rotate(360deg); } }
.bm-spin { animation: bm-spin 1s linear infinite; }

/* View toggle (daily / weekly) */
.bm-view-toggle {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: 8px; padding: 3px; width: fit-content;
}
.bm-view-btn {
  padding: 7px 16px; border-radius: 6px; border: none;
  background: transparent; color: var(--text-secondary);
  font-size: 12px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.bm-view-btn:hover { color: var(--text-primary); }
.bm-view-btn.active {
  background: var(--accent); color: white;
}

/* Weekly report — narrative summary */
.bm-weekly-summary { position: relative; }
.bm-weekly-narrative {
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
  margin: 0;
}

/* Weekly report — highlight cards */
.bm-weekly-highlights {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.bm-highlight-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; align-items: flex-start; gap: 12px;
  transition: border-color 0.15s;
}
.bm-highlight-card:hover { border-color: var(--border-hover); }
.bm-highlight-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.bm-highlight-top .bm-highlight-icon {
  background: rgba(251,191,36,0.12); color: #fbbf24;
}
.bm-highlight-improve .bm-highlight-icon {
  background: rgba(52,211,153,0.12); color: #34d399;
}
.bm-highlight-concern .bm-highlight-icon {
  background: rgba(248,113,113,0.12); color: #f87171;
}
.bm-highlight-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 4px;
}
.bm-highlight-top .bm-highlight-title { color: #fbbf24; }
.bm-highlight-improve .bm-highlight-title { color: #34d399; }
.bm-highlight-concern .bm-highlight-title { color: #f87171; }
.bm-highlight-name {
  font-size: 14px; font-weight: 700; color: white; margin-bottom: 2px;
}
.bm-highlight-reason {
  font-size: 12px; color: var(--text-secondary); line-height: 1.4;
}

/* Weekly deltas */
.bm-delta-up { color: #34d399; font-weight: 700; font-size: 11px; }
.bm-delta-down { color: #f87171; font-weight: 700; font-size: 11px; }
.bm-delta-neutral { color: var(--text-muted); font-size: 11px; }

/* Weekly table sub-header */
.bm-weekly-subheader th {
  font-size: 9px !important; color: var(--text-muted) !important;
  padding-top: 0 !important; border-bottom: 1px solid var(--border) !important;
  text-transform: none !important; letter-spacing: 0 !important;
}

/* Weekly recommended actions */
.bm-weekly-actions {
  display: flex; flex-direction: column; gap: 8px;
}
.bm-weekly-action {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  padding: 10px 12px; background: var(--bg-base);
  border-radius: 6px; border: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 10px;
}
.bm-weekly-action-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent-light);
  font-size: 11px; font-weight: 800; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
  .bm-cards-row { grid-template-columns: repeat(2, 1fr); }
  .bm-insights-grid { grid-template-columns: 1fr; }
  .bm-weekly-highlights { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .bm-cards-row { grid-template-columns: 1fr; }
}

/* ===================== TASKS (Minha Pauta) ===================== */

/* ── Header ── */
.tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tasks-header-left { flex: 1; min-width: 180px; }
.tasks-greeting {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.tasks-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.tasks-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.tasks-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tasks-progress-track {
  width: 120px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.tasks-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 3px;
  transition: width 0.4s ease;
}
.tasks-progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.tasks-autopilot-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.tasks-autopilot-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
}

/* ── Admin bar ── */
.tasks-admin-bar {
  display: flex; gap: 8px;
  padding: 0 0 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.tasks-admin-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.tasks-admin-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.tasks-admin-btn-obs { border-color: rgba(251,191,36,0.3); }
.tasks-admin-btn-obs:hover { border-color: #fbbf24; color: #fbbf24; }
.task-modal-submit-obs { background: linear-gradient(135deg, #d97706, #f59e0b); }
.task-modal-submit-obs:hover { box-shadow: 0 4px 16px rgba(245,158,11,0.35); }

/* ── Section titles ── */
.task-section { margin-bottom: 20px; }
.task-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 0;
  color: var(--text-secondary);
  user-select: none;
}
.task-section-urgent { color: #ef4444; }
.task-section-today  { color: #f59e0b; }
.task-section-upcoming { color: var(--text-muted); }
.task-section-done   { color: var(--text-muted); }
.task-section-obs    { color: #fbbf24; }
.task-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: inherit;
}
.task-section-chevron {
  transition: transform 0.2s ease;
  font-size: 12px;
}
.task-section-open .task-section-chevron {
  transform: rotate(90deg);
}

/* Collapsible content */
.task-section-collapsible {
  display: none;
}
.task-section-open .task-section-collapsible {
  display: block;
}

/* ── Task card ── */
.task-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
  position: relative;
}
.task-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}
.task-card-done {
  opacity: 0.5;
}
.task-card-highlight {
  animation: taskHighlight 2s ease;
}
@keyframes taskHighlight {
  0%   { box-shadow: 0 0 0 2px var(--accent); }
  100% { box-shadow: none; }
}

/* Priority bar */
.task-card-priority {
  width: 3px;
  min-height: 32px;
  border-radius: 2px;
  flex-shrink: 0;
  align-self: stretch;
}
.task-priority-urgent  { background: #ef4444; }
.task-priority-high    { background: #f97316; }
.task-priority-medium  { background: #3b82f6; }
.task-priority-low     { background: #6b7280; }
.task-priority-observation { background: #fbbf24; }

/* Avatar */
.task-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.task-avatar-obs {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  font-size: 16px;
}

/* Body */
.task-card-body {
  flex: 1;
  min-width: 0;
}
.task-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.task-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-card-time {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.task-time-overdue {
  color: #ef4444;
  font-weight: 600;
}
.task-card-context {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-card-instructions {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

/* ── Quick action buttons ── */
.task-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.task-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.task-action-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.task-action-success {
  color: var(--accent-light);
  border-color: rgba(52, 211, 153, 0.2);
}
.task-action-success:hover {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.35);
}
.task-action-danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.2);
}
.task-action-danger:hover {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.35);
}
.task-action-neutral {
  color: var(--text-muted);
}
.task-action-neutral:hover {
  color: var(--text-secondary);
}
.task-action-primary {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.2);
}
.task-action-primary:hover {
  background: rgba(96, 165, 250, 0.08);
  border-color: rgba(96, 165, 250, 0.35);
}
.task-action-whatsapp {
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.2);
  padding: 5px 12px;
}
.task-action-whatsapp:hover {
  background: rgba(37, 211, 102, 0.08);
  border-color: rgba(37, 211, 102, 0.35);
}

/* ── Observation card ── */
.task-card-observation {
  border-color: rgba(251, 191, 36, 0.15);
  background: rgba(251, 191, 36, 0.03);
}
.task-card-observation:hover {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.06);
}

/* ── Meeting/Followup Modal ── */
.task-meeting-modal {
  max-width: 440px;
  width: 100%;
}
.task-meeting-body {
  padding: 20px;
}
.task-modal-lead {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.task-modal-lead strong {
  color: var(--text-primary);
}
.task-modal-question {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.task-modal-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.task-modal-options-col {
  flex-direction: column;
}
.task-modal-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
  min-width: 100px;
  justify-content: center;
}
.task-modal-opt:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.task-modal-opt-success:hover {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}
.task-modal-opt-danger:hover {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}
.task-modal-opt-neutral:hover {
  border-color: rgba(96, 165, 250, 0.25);
  background: rgba(96, 165, 250, 0.06);
}
.task-modal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  margin-top: 12px;
}
.task-modal-form {
  margin-bottom: 16px;
}
.task-modal-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 16px;
}
.task-modal-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
}

/* ── Empty state ── */
.task-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}
.task-empty-check {
  font-size: 56px;
  color: var(--accent-light);
  margin-bottom: 16px;
}
.task-empty-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.task-empty-desc {
  font-size: 13px;
  color: var(--text-secondary);
}
.task-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  color: var(--text-secondary);
  font-size: 14px;
  gap: 8px;
}

/* Loading skeleton */
.task-loading {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 0;
}
.task-skeleton {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.task-skeleton-bar { width: 3px; height: 48px; border-radius: 2px; background: var(--border); }
.task-skeleton-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.task-skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.task-skeleton-line { height: 12px; border-radius: 4px; background: var(--border); }
.task-skeleton-line:nth-child(1) { width: 60%; }
.task-skeleton-line:nth-child(2) { width: 80%; }
.task-skeleton-line:nth-child(3) { width: 40%; }
.task-skeleton *, .task-skeleton {
  animation: shimmer 1.5s ease infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.task-spin {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .tasks-header { flex-direction: column; gap: 12px; }
  .tasks-header-right { width: 100%; justify-content: space-between; }
  .task-actions { gap: 4px; }
  .task-action-btn { padding: 4px 8px; font-size: 11px; }
}

/* ══════════════ Global Filter System ══════════════ */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; padding: 8px 0;
}
.filter-bar select, .filter-bar input {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-primary);
  font-size: 12px; padding: 6px 10px;
  min-width: 120px;
}
.filter-clear-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 6px;
  border: 1px solid rgba(248,113,113,0.2);
  background: transparent; color: #f87171;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.filter-clear-btn:hover { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.35); }
.filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--accent); color: white;
  border-radius: 9px; font-size: 10px; font-weight: 700;
}

/* Filter chips */
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 0; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 12px;
  background: var(--accent-dim); border: 1px solid rgba(5,150,105,0.2);
  color: var(--accent-light); font-size: 11px; font-weight: 500;
}
.filter-chip-remove {
  cursor: pointer; font-size: 12px; opacity: 0.7;
  transition: opacity .15s;
}
.filter-chip-remove:hover { opacity: 1; }

/* Sortable table headers */
.sort-header {
  cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 4px;
  transition: color .15s;
}
.sort-header:hover { color: var(--accent-light); }
.sort-arrow { font-size: 10px; opacity: 0.4; }
.sort-arrow.active { opacity: 1; color: var(--accent-light); }

/* Platform filter buttons */
.platform-filters {
  display: flex; gap: 4px; padding: 8px 0;
}
.platform-filter-btn {
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); font-size: 11px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.platform-filter-btn.active {
  background: var(--accent-dim); border-color: var(--accent);
  color: var(--accent-light);
}
.platform-filter-btn:hover { border-color: var(--border-hover); }

/* ===================== UTILITY CLASSES ===================== */

.p-6 { padding: 24px; }
.hidden { display: none !important; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.mt-4 { margin-top: 16px; }
