/* ============================================================
   Trello CRM Imobiliário — Design System & Custom Styles
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg-main: #f4f6fa;
  --bg-card: #ffffff;
  --bg-sidebar: #1e1b4b;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-light: #f5f3ff;
  --primary-border: #ddd6fe;
  
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border: #e2e8f0;
  --border-focus: #7c3aed;

  --col-bg: #f8fafc;
  --col-border: #e2e8f0;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Tag Colors */
  --tag-norte: #3b82f6;
  --tag-sul: #7c3aed;
  --tag-leste: #ec4899;
  --tag-oeste: #f59e0b;
  --tag-guarulhos: #10b981;
  
  --tag-comandra: #64748b;
  --tag-app: #7c3aed;
  --tag-site: #06b6d4;
  --tag-roleta: #f97316;
  --tag-anuncio: #8b5cf6;
  --tag-indicacao: #10b981;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(124, 58, 237, 0.15);
}

/* ── DARK THEME OVERRIDES ───────────────────────────────────── */
[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --text-dark: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #334155;
  --col-bg: #1e293b;
  --col-border: #334155;
}

[data-theme="dark"] .topbar,
[data-theme="dark"] .stats-bar,
[data-theme="dark"] .lead-card,
[data-theme="dark"] .modal-card {
  background: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}

[data-theme="dark"] .brand-title,
[data-theme="dark"] .col-title,
[data-theme="dark"] .card-lead-name,
[data-theme="dark"] .modal-title,
[data-theme="dark"] .timeline-bubble-text {
  color: #f8fafc;
}

[data-theme="dark"] .kanban-col,
[data-theme="dark"] .timeline-bubble,
[data-theme="dark"] .card-conversa-preview {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .search-box input {
  background: #0f172a;
  color: #f8fafc;
  border-color: #475569;
}

/* ── LEAD WARNING BADGES (COOLING DOWN ALERTS) ───────────── */
.lead-warning-24h {
  border-color: #f59e0b !important;
  background: #fffbeb !important;
}

[data-theme="dark"] .lead-warning-24h {
  background: #451a03 !important;
}

.lead-warning-48h {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  animation: warningGlow 2s infinite;
}

[data-theme="dark"] .lead-warning-48h {
  background: #450a0a !important;
}

@keyframes warningGlow {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.tag-warning {
  background: #fef3c7;
  color: #b45309;
  border-left-color: #f59e0b;
}

.tag-danger {
  background: #fee2e2;
  color: #b91c1c;
  border-left-color: #ef4444;
}

/* ── SCRIPTS DE VENDAS FLAVIA ──────────────────────────────── */
.script-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-left: 4.5px solid #7c3aed;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

[data-theme="dark"] .script-card {
  background: #0f172a;
  border-color: #334155;
}

.script-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.script-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

[data-theme="dark"] .script-card-title {
  color: #f8fafc;
}

.script-card-text {
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
  white-space: pre-wrap;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

[data-theme="dark"] .script-card-text {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.script-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── CORRETOR BADGES ────────────────────────────────────────── */
.badge-corretor {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.badge-corretor-flavia {
  background: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.badge-corretor-antonio {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-corretor-yasmim {
  background: #fce7f3;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER & TOPBAR ────────────────────────────────────────── */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #1e1b4b;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.search-box input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.topbar-user-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-session-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
}

.session-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.session-select {
  background: transparent;
  border: none;
  font-weight: 800;
  font-size: 12px;
  color: #7c3aed;
  cursor: pointer;
  outline: none;
}

/* ── ACTION TOOLBAR (ROW 2) ────────────────────────────────── */
.action-toolbar {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-head {
  padding: 6px 14px;
  height: 36px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn-scripts {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.btn-scripts:hover { background: #fde68a; }

.btn-simular {
  background: #fdf2f8;
  color: #db2777;
  border-color: #fbcfe8;
}
.btn-simular:hover { background: #fce7f3; }

.btn-webhook {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.btn-webhook:hover { background: #dcfce7; }

.btn-export {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}
.btn-export:hover { background: #e2e8f0; }

.btn-theme {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.btn-novo-lead-main {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  border: none;
  padding: 6px 18px;
  height: 36px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-novo-lead-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
}

/* ── KANBAN BOARD WRAPPER ───────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stats-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 6px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.stats-group {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
}

.stat-num {
  font-weight: 800;
  font-size: 13px;
  color: var(--primary);
}

.filters-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-label-sm {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.filter-select {
  padding: 4px 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  background: #ffffff;
  outline: none;
  cursor: pointer;
}

.kanban-board {
  flex: 1;
  display: flex;
  gap: 16px;
  padding: 16px 24px;
  overflow-x: auto;
  align-items: flex-start;
  scroll-behavior: smooth;
}

/* ── KANBAN COLUMN ─────────────────────────────────────────── */
.kanban-col {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  flex: 0 0 320px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 170px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.col-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
}

.col-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.col-icon {
  font-size: 16px;
}

.col-title {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.col-count {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.col-cards {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
  flex: 1;
}

/* Color Themes per Column Header */
.col-primeira .col-header { border-bottom-color: #8b5cf6; }
.col-primeira .col-count { background: #f3e8ff; color: #7c3aed; }

.col-atendimento .col-header { border-bottom-color: #3b82f6; }
.col-atendimento .col-count { background: #dbeafe; color: #1d4ed8; }

.col-follow1 .col-header { border-bottom-color: #06b6d4; }
.col-follow1 .col-count { background: #cffafe; color: #0e7490; }

.col-visita .col-header { border-bottom-color: #f59e0b; }
.col-visita .col-count { background: #fef3c7; color: #b45309; }

.col-documentos .col-header { border-bottom-color: #ec4899; }
.col-documentos .col-count { background: #fce7f3; color: #be185d; }

.col-encerrados .col-header { border-bottom-color: #16a34a; }
.col-encerrados .col-count { background: #dcfce7; color: #15803d; }

.col-estufa .col-header { border-bottom-color: #6366f1; }
.col-estufa .col-count { background: #e0e7ff; color: #4338ca; }

/* ── KANBAN CARD ────────────────────────────────────────────── */
.lead-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  cursor: grab;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  position: relative;
}

.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.12);
  border-color: #cbd5e1;
}

.lead-card.new-lead-glow {
  animation: pulseGlow 2s infinite;
  border-color: #7c3aed;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

.card-top-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.card-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-left: 3.5px solid transparent;
}

.tag-regiao-norte { background: #eff6ff; color: #1e40af; border-left-color: #3b82f6; }
.tag-regiao-sul { background: #f5f3ff; color: #5b21b6; border-left-color: #7c3aed; }
.tag-regiao-leste { background: #fdf2f8; color: #9d174d; border-left-color: #ec4899; }
.tag-regiao-oeste { background: #fffbeb; color: #92400e; border-left-color: #f59e0b; }
.tag-regiao-guarulhos { background: #ecfdf5; color: #065f46; border-left-color: #10b981; }

.tag-origem-anuncio { background: #f3e8ff; color: #6b21a8; border-left-color: #8b5cf6; }
.tag-origem-app { background: #f5f3ff; color: #5b21b6; border-left-color: #7c3aed; }
.tag-origem-site { background: #ecfeff; color: #155e75; border-left-color: #06b6d4; }
.tag-origem-comandra { background: #f1f5f9; color: #334155; border-left-color: #64748b; }
.tag-origem-roleta { background: #ffedd5; color: #9a3412; border-left-color: #f97316; }
.tag-origem-indicacao { background: #dcfce7; color: #166534; border-left-color: #16a34a; }

.card-lead-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.card-lead-product {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-conversa-preview {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-left: 3.5px solid #7c3aed;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  color: #334155;
  margin: 6px 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* ── FOLLOWUP TIMELINE BUBBLES ──────────────────────────────── */
.followup-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 2px;
}

.timeline-bubble {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-left: 4px solid #7c3aed;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.timeline-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.timeline-bubble-time {
  color: #7c3aed;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.timeline-bubble-text {
  font-size: 13px;
  color: #1e293b;
  line-height: 1.45;
  word-break: break-word;
}

.btn-del-bubble {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
}

.btn-del-bubble:hover {
  color: #ef4444;
}

.card-lead-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  margin-top: 8px;
}

.btn-whatsapp-card {
  background: #25d366;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
  transition: all 0.2s;
}

.btn-whatsapp-card:hover {
  background: #20ba5a;
  transform: scale(1.05);
}

/* ── MODAL EDITAR LEAD (EXACT DESIGN MATCH) ─────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #1e1b4b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-label {
  font-size: 11px;
  font-weight: 800;
  color: #4338ca;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  display: block;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #c7d2fe;
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  color: #1e1b4b;
  background: #ffffff;
  transition: all 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── ETIQUETAS CHECKBOX PILLS (EXACT MATCH TO SCREENSHOTS) ─── */
.tags-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tags-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px 6px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  transition: all 0.15s ease;
  border-left-width: 5px;
}

.checkbox-pill input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-right: 8px;
  accent-color: #7c3aed;
  cursor: pointer;
}

.checkbox-pill:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.checkbox-pill.checked {
  background: #f3e8ff;
  border-color: #7c3aed;
  color: #5b21b6;
}

/* Specific Pill Color Stripes */
.pill-norte { border-left-color: #3b82f6; }
.pill-sul { border-left-color: #7c3aed; }
.pill-leste { border-left-color: #ec4899; }
.pill-oeste { border-left-color: #f59e0b; }
.pill-guarulhos { border-left-color: #10b981; }

.pill-comandra { border-left-color: #64748b; }
.pill-app { border-left-color: #7c3aed; }
.pill-site { border-left-color: #06b6d4; }
.pill-roleta { border-left-color: #f97316; }
.pill-anuncio { border-left-color: #8b5cf6; }
.pill-indicacao { border-left-color: #16a34a; }

.pill-primeira { border-left-color: #8b5cf6; }
.pill-atendimento { border-left-color: #3b82f6; }
.pill-follow1 { border-left-color: #06b6d4; }
.pill-follow2 { border-left-color: #0284c7; }
.pill-follow3 { border-left-color: #1d4ed8; }
.pill-visita { border-left-color: #f59e0b; }
.pill-documentos { border-left-color: #ec4899; }
.pill-encerrados { border-left-color: #16a34a; }
.pill-sem-interesse { border-left-color: #ef4444; }
.pill-sem-resposta { border-left-color: #94a3b8; }
.pill-estufa { border-left-color: #6366f1; }

/* Custom tag input */
.input-add-tag {
  margin-top: 6px;
  font-size: 13px;
}

/* ── MODAL FOOTER ───────────────────────────────────────────── */
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
}

.btn-delete-lead {
  background: #fef2f2;
  color: #ef4444;
  border: 1.5px solid #fecaca;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-delete-lead:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-cancel-modal {
  background: #ffffff;
  color: #475569;
  border: 1.5px solid #cbd5e1;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel-modal:hover {
  background: #f8fafc;
  color: #0f172a;
}

.btn-save-modal {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
  transition: all 0.2s;
}

.btn-save-modal:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

/* ── TOAST NOTIFICATIONS ────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
}

.toast {
  background: #1e1b4b;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.3s ease;
  border-left: 5px solid #7c3aed;
}

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

/* Estilo Padrão para Computadores / Desktop */
.mobile-column-tabs {
  display: none;
}

/* ── SISTEMA DE RESPONSIVIDADE MOBILE COMPLETO ──────────────── */
@media (max-width: 768px) {
  body {
    height: auto;
    overflow-y: auto;
  }

  /* 1. Cabeçalho Compacto (Uma única linha horizontal fina) */
  .topbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 12px !important;
    gap: 8px !important;
    height: 48px !important;
    box-sizing: border-box;
  }
  .brand {
    display: none !important; /* Esconde logo e subtítulo no celular */
  }
  .btn-theme {
    display: none !important; /* Esconde botão de tema no celular */
  }
  .search-box {
    flex: 1.2 !important;
    max-width: 50% !important;
    margin: 0 !important;
  }
  .topbar-user-section {
    flex: 1 !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }
  .user-session-pill {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    gap: 4px !important;
  }
  .session-label {
    display: none !important; /* Esconde o rótulo escrito "Perfil Ativo" */
  }
  .session-select {
    font-size: 11px !important;
    padding: 4px !important;
    max-width: 130px !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
  }
  #connectionStatusText {
    display: none !important; /* Esconde texto do status de conexão */
  }
  #connectionStatusIndicator {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
  }

  /* 2. Barra de Ferramentas Compacta */
  .action-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px;
    gap: 10px;
  }
  .action-buttons-group {
    display: block !important;
    width: 100%;
  }
  .btn-simular,
  .btn-webhook,
  .btn-export {
    display: none !important;
  }
  .btn-scripts {
    width: 100% !important;
    justify-content: center;
    height: 38px;
    font-size: 13px;
    margin-bottom: 8px;
  }
  .btn-head {
    justify-content: center;
    width: 100%;
    height: 34px;
    font-size: 11px;
    padding: 0 8px;
  }
  .btn-novo-lead-main {
    width: 100%;
    justify-content: center;
    height: 38px;
  }

  /* 3. Esconder Números de Estatísticas e Filtros para Poupar Altura */
  .stats-bar {
    display: none !important;
  }

  /* 4. Abas Deslizantes de Coluna (Visual Estilo App Nativo) */
  .mobile-column-tabs {
    display: flex;
    overflow-x: auto;
    background: #ffffff;
    padding: 8px 16px;
    gap: 6px;
    border-bottom: 1.5px solid var(--border);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-column-tabs::-webkit-scrollbar {
    display: none; /* Esconder a barra de rolagem cinza feia */
  }
  .mobile-tab {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
  }
  .mobile-tab.active {
    background: #7c3aed;
    color: #ffffff;
    border-color: #7c3aed;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
  }

  /* 5. Exibição da Coluna Ativa */
  .kanban-board {
    padding: 12px 16px;
    display: block; /* Não usar flex horizontal no mobile */
  }
  .kanban-col {
    display: none !important; /* Esconde todas */
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    max-height: none;
  }
  .kanban-col.active-mobile-col {
    display: flex !important; /* Mostra apenas a ativa */
  }
  .col-cards {
    max-height: none; /* Rolagem na própria página */
    overflow-y: visible;
    padding: 8px 0;
  }

  /* Otimização de formulário no celular */
  .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* ── BOTÃO FLUTUANTE DE INSTALAÇÃO PWA ──────────────────────── */
.pwa-install-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  animation: bouncePwa 2s infinite;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.pwa-install-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.5);
  transform: translateX(-50%) translateY(-2px);
}

@keyframes bouncePwa {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}
