body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
.tab-btn { padding: 0.75rem 1rem; font-size: 0.875rem; color: #6b7280; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab-btn:hover { color: #111827; }
.tab-btn.active { border-bottom-color: #25D366; color: #111827; font-weight: 600; }
.chat-bg { background-color: #e5ddd5; background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1px); background-size: 18px 18px; }
.bubble { max-width: 78%; padding: 0.5rem 0.75rem; border-radius: 0.75rem; font-size: 0.875rem; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.bubble-in { background: #fff; border-top-left-radius: 0; margin-right: auto; }
.bubble-out { background: #dcf8c6; border-top-right-radius: 0; margin-left: auto; }
.bubble-sys { background: #fff3cd; color: #7a5b00; font-size: 0.75rem; margin: 0 auto; text-align: center; }
.bubble time { display: block; font-size: 0.65rem; color: #6b7280; text-align: right; margin-top: 2px; }
.typing span { display: inline-block; width: 6px; height: 6px; margin: 0 1px; background: #9ca3af; border-radius: 50%; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s } .typing span:nth-child(3) { animation-delay: .4s }
@keyframes blink { 0%, 80%, 100% { opacity: .2 } 40% { opacity: 1 } }
.btn-primary { background: #075E54; color: #fff; padding: 0.5rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; }
.btn-primary:hover { background: #064e46; }
.btn-secondary { background: #f3f4f6; color: #374151; padding: 0.5rem 0.9rem; border-radius: 0.5rem; font-size: 0.875rem; border: 1px solid #e5e7eb; }
.btn-secondary:hover { background: #e5e7eb; }
.field { display: block; font-size: 0.8rem; color: #4b5563; }
.field > span { display: block; margin-bottom: 0.25rem; font-weight: 500; }
.input { width: 100%; border: 1px solid #d1d5db; border-radius: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; color: #111827; }
.input:focus { outline: none; border-color: #25D366; box-shadow: 0 0 0 2px rgba(37,211,102,.25); }
.chip { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 9999px; padding: 0.25rem 0.75rem; font-size: 0.75rem; }
.chip:hover { background: #dcf8c6; }
.kb-card { background: #fff; border-radius: 0.75rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.kb-card.disabled { opacity: .55; }
.kb-card .kb-content { font-size: 0.8rem; color: #4b5563; white-space: pre-wrap; max-height: 7rem; overflow: hidden; }
.badge { display: inline-block; font-size: 0.65rem; padding: 0.1rem 0.5rem; border-radius: 9999px; font-weight: 600; }
.badge-ok { background: #d1fae5; color: #065f46; } .badge-bad { background: #fee2e2; color: #991b1b; }
dialog::backdrop { background: rgba(0,0,0,.4); }
.conv-item { padding: 0.75rem 1rem; cursor: pointer; }
.conv-item:hover, .conv-item.active { background: #f0fdf4; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
