.sidebar { width: 280px; min-width: 280px; }
.sidebar .list-group-item { display: block; border: 0; border-radius: .25rem; margin-bottom: 2px; }
.msg { display: flex; margin-bottom: 1rem; }
.msg-user { justify-content: flex-end; }
.msg-user .bubble { background: #0d6efd; color: #fff; white-space: pre-wrap; }
.msg-assistant { flex-direction: column; align-items: flex-start; }
.bubble { max-width: 85%; padding: .6rem .9rem; border-radius: .75rem; background: #f1f3f5; }
.markdown p:last-child { margin-bottom: 0; }
.markdown pre { background: #212529; color: #f8f9fa; padding: .5rem .75rem; border-radius: .4rem; font-size: .85em; overflow-x: auto; }
.markdown code { font-size: .9em; }
.markdown table { font-size: .9em; }
.markdown table td, .markdown table th { border: 1px solid #dee2e6; padding: .15rem .4rem; }
.lookups { font-size: .8rem; color: #6c757d; margin-bottom: .25rem; max-width: 85%; }
.lookups summary { cursor: pointer; }
.lookups ul { margin: .25rem 0 0; padding-left: 1.2rem; }
.lookups li { word-break: break-all; }
.lookups .running::after { content: " …"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.draft-card { max-width: 85%; }
.text-pre { white-space: pre-wrap; }
#chat-form textarea { resize: none; }
.msg-images { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.msg-images img { max-height: 160px; max-width: 240px; border-radius: .4rem; background: #fff; }
.msg-images:last-child { margin-bottom: 0; }
.attach-preview { display: flex; flex-wrap: wrap; gap: .5rem; }
.attach-preview:not(:empty) { margin-bottom: .5rem; }
.attach-preview .thumb { position: relative; }
.attach-preview img { height: 64px; border-radius: .3rem; border: 1px solid #dee2e6; }
.attach-preview .btn-close { position: absolute; top: -.4rem; right: -.4rem; background-color: #fff; border-radius: 50%; padding: .3rem; font-size: .6rem; }
.with-images.dragover { outline: 2px dashed #0d6efd; outline-offset: -4px; }
