/* Styles for the new sections added in v2:
   Conexões (WhatsApp + Google Agenda), Voz clonada, Áreas, CRM Pipeline, Funil */

/* === Conexões === */
.conn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) { .conn-grid { grid-template-columns: 1fr; } }

.conn-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 380px;
  position: relative;
  overflow: hidden;
}
.conn-card h3 { font-size: 22px; }
.conn-card .conn-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.conn-card .ok-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--mint);
  font-size: 11px;
  font-weight: 700;
}
.conn-card .conn-body {
  flex: 1;
  display: grid; place-items: center;
}

/* WhatsApp QR + counter motion */
.qr-wrap {
  position: relative;
  width: 200px; height: 200px;
  border-radius: var(--radius);
  background: white;
  padding: 16px;
  display: grid; place-items: center;
  box-shadow: 0 16px 50px -16px rgba(0,0,0,0.6);
}
.qr-scan-line {
  position: absolute;
  left: 6%; right: 6%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-bright), transparent);
  box-shadow: 0 0 16px var(--primary-bright);
  border-radius: 999px;
  top: 16px;
  animation: qr-scan 2.2s linear infinite;
  pointer-events: none;
}
@keyframes qr-scan {
  0%   { transform: translateY(0); opacity: 0.9; }
  50%  { transform: translateY(165px); opacity: 0.9; }
  51%  { opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
.qr-overlay-ok {
  position: absolute; inset: 16px;
  background: rgba(15, 13, 28, 0.94);
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--mint);
  flex-direction: column;
  opacity: 0;
  animation: qr-success 6s 4s ease infinite;
}
@keyframes qr-success {
  0%, 100% { opacity: 0; }
  10%, 70% { opacity: 1; }
}
.qr-overlay-ok .big-check {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--mint-soft);
  display: grid; place-items: center;
  margin-bottom: 8px;
  animation: pop-check 0.6s 4s ease forwards;
}
.qr-tile {
  width: 8px; height: 8px;
  background: #0a0a0a;
  border-radius: 1px;
}

.timer-counter {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 14px;
}
.timer-counter .big {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(180deg, #fff, #b8b3d0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Google Calendar mock */
.gcal {
  width: 100%;
  background: white;
  color: #202124;
  border-radius: 14px;
  padding: 16px;
  font-size: 13px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}
.gcal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
}
.gcal-days {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  font-size: 11px;
  color: #5f6368;
  text-align: center;
}
.gcal-day {
  padding: 6px 0;
  border-radius: 4px;
  font-weight: 500;
}
.gcal-day .num {
  font-weight: 700; color: #202124; font-size: 15px;
  margin-top: 2px;
}
.gcal-day.today {
  background: rgba(139,92,246,0.12);
  color: var(--primary-deep);
}
.gcal-slots {
  margin-top: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.gcal-slot {
  display: flex; gap: 8px; align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  color: #3c4043;
  background: #f3f4f6;
}
.gcal-slot.new {
  background: linear-gradient(90deg, rgba(139,92,246,0.18), rgba(139,92,246,0.06));
  color: var(--primary-deep);
  font-weight: 600;
  border-left: 3px solid var(--primary);
  animation: slot-in 0.6s ease forwards;
  transform: translateX(-10px);
  opacity: 0;
}
@keyframes slot-in {
  to { transform: none; opacity: 1; }
}
.gcal-slot .time { color: #5f6368; font-family: var(--font-mono); font-size: 11px; }

/* === Voz humanizada === */
.voice-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.voice-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-top: 12px;
}
.voice-row .vplay {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(139,92,246,0.18);
  display: grid; place-items: center;
  color: var(--primary-bright);
  flex-shrink: 0;
}
.voice-row .vlabel { flex: 1; font-size: 14px; }
.voice-row .vlabel .sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.voice-wave {
  flex: 1; display: flex; align-items: center; gap: 2px; height: 28px;
}
.voice-wave span {
  flex: 1;
  background: var(--primary);
  border-radius: 999px;
  min-height: 4px;
}
.voice-wave.live span { animation: wave 1.2s ease-in-out infinite; }
.voice-buttons {
  display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap;
}
.btn-clone {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 14px;
}
.btn-save {
  background: linear-gradient(180deg, var(--primary-bright), var(--primary-deep));
  color: white; border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

/* === Áreas de atuação === */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .areas-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .areas-grid { grid-template-columns: 1fr; } }

.area {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  transition: all .2s;
}
.area.active {
  background: rgba(139,92,246,0.10);
  border-color: rgba(139,92,246,0.35);
}
.area .tg {
  width: 28px; height: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  position: relative;
  flex-shrink: 0;
}
.area .tg::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: white;
  top: 2px; left: 2px;
  transition: all .2s;
}
.area.active .tg { background: var(--primary); }
.area.active .tg::after { left: 14px; }

/* === CRM Pipeline (Kanban) === */
.kanban-wrap {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  overflow: hidden;
  position: relative;
}
.kanban-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.kanban-stats {
  display: flex; gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.kanban-stats::-webkit-scrollbar { display: none; }
.kstat {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
}
.kstat .dot { width: 8px; height: 8px; border-radius: 50%; }
.kstat .num { font-weight: 700; color: var(--text); font-family: var(--font-display); }
.kstat .lbl { color: var(--text-muted); }

.kanban {
  display: flex; gap: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  padding-bottom: 4px;
}
.kanban::-webkit-scrollbar { height: 6px; }
.kanban::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.kcol {
  flex-shrink: 0;
  width: 240px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex; flex-direction: column;
  gap: 10px;
}
.kcol-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.kcol-head .count {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--text-muted);
}
.kcol-head .dot { width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; display: inline-block; }
.kcard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column;
  gap: 6px;
  font-size: 12px;
  transition: all .25s;
}
.kcard .row1 { display: flex; gap: 8px; align-items: center; }
.kcard .av {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: white;
}
.kcard .nm { font-weight: 600; color: var(--text); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard .age {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.kcard .tel { font-family: var(--font-mono); color: var(--text-muted); font-size: 10px; }
.kcard .tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(139,92,246,0.14);
  color: var(--primary-bright);
  align-self: flex-start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.kcard.move-in {
  animation: card-slide-in 0.6s ease forwards;
}
@keyframes card-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.kcard.move-out {
  animation: card-slide-out 0.4s ease forwards;
}
@keyframes card-slide-out {
  to { opacity: 0; transform: translateX(-20px); }
}

/* === Funil (dashboard mockup) === */
.dash {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }

.dash-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.dash-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.dash-head h3 { font-size: 17px; }
.dash-head .pct {
  background: var(--mint-soft);
  color: var(--mint);
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.funnel {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  padding: 8px 0 0;
}
.funnel-row {
  position: relative;
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 14px 24px;
  text-align: center;
  font-size: 14px;
  clip-path: polygon(8% 0, 92% 0, 86% 100%, 14% 100%);
  width: 100%;
  transform: scaleX(1);
  opacity: 0;
  animation: funnel-in 0.6s ease forwards;
}
.funnel-row .v { font-size: 22px; line-height: 1; display: block; }
.funnel-row .l { font-size: 11px; opacity: 0.85; margin-top: 4px; display: block; font-family: var(--font-body); font-weight: 500; }
.funnel-row.r1 { width: 100%;  animation-delay: 0.1s; }
.funnel-row.r2 { width: 86%;   animation-delay: 0.25s; background: linear-gradient(180deg, #9b7cff, #6936d4); }
.funnel-row.r3 { width: 72%;   animation-delay: 0.4s; background: linear-gradient(180deg, #a98aff, #7a47db); }
.funnel-row.r4 { width: 58%;   animation-delay: 0.55s; background: linear-gradient(180deg, #b698ff, #8a5be6); }
.funnel-row.r5 { width: 44%;   animation-delay: 0.7s; background: linear-gradient(180deg, #c5acff, #9b71eb); }
.funnel-step-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
@keyframes funnel-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* Chart */
.chart {
  position: relative;
  height: 260px;
  border-radius: 10px;
  background: rgba(0,0,0,0.18);
  padding: 14px;
  overflow: hidden;
}

/* Dashboard small tiles */
.dash-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}
@media (max-width: 700px) { .dash-tiles { grid-template-columns: repeat(2, 1fr); } }
.dash-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.dash-tile .tl { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.dash-tile .tv {
  font-family: var(--font-display); font-weight: 700;
  font-size: 26px;
  margin-top: 4px;
  background: linear-gradient(180deg, #fff, #b8b3d0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
