/* V1.6.7 — focused AI chat UX refresh. Uses HALONG INTEL semantic UI tokens. */
.floating-chat{padding:12px 16px;min-height:46px;box-shadow:var(--ui-shadow-md);transition:transform .18s ease,box-shadow .18s ease}.floating-chat:hover{transform:translateY(-2px);box-shadow:0 18px 42px rgba(13,71,85,.18)}.floating-chat span{font-size:.8125rem;letter-spacing:.1px}

dialog.quick-chat-dialog{position:fixed;inset:16px 16px 16px auto;margin:0;width:min(520px,calc(100vw - 32px));height:auto;max-height:none;border-radius:var(--ui-radius-xl);overflow:hidden;box-shadow:var(--ui-shadow-lg);background:var(--ui-surface)}
dialog.quick-chat-dialog::backdrop{background:rgba(17,43,58,.34);backdrop-filter:blur(2px)}
.quick-chat-dialog .modal-head{padding:17px 18px;border-bottom:1px solid var(--ui-border)}
.quick-chat-dialog .modal-head h2{font-size:1rem;letter-spacing:.2px}
.quick-chat-dialog .modal-body{padding:0;overflow:hidden;display:flex;flex:1;min-height:0}
.quick-chat-shell{display:flex;flex-direction:column;min-height:0;width:100%;background:var(--ui-surface)}
.quick-chat-toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-space-3);padding:14px 18px;background:var(--ui-surface-subtle);border-bottom:1px solid var(--ui-border)}
.quick-chat-status{display:flex;align-items:center;gap:10px;min-width:0}.quick-chat-status>div{min-width:0}.quick-chat-status strong{display:block;font-size:.8125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}.quick-chat-status small{display:block;margin-top:3px;font-size:.7rem}
.quick-status-dot{width:9px;height:9px;border-radius:50%;background:#42a67a;box-shadow:0 0 0 4px var(--ui-success-soft);flex:0 0 auto}.quick-status-dot.busy{background:#d39b36;box-shadow:0 0 0 4px var(--ui-warning-soft)}
.quick-chat-actions{display:flex;align-items:center;gap:2px;flex:0 0 auto}.quick-chat-actions .icon-btn{width:34px;height:34px}
.quick-chat-messages{flex:1;min-height:0;max-height:none;overflow:auto;padding:20px 18px 24px;background:linear-gradient(180deg,var(--ui-surface-subtle) 0,var(--ui-surface) 18%);scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:#b4becc transparent}
.quick-chat-dialog .message{max-width:88%;margin:0 0 14px;padding:13px 15px;border-radius:14px;font-size:.84rem;line-height:1.7;box-shadow:none}.quick-chat-dialog .message.user{margin-left:auto;background:var(--ui-primary-soft);border:1px solid #d4dce8;border-bottom-right-radius:5px}.quick-chat-dialog .message.assistant{margin-right:auto;background:#f4f6f9;border:1px solid #e8ecf1;border-bottom-left-radius:5px}.quick-chat-dialog .message-author{display:block;margin-bottom:6px;font-size:.64rem}.quick-chat-dialog .prewrap{font-size:.84rem;line-height:1.7}
.quick-chat-empty{min-height:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:20px 4px}.quick-chat-empty .ai-mark{width:48px;height:48px;border-radius:15px;margin:0 0 18px}.quick-chat-empty h3{font-size:1.2rem;margin:0 0 8px}.quick-chat-empty p{font-size:.82rem;color:var(--ui-text-muted);line-height:1.7;max-width:430px;margin:0 0 20px}.quick-chat-suggestions{display:grid;gap:8px;width:100%}.quick-suggestion{display:flex;align-items:center;gap:10px;text-align:left;width:100%;border:1px solid var(--ui-border);background:var(--ui-surface);border-radius:11px;padding:11px 12px;font-size:.78rem}.quick-suggestion:hover{border-color:#b8c7dc;background:var(--ui-surface-accent)}.quick-suggestion span{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:var(--ui-primary-soft);color:var(--ui-primary);font-size:.65rem;font-weight:700;flex:0 0 auto}
.quick-typing{display:flex;align-items:center;gap:5px;margin:6px 0 12px;width:max-content;max-width:90%;padding:11px 13px;border:1px solid var(--ui-border);background:var(--ui-surface-subtle);border-radius:13px;border-bottom-left-radius:5px}.quick-typing>span{width:6px;height:6px;border-radius:50%;background:#75859c;animation:quickPulse 1.15s infinite ease-in-out}.quick-typing>span:nth-child(2){animation-delay:.15s}.quick-typing>span:nth-child(3){animation-delay:.3s}.quick-typing small{margin-left:6px;font-size:.68rem}@keyframes quickPulse{0%,70%,100%{opacity:.35;transform:translateY(0)}35%{opacity:1;transform:translateY(-2px)}}
.quick-chat-error{margin:10px 0}.quick-traces{margin-top:8px;font-size:.72rem}.quick-traces summary{cursor:pointer;color:var(--ui-text-muted)}
.quick-chat-composer{margin:0!important;padding:12px 14px 14px!important;display:block!important;gap:0!important;border-top:1px solid var(--ui-border);background:var(--ui-surface)}.quick-chat-composer textarea{width:100%;min-height:58px;max-height:160px;resize:none;border:1px solid var(--ui-border-strong);border-radius:var(--ui-radius-md);padding:12px 13px;outline:none;font-size:.84rem;line-height:1.55;background:var(--ui-surface);color:var(--ui-text)}.quick-chat-composer textarea:focus{border-color:#849fc4;box-shadow:0 0 0 3px rgba(25,58,106,.11)}.quick-chat-compose-foot{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-space-3);margin-top:8px}.quick-chat-compose-foot small{font-size:.66rem}.quick-send{width:38px;height:38px;border:0;border-radius:10px;background:var(--ui-primary);color:#fff;display:grid;place-items:center;box-shadow:0 4px 10px rgba(25,58,106,.13)}.quick-send:hover{filter:brightness(.96)}.quick-send:disabled{opacity:.45}.quick-send .icon{width:18px;height:18px}

@media(max-width:700px){dialog.quick-chat-dialog{inset:0;margin:0;width:100vw;height:100dvh;border:0;border-radius:0}.quick-chat-dialog .modal-head{padding:15px 16px}.quick-chat-toolbar{padding:11px 14px}.quick-chat-messages{padding:16px 14px 20px}.quick-chat-dialog .message{max-width:94%}.quick-chat-status strong{max-width:220px}.quick-chat-compose-foot small{display:none}.floating-chat{right:14px;bottom:14px;padding:12px 14px}}
@media(prefers-reduced-motion:reduce){.quick-typing>span{animation:none}.quick-chat-messages{scroll-behavior:auto}}
