.chat-controls { display:grid; grid-template-columns:1fr 1fr 2fr; gap:16px; margin:20px 0; }
.chat-controls label { display:flex; flex-direction:column; gap:8px; min-width:0; }
.chat-controls select { width:100%; }
.chat-agent-profile { display:flex; align-items:center; gap:14px; margin:20px 0 8px; }
.chat-agent-profile strong { display:block; font-size:1rem; letter-spacing:.06em; }
.chat-agent-profile .muted { display:block; margin-top:4px; font-size:.78rem; }
.agent-avatar { display:block; width:52px; height:52px; object-fit:cover; object-position:center 22%; border-radius:16px; border:1px solid #ffffff1c; box-shadow:0 8px 22px #0004; }
.agent-avatar.large { width:68px; height:68px; border-radius:21px; }
.message-avatar { flex:0 0 38px; width:38px; height:38px; border-radius:12px; }
.chat-messages { max-height:560px; overflow:auto; display:flex; flex-direction:column; gap:16px; margin:20px 0; }
.chat-sources{margin-top:12px;padding:10px 12px;border:1px solid rgba(130,217,255,.2);border-radius:12px;background:rgba(130,217,255,.04);font-size:.76rem}.chat-sources strong{color:#82d9ff}.chat-sources ol{margin:7px 0 0;padding-left:20px}.chat-sources li+li{margin-top:4px}.chat-sources a{color:#b9eaff;overflow-wrap:anywhere}
.chat-bubble { border:1px solid #ffffff18; border-radius:16px; padding:18px; background:#ffffff04; overflow-wrap:anywhere; }
.chat-bubble.user { margin-left:8%; background:#06b6d410; }
.chat-bubble.assistant { margin-right:8%; }
.chat-bubble.assistant { display:flex; gap:12px; align-items:flex-start; }
.chat-bubble h3 { margin:0 0 10px; font-size:15px; }
.chat-body { white-space:pre-wrap; line-height:1.6; }
.chat-usage { color:#a9b5c9; font-size:12px; margin:12px 0 0; }
.chat-listen { margin-top:12px; padding:7px 10px; font-size:.75rem; }
.chat-actions,.voice-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.voice-controls { margin-top:18px; padding-top:18px; border-top:1px solid #ffffff12; }
.voice-controls label:first-child { display:grid; gap:6px; min-width:160px; color:#cbd3df; font-size:.8rem; }
.voice-toggle { display:flex; align-items:center; gap:8px; color:#cbd3df; font-size:.8rem; }
.voice-toggle input { width:auto; }
#chatInput { width:100%; resize:vertical; }
button:disabled { opacity:.5; cursor:not-allowed; }
@media(max-width:760px) { .chat-controls { grid-template-columns:1fr; } .chat-bubble.user,.chat-bubble.assistant { margin:0; } }
#chatEngineeringRow { border:1px solid rgba(135,215,203,.4); border-radius:14px; padding:12px 16px; margin:12px 0; background:rgba(135,215,203,.05); }
#chatEngineeringRow legend { padding:0 8px; font-weight:800; font-size:.85rem; color:#87d7cb; }
#chatEngineeringRow > div { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin:10px 0 14px; }
#chatEngineeringRow > div label { display:flex; flex-direction:column; gap:6px; min-width:0; }
