/* ============================================================
   AnalisaCallCenter — Estilos principais
   ============================================================ */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
}

/* ── Layout ── */

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.8rem;
  color: #1a3c6e;
}

header p {
  color: #666;
  margin-top: 0.4rem;
}

.nome-arquivo {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.25rem 0.8rem;
  background: #e8edf8;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #1a3c6e;
  font-weight: 600;
}

/* ── Card ── */

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  font-size: 1.2rem;
  color: #1a3c6e;
  margin-bottom: 1.2rem;
  border-bottom: 2px solid #e8edf3;
  padding-bottom: 0.5rem;
}

/* ── Formulário de upload ── */

.campo-form {
  margin-bottom: 1.2rem;
}

.campo-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #444;
}

.campo-form input[type="file"],
.campo-form input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.campo-form input[type="file"]:focus,
.campo-form input[type="text"]:focus {
  outline: none;
  border-color: #1a3c6e;
}

.ajuda-campo {
  font-size: 0.82rem;
  color: #888;
  margin-top: 0.3rem;
}

/* ── Botão ── */

.btn-primario {
  display: inline-block;
  background: #1a3c6e;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  width: 100%;
}

.btn-primario:hover:not(:disabled) {
  background: #12306a;
}

.btn-primario:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Progresso ── */

#secao-progresso {
  margin-top: 1.5rem;
}

#secao-progresso label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a3c6e;
}

progress {
  width: 100%;
  height: 18px;
  border-radius: 9px;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: #e0e5ec;
}

progress::-webkit-progress-bar {
  background: #e0e5ec;
  border-radius: 9px;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, #1a3c6e, #4a90d9);
  border-radius: 9px;
  transition: width 0.4s ease;
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, #1a3c6e, #4a90d9);
  border-radius: 9px;
}

#label-etapa {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
  min-height: 1.2em;
}

/* ── Mensagem de erro ── */

.mensagem-erro {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f5c6c6;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin-top: 1rem;
  font-size: 0.92rem;
}

.aviso-flash {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

/* ── Transcrição ── */

.transcricao-lista {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.fala {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}

.fala.vendedor {
  align-self: flex-start;
}

.fala.cliente {
  align-self: flex-end;
}

.fala-rotulo {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.fala.vendedor .fala-rotulo {
  color: #1a3c6e;
}

.fala.cliente .fala-rotulo {
  color: #2d7d46;
  text-align: right;
}

.fala-texto {
  background: #e8edf8;
  border-radius: 10px 10px 10px 2px;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.fala.cliente .fala-texto {
  background: #e8f5ec;
  border-radius: 10px 10px 2px 10px;
  text-align: right;
}

/* ── Sentimento ── */

.sentimentos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.sentimento-card {
  border-radius: 8px;
  padding: 1rem 1.2rem;
  text-align: center;
}

.sentimento-card .agente-nome {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 0.4rem;
}

.sentimento-card .categoria {
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: capitalize;
}

.sentimento-card .confianca {
  font-size: 0.8rem;
  color: #777;
  margin-top: 0.2rem;
}

/* Cores por categoria */
.cat-irritado    { background: #fdecea; color: #c0392b; border: 2px solid #e57373; }
.cat-frustrado   { background: #fff3e0; color: #e65100; border: 2px solid #ffb74d; }
.cat-neutro      { background: #f5f5f5; color: #555;    border: 2px solid #bdbdbd; }
.cat-satisfeito  { background: #e8f5e9; color: #2e7d32; border: 2px solid #66bb6a; }
.cat-amigavel    { background: #e8f5e9; color: #2e7d32; border: 2px solid #66bb6a; }
.cat-agressivo   { background: #fdecea; color: #c0392b; border: 2px solid #e57373; }

/* ── Venda Ativa ── */

.badge-classificacao {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.badge-upsell_aceito    { background: #e8f5e9; color: #2e7d32; border: 1.5px solid #66bb6a; }
.badge-upsell_oferecido { background: #e3f2fd; color: #1565c0; border: 1.5px solid #64b5f6; }
.badge-upsell_recusado  { background: #fdecea; color: #c0392b; border: 1.5px solid #e57373; }
.badge-sem_upsell       { background: #f5f5f5; color: #555;    border: 1.5px solid #bdbdbd; }

.entidades-grupo {
  margin-top: 0.8rem;
}

.entidades-grupo h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.4rem;
}

.entidade-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge-entidade {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 12px;
  font-size: 0.85rem;
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.badge-entidade.tipo-produto   { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.badge-entidade.tipo-promocao  { background: #fff8e1; color: #f57f17; border-color: #ffe082; }
.badge-entidade.tipo-servico   { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.badge-entidade.tipo-outro     { background: #f3e5f5; color: #6a1b9a; border-color: #ce93d8; }

/* ── Produto Foco ── */

.produto-foco-resultado {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.produto-foco-resultado.sim {
  background: #e8f5e9;
  border: 2px solid #66bb6a;
}

.produto-foco-resultado.nao {
  background: #fdecea;
  border: 2px solid #e57373;
}

.produto-foco-resultado .icone {
  font-size: 2rem;
  line-height: 1;
}

.produto-foco-resultado .texto-principal {
  font-size: 1.1rem;
  font-weight: 700;
}

.produto-foco-resultado.sim .texto-principal { color: #2e7d32; }
.produto-foco-resultado.nao .texto-principal { color: #c0392b; }

.evidencias {
  margin-top: 0.8rem;
}

.evidencias h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.5rem;
}

.trecho-evidencia {
  border-left: 3px solid #1a3c6e;
  padding: 0.5rem 0.8rem;
  margin-bottom: 0.4rem;
  background: #f0f4fb;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #444;
  font-size: 0.93rem;
}

/* ── Insights ── */

.insights-lista {
  list-style: none;
  padding: 0;
}

.insights-lista li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.insights-lista li:last-child {
  border-bottom: none;
}

/* ── Botão voltar ── */

.btn-secundario {
  display: inline-block;
  background: transparent;
  color: #1a3c6e;
  border: 2px solid #1a3c6e;
  border-radius: 6px;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-secundario:hover {
  background: #1a3c6e;
  color: #fff;
}

/* ── Rodapé ── */

.rodape {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  color: #999;
  font-size: 0.85rem;
}

.rodape-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
}

.rodape-linkedin:hover {
  color: #0a66c2;
}
