/* =====================================================================
 * AgroRota — Vitrine Pública
 * Paleta: teal #2A6970 / cobre #B07338 / prata #C5C8CD
 * ===================================================================== */

:root {
  --primary:   #2A6970;
  --primary-d: #1F4E54;
  --primary-l: #3A8089;
  --secondary: #B07338;
  --secondary-d: #905C2A;
  --accent:    #C5C8CD;
  --dark:      #1A1A1A;
  --neutral:   #555E66;
  --light:     #F5F6F8;
  --light-2:   #ECEEF1;
  --surface:   #FFFFFF;
  --divider:   #E2E5E9;
  --success:   #2E8B57;
  --warning:   #C58A1A;
  --danger:    #B5483F;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 18px 50px rgba(0,0,0,.18);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--dark);
  background: var(--light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a  { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); }
button { font: inherit; cursor: pointer; }
h1,h2,h3,h4 { color: var(--dark); margin: 0 0 .4em; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 18px; }
p  { margin: 0 0 1em; color: var(--neutral); }
ul { list-style: none; padding: 0; margin: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==================== HEADER ==================== */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  position: sticky; top: 0; z-index: 30;
}
.topbar-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--dark);
}
.brand:hover { color: var(--dark); }
.brand-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; letter-spacing: .5px;
  box-shadow: var(--shadow-sm);
}
.brand-img {
  height: 56px;
  width: auto;
  display: block;
}
.brand-img-rodape { height: 130px; }
.brand-fallback { display: flex; align-items: center; gap: 12px; }
@media (max-width: 720px) {
  .brand-img { height: 90px; width: auto; display: block; }
  .brand-img-rodape { height: 70px; }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; }
.brand-text span { font-size: 12px; color: var(--neutral); }

.topbar-nav { display: flex; align-items: center; gap: 22px; }
.topbar-nav a {
  font-size: 14px;
  color: var(--neutral);
  font-weight: 500;
}
.topbar-nav a:hover { color: var(--primary); }

@media (max-width: 720px) {
  .topbar-row { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 12px; }
  .topbar-nav { width: 100%; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .topbar-nav a { font-size: 13px; }
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary  { background: var(--primary);   color: var(--surface); }
.btn-primary:hover  { background: var(--primary-d); color: var(--surface); }
.btn-secondary{ background: var(--secondary); color: var(--surface); }
.btn-secondary:hover{ background: var(--secondary-d); color: var(--surface); }
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--divider);
}
.btn-ghost:hover { background: var(--light-2); color: var(--primary-d); }

.btn-wpp { background: #25D366; }
.btn-wpp:hover { background: #1DA851; color: var(--surface); }
.btn-wpp .ico-wpp {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .5; transform: scale(.7); }
}

/* ==================== HERO ==================== */
.hero {
  background:
    radial-gradient(1200px 600px at 90% -20%, rgba(176,115,56,.18), transparent 60%),
    radial-gradient(1000px 500px at -10% 0%, rgba(42,105,112,.10), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--light) 100%);
  padding: 60px 0 70px;
  border-bottom: 1px solid var(--divider);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
}
.hero-sub {
  font-size: 17px;
  max-width: 560px;
  color: var(--neutral);
  margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 460px;
  border-top: 1px solid var(--divider);
  padding-top: 22px;
  gap: 12px;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 26px; color: var(--primary); }
.hero-stats span { font-size: 12px; color: var(--neutral); }

.hero-aside {
  position: relative;
  height: 380px;
}
@media (max-width: 900px) { .hero-aside { display: none; } }
.hero-card {
  position: relative;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  padding: 36px;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 14px;
}
.hero-card-glow {
  position: absolute; top: -100px; right: -100px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  opacity: .55;
}
.hero-card-line {
  height: 6px; width: 90%;
  background: rgba(255,255,255,.18);
  border-radius: 3px;
}
.hero-card-line.short { width: 55%; background: var(--secondary); }
.hero-card-tag {
  margin-top: 16px;
  display: inline-block;
  padding: 8px 14px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  width: fit-content;
}

/* ==================== SECTIONS ==================== */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.section-head p { margin: 4px 0 0; }

/* ==================== FILTROS ==================== */
.filtros {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--divider);
  font-size: 13px;
  color: var(--neutral);
  font-weight: 500;
  transition: all .15s ease;
}
.chip:hover { color: var(--primary); border-color: var(--primary-l); }
.chip[aria-pressed="true"] {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}

.filtros-extra { display: flex; gap: 8px; align-items: center; }
#busca {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--divider);
  font-size: 14px;
  min-width: 240px;
  background: var(--surface);
  color: var(--dark);
}
#busca:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(42,105,112,.15); }
@media (max-width: 600px) { #busca { min-width: 0; flex: 1; } .filtros-extra { width: 100%; } }
.btn-recarregar { padding: 10px 14px; }

/* ==================== GRID DE CARDS ==================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card-foto {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--accent) 0%, var(--light-2) 100%);
  position: relative;
  overflow: hidden;
}
.card-foto img {
  width: 100%; height: 100%; object-fit: cover;
}
.card-foto-vazia {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  color: var(--neutral); gap: 8px;
}
.card-foto-vazia .placeholder-ico {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.card-categoria {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.7);
  color: #fff;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: .5px;
  backdrop-filter: blur(4px);
}
.card-sku {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(255,255,255,.92);
  color: var(--dark);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.card-corpo { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card-titulo {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin: 0 0 4px;
}
.card-info {
  font-size: 13px;
  color: var(--neutral);
  margin: 0 0 12px;
}
.card-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.card-meta span {
  font-size: 12px;
  color: var(--neutral);
  background: var(--light);
  padding: 3px 8px;
  border-radius: 6px;
}

.card-preco { margin-top: auto; }
.card-preco-de {
  font-size: 12px;
  color: var(--neutral);
  text-decoration: line-through;
}
.card-preco-por {
  font-size: 22px;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -.3px;
}
.card-preco-rotulo {
  display: block;
  font-size: 11px;
  color: var(--neutral);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ==================== STATUS / PAGINAÇÃO ==================== */
.status-msg {
  text-align: center;
  padding: 30px 0;
  color: var(--neutral);
  font-size: 14px;
}
.status-msg.erro { color: var(--danger); }
.status-msg.vazio { color: var(--neutral); }

.paginacao {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 32px;
}
.paginacao button {
  min-width: 38px; height: 38px;
  border: 1px solid var(--divider);
  background: var(--surface);
  border-radius: var(--radius-sm);
  color: var(--neutral);
  font-weight: 600;
  font-size: 13px;
}
.paginacao button[aria-current="page"] {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}
.paginacao button:disabled { opacity: .4; cursor: not-allowed; }

/* ==================== VENDEDORES ==================== */
.vendedores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.vendedor {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: pointer;
}
.vendedor:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-l); }
.vendedor-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-l));
  color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
  margin-bottom: 4px;
}
.vendedor-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.vendedor h3 { margin: 0; font-size: 16px; }
.vendedor-cargo { font-size: 12px; color: var(--neutral); }
.vendedor-wpp {
  margin-top: 8px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}
.vendedor .btn { width: 100%; margin-top: 8px; }

.vendedores-grid-modal { margin: 12px 0 16px; }

/* ==================== PASSOS ==================== */
.passos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.passos article {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--divider);
  position: relative;
}
.passo-num {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  color: var(--secondary);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.passos h3 { margin: 0 0 6px; font-size: 17px; }
.passos p { margin: 0; font-size: 14px; }

/* ==================== FOOTER ==================== */
.rodape {
  background: var(--dark);
  color: var(--accent);
  margin-top: 60px;
}
.rodape h4 {
  color: var(--surface);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.rodape-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 56px 20px 36px;
}
@media (max-width: 720px) { .rodape-grid { grid-template-columns: 1fr; gap: 28px; } }
.rodape-mini { color: var(--accent); font-size: 14px; margin-top: 14px; opacity: .8; max-width: 360px; }
.rodape .brand-text strong { color: var(--surface); }
.rodape .brand-text span { color: var(--accent); }
.rodape ul li { margin-bottom: 8px; font-size: 14px; }
.rodape ul a, .rodape ul span { color: var(--accent); }
.rodape ul a:hover { color: var(--surface); }

.rodape-base {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0;
  font-size: 12px;
}
.rodape-base .container {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.rodape-versao { opacity: .5; font-family: ui-monospace, monospace; }

/* ==================== MODAL ==================== */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal[aria-hidden="false"] { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,20,22,.7);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 920px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}
.modal-card-pequeno { max-width: 540px; }
@keyframes modalIn {
  from { transform: scale(.96) translateY(8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-fechar {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--light);
  border: none;
  font-size: 22px;
  color: var(--neutral);
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.modal-fechar:hover { background: var(--light-2); color: var(--dark); }

.modal-conteudo-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
}
@media (max-width: 800px) { .modal-conteudo-grid { grid-template-columns: 1fr; } }

.galeria {
  background: var(--light-2);
}
.galeria-principal {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--accent), var(--light-2));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.galeria-principal img { width: 100%; height: 100%; object-fit: cover; }
.galeria-thumbs {
  display: flex; gap: 8px; padding: 12px;
  overflow-x: auto;
}
.galeria-thumbs button {
  flex: 0 0 64px; aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0; background: var(--accent);
}
.galeria-thumbs button[aria-pressed="true"] { border-color: var(--primary); }
.galeria-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.modal-detalhe { padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.modal-categoria {
  display: inline-block;
  background: var(--primary);
  color: var(--surface);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  width: fit-content;
}
.modal-titulo { font-size: 24px; margin: 0; line-height: 1.2; }
.modal-sku { font-family: ui-monospace, monospace; font-size: 13px; color: var(--neutral); }
.modal-sub { font-size: 14px; color: var(--neutral); margin: 0 0 12px; }

.modal-ficha {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  padding: 14px;
  background: var(--light);
  border-radius: var(--radius-sm);
  margin: 8px 0;
}
.modal-ficha div { display: flex; flex-direction: column; }
.modal-ficha strong { font-size: 13px; color: var(--dark); }
.modal-ficha span { font-size: 11px; color: var(--neutral); text-transform: uppercase; letter-spacing: .5px; }

.modal-preco-bloco {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 8px;
}
.modal-preco-de { font-size: 13px; color: var(--neutral); text-decoration: line-through; }
.modal-preco-por { font-size: 32px; font-weight: 800; color: var(--secondary); letter-spacing: -.5px; line-height: 1; }
.modal-preco-rotulo { font-size: 11px; color: var(--neutral); text-transform: uppercase; letter-spacing: .5px; }

.modal-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-acoes .btn { flex: 1; min-width: 140px; }

.modal-descricao {
  background: var(--light);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  color: var(--neutral);
  white-space: pre-wrap;
}

@media (max-width: 800px) {
  .modal-detalhe { padding: 20px; }
  .modal-titulo { font-size: 20px; }
  .modal-preco-por { font-size: 26px; }
}

/* ==================== PARCEIROS ==================== */
.parceiros-section { background: var(--surface); border-top: 1px solid var(--divider); }
.parceiros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.parceiro-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--light);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.parceiro-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary-l);
  color: inherit;
}
.parceiro-card img {
  height: 64px; width: auto; flex-shrink: 0;
}
.parceiro-info { display: flex; flex-direction: column; }
.parceiro-info strong { font-size: 15px; color: var(--dark); margin-bottom: 2px; }
.parceiro-info span { font-size: 13px; color: var(--neutral); }

/* ==================== CHAT WIDGET ==================== */

/* Fix global: o atributo HTML "hidden" deve sempre esconder o
   elemento, mesmo quando ele tem display: flex/grid no CSS. */
[hidden] { display: none !important; }

.chat-widget {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 40;
  font-size: 14px;
}

/* botão flutuante (fechado) */
.chat-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 14px 16px;
  background: var(--primary);
  color: var(--surface);
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(42,105,112,.45), 0 4px 8px rgba(0,0,0,.15);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  position: relative;
}
.chat-toggle:hover { background: var(--primary-d); transform: translateY(-2px); }
.chat-toggle-ico {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex; align-items: center; justify-content: center;
}
.chat-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #E63946;
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

@media (max-width: 600px) {
  .chat-widget { bottom: 14px; right: 14px; left: 14px; }
  .chat-toggle { width: 100%; justify-content: center; }
  .chat-toggle-text { display: inline; }
}

/* painel do chat (aberto) */
.chat-panel {
  width: 380px;
  max-width: calc(100vw - 28px);
  height: 580px;
  max-height: calc(100vh - 60px);
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatIn .25s ease;
}
@keyframes chatIn {
  from { transform: translateY(20px) scale(.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
@media (max-width: 600px) {
  .chat-panel { width: 100%; height: 80vh; }
}

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: var(--surface);
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.chat-header-info strong { display: block; font-size: 14px; }
.chat-header-info span { font-size: 11px; opacity: .85; }

.chat-header-acoes { display: flex; gap: 4px; }
.chat-btn-icone {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: none;
  color: var(--surface);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.chat-btn-icone:hover { background: rgba(255,255,255,.22); }

/* tela de seleção de agente */
.chat-selecao {
  padding: 22px 18px;
  flex: 1;
  display: flex; flex-direction: column;
}
.chat-intro {
  font-size: 14px;
  color: var(--neutral);
  margin: 0 0 16px;
  line-height: 1.5;
}
.chat-intro strong { color: var(--dark); display: block; margin-top: 6px; font-size: 15px; }
.chat-agentes {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 14px;
}
.chat-agente {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--light);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all .15s ease;
  font: inherit;
  color: inherit;
}
.chat-agente:hover {
  background: var(--surface);
  border-color: var(--primary-l);
  transform: translateX(2px);
}
.chat-agente-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.chat-agente-avatar.verde   { background: #DDEEDF; color: #2E8B57; }
.chat-agente-avatar.cobre   { background: #F1D9BD; color: #B07338; }
.chat-agente-avatar.amarelo { background: #FBE9B0; color: #B58A12; }
.chat-agente-info { flex: 1; line-height: 1.3; }
.chat-agente-nome { font-weight: 700; color: var(--dark); font-size: 14px; }
.chat-agente-papel { font-size: 12px; color: var(--neutral); margin-top: 2px; }
.chat-mini { font-size: 11px; color: var(--neutral); margin: auto 0 0; text-align: center; }

/* tela de conversa */
.chat-conversa { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-mensagens {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--light);
}
.chat-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
  animation: msgIn .25s ease;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } }
.chat-msg.user {
  background: var(--primary);
  color: var(--surface);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg.ai {
  background: var(--surface);
  color: var(--dark);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--divider);
}
.chat-msg.sistema {
  align-self: center;
  background: transparent;
  color: var(--neutral);
  font-size: 12px;
  font-style: italic;
}
.chat-msg-acoes {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 8px;
}
.chat-msg-acao {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--light-2);
  border: 1px solid var(--divider);
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}
.chat-msg-acao:hover { background: var(--primary); color: var(--surface); border-color: var(--primary); }

.chat-digitando {
  display: flex; gap: 4px;
  padding: 0 16px 8px;
  background: var(--light);
}
.chat-digitando span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--neutral);
  animation: digitando 1.2s infinite ease-in-out;
}
.chat-digitando span:nth-child(2) { animation-delay: .2s; }
.chat-digitando span:nth-child(3) { animation-delay: .4s; }
@keyframes digitando {
  0%, 80%, 100% { transform: scale(.6); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}

.chat-form {
  display: flex; gap: 8px;
  padding: 12px;
  background: var(--surface);
  border-top: 1px solid var(--divider);
}
.chat-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  font-size: 14px;
  background: var(--light);
}
.chat-form input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(42,105,112,.15);
}
.chat-form button {
  width: 42px; height: 42px;
  border-radius: 50%;
  padding: 0;
}

/* Override final - logos maiores */
.brand-img        { height: 90px !important; }
.brand-img-rodape { height: 130px !important; }

/* Override final v2 - logo retangular */
.brand-img        { height: 60px !important; max-width: 220px; object-fit: contain; }
.brand-img-rodape { height: 80px !important; max-width: 280px; object-fit: contain; }

/* Override final v2 - logo retangular */
.brand-img        { height: 60px !important; max-width: 220px; object-fit: contain; }
.brand-img-rodape { height: 80px !important; max-width: 280px; object-fit: contain; }

/* Override final v2 - logo retangular */
.brand-img        { height: 60px !important; max-width: 220px; object-fit: contain; }
.brand-img-rodape { height: 80px !important; max-width: 280px; object-fit: contain; }

/* === Override final v3 — logo grande e destacada === */
.brand {
  padding: 6px 0;
}
.brand-img {
  height: 140px !important;
  width: auto !important;
  max-width: 320px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.10)) contrast(1.05) saturate(1.05);
  transition: transform .2s ease;
}
.brand-img:hover {
  transform: scale(1.02);
}
.brand-img-rodape {
  height: 180px !important;
  max-width: 380px;
}
.topbar {
  padding: 4px 0;
}
.topbar-row {
  height: auto !important;
  min-height: 90px;
  padding: 10px 0;
}
@media (max-width: 720px) {
  .brand-img { height: 80px !important; }
  .brand-img-rodape { height: 110px !important; }
  .topbar-row { min-height: 60px; }
}

/* === Override final v4 — logo mais esticada e compacta === */
.brand-img {
  height: 100px !important;
  max-width: 420px !important;
  object-fit: contain;
}
.brand {
  margin-right: 20px;
}
.topbar-row {
  min-height: 80px !important;
  gap: 24px;
}
.topbar-nav {
  gap: 28px;
}
@media (max-width: 720px) {
  .brand-img { height: 70px !important; max-width: 240px !important; }
  .topbar-row { min-height: 60px !important; gap: 12px; }
}

/* === Override final v5 — logo BEM GRANDE === */
.brand-img {
  height: 160px !important;
  max-width: 560px !important;
  object-fit: contain;
}
.brand-img-rodape {
  height: 200px !important;
  max-width: 460px !important;
}
.topbar-row {
  min-height: 130px !important;
  padding: 8px 0 !important;
}
.brand {
  margin-right: 16px;
}
@media (max-width: 720px) {
  .brand-img { height: 90px !important; max-width: 280px !important; }
  .topbar-row { min-height: 75px !important; }
  .brand-img-rodape { height: 130px !important; max-width: 280px !important; }
}
