/* AI Support Agent */
.agent-layout { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.agent-side { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 12px; position: sticky; top: 76px; max-height: calc(100vh - 160px); overflow: auto; }
.agent-side h3 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.agent-convos { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.agent-convos li { display: flex; align-items: center; border-radius: 9px; }
.agent-convos li.on, .agent-convos li:hover { background: var(--head); }
.agent-convos a { flex: 1; min-width: 0; display: grid; padding: 7px 8px; color: var(--text); text-decoration: none; font-size: .86rem; }
.agent-convos a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-convos small { color: var(--muted); font-size: .72rem; }
.agent-convos .icon-btn { border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; }
.agent-main { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; min-height: calc(100vh - 200px); }
.agent-thread { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.agent-intro { margin: auto; max-width: 560px; text-align: center; }
.agent-intro h2 { margin: 0 0 6px; }
.agent-intro .chips { justify-content: center; margin-top: 14px; }
.agent-suggest { cursor: pointer; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .84rem; padding: 6px 12px; }
.agent-suggest:hover { background: var(--head); }
.agent-msg { display: flex; gap: 10px; max-width: 760px; }
.agent-msg.user { align-self: flex-end; }
.agent-msg.user .agent-bubble { background: #e6f4f4; border-color: transparent; }
.agent-avatar { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #007f84, #1f6fe0); color: #fff; }
.agent-bubble { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: .92rem; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.agent-bubble p { margin: 0 0 8px; }
.agent-bubble p:last-child { margin-bottom: 0; }
.agent-bubble ol, .agent-bubble ul { margin: 0 0 8px; padding-left: 20px; }
.agent-bubble code { background: var(--head); padding: 1px 5px; border-radius: 5px; font-size: .85em; }
.agent-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-tools:not(:empty) { margin-bottom: 8px; }
.agent-tools .chip { font-size: .72rem; }
.agent-note { color: var(--muted); font-size: .84rem; font-style: italic; }
.agent-note.err { color: var(--bad); font-style: normal; }
.agent-warning { margin: 0 0 8px; padding: 8px 10px; border: 1px solid #f3c7c2; border-left: 4px solid var(--bad); border-radius: 6px; background: #fdf2f1; color: #7a1d14; font-size: .84rem; line-height: 1.4; }
.agent-msg.typing .agent-text::after { content: ""; display: inline-block; width: 36px; height: 10px; background: radial-gradient(circle, var(--muted) 3px, transparent 4px) 0 50% / 12px 10px repeat-x; animation: agent-dots 1s steps(3) infinite; }
@keyframes agent-dots { from { width: 12px; } to { width: 48px; } }
.agent-input { display: flex; gap: 10px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); }
.agent-input textarea { flex: 1; resize: vertical; min-height: 44px; max-height: 200px; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; }
.agent-foot { margin: 0; padding: 0 14px 10px; color: var(--muted); font-size: .74rem; }
@media (max-width: 860px) {
  .agent-layout { grid-template-columns: 1fr; }
  .agent-side { position: static; max-height: 180px; }
  .agent-main { min-height: 60vh; }
  .agent-msg { max-width: 100%; }
}
