/* ──────────────────────────────────────────
   CSS VARIABLES — compatibilidade login.html
   ────────────────────────────────────────── */
:root {
  --panel:   #ffffff;
  --bg:      #f7f8fc;
  --border:  #e2e8f0;
  --radius:  14px;
  --shadow:  0 1px 3px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.05);
  --accent:  #3b82f6;
  --text:    #0f172a;
  --muted:   #64748b;
  --accent3: #ef4444;
  /* Palette primária roxa */
  --p:       #7C3AED;
  --p-hover: #6D28D9;
  --p-soft:  #F3E8FF;
  --p-muted: #A78BFA;
  --p-deep:  #5B21B6;
  --sb-bg:   #111827;
  --sb-act-bg:  rgba(124,58,237,.15);
  --sb-act-txt: #A78BFA;
}

/* ──────────────────────────────────────────
   SIDEBAR
   ────────────────────────────────────────── */
.sidebar {
  width: 220px;
  background: linear-gradient(180deg, #131118 0%, #0f0e13 100%);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

/* ── Logo / branding ── */
.sb-logo {
  padding: 20px 16px 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* Símbolo real da marca — crop do PNG transparente */
/* PNG: 1774×887px. Símbolo ocupa aprox x:124-656px, y:133-754px */
/* Escala: image-height=68px → symbol aparece ~44px tall, ~41px wide */
.sb-logo-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: url('revo_mark_clean.png') no-repeat;
  background-size: auto 68px;
  background-position: -10px -10px;
}

.sb-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}
.sb-logo-name {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,.88);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-family: inherit;
}
.sb-logo-sub {
  font-size: 9px;
  font-weight: 600;
  color: rgba(167,139,250,.38);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: inherit;
  margin-top: 1px;
}

/* ── Nav ── */
.sb-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 12px 10px;
}
.sb-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.38);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.2;
  transition: background .15s, color .15s, box-shadow .15s;
  font-family: inherit;
  text-align: left;
}
.sb-item .sb-icon {
  color: rgba(255,255,255,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .15s;
}
.sb-item:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.72);
}
.sb-item:hover .sb-icon { color: rgba(255,255,255,.58); }
.sb-item.is-active {
  background: rgba(124,58,237,.11);
  color: var(--sb-act-txt);
  font-weight: 600;
  box-shadow: inset 3px 0 0 rgba(139,92,246,.6);
}
.sb-item.is-active .sb-icon {
  color: #a78bfa;
}

/* ── Footer ── */
.sb-footer {
  padding: 10px 10px 16px;
  border-top: 1px solid rgba(255,255,255,.05);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
}
.sb-user {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background .15s;
  width: 100%;
  font-family: inherit;
}
.sb-user:hover { background: rgba(255,255,255,.06); }
.sb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #334155, #1e293b);
  border: 2px solid rgba(255,255,255,.12);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sb-user-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.45);
  letter-spacing: .01em;
}

/* ──────────────────────────────────────────
   VIEW VISIBILITY
   ────────────────────────────────────────── */
.view { display: none; }
.view.is-active { display: block; }

/* ──────────────────────────────────────────
   FILTER PILLS
   ────────────────────────────────────────── */
.pill {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  transition: all .15s;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.pill:hover { border-color: #94a3b8; color: #0f172a; }
.pill.is-active {
  background: var(--p);
  border-color: var(--p);
  color: #fff;
}

/* Segment pills — segunda linha de filtros */
.seg-pill {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  transition: all .15s;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.seg-pill:hover { border-color: #7c3aed; color: #7c3aed; }
.seg-pill.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.seg-pill.is-active:first-of-type {
  background: #334155;
  border-color: #334155;
}

/* ──────────────────────────────────────────
   STATUS DOTS
   ────────────────────────────────────────── */
.s-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,.18);
  flex-shrink: 0;
}
.s-dot.amber { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.s-dot.red   { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.18); }

/* ──────────────────────────────────────────
   BADGES
   ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.novo      { background: #eff6ff; color: #1d4ed8; }
.badge.conversa  { background: var(--p-soft); color: var(--p); }
.badge.agendado  { background: #fff7ed; color: #c2410c; }
.badge.cancelado { background: #f1f5f9; color: #64748b; }

/* ──────────────────────────────────────────
   MODAL
   ────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.52);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.is-open { display: flex; }
.modal-row { margin-bottom: 14px; }
.modal-row label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
  margin-bottom: 4px;
}
.modal-row span { font-size: 14px; color: #0f172a; }
.modal-close { cursor: pointer; }

/* ──────────────────────────────────────────
   CONTACT ROWS (gerado por JS)
   ────────────────────────────────────────── */
.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 24px;
  border-bottom: 1px solid #f1f5f9;
  transition: background .1s;
}
.contact-row:last-child { border-bottom: none; }
.contact-row:hover { background: #fafafa; }

.cr-identity { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.cr-init {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.cr-info { min-width: 0; }
.cr-name  { font-size: 14px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-phone { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.cr-status { flex-shrink: 0; min-width: 90px; }
.cr-meta   { flex-shrink: 0; text-align: right; }
.cr-time   { font-size: 12px; color: #94a3b8; }
.cr-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }

/* Badge group: micro-label semântico + chip */
.cr-badge-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 64px;
}
.cr-badge-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #cbd5e1;
  line-height: 1;
}

.btn-xs {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  color: #374151;
  white-space: nowrap;
  transition: all .12s;
  font-family: inherit;
}
.btn-xs:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-xs.purple-outline { border-color: #c4b5fd; color: #7c3aed; background: transparent; }
.btn-xs.purple-outline:hover { background: #f5f3ff; }
.btn-xs.link { border: none; background: transparent; color: #3b82f6; }
.btn-xs.link:hover { color: #1d4ed8; }

.contact-empty { padding: 56px; text-align: center; color: #94a3b8; font-size: 14px; }

/* ──────────────────────────────────────────
   APPOINTMENT ITEMS (gerado por JS)
   ────────────────────────────────────────── */
.appt-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #cbd5e1;
  margin: 12px 0 6px;
}
.appt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.appt-item:last-child { border-bottom: none; }
.appt-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.appt-info { flex: 1; min-width: 0; }
.appt-name  { font-size: 13px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-phone { font-size: 11px; color: #94a3b8; }
.appt-time  { font-size: 13px; font-weight: 600; color: #0f172a; flex-shrink: 0; }
.appt-empty { font-size: 13px; color: #94a3b8; padding: 8px 0; }

/* ──────────────────────────────────────────
   BUTTON DISABLED
   ────────────────────────────────────────── */
#btnGenerateQR:disabled { opacity: .5; cursor: not-allowed; }
#btnGenerateQR:hover:not(:disabled) { opacity: .9; }

/* ──────────────────────────────────────────
   WORKSPACE — CENTRAL OPERACIONAL
   Cockpit layout: containers com altura
   controlada e scroll interno independente.
   ────────────────────────────────────────── */
#view-dashboard.is-active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Barra de KPIs não comprime */
#centralKpis { flex-shrink: 0; }

/* Área principal do workspace */
.op-main {
  flex: 1;
  min-height: 0;       /* permite que flex filho comprima abaixo do conteúdo natural */
  display: flex;
  gap: 20px;
  overflow: hidden;
}

/* Fila de prioridades */
.op-queue {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 32px rgba(0,0,0,.07);
  overflow: hidden;
}
.op-queue-header {
  flex-shrink: 0;
  padding: 12px 20px;
  border-bottom: 1px solid #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.op-queue-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.op-queue-body::-webkit-scrollbar       { width: 4px; }
.op-queue-body::-webkit-scrollbar-track { background: transparent; }
.op-queue-body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

/* Sidebar */
.op-sidebar {
  width: 272px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

/* Cards genéricos (Appointments + Radar) */
.op-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 6px 24px rgba(0,0,0,.06);
  overflow: hidden;
}
/* Próximas consultas: altura máx relativa ao sidebar */
.op-card-fixed {
  flex-shrink: 0;
  max-height: 34%;
}
/* Radar Operacional: preenche o espaço restante */
.op-card-grow {
  flex: 1;
  min-height: 0;
}
.op-card-header {
  flex-shrink: 0;
  padding: 12px 16px;
  border-bottom: 1px solid #f8fafc;
}
.op-card-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.op-card-body::-webkit-scrollbar       { width: 4px; }
.op-card-body::-webkit-scrollbar-track { background: transparent; }
.op-card-body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

/* ──────────────────────────────────────────
   WORKSPACE — USUÁRIOS
   Mesmo padrão cockpit da Central: altura
   controlada pelo viewport, lista com scroll
   interno independente.
   ────────────────────────────────────────── */
#view-usuarios.is-active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Topbar (header com tab toggle) */
.usr-topbar { flex-shrink: 0; }

/* Tab toggle */
.usr-tab-toggle {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.usr-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
}
.usr-tab.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* Inbox pane */
.usr-inbox {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 16px;
  overflow: hidden;
}

/* Leads pane */
.usr-leads-pane {
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

/* Filtros dentro do leads pane */
.usr-leads-pane .usr-filters { flex-shrink: 0; }

/* ── Conversation list column ──────────────────── */
.inbox-list-col {
  width: 296px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 32px rgba(0,0,0,.07);
  overflow: hidden;
}

/* Search bar */
.inbox-search-wrap {
  flex-shrink: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}
.inbox-search-icon {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: #cbd5e1;
  pointer-events: none;
}
.inbox-search-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 10px 7px 30px;
  font-size: 12px;
  color: #0f172a;
  font-family: inherit;
  outline: none;
  background: #f8fafc;
  box-sizing: border-box;
  transition: border-color .12s;
}
.inbox-search-input:focus { border-color: #93c5fd; background: #fff; }

/* Conversation list body */
.inbox-list-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.inbox-list-body::-webkit-scrollbar       { width: 4px; }
.inbox-list-body::-webkit-scrollbar-track { background: transparent; }
.inbox-list-body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

/* Conversation item */
.inbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
  transition: background .1s;
}
.inbox-item:hover { background: #f8fafc; }
.inbox-item.is-active { background: #f5f3ff; }
.inbox-item-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.inbox-item-body { flex: 1; min-width: 0; }
.inbox-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-item-preview {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.inbox-item-meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.inbox-item-time { font-size: 10px; color: #cbd5e1; }

/* ── Chat column ────────────────────────────────── */
.inbox-chat-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 32px rgba(0,0,0,.07);
  overflow: hidden;
}

/* Empty state */
.inbox-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  gap: 10px;
}
.inbox-empty p { font-size: 13px; font-weight: 500; margin: 0; }

/* Chat header */
.inbox-chat-header {
  flex-shrink: 0;
  padding: 13px 18px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 12px;
}
.inbox-chat-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.inbox-chat-name  { font-size: 14px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.inbox-chat-phone { font-size: 11px; color: #94a3b8; margin-top: 1px; }

/* Messages area */
.inbox-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.inbox-messages::-webkit-scrollbar       { width: 4px; }
.inbox-messages::-webkit-scrollbar-track { background: transparent; }
.inbox-messages::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

/* Individual messages */
.inbox-msg { display: flex; flex-direction: column; max-width: 72%; }
.inbox-msg.is-out { align-self: flex-end; align-items: flex-end; }
.inbox-msg.is-in  { align-self: flex-start; align-items: flex-start; }
.inbox-msg-bubble {
  padding: 8px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}
.inbox-msg.is-out .inbox-msg-bubble {
  background: #7c3aed;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.inbox-msg.is-in .inbox-msg-bubble {
  background: #f1f5f9;
  color: #0f172a;
  border-bottom-left-radius: 4px;
}
.inbox-msg-time {
  font-size: 10px;
  color: #cbd5e1;
  margin-top: 3px;
  padding: 0 2px;
}
.inbox-msg-time-sep { margin: 0 3px; }
.inbox-msg-badge { font-weight: 700; letter-spacing: .02em; }
.inbox-msg-badge-ai     { color: #7c3aed; }
.inbox-msg-badge-human  { color: #16a34a; }
.inbox-msg-badge-robot  { color: #64748b; }

/* Reply area */
.inbox-reply {
  flex-shrink: 0;
  padding: 10px 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.inbox-reply-input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 13px;
  color: #0f172a;
  font-family: inherit;
  outline: none;
  resize: none;
  min-height: 38px;
  max-height: 120px;
  overflow-y: auto;
  line-height: 1.4;
  transition: border-color .12s;
  box-sizing: border-box;
  scrollbar-width: thin;
}
.inbox-reply-input:focus { border-color: #93c5fd; }
.inbox-reply-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: #7c3aed;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: opacity .15s;
}
.inbox-reply-send:hover:not(:disabled) { opacity: .85; }
.inbox-reply-send:disabled { opacity: .35; cursor: not-allowed; }

.usr-filters { flex-shrink: 0; }
.usr-table {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 32px rgba(0,0,0,.07);
  overflow: hidden;
}
.usr-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.usr-list::-webkit-scrollbar       { width: 4px; }
.usr-list::-webkit-scrollbar-track { background: transparent; }
.usr-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

/* ──────────────────────────────────────────
   FORM MODAL (edição de lead)
   ────────────────────────────────────────── */
.form-section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #94a3b8;
  margin-bottom: 10px;
}
.form-row { margin-bottom: 10px; }
.form-row label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 3px;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  color: #0f172a;
  font-family: inherit;
  outline: none;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .12s;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus { border-color: #93c5fd; }
.form-row textarea { resize: vertical; }
.form-section {
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 14px;
}
.form-section:last-child { border-bottom: none; margin-bottom: 0; }
.form-readonly {
  font-size: 13px;
  color: #475569;
  padding: 6px 0;
}
.form-readonly-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
}

/* ══════════════════════════════════════════
   GESTÃO DE LEADS — premium executive view
   ══════════════════════════════════════════ */

/* ── Zone 1: KPI Strip ── */
.gst-kpi-strip {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.gst-kpi-card {
  flex: 1;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  padding: 18px 22px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 4px 20px rgba(0,0,0,.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.gst-kpi-card.is-hero { flex: 1.6; }
.gst-kpi-card.is-risk {
  border-color: rgba(220,38,38,.18);
  background: linear-gradient(135deg,#fff 60%,rgba(220,38,38,.03) 100%);
}
.gst-kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.gst-kpi-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #94a3b8;
  margin-bottom: 6px;
}
.gst-kpi-num {
  font-size: 38px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -1.5px;
}
.gst-kpi-card.is-hero .gst-kpi-num { font-size: 46px; }
.gst-kpi-card.is-risk  .gst-kpi-num { color: #dc2626; }
.gst-kpi-card.is-conv  .gst-kpi-num { color: var(--p); }
.gst-kpi-card.is-new   .gst-kpi-num { color: #0891b2; }
.gst-kpi-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}
.gst-kpi-delta {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
}
.gst-kpi-delta.up   { background: #f5f3ff; color: #7c3aed; }
.gst-kpi-delta.down { background: #fee2e2; color: #dc2626; }
.gst-kpi-delta.neu  { background: #f1f5f9; color: #64748b; }
.gst-kpi-spark { line-height: 0; }

/* ── Zone 2: Intelligence (evolution + funnel) ── */
.gst-intel {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.gst-chart-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  padding: 20px 24px 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 4px 20px rgba(0,0,0,.05);
  overflow: hidden;
}
.gst-gran-btn.is-active { background: #7c3aed !important; color: #fff !important; border-color: #7c3aed !important; }
.cal-select {
  font-size: 12.5px; font-weight: 600; color: #334155;
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 10px;
  background: #fff; font-family: inherit;
}
.gst-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.gst-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.2px;
}
.gst-chart-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
.gst-chart-big {
  font-size: 26px;
  font-weight: 800;
  color: var(--p);
  letter-spacing: -1px;
  line-height: 1;
}

/* ── Zone 3: Signal Cards ── */
.gst-signals-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.gst-signals-header-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94a3b8;
}
.gst-signals-header-line {
  flex: 1;
  height: 1px;
  background: #f1f5f9;
}
.gst-signals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-bottom: 24px;
}
.gst-signal {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #f1f5f9;
  padding: 18px 16px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 4px 16px rgba(0,0,0,.04);
  transition: transform .12s, box-shadow .12s;
}
.gst-signal:hover {
  box-shadow: 0 2px 20px rgba(0,0,0,.07);
  border-color: rgba(0,0,0,.07);
}
.gst-signal::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--sig-color, #94a3b8);
  border-radius: 0 2px 2px 0;
}
.gst-signal-bg {
  position: absolute;
  inset: 0;
  background: var(--sig-bg, transparent);
  pointer-events: none;
}
.gst-signal-num {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--sig-color, #94a3b8);
  position: relative;
}
.gst-signal-sub {
  font-size: 10px;
  color: #b0bad0;
  margin-top: 2px;
  line-height: 1.2;
  position: relative;
}
.gst-signal-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #94a3b8;
  margin-top: 8px;
  line-height: 1.3;
  position: relative;
}
.gst-signal.is-zero .gst-signal-num { color: #64748b; }
.gst-signal.is-zero { --sig-color: #64748b; --sig-bg: transparent; }
.gst-signal.is-zero .gst-signal-label { color: #94a3b8; }

/* ── Narrative bar ── */
.gst-narrative {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #faf7ff;
  border: 1px solid #ede9fe;
  border-left: 3px solid var(--p);
  border-radius: 0 10px 10px 0;
  padding: 11px 16px;
  margin-bottom: 22px;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}
.gst-nar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--p);
  flex-shrink: 0;
}
.gst-narrative strong {
  color: #1e1b4b;
  font-weight: 700;
}
