/* ══════════════════════════════════════════════════════════════════
   SRP FUNNEL DASHBOARD — CSS v5.0.0
   Design system unificado com avaliacao-senar:
   • Plus Jakarta Sans + Syne (display)
   • Background #eef2f7 (página), cartões brancos com shadow
   • Header gradiente verde com borda ouro
   • KPI cards com ícone colorido, num grande, label muted
   • Paleta: --G #18863D / --Y #FCB61A / --TX #1e293b
══════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════
   RESET & TOKENS
══════════════════════════════════════════════════════════════════ */
.srp-funnel-root {
  --G:        #18863D;
  --GD:       #0d5e28;
  --GL:       #d1fae5;
  --GM:       #4a8c5c;
  --Y:        #FCB61A;
  --YL:       #fef3c7;
  --R:        #ef4444;
  --RL:       #fee2e2;
  --B:        #004a8d;
  --BL:       #dbeafe;
  --TX:       #1e293b;
  --MT:       #64748b;
  --SB:       #94a3b8;
  --BR:       #e2e8f0;
  --BG:       #eef2f7;
  --WH:       #ffffff;
  --LN:       rgba(24,134,61,.15);
  --SH:       0 2px 12px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --SH2:      0 8px 30px rgba(0,0,0,.10);
  --RD:       14px;
  --RD-sm:    10px;

  /* Aliases legados */
  --verde:     #18863D;
  --verde-mid: #2f7a4a;
  --verde-lt:  #4a8c5c;
  --ouro:      #FCB61A;
  --ouro-lt:   #fde68a;
  --creme:     #f1f5f9;
  --creme-dk:  #e2e8f0;
  --marrom:    #1e293b;
  --texto:     #1e293b;
  --branco:    #ffffff;
  --ln:        rgba(24,134,61,.15);
  --shadow:    0 2px 12px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --radius:    14px;

  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  color: var(--TX);
  background: var(--BG);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
  width: 100%;
}

.srp-funnel-root *,
.srp-funnel-root *::before,
.srp-funnel-root *::after { box-sizing: border-box; }

/* ══════════════════════════════════════════════════════════════════
   GATE — tela de login
══════════════════════════════════════════════════════════════════ */
.srp-funnel-gate {
  position: fixed; inset: 0; z-index: 99990;
  display: flex; align-items: center; justify-content: center;
  background: var(--BG); overflow-y: auto;
}

.srp-funnel-gate-wrapper {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; width: 100%; padding: 24px 16px 80px;
}

.srp-funnel-gate-card {
  background: var(--WH); width: 100%; max-width: 420px;
  border-radius: var(--RD); box-shadow: var(--SH2); overflow: hidden;
  animation: srp-gate-in .35s cubic-bezier(.22,.68,0,1.2) both;
}

@keyframes srp-gate-in {
  from { opacity:0; transform:translateY(24px) scale(.97); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

.srp-funnel-gate-header {
  background: linear-gradient(135deg, #0f4c24 0%, #18863D 60%, #1ea44a 100%);
  border-bottom: 3px solid var(--Y);
  padding: 40px 24px 32px; text-align: center; color: #fff;
}

.srp-funnel-gate-logo-area img {
  max-height: 72px; width: auto; display: inline-block;
  margin-bottom: 16px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.25));
}

.srp-funnel-gate-title {
  margin: 0; font-size: 22px; font-weight: 800; color: #fff;
  font-family: 'Syne', 'Plus Jakarta Sans', sans-serif; letter-spacing: -.3px;
}

.srp-funnel-gate-subtitle {
  margin: 6px 0 0; font-size: 13px; color: rgba(255,255,255,.8);
}

.srp-funnel-gate-body { padding: 32px 28px; }
.srp-funnel-gate-field { margin-bottom: 20px; }

.srp-funnel-gate-label {
  display: block; font-weight: 700; margin-bottom: 10px;
  color: var(--TX); font-size: 13px; text-align: center;
  text-transform: uppercase; letter-spacing: .05em;
}

.srp-funnel-gate-input {
  width: 100%; padding: 14px; font-size: 20px;
  border: 2px solid var(--BR); border-radius: var(--RD-sm);
  text-align: center; outline: none;
  transition: border-color .2s, box-shadow .2s;
  letter-spacing: 4px; font-family: inherit; font-weight: 700; background: #f8fafc;
}

.srp-funnel-gate-input:focus {
  border-color: var(--G); box-shadow: 0 0 0 3px rgba(24,134,61,.12); background: #fff;
}

.srp-funnel-gate-btn {
  width: 100%; padding: 15px; background: var(--G); color: #fff;
  border: none; border-radius: var(--RD-sm); font-size: 14px; font-weight: 800;
  cursor: pointer; text-transform: uppercase; letter-spacing: .08em;
  transition: background .2s, transform .15s, box-shadow .2s;
  font-family: inherit; box-shadow: 0 4px 14px rgba(24,134,61,.35);
}

.srp-funnel-gate-btn:hover:not(:disabled) {
  background: var(--GD); transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(24,134,61,.4);
}

.srp-funnel-gate-btn:disabled { opacity: .6; cursor: default; transform: none; }

.srp-funnel-gate-badge {
  text-align: center; color: var(--MT); font-size: 12px; margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.srp-funnel-gate-msg {
  margin-bottom: 14px; font-size: 13px; border-radius: 8px; padding: 0; text-align: center;
}

.srp-funnel-gate-msg.error,
.srp-funnel-gate-msg.srp-funnel-msg-error {
  background: #fef2f2; color: #b91c1c; padding: 12px;
  border: 1px solid #fecaca; font-weight: 600;
}

.srp-funnel-msg-error { color: #b91c1c; }
.srp-funnel-msg-ok    { color: var(--G); }

.srp-funnel-gate-footer {
  position: fixed; bottom: 0; left: 0; width: 100%; text-align: center;
  padding: 14px; background: var(--WH); font-size: 12px; color: var(--SB);
  border-top: 1px solid var(--BR);
}

@media (max-height: 600px) {
  .srp-funnel-gate-wrapper { justify-content: flex-start; padding-top: 20px; }
  .srp-funnel-gate-footer  { position: static; margin-top: 20px; }
}

.srp-funnel-gate-brand   { display: none; }
.srp-funnel-gate-icon    { display: none; }
.srp-funnel-gate-divider { display: none; }

/* ══════════════════════════════════════════════════════════════════
   DASHBOARD — estrutura
══════════════════════════════════════════════════════════════════ */
.srp-funnel-dashboard { padding: 0 0 80px; }

/* ── Header gradiente estilo senar sfdt-hdr ── */
.srp-funnel-header {
  background: linear-gradient(135deg, #0f4c24 0%, #18863D 60%, #1ea44a 100%);
  border-bottom: 3px solid var(--Y);
  padding: 18px 24px; border-radius: 0 0 var(--RD) var(--RD);
  box-shadow: 0 4px 24px rgba(15,76,36,.25);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}

.srp-funnel-header-left {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}

.srp-funnel-logo {
  height: 44px; width: auto; display: block; object-fit: contain; flex-shrink: 0;
  background: rgba(255,255,255,.15); border-radius: 8px; padding: 4px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.srp-funnel-header-text { display: flex; flex-direction: column; gap: 2px; }

.srp-funnel-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--Y); margin-bottom: 2px;
}

.srp-funnel-title {
  font-family: 'Syne', 'Plus Jakarta Sans', sans-serif;
  font-size: 20px; font-weight: 800; color: #fff;
  margin: 0 0 2px; line-height: 1.2; letter-spacing: -.3px;
}

.srp-funnel-subtitle {
  font-size: 13px; color: rgba(255,255,255,.8); margin: 0;
}

/* ── Wrapper de conteúdo com padding ── */
#srp-funnel-loading { padding: 0 20px; }
#srp-funnel-content { padding: 20px; }

.srp-funnel-loading {
  text-align: center; padding: 80px 20px; color: var(--MT);
}

.srp-funnel-spinner {
  width: 40px; height: 40px; border: 3px solid var(--BR);
  border-top-color: var(--G); border-radius: 50%;
  animation: srp-spin .7s linear infinite; margin: 0 auto 16px;
}

@keyframes srp-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════
   BOTÕES
══════════════════════════════════════════════════════════════════ */
.srp-funnel-btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; background: var(--Y); color: var(--GD);
  border: none; border-radius: 8px; font-family: inherit; font-size: 13px;
  font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(252,182,26,.35);
}

.srp-funnel-btn-primary:hover {
  background: #f5ab10; transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(252,182,26,.45);
}

.srp-funnel-btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Logout — glassmorphism no header verde */
.srp-funnel-btn-ghost {
  background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.4);
  color: #fff; padding: 8px 18px; border-radius: 8px; cursor: pointer;
  font-weight: 700; font-size: 13px; transition: background .2s, border-color .2s;
  text-decoration: none; backdrop-filter: blur(4px); font-family: inherit;
}

.srp-funnel-btn-ghost:hover {
  background: rgba(255,255,255,.25); border-color: #fff;
}

/* ══════════════════════════════════════════════════════════════════
   SEÇÕES — cartão branco sobre fundo #eef2f7
══════════════════════════════════════════════════════════════════ */
.srp-funnel-section {
  background: var(--WH); border-radius: var(--RD); padding: 24px 24px 20px;
  margin-bottom: 20px; box-shadow: var(--SH); border: 1px solid var(--BR);
}

.srp-funnel-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px; font-weight: 800; color: var(--TX);
  margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--BR);
  display: flex; align-items: center; gap: 10px; letter-spacing: -.1px;
  text-transform: uppercase; letter-spacing: .04em;
}

.srp-funnel-section-title::before {
  content: '';
  display: inline-block; width: 3px; height: 16px;
  background: var(--Y); flex-shrink: 0; border-radius: 2px;
}

/* Grid 2 colunas */
.srp-funnel-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;
}

@media (max-width: 720px) {
  .srp-funnel-grid-2 { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   KPI CARDS — estilo senar w-card com ícone colorido
══════════════════════════════════════════════════════════════════ */
.srp-funnel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px; margin: 20px 0;
}

@media (max-width: 500px) {
  .srp-funnel-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.srp-funnel-kpi {
  background: var(--WH); border-radius: var(--RD); padding: 18px 14px;
  box-shadow: var(--SH); border: 1px solid var(--BR);
  display: flex; align-items: center; gap: 10px;
  transition: transform .2s, box-shadow .2s;
}
.srp-funnel-kpi-highlight {
  border-color: var(--Y); background: #fffbf0;
}

.srp-funnel-kpi:hover { transform: translateY(-3px); box-shadow: var(--SH2); }

/* Ícone quadrado colorido — padrão senar kpi-icon */
.srp-funnel-kpi-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  background: var(--GL); color: var(--GD);
}

.srp-funnel-kpi:nth-child(2) .srp-funnel-kpi-icon { background: var(--YL); color: #92400e; }
.srp-funnel-kpi:nth-child(3) .srp-funnel-kpi-icon { background: var(--BL); color: #1e40af; }
.srp-funnel-kpi:nth-child(4) .srp-funnel-kpi-icon { background: #f3e8ff; color: #7e22ce; }
.srp-funnel-kpi:nth-child(5) .srp-funnel-kpi-icon { background: #ffe4e6; color: #be123c; }
.srp-funnel-kpi:nth-child(6) .srp-funnel-kpi-icon { background: #fef3c7; color: #b45309; }

.srp-funnel-kpi-info { flex: 1; min-width: 0; }

.srp-funnel-kpi-pct {
  font-size: 12px; font-weight: 700; color: var(--G); margin-bottom: 2px;
}
.srp-funnel-kpi-val {
  font-family: 'Syne', 'Plus Jakarta Sans', sans-serif;
  font-size: 26px; font-weight: 800; color: var(--TX);
  line-height: 1; margin-bottom: 2px;
}

.srp-funnel-kpi-label {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--MT); line-height: 1.3;
}

/* ══════════════════════════════════════════════════════════════════
   FUNIL VISUAL SVG
══════════════════════════════════════════════════════════════════ */
.srp-funnel-visual { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.srp-funnel-svg-wrap { width: 100%; min-width: 480px; margin: 0 auto; }

.srp-funnel-svg-wrap svg { width: 100%; height: auto; display: block; }

.srp-funnel-tooltip {
  position: fixed; pointer-events: none;
  background: rgba(15,76,36,.95); color: #fff; padding: 8px 14px;
  border-radius: 8px; font-size: 12px; font-family: 'Plus Jakarta Sans', sans-serif;
  z-index: 9999; white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.2);
  opacity: 0; transition: opacity .15s; border-top: 2px solid var(--Y);
}

.srp-funnel-legend {
  display: flex; flex-wrap: wrap; gap: 10px 20px;
  margin-top: 20px; justify-content: center;
}

.srp-funnel-legend-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--MT);
}

.srp-funnel-legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* Barras horizontais (progressão) */
.srp-funnel-bar-row { display: flex; flex-direction: column; gap: 5px; }

.srp-funnel-bar-label {
  font-size: 12px; font-weight: 700; color: var(--TX);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}

.srp-funnel-bar-conv { font-weight: 400; color: var(--MT); font-size: 11px; }

.srp-funnel-bar-track {
  height: 32px; background: #f1f5f9; border-radius: 8px; overflow: hidden; position: relative;
}

.srp-funnel-bar-fill {
  height: 100%; border-radius: 8px; display: flex; align-items: center;
  justify-content: flex-end; padding-right: 10px; transition: width .6s ease; min-width: 36px;
}

.srp-funnel-bar-num {
  color: #fff; font-size: 12px; font-weight: 800;
  text-shadow: 0 1px 3px rgba(0,0,0,.3); white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════
   CONVERSÃO
══════════════════════════════════════════════════════════════════ */
.srp-funnel-conv-list { display: flex; flex-direction: column; gap: 10px; }

.srp-funnel-conv-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; background: #f8fafc;
  border-radius: 10px; border: 1px solid var(--BR); flex-wrap: wrap;
}

.srp-funnel-conv-stages {
  font-size: 12px; color: var(--MT);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}

.srp-funnel-conv-arrow { color: var(--Y); font-weight: 800; }

.srp-funnel-conv-badge {
  font-size: 18px; font-weight: 800; color: var(--TX);
  display: flex; flex-direction: column; align-items: flex-end;
}

.srp-funnel-conv-badge small { font-size: 11px; font-weight: 400; color: var(--MT); }

/* ══════════════════════════════════════════════════════════════════
   GARGALO
══════════════════════════════════════════════════════════════════ */
.srp-funnel-gargalo-card {
  background: linear-gradient(135deg, rgba(252,182,26,.06) 0%, rgba(24,134,61,.04) 100%);
  border: 1px solid rgba(252,182,26,.3); border-radius: var(--RD-sm); padding: 20px;
}

.srp-funnel-gargalo-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--MT); margin-bottom: 8px;
}

.srp-funnel-gargalo-taxa {
  font-family: 'Syne', sans-serif; font-size: 42px; font-weight: 800;
  margin-bottom: 10px; line-height: 1;
}

.srp-funnel-gargalo-desc { font-size: 13px; color: var(--MT); margin-bottom: 12px; line-height: 1.6; }

.srp-funnel-gargalo-tip {
  font-size: 13px; color: var(--G); background: rgba(24,134,61,.05);
  border-left: 3px solid var(--Y); padding: 10px 14px;
  border-radius: 0 8px 8px 0; line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════
   FONTES DE TRÁFEGO
══════════════════════════════════════════════════════════════════ */
.srp-funnel-fonte-list { display: flex; flex-direction: column; gap: 12px; }

.srp-funnel-fonte-row {
  display: grid; grid-template-columns: 130px 1fr 60px; align-items: center; gap: 12px;
}

.srp-funnel-fonte-name { font-size: 13px; font-weight: 700; color: var(--TX); }

.srp-funnel-fonte-bar-wrap {
  height: 8px; background: #f1f5f9; border-radius: 100px; overflow: hidden;
}

.srp-funnel-fonte-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--G) 0%, #4ade80 100%);
  border-radius: 100px; transition: width .5s ease;
}

.srp-funnel-fonte-pct { font-size: 13px; font-weight: 800; color: var(--G); text-align: right; }
.srp-funnel-fonte-pct small { font-weight: 400; color: var(--MT); font-size: 11px; }

/* ══════════════════════════════════════════════════════════════════
   TABELAS
══════════════════════════════════════════════════════════════════ */
.srp-funnel-table-wrap { overflow-x: auto; }

.srp-funnel-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.srp-funnel-table thead { background: var(--G); color: #fff; }

.srp-funnel-table th {
  padding: 12px 14px; text-align: left; font-size: 11px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}

.srp-funnel-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--BR);
  color: var(--TX); vertical-align: middle;
}

.srp-funnel-table tbody tr:hover { background: #f8fafc; }
.srp-funnel-table tbody tr:last-child td { border-bottom: none; }

.srp-funnel-td-num  { text-align: right; font-weight: 800; color: var(--G); }
.srp-funnel-td-id   { color: var(--SB); font-size: 11px; }
.srp-funnel-td-date { color: var(--MT); font-size: 12px; white-space: nowrap; }
.srp-funnel-table-recentes { min-width: 640px; }

/* ══════════════════════════════════════════════════════════════════
   MÉTRICAS CAC / LTV
══════════════════════════════════════════════════════════════════ */
.srp-funnel-metric-card { display: flex; flex-direction: column; gap: 10px; }

.srp-funnel-metric-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #f8fafc; border-radius: 10px;
  border: 1px solid var(--BR); font-size: 13px;
}

.srp-funnel-metric-row strong { font-size: 18px; font-weight: 800; color: var(--G); }

.srp-funnel-metric-formula {
  font-size: 12px; color: var(--MT); background: #f8fafc;
  padding: 10px 14px; border-radius: 8px; border-left: 3px solid var(--Y);
  font-family: 'Courier New', monospace;
}

.srp-funnel-metric-input-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.srp-funnel-metric-input-row label {
  font-size: 12px; font-weight: 700; color: var(--G); white-space: nowrap;
}

.srp-funnel-metric-input-row input,
.srp-funnel-ltv-inputs input {
  padding: 8px 12px; border: 1.5px solid var(--BR); border-radius: 8px;
  font-family: inherit; font-size: 13px; width: 110px; outline: none;
  transition: border-color .2s, box-shadow .2s; background: #fff;
}

.srp-funnel-metric-input-row input:focus,
.srp-funnel-ltv-inputs input:focus {
  border-color: var(--G); box-shadow: 0 0 0 3px rgba(24,134,61,.1);
}

.srp-funnel-metric-result { font-size: 17px; font-weight: 800; color: var(--G); }
.srp-funnel-metric-note { font-size: 12px; color: var(--MT); margin: 0; line-height: 1.6; }
.srp-funnel-ltv-inputs { display: flex; gap: 10px; flex-wrap: wrap; }

.srp-funnel-ltv-inputs label {
  font-size: 12px; font-weight: 700; color: var(--G);
  display: flex; flex-direction: column; gap: 5px;
}

/* ══════════════════════════════════════════════════════════════════
   SÉRIE TEMPORAL
══════════════════════════════════════════════════════════════════ */
.srp-funnel-serie-wrap { overflow-x: auto; }
.srp-funnel-serie-wrap svg { display: block; width: 100%; height: auto; }

/* ══════════════════════════════════════════════════════════════════
   ESTADO VAZIO
══════════════════════════════════════════════════════════════════ */
.srp-funnel-empty {
  font-size: 13px; color: var(--SB); text-align: center; padding: 28px;
  background: #f8fafc; border-radius: 10px; border: 1px dashed var(--BR); margin: 0;
}

/* ══════════════════════════════════════════════════════════════════
   FAIXA DE STATUS: GA4 + META PIXEL
══════════════════════════════════════════════════════════════════ */
.srp-tracking-status-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  background: #f0faf4; border: 1px solid #c3e6cb;
  border-radius: 10px; padding: 10px 16px;
  margin-bottom: 20px;
}

.srp-tracking-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #d1d5db;
  border-radius: 20px; padding: 5px 12px;
  font-size: 12px; font-weight: 600; color: #374151;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.srp-tracking-badge__dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,.25);
  animation: srpTrackPulse 2s infinite;
}

@keyframes srpTrackPulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(34,197,94,.25); }
  50%      { box-shadow: 0 0 0 4px rgba(34,197,94,.1);  }
}

.srp-tracking-badge__label { color: #374151; }

.srp-tracking-badge__id {
  background: #f3f4f6; border-radius: 4px;
  padding: 1px 6px; font-size: 11px; font-weight: 700;
  color: #1e5c30; letter-spacing: .02em;
}

.srp-tracking-status-bar__caption {
  font-size: 11px; color: #6b7280; margin-left: auto;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════
   ANALYTICS EXTERNOS — Grid 50/50
   Esquerda: Dispositivos (topo) + Top Locais (baixo)
   Direita:  Top Páginas (altura total)
══════════════════════════════════════════════════════════════════ */
.srp-analytics-3col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}

/* Col 1, linha 1: Dispositivos */
.srp-analytics-3col > .srp-analytics-col:nth-child(1) {
  grid-column: 1; grid-row: 1;
}

/* Col 1, linha 2: Top Locais */
.srp-analytics-3col > .srp-analytics-col:nth-child(2) {
  grid-column: 1; grid-row: 2;
}

/* Col 2, linhas 1+2: Top Páginas ocupa toda a altura da coluna direita */
.srp-analytics-col--pages {
  grid-column: 2; grid-row: 1 / span 2;
  min-width: 0;
}

/* Mobile: todos empilhados */
@media (max-width: 700px) {
  .srp-analytics-3col {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .srp-analytics-3col > .srp-analytics-col:nth-child(1),
  .srp-analytics-3col > .srp-analytics-col:nth-child(2),
  .srp-analytics-col--pages {
    grid-column: 1; grid-row: auto;
  }
  .srp-tracking-status-bar__caption { display: none; }
}

.srp-analytics-col { min-width: 0; }

.srp-analytics-card-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--MT); border-bottom: 1px solid var(--BR); padding-bottom: 12px;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}

.srp-analytics-card-title::before { display: none !important; }
.srp-atitle-icon { font-size: 15px; }

/* ── Dispositivos ── */
.srp-dev-list { display: flex; flex-direction: column; gap: 14px; }
.srp-dev-row  { display: flex; flex-direction: column; gap: 6px; }

.srp-dev-label-row {
  display: flex; justify-content: space-between; align-items: center;
}

.srp-dev-name { font-size: 13px; font-weight: 700; color: var(--TX); }
.srp-dev-num  { font-size: 13px; font-weight: 800; color: var(--G); }

.srp-dev-track { height: 8px; background: #f1f5f9; border-radius: 100px; overflow: hidden; }

.srp-dev-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--G) 0%, #4ade80 100%);
  border-radius: 100px; transition: width .5s ease;
}

/* ── Top Locais ── */
.srp-loc-list { display: flex; flex-direction: column; gap: 8px; }

.srp-loc-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-radius: 8px; transition: background .15s;
}

.srp-loc-row:hover { background: #f8fafc; }
.srp-loc-pin { font-size: 14px; flex-shrink: 0; }

.srp-loc-name {
  font-size: 13px; color: var(--TX); flex: 1; font-weight: 500;
  min-width: 0; white-space: normal; word-break: break-word; line-height: 1.4;
}

.srp-loc-num { font-size: 13px; font-weight: 800; color: var(--G); flex-shrink: 0; }

/* ── Top Páginas — heatmap grid 2×N dentro do card ── */
.srp-heat-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}

.srp-heat-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: var(--MT);
}

.srp-heat-scale { display: flex; align-items: center; gap: 4px; }
.srp-heat-scale-txt { font-size: 10px; color: var(--SB); font-weight: 600; }

.srp-heat-dot { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }

/* Grid interno do heatmap: 2 colunas dentro do card de Top Páginas */
.srp-heat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px;
}

.srp-heat-card {
  border-radius: 10px; padding: 12px 10px; cursor: default;
  transition: transform .15s, box-shadow .15s;
}

.srp-heat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.12); }

.srp-heat-card-name {
  font-size: 10px; font-weight: 700; margin-bottom: 4px;
  word-break: break-word; white-space: normal; line-height: 1.35; opacity: .85;
}

.srp-heat-card-num {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 800; line-height: 1; margin-bottom: 4px;
}

.srp-heat-card-time { font-size: 10px; font-weight: 600; opacity: .8; }

.srp-heat-escala {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}

.srp-heat-escala-label {
  font-size: 11px; color: var(--MT); font-weight: 600; white-space: nowrap;
}

.srp-heat-escala-bar {
  flex: 1; height: 8px; border-radius: 100px;
  background: linear-gradient(to right, #edf7ee, #c8e6c9, #4a8c5c, #1e5c30);
}

.srp-heat-escala-range { font-size: 11px; color: var(--MT); font-weight: 600; white-space: nowrap; }

.srp-det-header {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--MT); margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}

.srp-det-list { display: flex; flex-direction: column; gap: 12px; }
.srp-det-row  { display: flex; flex-direction: column; gap: 4px; }

.srp-det-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.srp-det-name {
  font-size: 13px; font-weight: 700; color: var(--TX);
  flex: 1; word-break: break-word; white-space: normal; line-height: 1.4;
}

.srp-det-num { font-size: 13px; font-weight: 800; color: var(--TX); flex-shrink: 0; }
.srp-det-time { font-size: 11px; color: var(--MT); }

.srp-det-track { height: 6px; background: #f1f5f9; border-radius: 100px; overflow: hidden; }

.srp-det-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--G) 0%, #4ade80 100%);
  border-radius: 100px; transition: width .5s ease;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVO
══════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .srp-funnel-title         { font-size: 17px; }
  .srp-funnel-header        { padding: 14px 16px; border-radius: 0 0 10px 10px; }
  #srp-funnel-content       { padding: 14px; }
  .srp-funnel-section       { padding: 16px 14px; }
  .srp-funnel-section-title { font-size: 12px; }
  .srp-funnel-kpi-val       { font-size: 24px; }
  .srp-funnel-fonte-row     { grid-template-columns: 100px 1fr 48px; }
  .srp-heat-grid            { grid-template-columns: 1fr; }
  .srp-funnel-logo          { height: 36px; }
}

@media (max-width: 720px) {
  .srp-funnel-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .srp-funnel-visual     { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Geolocalização dos Visitantes — v4.1.0 */
.srp-geo-list { display: flex; flex-direction: column; gap: 8px; }
.srp-geo-row  { display: flex; align-items: center; gap: 12px; }
.srp-geo-lbl  { min-width: 220px; font-size: 13px; color: var(--TX, #444); }
.srp-fonte-bg { flex: 1; background: #f0f0f0; border-radius: 4px; height: 10px; overflow: hidden; }
.srp-fonte-fill { height: 10px; border-radius: 4px; background: #c8a84b; }
.srp-fonte-n  { font-size: 12px; font-weight: 700; color: #1e5c30; min-width: 36px; text-align: right; }

/* ══════════════════════════════════════════════════════════════════
   LIVE FEED FRONTEND — Sessões em Tempo Real
══════════════════════════════════════════════════════════════════ */
.srp-lf-frontend-wrap { padding: 20px 24px; }

.srp-lf-front-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 2px solid var(--BR);
}

.srp-lf-live-badge-front {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid #ef4444; background: #fef2f2;
  color: #b91c1c; padding: 2px 10px; border-radius: 99px;
  font-weight: 700; font-size: 11px; margin-left: 8px; vertical-align: middle;
}
.srp-lf-live-dot-front {
  width: 7px; height: 7px; background: #ef4444; border-radius: 50%;
  animation: srpLfPulseFront 1.5s infinite; flex-shrink: 0;
}
@keyframes srpLfPulseFront {
  0%   { opacity: 1; transform: scale(1); }
  50%  { opacity: .5; transform: scale(.85); }
  100% { opacity: 1; transform: scale(1); }
}
.srp-fl-session-count {
  font-size: 12px; color: var(--MT); font-weight: 600;
}

/* Accordion rows */
.srp-lf-item {
  background: var(--WH); border: 1px solid var(--BR);
  border-radius: 8px; margin-bottom: 8px; overflow: hidden; transition: .3s;
}
.srp-lf-item.open { border-color: var(--G); box-shadow: 0 4px 12px rgba(0,137,62,.08); }
.srp-lf-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; cursor: pointer; background: var(--BG2,#f8fafc);
  border-bottom: 1px solid transparent; transition: .2s;
}
.srp-lf-item.open .srp-lf-header { background: var(--WH); border-bottom-color: var(--BR); }
.srp-lf-meta { display: flex; align-items: center; gap: 9px; font-weight: 600; flex-wrap: wrap; }
.srp-lf-device {
  background: var(--BR); padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
}
.srp-lf-loc { font-size: 13px; color: var(--G); display: flex; align-items: center; gap: 4px; }
.srp-lf-summary { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-shrink: 0; }
.srp-lf-badge {
  background: #dcfce7; color: var(--GD,#005c29);
  padding: 2px 8px; border-radius: 12px; font-weight: 700; font-size: 12px;
}
.srp-lf-time { color: var(--MT); }
.srp-lf-toggle-icon { transition: transform .3s; color: var(--MT); font-size: 16px; }
.srp-lf-item.open .srp-lf-toggle-icon { transform: rotate(180deg); }
.srp-lf-body { display: none; padding: 14px 16px; background: var(--WH); }
.srp-lf-item.open .srp-lf-body { display: block; }
.srp-lf-session-id {
  background: var(--BG2,#f8fafc); padding: 7px 10px;
  border: 1px solid var(--BR); border-radius: 4px;
  margin-bottom: 12px; font-size: 11px; color: var(--MT);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.srp-lf-maps-link { text-decoration: none; color: #d63638; font-size: 11px; }
.srp-lf-empty { text-align: center; padding: 30px; color: var(--MT); }
.srp-lf-filter-notice {
  margin-bottom: 14px; padding: 10px 14px; background: #eff6ff;
  border: 1px solid #bfdbfe; border-radius: 6px; color: #1e40af;
  display: flex; justify-content: space-between; align-items: center; font-size: 13px;
}
.srp-lf-clear-btn { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 12px; font-weight: 700; }
.srp-lf-pagination {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--BR);
  flex-wrap: wrap; gap: 8px;
}
.srp-lf-pagination-info { font-size: 12px; color: var(--MT); }
.srp-lf-pagination-btns { display: flex; gap: 5px; align-items: center; }
.srp-lf-loading { text-align: center; padding: 24px; color: var(--MT); font-size: 13px; }
.srp-lf-error-front { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 14px; border-radius: 6px; font-size: 13px; }
