/* =========================================================
   Armadillo Azul — chat de requerimientos (usa los tokens de estilos.css)
   ========================================================= */
.aac { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-end; justify-content: flex-end; padding: 16px; background: rgba(14,17,22,.28); }
.aac.on { display: flex; animation: aac-in .25s ease; }
@keyframes aac-in { from { opacity: 0; } }
.aac-panel {
  width: min(420px, 100%); height: min(640px, calc(100dvh - 32px)); display: flex; flex-direction: column;
  background: var(--bg, #f3f3ef); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
  font: 400 15px/1.45 var(--sans, "Inter Tight", Arial, sans-serif); color: var(--ink, #0e1116);
  animation: aac-sube .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes aac-sube { from { transform: translateY(18px); opacity: 0; } }
.aac-cab { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; background: var(--ink, #0e1116); color: #fff; }
.aac-logo { width: 34px; height: 26px; flex: none; background: linear-gradient(90deg, #6aa0ff, var(--blue, #0046fa));
  -webkit-mask: url(../assets/icono.svg) center / contain no-repeat; mask: url(../assets/icono.svg) center / contain no-repeat; }
.aac-cab div { flex: 1; min-width: 0; display: grid; }
.aac-cab b { font-weight: 500; font-size: 15px; }
.aac-cab small { font: 500 11px/1.4 var(--mono, monospace); letter-spacing: .05em; text-transform: uppercase; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 6px; }
.aac-cab small i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; }
.aac-x { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; }
.aac-x:hover { background: rgba(255,255,255,.16); }
.aac-lista { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.aac-m { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.aac-m p { margin: 0; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; }
.aac-m.ia p { background: #fff; border: 1px solid var(--line, #d6d6cf); border-bottom-left-radius: 6px; }
.aac-m.ia.err p { background: #fff4f4; border-color: #f3c9c9; color: #9b1c1c; }
.aac-m.yo { align-self: flex-end; }
.aac-m.yo p { background: var(--blue, #0046fa); color: #fff; border-bottom-right-radius: 6px; }
.aac-av { width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--ink, #0e1116) url(../assets/favicon.png) center / 70% no-repeat; }
.aac-esc p { display: flex; gap: 4px; padding: 14px; }
.aac-esc i { width: 6px; height: 6px; border-radius: 50%; background: #9aa0aa; animation: aac-pt 1s infinite; }
.aac-esc i:nth-child(2) { animation-delay: .15s; } .aac-esc i:nth-child(3) { animation-delay: .3s; }
@keyframes aac-pt { 50% { opacity: .25; transform: translateY(-2px); } }
.aac-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 34px; }
.aac-chips button { font: 500 13.5px var(--sans, sans-serif); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line, #d6d6cf); background: #fff; color: var(--ink, #0e1116); cursor: pointer; }
.aac-chips button:hover { border-color: var(--blue, #0046fa); color: var(--blue, #0046fa); }
.aac-fin { margin: 6px 0 4px 34px; padding: 14px; border-radius: 14px; background: var(--ink, #0e1116); color: #fff; display: grid; gap: 8px; }
.aac-fin p { margin: 0 0 2px; font-size: 14px; color: rgba(255,255,255,.85); }
.aac-btn { display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 10px; background: var(--cream, #f3f1e7); color: var(--ink, #0e1116); font-weight: 500; font-size: 14.5px; text-decoration: none; }
.aac-btn.az { background: var(--blue, #0046fa); color: #fff; }
.aac-caja { display: flex; align-items: flex-end; gap: 8px; margin: 8px 12px 4px; padding: 8px 8px 8px 14px; background: var(--ink, #0e1116); border-radius: 14px; }
.aac-caja textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: none; color: #fff; font: 15px/1.4 var(--sans, sans-serif); padding: 9px 0; max-height: 120px; }
.aac-caja textarea::placeholder { color: rgba(255,255,255,.5); }
.aac-caja button { flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--blue, #0046fa); color: #fff; display: grid; place-items: center; cursor: pointer; }
.aac-caja button:disabled { opacity: .5; cursor: default; }
.aac-legal { margin: 0; padding: 4px 14px 12px; font-size: 11.5px; color: var(--muted, #6b6f78); text-align: center; }
.aac-legal a { color: inherit; text-decoration: underline; }
.aac-nuevo { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
html.aac-abierto { overflow: hidden; }
@media (max-width: 640px) {
  .aac { padding: 0; }
  .aac-panel { width: 100%; height: 100dvh; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .aac.on, .aac-panel, .aac-esc i { animation: none; } }
