/* RM Dashboard · Módulo Data · Estilos específicos
   Light theme · respeta tokens definidos en dashboard.css */

[x-cloak] { display: none !important; }

/* ============ Score badges ============ */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.score-hot {
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  color: #991B1B;
  border: 1px solid #FCA5A5;
}
.score-warm {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #92400E;
  border: 1px solid #FCD34D;
}
.score-cold {
  background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
  color: #1E40AF;
  border: 1px solid #93C5FD;
}

/* ============ Quick action buttons ============ */
.quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-cream);
  color: var(--text-dark);
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: all 0.15s;
}
.quick-action:hover {
  background: var(--rm-gold-light);
  border-color: var(--rm-gold);
  transform: translateY(-1px);
}

/* ============ Leads table ============ */
.leads-table { border-collapse: separate; border-spacing: 0; }
.leads-table thead th {
  position: sticky; top: 0;
  background: var(--bg-cream);
  z-index: 5;
  font-weight: 600;
}
.leads-table tbody tr { transition: background 0.1s; }

/* ============ Lead cards ============ */
.lead-card {
  cursor: pointer;
  transition: all 0.2s;
}
.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ============ Timeline events ============ */
.timeline-event {
  display: flex;
  gap: 12px;
  position: relative;
  padding-left: 8px;
  padding-bottom: 12px;
  border-left: 2px solid var(--border-soft);
  margin-left: 6px;
}
.timeline-event:last-child { border-left-color: transparent; }
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: -15px;
  flex-shrink: 0;
  margin-top: 4px;
  border: 2px solid var(--bg-white);
  box-shadow: 0 0 0 1px var(--border-soft);
}
.timeline-dot-green { background: var(--rm-green); }
.timeline-dot-gold { background: var(--rm-gold); }
.timeline-dot-blue { background: #3B82F6; }
.timeline-dot-gray { background: var(--text-muted); }

/* ============ AI Drawer ============ */
.ai-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--bg-white);
  box-shadow: -8px 0 24px rgba(0,0,0,0.12);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease-out;
}
.ai-drawer.open { right: 0; }
.ai-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 99;
}
.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-cream);
}
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-msg { display: flex; }
.ai-msg-user { justify-content: flex-end; }
.ai-msg-assistant { justify-content: flex-start; }
.ai-msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.ai-msg-user .ai-msg-bubble {
  background: var(--rm-green);
  color: white;
  border-bottom-right-radius: 4px;
}
.ai-msg-assistant .ai-msg-bubble {
  background: var(--bg-cream);
  color: var(--text-dark);
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 4px;
}
.ai-suggestions {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-chip {
  text-align: left;
  background: var(--bg-cream);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.15s;
}
.ai-chip:hover { background: var(--rm-gold-light); border-color: var(--rm-gold); }
.ai-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-white);
}

/* ============ Mobile ============ */
@media (max-width: 768px) {
  .leads-table { font-size: 11px; }
  .leads-table th, .leads-table td { padding: 6px 4px !important; }
  .quick-action { width: 24px; height: 24px; font-size: 12px; }
  .ai-drawer { max-width: 100%; }
  .sub-nav { overflow-x: auto; flex-wrap: nowrap; }
  .kanban-col { min-width: 240px; }
}

/* ============ Animations ============ */
@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}
.animate-pulse { animation: pulse-soft 2s infinite; }
