/* Agente da Krypta — widget flutuante */
.agente { position: fixed; right: 20px; bottom: 20px; z-index: 1090; font-family: var(--f-texto, inherit); }
.agente-fab { position: relative; display: inline-flex; align-items: center; gap: .55rem; border: 0; cursor: pointer;
  padding: .7rem 1.1rem .7rem .95rem; border-radius: 999px; color: #fff; font-weight: 600; font-size: .95rem;
  background: #0D1418 linear-gradient(120deg, #0891B2, #2563EB 55%, #7C3AED);
  box-shadow: 0 14px 34px rgba(37, 99, 235, .4); transition: transform .15s ease, box-shadow .15s ease; }
.agente-fab { animation: agente-zoom 1.8s ease-in-out infinite; }
.agente-fab:hover { animation: none; transform: translateY(-2px) scale(1.05); box-shadow: 0 18px 40px rgba(124, 58, 237, .5); }
@keyframes agente-zoom { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .agente-fab { animation: none; } }
.agente-fab i { font-size: 1.25rem; }
.agente-pulso { position: absolute; inset: 0; border-radius: 999px; box-shadow: 0 0 0 0 rgba(37, 99, 235, .55);
  animation: agente-pulsar 2.4s infinite; }
@keyframes agente-pulsar { 70% { box-shadow: 0 0 0 16px rgba(37, 99, 235, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }
.agente.aberto .agente-fab, .agente.aberto .agente-fab-txt { display: none; }
@media (max-width: 575px) { .agente-fab-txt { display: none; } }
@media (prefers-reduced-motion: reduce) { .agente-pulso { animation: none; } }

.agente-painel { position: fixed; right: 20px; bottom: 20px; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: var(--superficie, #fff); border: 1px solid var(--borda, #e4e7ec);
  border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(13, 20, 24, .3); }
.agente-cab { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: #fff;
  background: #0D1418 linear-gradient(120deg, #0891B2, #2563EB 55%, #7C3AED); }
.agente-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem;
  background: rgba(255, 255, 255, .16); }
.agente-ident { display: flex; flex-direction: column; line-height: 1.15; flex: 1; }
.agente-ident strong { font-size: 1rem; }
.agente-ident span { font-size: .74rem; opacity: .85; }
.agente-x { background: transparent; border: 0; color: #fff; font-size: 1rem; cursor: pointer; opacity: .9; }
.agente-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  background: var(--superficie-2, #f4f8fc); }
.ag-msg { max-width: 84%; padding: 9px 12px; border-radius: 14px; font-size: .9rem; line-height: 1.35; }
.ag-bot { align-self: flex-start; background: var(--superficie, #fff); border: 1px solid var(--borda, #e4e7ec); color: var(--tinta, #1d2939); border-bottom-left-radius: 4px; }
.ag-user { align-self: flex-end; color: #fff; background: linear-gradient(120deg, #2563EB, #7C3AED); border-bottom-right-radius: 4px; }
.ag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-chips button { border: 1px solid var(--acento, #2563EB); color: var(--acento, #2563EB); background: transparent;
  border-radius: 999px; padding: .3rem .7rem; font-size: .8rem; cursor: pointer; }
.ag-chips button:hover { background: var(--acento, #2563EB); color: #fff; }
.ag-plano { align-self: stretch; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .88rem;
  background: var(--suave, #eef4ff); border: 1px solid var(--suave-borda, #cdddff); border-radius: 14px; padding: 10px 12px; color: var(--tinta, #1d2939); }
.ag-plano i { color: #16A34A; }
.ag-plano .btn { margin-left: auto; }
.ag-escrevendo { display: inline-flex; gap: 4px; }
.ag-escrevendo span { width: 7px; height: 7px; border-radius: 50%; background: var(--tinta-3, #98a2b3); animation: ag-bolha 1s infinite; }
.ag-escrevendo span:nth-child(2) { animation-delay: .15s; } .ag-escrevendo span:nth-child(3) { animation-delay: .3s; }
@keyframes ag-bolha { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.agente-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--borda, #e4e7ec); background: var(--superficie, #fff); }
.agente-form input { flex: 1; border: 1px solid var(--borda, #e4e7ec); border-radius: 999px; padding: .55rem .9rem; font-size: .9rem;
  background: var(--superficie-2, #f4f8fc); color: var(--tinta, #1d2939); }
.agente-form input:focus { outline: none; border-color: var(--acento, #2563EB); }
.agente-form button { border: 0; width: 42px; border-radius: 50%; color: #fff; cursor: pointer; flex: 0 0 42px;
  background: linear-gradient(120deg, #2563EB, #7C3AED); }
