body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; padding: 0; background: #f5f7fb; color: #1f2937; }
.container { max-width: 960px; margin: 40px auto 120px; padding: 0 16px; }
h1 { margin-bottom: 12px; }
.conversations { margin: 6px 0 12px; }
.conv-link { padding: 6px 10px; border-radius: 8px; background: #e5e7eb; margin-right: 6px; text-decoration: none; color: #111827; }
.conv-link.active { background: #111827; color: #fff; }
.chat-history { background: white; border-radius: 14px; padding: 12px; box-shadow: 0 6px 22px rgba(0,0,0,.06); }
.msg { padding: 10px 12px; border-bottom: 1px dashed #e5e7eb; }
.msg:last-child { border-bottom: none; }
.msg .role { font-size: 12px; font-weight: 700; color: #6b7280; }
.msg .content { margin-top: 4px; white-space: pre-wrap; }
.msg .time { font-size: 11px; color: #9ca3af; margin-top: 4px; }

.chat-widget { position: fixed; right: 24px; bottom: 24px; width: 420px; max-width: 90vw; background: #fff; border-radius: 18px; box-shadow: 0 20px 40px rgba(0,0,0,.18); overflow: hidden; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #111827; color: #fff; }
.chat-header .actions button { margin-left: 8px; background: #374151; color: #fff; border: 0; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.chat-body { padding: 10px; }
.messages { height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.bubble { background: #f3f4f6; border-radius: 12px; padding: 8px 10px; }
.bubble.user { background: #dbeafe; }
.bubble.assistant { background: #f3f4f6; }
.bubble .role { font-size: 10px; color: #6b7280; font-weight: 700; margin-bottom: 4px; }
.controls { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
textarea#prompt { width: 100%; min-height: 70px; resize: vertical; padding: 8px; border-radius: 10px; border: 1px solid #e5e7eb; }
.row { display: flex; justify-content: space-between; align-items: center; }
.row button { background: #111827; color: #fff; border: none; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.row select { border: 1px solid #e5e7eb; padding: 6px; border-radius: 8px; }
.analyzer { padding: 10px; border-top: 1px solid #e5e7eb; max-height: 320px; overflow: auto; }
.analyzer .panel { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px; }
.hint { color: #6b7280; font-size: 12px; margin-left: 8px; }
pre { white-space: pre-wrap; font-size: 12px; background: #fff; padding: 8px; border-radius: 8px; border: 1px dashed #e5e7eb; }
