/* Chat del asistente de IA interno */
.asst-page { max-width: 980px; }
.asst-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.asst-msgs { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); height: min(62vh, 640px); min-height: 320px; overflow-y: auto; background: var(--surface-2); scroll-behavior: smooth; }
.asst-row { display: flex; gap: var(--s-3); align-items: flex-start; max-width: 100%; }
.asst-row.asst-user { flex-direction: row-reverse; }
.asst-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.asst-user .asst-av { background: var(--brand); color: var(--on-brand); }
.asst-bubble { max-width: min(78%, 680px); padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); line-height: 1.5; word-break: break-word; }
.asst-user .asst-bubble { background: var(--brand); color: var(--on-brand); border-color: transparent; border-top-right-radius: 4px; }
.asst-assistant .asst-bubble { border-top-left-radius: 4px; }
.asst-bubble p { margin: 0 0 var(--s-2); white-space: pre-wrap; }
.asst-bubble p:last-child, .asst-bubble ul:last-child { margin-bottom: 0; }
.asst-list { margin: 0 0 var(--s-2); padding-left: 20px; }
.asst-list li { margin: 2px 0; }
.asst-bubble code { background: var(--surface-3); border-radius: 4px; padding: 1px 6px; font-size: .92em; }
.asst-user .asst-bubble code { background: rgba(255,255,255,.2); }
.asst-quote { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-top: var(--s-3); padding: var(--s-3); border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface-2); }
.asst-quote-ic { width: 38px; height: 38px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.asst-quote-body { flex: 1 1 220px; min-width: 0; }
.asst-quote-total { font-size: var(--fs-lg); font-weight: 720; color: var(--text); }
.asst-quote-total small { font-size: var(--fs-sm); font-weight: 560; color: var(--text-3); }
.asst-quote-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.asst-typing { display: flex; gap: 5px; align-items: center; padding: 14px 16px; }
.asst-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); animation: asst-dot 1.1s infinite ease-in-out; }
.asst-typing i:nth-child(2) { animation-delay: .15s; } .asst-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes asst-dot { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.asst-empty { margin: auto; text-align: center; max-width: 440px; }
.asst-empty-ic { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto var(--s-3); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.asst-empty h3 { margin: 0 0 var(--s-2); }
.asst-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-3) var(--s-5) 0; border-top: 1px solid var(--border); }
.asst-chip { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: var(--r-pill); padding: 6px 12px; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.asst-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.asst-composer { display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-5) var(--s-4); align-items: flex-end; }
.asst-input { flex: 1; resize: vertical; min-height: 44px; max-height: 180px; }
.asst-note { margin: var(--s-3) 2px 0; font-size: var(--fs-sm); }
@media (max-width: 720px) {
  .asst-msgs { padding: var(--s-3); height: 56vh; }
  .asst-bubble { max-width: 88%; }
  .asst-chips { padding: var(--s-3) var(--s-3) 0; }
  .asst-composer { padding: var(--s-3); flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { .asst-typing i { animation: none; opacity: .7; } .asst-msgs { scroll-behavior: auto; } }

.asst-attach{display:flex;align-items:center;gap:8px;padding:6px 12px;font-size:13px;border-top:1px solid var(--border,#e2e7f0)}
.asst-attach[hidden]{display:none}
.asst-composer .btn{align-self:stretch}
