:root{
  --bg:#0f172a; --panel:#111827; --panel-2:#1f2937; --text:#e5e7eb; --muted:#9ca3af;
  --primary:#3b82f6; --accent:#22d3ee; --danger:#ef4444; --ok:#10b981;
  --glass: rgba(255,255,255,.06);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial;
  background: radial-gradient(1200px 800px at 10% -10%, rgba(34,211,238,.08), transparent 60%),
              radial-gradient(1000px 700px at 110% 10%, rgba(59,130,246,.08), transparent 60%),
              var(--bg);
  color:var(--text);
}

/* Layout */
.container{ max-width:920px; margin:0 auto; padding:24px; }
header{ display:flex; align-items:center; gap:12px; padding:12px 0 16px; }
header .dot{ width:12px; height:12px; border-radius:999px; background:var(--ok); box-shadow:0 0 0 4px rgba(16,185,129,.15);}
header h1{ margin:0; font-size:18px; font-weight:700; letter-spacing:.2px;}
header span{ color:var(--muted); font-size:12px; }

.card{
  background: linear-gradient(180deg, rgba(17,24,39,.9), rgba(31,41,55,.9));
  border:1px solid var(--glass);
  border-radius:16px; overflow:hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
}

.toolbar{ display:flex; gap:12px; align-items:center; padding:12px 16px; border-bottom:1px solid var(--glass); }
.toolbar input[type="text"]{
  flex:1; background:#0b1220; border:1px solid rgba(255,255,255,.08); color:var(--text);
  padding:10px 12px; border-radius:10px; outline:none; transition: border-color .2s, box-shadow .2s;
}
.toolbar input[type="text"]:focus{
  border-color: rgba(34,211,238,.5);
  box-shadow: 0 0 0 3px rgba(34,211,238,.15);
}
.toolbar button{
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color:white; border:none; padding:10px 14px; border-radius:10px; cursor:pointer; font-weight:700;
  box-shadow: 0 6px 20px rgba(37,99,235,.25); transition: transform .06s ease, filter .2s ease;
}
.toolbar button:hover{ filter:brightness(1.05); }
.toolbar button:active{ transform: translateY(1px); }

.chat{ height:60vh; overflow:auto; padding:16px; display:flex; flex-direction:column; gap:12px; }

/* Mensagens */
.msg{ display:flex; gap:12px; align-items:flex-start; opacity:0; transform: translateY(4px) scale(.995); }
.msg.in{ opacity:1; transform:none; transition: all .18s ease-out; }

.msg .bubble{
  max-width: min(780px,78%);
  padding: 12px 14px; border-radius:14px; line-height:1.55; position:relative;
  border:1px solid rgba(255,255,255,.08);
  background:#0b1220;
}

/* Usuário (direita) */
.msg.user{ justify-content:flex-end; }
.msg.user .bubble{
  background:#0b1220; border:1px solid rgba(255,255,255,.12);
}
.msg.user .bubble::before,
.msg.user .bubble::after{
  content:""; position:absolute; right:-8px; top:18px; width:0; height:0;
  border-top:8px solid transparent; border-bottom:8px solid transparent;
}
.msg.user .bubble::before{ border-left:8px solid rgba(255,255,255,.12); }
.msg.user .bubble::after { right:-6px; top:19px; border-left:7px solid #0b1220; }

/* Bot (esquerda) + avatar */
.msg .avatar{
  width:36px; height:36px; border-radius:999px; object-fit:cover; flex:0 0 36px;
  box-shadow:0 0 0 2px rgba(255,255,255,.06); background:#0b1220;
}
.msg.bot .bubble{
  background: rgba(59,130,246,.10);
  border:1px solid rgba(59,130,246,.32);
}
.msg.bot .bubble::before,
.msg.bot .bubble::after{
  content:""; position:absolute; left:-8px; top:18px; width:0; height:0;
  border-top:8px solid transparent; border-bottom:8px solid transparent;
}
.msg.bot .bubble::before{ border-right:8px solid rgba(59,130,246,.32); }
.msg.bot .bubble::after { left:-6px; top:19px; border-right:7px solid rgba(59,130,246,.10); }

/* Meta info */
.meta{ color:var(--muted); font-size:12px; margin-top:6px; display:flex; gap:16px; align-items:center; }

/* Composer */
.composer{ display:flex; gap:10px; padding:12px; border-top:1px solid var(--glass); background: rgba(0,0,0,.2); }
textarea{
  flex:1; resize:none; min-height:48px; max-height:160px; background:#0b1220; color:var(--text);
  border:1px solid rgba(255,255,255,.10); border-radius:12px; padding:12px 14px; outline:none;
  transition: border-color .2s, box-shadow .2s;
}
textarea:focus{ border-color:rgba(59,130,246,.55); box-shadow:0 0 0 3px rgba(59,130,246,.18); }
.send{
  background: linear-gradient(180deg, #3b82f6, #2563eb); color:white; border:none; padding:0 16px;
  border-radius:12px; font-weight:800; cursor:pointer; min-width:96px;
  box-shadow: 0 10px 30px rgba(37,99,235,.35);
  transition: transform .06s ease, filter .2s ease;
}
.send:hover{ filter:brightness(1.05); }
.send:active{ transform: translateY(1px); }
.send[disabled]{ opacity:.6; cursor:not-allowed; }

/* Tipando (três bolinhas) */
.typing{
  display:inline-block; width:22px; height:10px; position:relative; margin-right:6px;
}
.typing::before, .typing::after, .typing span{
  content:""; position:absolute; top:0; width:6px; height:6px; border-radius:50%;
  background: var(--accent); opacity:.8; animation: blink 1s infinite ease-in-out;
}
.typing span{ left:8px; animation-delay:.15s; }
.typing::after{ left:16px; animation-delay:.3s; }
@keyframes blink{ 0%,80%,100%{ transform: translateY(0); opacity:.6;} 40%{ transform: translateY(-3px); opacity:1;} }

/* Scrollbar bonita (Chromium/Edge/Safari) */
.chat::-webkit-scrollbar{ width:10px; }
.chat::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.12); border-radius:20px; }
.chat::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,.18); }

/* Texto em negrito dentro da bolha */
.bubble b{ font-weight:700; }

/* Responsivo */
@media (max-width:640px){
  .container{ padding:12px; }
  .msg .bubble{ max-width: 88%; }
}

.logo-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logo {
  height: 22px;   /* tamanho em miniatura */
  width: auto;
  object-fit: contain;
  margin-top: 2px;   /* ajusta o alinhamento vertical */
  opacity: 0.9;      /* opcional: deixa mais discreta */
}



