/* Tela do Agente — a cara aprovada por ela em 27/09/2026.
   Trocar a marca: mude --marca e --acento aqui, e o nome no HTML. */

:root {
  --marca: #16584A;
  --marca-escura: #0E3E34;
  --acento: #C8873E;
  --fundo: #FBFAF8;
  --lateral: #F2F0EB;
  --papel: #FFFFFF;
  --borda: #E4E0D6;
  --borda-forte: #D9D3C7;
  --texto: #1A2420;
  --texto-medio: #4A554F;
  --texto-fraco: #5A6560;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

a { color: var(--marca); }
a:hover { color: var(--marca-escura); }

:focus-visible {
  outline: 2px solid var(--marca);
  outline-offset: 2px;
}

.so-leitor {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------- a moldura */

.tudo { display: flex; height: 100%; }

.lateral {
  width: 264px;
  flex-shrink: 0;
  background: var(--lateral);
  border-right: 1px solid #E0DCD3;
  display: flex;
  flex-direction: column;
}

.marca {
  padding: 22px 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.marca-selo {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--marca);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.marca-nome {
  font-family: 'Bricolage Grotesque', Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.caixa-botao { padding: 0 16px 14px; }

.botao-nova {
  width: 100%;
  height: 44px;
  border: 1px solid var(--borda-forte);
  border-radius: 11px;
  background: var(--papel);
  color: var(--texto);
  font-size: 15px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.botao-nova:hover { background: #FAF8F4; }

.rotulo-lista {
  padding: 6px 24px 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #6B7670;
}

.lista { flex: 1; overflow-y: auto; padding: 0 16px; }

.conversa-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 11px 12px;
  margin-bottom: 3px;
  display: block;
}
.conversa-item:hover { background: #EDEAE3; }
.conversa-item.ativa { background: var(--papel); border-color: #DCD6CA; }

.conversa-titulo {
  font-size: 14.5px; font-weight: 600; color: var(--texto);
  margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conversa-item:not(.ativa) .conversa-titulo { font-weight: 500; color: #33403A; }
.conversa-quando { font-size: 12.5px; color: #6B7670; }

.rodape-lateral {
  padding: 14px 16px 18px;
  border-top: 1px solid #E0DCD3;
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #DCE5E0; color: var(--marca);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rodape-nome { font-size: 14px; font-weight: 600; }
.botao-sair {
  border: none; background: none; padding: 0;
  font-size: 12px; color: var(--texto-fraco); text-decoration: underline;
}

/* ---------------------------------------------------------- a conversa */

.painel { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topo {
  height: 68px;
  flex-shrink: 0;
  padding: 0 32px;
  border-bottom: 1px solid #E8E4DB;
  display: flex; align-items: center; gap: 12px;
}

.topo-titulo {
  font-family: 'Bricolage Grotesque', Georgia, serif;
  font-size: 17px; font-weight: 600; letter-spacing: -0.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.selo-vivo {
  margin-left: auto;
  display: flex; align-items: center; gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #E7EFE9;
  border: 1px solid #CBDDD2;
  font-size: 13px; font-weight: 600; color: #124A3E;
  flex-shrink: 0;
}
.selo-vivo span.ponto {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--marca); display: block;
}

.botao-menu {
  display: none;
  width: 38px; height: 38px;
  border: none; background: transparent;
  align-items: center; justify-content: center;
  padding: 0; flex-shrink: 0;
}

.fluxo {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 32px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.balao-pessoa {
  align-self: flex-end;
  max-width: 560px;
  padding: 14px 18px;
  border-radius: 16px 16px 4px 16px;
  background: var(--marca);
  color: #F7FAF8;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.linha-agente { display: flex; gap: 12px; align-items: flex-start; max-width: 100%; }

.selo-agente {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--marca);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 3px;
}

.balao-agente {
  max-width: 620px;
  padding: 15px 19px;
  border-radius: 4px 16px 16px 16px;
  background: var(--papel);
  border: 1px solid var(--borda);
  line-height: 1.6;
  color: #22302A;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cartao-trabalho {
  width: 430px;
  max-width: 100%;
  padding: 16px 19px;
  border-radius: 4px 16px 16px 16px;
  background: var(--papel);
  border: 1px solid var(--borda);
}
.trabalho-titulo { font-size: 15px; font-weight: 600; color: #22302A; margin-bottom: 4px; }
.trabalho-passo { font-size: 13.5px; color: var(--texto-fraco); margin-bottom: 13px; }
.trilho { height: 6px; border-radius: 999px; background: #EAE6DC; overflow: hidden; }
.trilho i {
  display: block; height: 6px; border-radius: 999px;
  background: var(--acento);
  width: 12%;
  transition: width .6s ease;
}

.vazio {
  margin: auto;
  text-align: center;
  max-width: 420px;
  color: var(--texto-medio);
}
.vazio h2 {
  font-family: 'Bricolage Grotesque', Georgia, serif;
  font-size: 26px; font-weight: 600; letter-spacing: -0.5px;
  color: var(--texto); margin: 0 0 8px;
}
.vazio p { margin: 0; line-height: 1.6; }

/* ---------------------------------------------------------- escrever */

.rodape { flex-shrink: 0; padding: 12px 32px 22px; }

.caixa-escrita {
  padding: 6px 6px 6px 18px;
  border: 1px solid var(--borda-forte);
  border-radius: 15px;
  background: var(--papel);
  display: flex; align-items: flex-end; gap: 10px;
}
.caixa-escrita:focus-within { border-color: #B9C7BF; }

.caixa-escrita textarea {
  flex: 1;
  min-width: 0;
  border: none; outline: none; background: transparent;
  font-size: 15.5px; color: var(--texto);
  padding: 12px 0;
  resize: none;
  max-height: 180px;
  line-height: 1.5;
}

/* Falar em vez de escrever — pedido dela em 27/09/2026: "já vai com
   instalação para ouvir áudio e entender no sistema". Quem não tem paciência
   de escrever um parágrafo fala ele em dez segundos. */
.botao-microfone {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--borda-forte);
  border-radius: 11px;
  background: var(--papel);
  color: var(--texto-medio);
  display: flex; align-items: center; justify-content: center;
}
.botao-microfone:hover { background: #FAF8F4; color: var(--marca); }
.botao-microfone.gravando {
  background: #FBEDEB; border-color: #E9C3BD; color: #B3261E;
  animation: pulsa 1.4s ease-in-out infinite;
}
.botao-microfone:disabled { opacity: .55; cursor: default; }
@keyframes pulsa { 0%,100% { opacity: 1 } 50% { opacity: .55 } }
@media (prefers-reduced-motion: reduce) { .botao-microfone.gravando { animation: none } }

.aviso-audio { padding: 8px 4px 0; font-size: 12.5px; color: var(--texto-fraco); }
.aviso-audio[hidden] { display: none; }

.botao-enviar {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border: none; border-radius: 11px;
  background: var(--marca);
  display: flex; align-items: center; justify-content: center;
}
.botao-enviar:disabled { background: #A9BDB5; cursor: default; }

.aviso-rodape { padding: 10px 4px 0; font-size: 12.5px; color: #6B7670; }

/* ---------------------------------------------------------- celular */

.fundo-gaveta {
  display: none;
  position: fixed; inset: 0;
  background: rgba(26, 36, 32, .38);
  z-index: 10;
}

@media (max-width: 760px) {
  .botao-menu { display: flex; }
  .lateral {
    position: fixed; z-index: 11;
    top: 0; bottom: 0; left: 0;
    width: 282px;
    transform: translateX(-100%);
    transition: transform .22s ease;
  }
  .lateral.aberta { transform: translateX(0); }
  .fundo-gaveta.aberta { display: block; }
  .topo { padding: 0 14px; height: 62px; }
  .fluxo { padding: 18px 16px 6px; gap: 14px; }
  .rodape { padding: 10px 14px 18px; }
  .balao-pessoa, .balao-agente { max-width: 86%; }
  .selo-vivo { display: none; }
  .caixa-escrita { border-radius: 24px; padding-left: 16px; }
  .botao-enviar { border-radius: 50%; }
}
