/* ============================================================
   SEÇÃO: TRANSBORDO WEB — os agentes executando
   Uma janela do produto em três colunas: quem trabalha, o que
   foi pedido, e o que está sendo feito agora.
   ============================================================ */

.tbe {
  position: relative;
  background: #07080A;
  color: #E8E9EA;
  overflow: hidden;
  padding: clamp(80px, 10vw, 140px) 20px clamp(70px, 9vw, 120px);
}

.tbe-fundo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 66% 48% at 50% -4%, rgba(111, 191, 139, 0.1), transparent 64%),
    radial-gradient(ellipse 48% 40% at 90% 98%, rgba(255, 255, 255, 0.05), transparent 66%);
}

.tbe-fundo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 74px 74px;
  -webkit-mask: radial-gradient(ellipse 76% 60% at 50% 42%, #000 28%, transparent 76%);
  mask: radial-gradient(ellipse 76% 60% at 50% 42%, #000 28%, transparent 76%);
}

.tbe-inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; }

/* ---------- Cabeçalho ---------- */
.tbe-head { text-align: center; max-width: 780px; margin: 0 auto clamp(40px, 5vw, 62px); }

.tbe-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #B9BEC3;
  margin-bottom: 22px;
}

.tbe-title {
  margin: 0;
  font-size: clamp(32px, 5.4vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: #FFFFFF;
  text-wrap: balance;
}

.tbe-title em {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  color: #E8C49A;
}

.tbe-sub {
  margin: 20px auto 0;
  max-width: 60ch;
  font-size: clamp(15px, 2vw, 17.5px);
  line-height: 1.62;
  color: #8A8F94;
  text-wrap: pretty;
}

/* ============================================================
   A JANELA DO PRODUTO
   ============================================================ */
.tbe-app {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.4fr) minmax(0, 0.95fr);
  min-height: 460px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(168deg, #101315 0%, #0A0C0E 76%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 60px 120px -54px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}

/* ---------- Coluna 1: agentes ---------- */
.tbe-areas {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(18px, 2vw, 24px);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.tbe-areas-rotulo {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: #6B7176;
  padding: 0 10px 10px;
}

.tbe-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: #8A8F94;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.4s ease, border-color 0.4s ease;
}

/* o traço que marca quem está trabalhando agora */
.tbe-area::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 0 3px 3px 0;
  background: #6FBF8B;
  transform: translateY(-50%);
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tbe-area.is-ativa::before { height: 26px; }

.tbe-area-icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

.tbe-area-icone svg { width: 17px; height: 17px; }

.tbe-area span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tbe-area b { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: #E8E9EA; }
.tbe-area i { font-style: normal; font-size: 12.5px; line-height: 1.35; color: #6B7176; }

.tbe-area:hover { background: rgba(255, 255, 255, 0.035); }

.tbe-area.is-ativa {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.tbe-area.is-ativa .tbe-area-icone {
  background: rgba(111, 191, 139, 0.14);
  border-color: rgba(111, 191, 139, 0.34);
  color: #8FD6A9;
}

.tbe-area.is-ativa i { color: #8A8F94; }

/* ---------- Coluna 2: conversa ---------- */
.tbe-chat { display: flex; flex-direction: column; min-width: 0; }

.tbe-chat-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px clamp(18px, 2vw, 24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tbe-chat-quem { font-size: 14px; font-weight: 700; color: #FFFFFF; }

.tbe-chat-estado {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: #7f9d89;
}

.tbe-chat-estado i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #7BA88C;
  animation: tbePulso 2s ease-in-out infinite;
}

.tbe-fluxo {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 2vw, 24px);
  overflow: hidden;
}

/* bolhas */
.tbe-bolha {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  animation: tbeEntra 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tbe-bolha--eu {
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
  background: #f5f5f5;
  border: 1px solid #f5f5f5;
  color: #1C1A16;
  font-weight: 500;
}

.tbe-bolha--ele {
  align-self: flex-start;
  border-radius: 16px 16px 16px 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #C6CBD0;
}

.tbe-bolha--ele strong { color: #FFFFFF; font-weight: 700; }

/* três pontinhos de "digitando" */
.tbe-pensando { align-self: flex-start; display: inline-flex; gap: 5px; padding: 14px 16px; }
.tbe-pensando i { width: 6px; height: 6px; border-radius: 50%; background: #6f6a63; animation: tbeDot 1.3s ease-in-out infinite; }
.tbe-pensando i:nth-child(2) { animation-delay: 0.18s; }
.tbe-pensando i:nth-child(3) { animation-delay: 0.36s; }

@keyframes tbeDot { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes tbeEntra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tbePulso { 0%, 100% { opacity: 0.5; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.2); } }

/* campo de digitação */
.tbe-campo {
  margin: 0 clamp(18px, 2vw, 24px) clamp(18px, 2vw, 24px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.tbe-campo-texto {
  position: relative;
  min-height: 42px;
  padding: 13px 15px 6px;
  font-size: 14px;
  line-height: 1.45;
  color: #EFE9E1;
  word-break: break-word;
}

.tbe-campo-dica { color: #5A6065; }
.tbe-campo-dica.is-oculta { display: none; }

.tbe-cursor {
  display: none;
  width: 1.5px;
  height: 15px;
  margin-left: 1px;
  vertical-align: -2px;
  background: #6FBF8B;
  animation: tbePisca 1s steps(2) infinite;
}

.tbe-cursor.is-ativo { display: inline-block; }

@keyframes tbePisca { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.tbe-campo-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 10px;
}

.tbe-campo-icone, .tbe-campo-enviar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #6B7176;
}

.tbe-campo-icone svg, .tbe-campo-enviar svg { width: 16px; height: 16px; }

.tbe-campo-enviar {
  background: rgba(255, 255, 255, 0.08);
  color: #8A8F94;
  transition: background 0.35s ease, color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tbe-campo-enviar.is-pronto { background: #FFFFFF; color: #1C1A16; transform: scale(1.06); }

/* ---------- Coluna 3: execução ---------- */
.tbe-exec {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 2vw, 24px);
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.22);
  min-width: 0;
}

.tbe-exec-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.tbe-exec-rotulo {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: #6B7176;
}

.tbe-exec-selo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #6f6a63;
  white-space: nowrap;
  transition: color 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}

.tbe-exec-selo i { width: 6px; height: 6px; border-radius: 50%; background: #4a4741; transition: background 0.4s ease; }
.tbe-exec-selo.is-rodando { color: #8FD6A9; border-color: rgba(111, 191, 139, 0.34); background: rgba(111, 191, 139, 0.08); }
.tbe-exec-selo.is-rodando i { background: #6FBF8B; animation: tbePulso 1.4s ease-in-out infinite; }
.tbe-exec-selo.is-pronto { color: #9FDDB0; border-color: rgba(123, 168, 140, 0.34); background: rgba(123, 168, 140, 0.08); }
.tbe-exec-selo.is-pronto i { background: #7BA88C; }

/* a lista do que o agente está fazendo */
.tbe-exec-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.tbe-passo {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 13px 13px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12.5px;
  line-height: 1.4;
  color: #8A8F94;
  overflow: hidden;
  animation: tbeEntra 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* fio de progresso na base, só enquanto a ferramenta trabalha */
.tbe-passo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, rgba(111, 191, 139, 0.35), #6FBF8B);
}

.tbe-passo.is-rodando::after { animation: tbeProgresso 1.15s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.tbe-passo.is-feito::after { width: 100%; opacity: 0.28; }

.tbe-passo-marca {
  flex: none;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid #33383C;
}

.tbe-passo-marca svg { width: 10px; height: 10px; opacity: 0; transition: opacity 0.3s ease; }

.tbe-passo-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tbe-passo-txt b { font-weight: 700; color: #C6CBD0; font-size: 12.5px; }
.tbe-passo-txt span { color: #6B7176; font-size: 11.5px; }

.tbe-passo-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.tbe-passo-logo img { width: 15px; height: 15px; object-fit: contain; }

.tbe-passo.is-rodando { border-color: rgba(111, 191, 139, 0.26); background: rgba(111, 191, 139, 0.05); }
.tbe-passo.is-rodando .tbe-passo-marca { border-color: #6FBF8B; border-right-color: transparent; animation: tbeGira 0.9s linear infinite; }
.tbe-passo.is-feito .tbe-passo-marca { border-color: #6FBF8B; background: rgba(111, 191, 139, 0.16); animation: none; }
.tbe-passo.is-feito .tbe-passo-marca svg { opacity: 1; color: #8FD6A9; }
.tbe-passo.is-feito .tbe-passo-txt b { color: #E8E9EA; }

@keyframes tbeProgresso { from { width: 0; } to { width: 100%; } }

@keyframes tbeGira { to { transform: rotate(360deg); } }

/* o resultado que sai */
.tbe-exec-saida { margin-top: auto; min-height: 0; }

.tbe-saida-caixa {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  animation: tbeEntra 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tbe-saida-topo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #9FDDB0;
  margin-bottom: 12px;
}

.tbe-saida-topo i { width: 6px; height: 6px; border-radius: 50%; background: #7BA88C; }

/* plano de venda */
.tbe-plano { display: flex; flex-direction: column; gap: 7px; }
.tbe-plano-item { display: flex; gap: 9px; align-items: baseline; font-size: 12px; color: #8A8F94; }
.tbe-plano-item b { color: #E8E9EA; font-weight: 700; }
.tbe-plano-item span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: #6FBF8B; }

/* grade de criativos */
.tbe-pecas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.tbe-peca {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(111, 191, 139, 0.07));
  animation: tbeEntra 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.tbe-peca:nth-child(2) { animation-delay: 0.12s; }
.tbe-peca:nth-child(3) { animation-delay: 0.24s; }

/* números da campanha */
.tbe-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tbe-kpi { border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.08); padding: 9px 11px; }
.tbe-kpi b { display: block; font-size: 15px; font-weight: 800; color: #FFFFFF; letter-spacing: -0.02em; }
.tbe-kpi span { font-size: 10.5px; letter-spacing: 0.1em; color: #6B7176; }

/* ---------- Fecho ---------- */
.tbe-fecho {
  margin: clamp(30px, 4vw, 48px) auto 0;
  text-align: center;
  max-width: 56ch;
  font-size: clamp(15px, 2vw, 17.5px);
  line-height: 1.6;
  color: #8A8F94;
}

.tbe-fecho strong { color: #FFFFFF; font-weight: 700; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .tbe-app { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); }
  .tbe-areas {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    scrollbar-width: none;
  }
  .tbe-areas::-webkit-scrollbar { display: none; }
  .tbe-areas-rotulo { display: none; }
  .tbe-area { flex: none; }
  .tbe-area i { display: none; }
}

@media (max-width: 760px) {
  .tbe-app { grid-template-columns: 1fr; }
  .tbe-exec { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
  .tbe-fluxo { min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .tbe-bolha, .tbe-passo, .tbe-saida-caixa, .tbe-peca { animation: none; }
  .tbe-passo::after { animation: none; width: 100%; }
  .tbe-pensando i, .tbe-chat-estado i, .tbe-exec-selo i, .tbe-cursor { animation: none; }
  .tbe-passo.is-rodando .tbe-passo-marca { animation: none; }
}
