:root {
  --flamengo-red: #E30613;
  --flamengo-red-dark: #B8050F;
  --flamengo-black: #0A0A0A;
  --flamengo-gold: #D4AF37;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-500: #64748B;
  --gray-800: #1E293B;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, var(--flamengo-black) 0%, #1a1a1a 100%);
  color: white;
  padding: 18px 24px;
  border-bottom: 4px solid var(--flamengo-red);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.header-logo {
  height: 48px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.header-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.header-text p {
  font-size: 0.82rem;
  color: #CBD5E1;
}

.header-badge {
  margin-left: auto;
  background: var(--flamengo-red);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ===== UPLOAD ===== */
#uploadSection {
  display: block;
}

.upload-hint {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.upload-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.upload-unified {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-bottom: 20px;
  align-items: stretch;
}
@media (max-width: 800px) {
  .upload-unified {
    grid-template-columns: 1fr;
  }
}
.upload-box-unified {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.upload-detect-list {
  list-style: none;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin: 0;
}
.upload-detect-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.86rem;
  color: var(--gray-500);
}
.upload-detect-list li:last-child { border-bottom: 0; }
.upload-detect-list li i { width: 16px; color: #cbd5e1; }
.upload-detect-list li.ok { color: #166534; font-weight: 600; }
.upload-detect-list li.ok i { color: #16a34a; }
.upload-file-name {
  margin-left: auto;
  font-weight: 500;
  color: #64748b;
  font-size: 0.75rem;
  max-width: 52%;
  text-align: right;
  word-break: break-all;
}

@media (min-width: 1100px) {
  .upload-section {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .upload-section {
    grid-template-columns: 1fr;
  }
}

.upload-box {
  background: white;
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.25s;
  box-shadow: var(--shadow);
}

.upload-box:hover,
.upload-box.dragover {
  border-color: var(--flamengo-red);
  background: #FFF5F5;
}

.upload-box.loaded {
  border-color: #16a34a;
  background: #f0fdf4;
}

.upload-box i {
  font-size: 1.8rem;
  color: var(--flamengo-red);
  margin-bottom: 8px;
}

.upload-box.loaded i {
  color: #16a34a;
}

.upload-box p {
  color: var(--gray-500);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.upload-box .filename {
  font-size: 0.78rem;
  color: #16a34a;
  font-weight: 600;
  margin-top: 8px;
  word-break: break-all;
}

input[type="file"] {
  display: none;
}

.status-bar {
  text-align: center;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--flamengo-red);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: 0.88rem;
  transition: background 0.2s;
  font-family: inherit;
}

.btn:hover {
  background: var(--flamengo-red-dark);
}

.btn-secondary {
  background: var(--flamengo-black);
}

.btn-secondary:hover {
  background: #222;
}

.btn-excel {
  background: #15803d;
}

.btn-excel:hover {
  background: #166534;
}

.btn-outline {
  background: white;
  color: var(--flamengo-red);
  border: 2px solid var(--flamengo-red);
}

.btn-outline:hover {
  background: #FFF5F5;
}

/* ===== MAIN CONTENT ===== */
#mainContent {
  display: none;
}

.reload-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.btn-slides {
  background: #1D6F42;
}

.btn-slides:hover {
  background: #145C33;
}

.btn-slides:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 720px) {
  .reload-bar {
    justify-content: stretch;
  }
  .reload-bar .btn {
    flex: 1;
    justify-content: center;
  }
}

.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.78);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}
.processing-overlay.show {
  display: flex;
}
.processing-overlay-box {
  background: #0A0A0A;
  color: #fff;
  border-top: 4px solid #E30613;
  border-radius: 12px;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  max-width: 420px;
}
.processing-overlay-box i {
  font-size: 1.6rem;
  color: #D4AF37;
}
.processing-overlay-box strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.processing-overlay-box p {
  margin: 0;
  font-size: 0.9rem;
  color: #e5e7eb;
  font-weight: 500;
}

.pptx-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.72);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.pptx-overlay-box {
  background: #0A0A0A;
  color: #fff;
  border-top: 4px solid #E30613;
  border-radius: 12px;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* ===== MAIN TABS ===== */
.main-tabs {
  display: flex;
  background: white;
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  gap: 4px;
  flex-wrap: wrap;
}

.main-tab-btn {
  flex: 1;
  min-width: 140px;
  padding: 14px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.main-tab-btn:hover {
  background: #fef2f2;
  color: var(--flamengo-red);
}

.main-tab-btn.active {
  background: var(--flamengo-red);
  color: white;
}

.main-tab-content {
  display: none;
}

.main-tab-content.active {
  display: block;
}

/* ===== SUB TABS ===== */
.sub-tabs {
  display: flex;
  background: white;
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  gap: 4px;
  flex-wrap: wrap;
}

.sub-tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.sub-tab-btn:hover {
  background: #fef2f2;
  color: var(--flamengo-red);
}

.sub-tab-btn.active {
  background: var(--flamengo-black);
  color: white;
}

.sub-tab-content {
  display: none;
}

.sub-tab-content.active {
  display: block;
}

/* ===== KPI CARDS ===== */
.kpi-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 8px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--flamengo-black);
}

.kpi-section-title i {
  color: var(--flamengo-red);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.kpi-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--flamengo-red);
  text-align: center;
}

.kpi-card.digital {
  border-top-color: #D4AF37;
}

.kpi-card.digital .kpi-icon {
  color: #D4AF37;
}

.kpi-card.muted {
  opacity: 0.55;
  border-top-color: #94a3b8;
}

.kpi-card.muted .kpi-icon {
  color: #94a3b8;
}

.kpi-icon {
  font-size: 1.3rem;
  color: var(--flamengo-red);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--flamengo-black);
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 4px;
  font-weight: 500;
}

.channel-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.badge-voz {
  background: #FEE2E2;
  color: #B91C1C;
}

.badge-digital {
  background: #FEF9E7;
  color: #8B6914;
}

.badge-ura {
  background: #FEF3C7;
  color: #B45309;
}

/* ===== SECTIONS / CHARTS ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 14px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--flamengo-black);
}

.section-title i {
  color: var(--flamengo-red);
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--flamengo-red);
}

.chart-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-card h3 i {
  color: var(--flamengo-red);
}

.chart-subtitle {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin: 0 0 12px 0;
  font-weight: 500;
}

.chart-subtitle strong {
  color: var(--flamengo-black);
}

.chart-container {
  position: relative;
  height: 270px;
}

/* ===== TABLES ===== */
.table-wrapper {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th {
  background: var(--flamengo-black);
  color: white;
  padding: 10px 11px;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

td {
  padding: 8px 11px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap;
}

tr:hover td {
  background: #FFF5F5;
}

.neg {
  color: #DC2626;
  font-weight: 600;
}

.pos {
  color: #16A34A;
  font-weight: 600;
}

.critical {
  background: #FEF2F2 !important;
}

.good {
  background: #F0FDF4 !important;
}

/* ===== EXPORT ===== */
.export-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: white;
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border-left: 4px solid var(--flamengo-red);
}

.export-bar label {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.export-bar select {
  padding: 7px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
}

/* ===== PLACEHOLDER ===== */
.placeholder-box {
  background: white;
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px dashed var(--gray-200);
}

.placeholder-box i {
  font-size: 2.5rem;
  color: #D4AF37;
  margin-bottom: 12px;
}

.placeholder-box h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--flamengo-black);
}

.placeholder-box p {
  color: var(--gray-500);
  font-size: 0.9rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--gray-500);
  font-size: 0.8rem;
}

.footer span {
  color: var(--flamengo-red);
  font-weight: 600;
}

/* ===== FLOW TOP BAR ===== */
.flow-pct-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.flow-pct-bar span {
  min-width: 52px;
  text-align: right;
}

.flow-pct-track {
  flex: 1;
  max-width: 120px;
  height: 8px;
  background: #fee2e2;
  border-radius: 4px;
  overflow: hidden;
}

.flow-pct-fill {
  height: 100%;
  background: var(--flamengo-red);
}


/* ===== PERÍODO ===== */
.period-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--flamengo-gold);
  font-size: 0.92rem;
  color: var(--gray-800);
}

.period-banner i {
  color: var(--flamengo-gold);
  font-size: 1.1rem;
}

.period-banner strong {
  color: var(--flamengo-black);
  font-weight: 700;
}

/* ===== TOP MOTIVO LIST ===== */
.top-motivo-card {
  grid-column: span 2;
  text-align: left !important;
}

@media (max-width: 700px) {
  .top-motivo-card {
    grid-column: span 1;
  }
}

.top-motivo-card .kpi-icon {
  text-align: center;
}

.top-motivo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-motivo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: #FEF9E7;
  border-radius: 8px;
  font-size: 0.82rem;
}

.top-motivo-rank {
  font-weight: 800;
  color: var(--flamengo-gold);
  min-width: 28px;
}

.top-motivo-name {
  flex: 1;
  font-weight: 600;
  color: var(--flamengo-black);
  text-align: left;
}

.top-motivo-pct {
  font-weight: 800;
  color: var(--flamengo-red);
  white-space: nowrap;
}


/* KPI com breakdown Chat / WhatsApp */
.kpi-card-rich {
  min-height: 118px;
}
.kpi-subline {
  margin-top: 8px;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  justify-content: center;
  text-align: center;
}
.kpi-subsep {
  color: #cbd5e1;
}


/* ===== PAINEL EXECUTIVO (VOZ × DIGITAL) ===== */
.badge-exec {
  background: #1a1a1a;
  color: #D4AF37;
}
.exec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.exec-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}
.exec-card-title {
  background: #E30613;
  color: #fff;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 6px;
}
.exec-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 12px 8px 6px;
  gap: 4px;
  text-align: center;
}
.exec-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111;
  line-height: 1.2;
}
.exec-card-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 5px 4px;
}
.exec-card.combined .exec-card-body {
  grid-template-columns: 1fr;
  padding: 14px 8px 8px;
}
.exec-card.combined .exec-val {
  font-size: 1.45rem;
}
.exec-card.combined .exec-card-footer {
  grid-template-columns: 1fr;
}
@media (max-width: 600px) {
  .exec-val { font-size: 0.95rem; }
}


/* ===== FUNIS EXECUTIVOS VOZ × DIGITAL ===== */
.funnel-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}
@media (max-width: 960px) {
  .funnel-pair { grid-template-columns: 1fr; }
}
.funnel-col {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.funnel-col-header {
  padding: 14px 16px;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.funnel-col-header.voz { background: linear-gradient(135deg, #E30613 0%, #9b0b12 100%); }
.funnel-col-header.digital { background: linear-gradient(135deg, #1a1a1a 0%, #333 100%); border-bottom: 3px solid #D4AF37; }
.funnel-col-header .funnel-badge {
  font-size: 0.65rem;
  background: rgba(255,255,255,0.2);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.funnel-body { padding: 16px 14px 18px; }
.funnel-stage {
  margin: 0 auto 10px;
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  position: relative;
  transition: transform 0.15s ease;
}
.funnel-stage:hover { transform: translateY(-1px); }
/* VOZ: degradê vermelho mais escuro → tom da caixa 1 (#E30613), fonte branca */
.funnel-stage.s1 { width: 100%; background: #E30613; color: #fff; }
.funnel-stage.s2 { width: 92%; background: #c40510; color: #fff; }
.funnel-stage.s3 { width: 84%; background: #9b0b12; color: #fff; }
.funnel-stage.s4 { width: 76%; background: #7a0810; color: #fff; }
.funnel-stage.s5 { width: 68%; background: #E30613; color: #fff; border: none; }

/* Grupo fila: borda preta = Ofertadas Humano (abandonos + atendidas) */
.funnel-queue-group {
  width: 90%;
  margin: 0 auto 10px;
  border: 2.5px solid #0A0A0A;
  border-radius: 14px;
  padding: 10px 8px 8px;
  background: #f8fafc;
  box-sizing: border-box;
}
.funnel-queue-group-header {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 800;
  color: #0A0A0A;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  padding: 2px 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  line-height: 1.45;
}
.funnel-queue-group-header strong {
  color: #E30613;
  font-size: 0.9rem;
}
.funnel-queue-group-header .funnel-hdr-line2 {
  display: block;
  margin-top: 4px;
  font-weight: 700;
  color: #334155;
  font-size: 0.72rem;
}
.funnel-queue-group-header .funnel-hdr-line2 strong {
  color: #0A0A0A;
  font-size: 0.78rem;
}
.funnel-queue-group .funnel-stage {
  color: #fff;
}
.funnel-queue-group .funnel-stage.s3 {
  width: 96%;
  background: #9b0b12; /* vermelho mais escuro */
  color: #fff;
}
.funnel-queue-group .funnel-stage.s5 {
  width: 88%;
  background: #E30613; /* mesmo tom da caixa 1 */
  color: #fff;
  border: none;
}
.funnel-queue-group .funnel-arrow { color: #64748b; }

/* DIGITAL: degradê preto → cinza médio (fonte branca legível) */
.funnel-col.digital-col .funnel-stage.s1 { background: #0A0A0A; color: #fff; }
.funnel-col.digital-col .funnel-stage.s2 { background: #1a1a1a; color: #fff; }
.funnel-col.digital-col .funnel-stage.s3 { background: #2d2d2d; color: #fff; }
.funnel-col.digital-col .funnel-stage.s4 { background: #404040; color: #fff; }
.funnel-col.digital-col .funnel-stage.s5 { background: #525252; color: #fff; border: 2px solid #D4AF37; }
.funnel-col.digital-col .funnel-stage .funnel-chip {
  background: rgba(255,255,255,0.14);
}
.funnel-col.digital-col .funnel-stage .funnel-stage-sub {
  border-top-color: rgba(255,255,255,0.2);
}
.funnel-col.digital-col .funnel-chip.muted {
  opacity: 0.85;
}

.funnel-stage-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
  margin-bottom: 4px;
}
.funnel-stage-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
}
.funnel-stage-meta {
  font-size: 0.72rem;
  margin-top: 4px;
  opacity: 0.95;
  line-height: 1.35;
}
.funnel-stage-sub {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.7rem;
  line-height: 1.4;
}
.funnel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.funnel-chip {
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.65rem;
  font-weight: 600;
}
.funnel-chip.muted {
  opacity: 0.75;
  font-style: italic;
  font-weight: 500;
}
.funnel-arrow {
  text-align: center;
  color: #94a3b8;
  font-size: 0.75rem;
  margin: -2px 0 6px;
}
.funnel-footer-note {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 8px;
  padding: 0 4px;
  line-height: 1.4;
}


/* Grupo digital: Ofertadas humano (borda vermelha) */
.funnel-escala-group {
  width: 90%;
  margin: 0 auto 10px;
  border: 2.5px solid #E30613;
  border-radius: 14px;
  padding: 10px 8px 8px;
  background: #fff5f5;
  box-sizing: border-box;
}
.funnel-escala-group-header {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 800;
  color: #0A0A0A;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  padding: 2px 6px 10px;
  border-bottom: 1px solid #fecaca;
  line-height: 1.45;
}
.funnel-escala-group-header strong {
  color: #E30613;
  font-size: 0.9rem;
}
.funnel-escala-group-header .funnel-hdr-meta {
  display: block;
  margin-top: 3px;
  font-weight: 600;
  color: #64748b;
  font-size: 0.7rem;
}
.funnel-escala-group .funnel-stage {
  color: #fff;
}
.funnel-escala-group .funnel-stage.s3 {
  width: 96%;
  background: #404040;
  color: #fff;
}
.funnel-escala-group .funnel-stage.s4 {
  width: 88%;
  background: #525252;
  color: #fff;
  border: 2px solid #D4AF37;
}
.funnel-escala-group .funnel-arrow { color: #E30613; }

/* Pontos de saída URA — fundo preto, fonte branca */
.funnel-exit-box {
  margin-top: 8px;
  padding: 8px 10px;
  background: #0A0A0A;
  border-radius: 8px;
  color: #fff;
}
.funnel-exit-box .funnel-exit-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
  margin-bottom: 6px;
  color: #fff;
}
.funnel-exit-box .funnel-chips {
  margin-top: 0;
}
.funnel-exit-box .funnel-chip {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
}
.funnel-exit-box .funnel-chip.muted {
  opacity: 0.8;
  color: #e2e8f0;
}

.funnel-disclaimer {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #E30613;
  border-radius: 8px;
  background: #fff5f5;
  color: #E30613;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
}
.funnel-disclaimer i {
  margin-right: 4px;
}


/* ===== TABULAÇÕES: Top Motivo + TMO ===== */
.tabulacoes-motivo-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 8px 0 28px;
}
.tabulacoes-motivo-stack .top-motivo-card {
  margin: 0;
}
.tabulacoes-motivo-stack .chart-card {
  margin: 0;
}
.top-motivo-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 28px;
  align-items: start;
}
.top-motivo-col {
  min-width: 0;
}
@media (max-width: 800px) {
  .top-motivo-cols {
    grid-template-columns: 1fr;
  }
}
.top-motivo-group {
  margin-bottom: 10px;
}
.top-motivo-group:last-child {
  margin-bottom: 0;
}
.top-motivo-tipo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0 3px 28px;
  padding: 3px 8px;
  background: #fff;
  border-left: 3px solid #D4AF37;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #475569;
}
.top-motivo-tipo-name {
  flex: 1;
  text-align: left;
  font-weight: 500;
}
.top-motivo-tipo-pct {
  font-weight: 700;
  color: #0A0A0A;
  white-space: nowrap;
}
.top-motivo-subtipo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 3px 52px;
  padding: 3px 8px 3px 10px;
  background: #F8FAFC;
  border-left: 2px dotted #94A3B8;
  border-radius: 6px;
  font-size: 0.7rem;
  color: #64748B;
}
.top-motivo-subtipo-name {
  flex: 1;
  text-align: left;
  font-weight: 500;
}
.top-motivo-subtipo-pct {
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .tabulacoes-motivo-stack {
    gap: 12px;
  }
}


.tmo-motivo-host { overflow: auto; }
.tmo-motivo-table {
  width: 100%;
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
}
.tmo-motivo-head,
.tmo-motivo-row {
  display: contents;
}
.tmo-motivo-head > div {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2px;
}
.tmo-motivo-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0A0A0A;
  line-height: 1.25;
  white-space: nowrap;
  padding: 4px 4px 4px 0;
}
.tmo-motivo-tmc {
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0A0A0A;
  text-align: right;
  white-space: nowrap;
  padding: 4px 4px;
}
.tmo-motivo-bar-cell {
  background: #f8fafc;
  border-radius: 8px;
  height: 22px;
  overflow: hidden;
}
.tmo-motivo-bar {
  height: 100%;
  background: #D4AF37;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
  min-width: 0;
  color: #111;
  font-size: 0.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tmo-motivo-bar span { color: #111; }


/* Tabela Fluxo da URA: 1ª coluna pelo maior conteúdo, 2ª ocupa o resto */
.flow-top-table {
  width: 100%;
  table-layout: auto;
}
.flow-top-table th:first-child,
.flow-top-table td:first-child {
  width: 1%;
  white-space: nowrap;
  text-align: left;
}
.flow-top-table th:last-child,
.flow-top-table td:last-child {
  width: auto;
}
