* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; color: #1f2933; background: #f5f7fa; }
a { color: #2b6cb0; }
code { background: #edf2f7; padding: 1px 4px; border-radius: 3px; font-size: 12px; }

/* 顶部 */
header { background: #1f2933; color: #fff; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; }
header h1 { margin: 0; font-size: 16px; font-weight: 600; }
header .right { display: flex; align-items: center; gap: 12px; font-size: 13px; }
header .user-name { opacity: .8; }

/* 布局 */
.container { max-width: 900px; margin: 20px auto; padding: 0 20px; }

/* 卡片 */
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* 登录 */
.login-wrap { max-width: 400px; margin: 60px auto; }
.login-wrap h1 { text-align: center; margin-bottom: 24px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; }
.form-group input { width: 100%; padding: 8px 12px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 14px; }
button { cursor: pointer; }
.btn-primary { background: #2b6cb0; color: #fff; border: none; padding: 8px 20px; border-radius: 6px; font-size: 14px; }
.btn-primary:hover { background: #2c5282; }
.btn-outline { background: #fff; color: #2b6cb0; border: 1px solid #2b6cb0; padding: 8px 16px; border-radius: 6px; font-size: 14px; }
.btn-outline:hover { background: #ebf4ff; }
.btn-small { background: #4a5568; color: #fff; border: none; padding: 4px 12px; border-radius: 4px; font-size: 12px; margin: 2px; }
.btn-small:hover { background: #2d3748; }
.btn-small.danger { background: #c53030; }
.btn-small.danger:hover { background: #9b2c2c; }

/* 聊天 */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 60px); }
.chat-header { padding: 12px 20px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.chat-header h2 { margin: 0 0 8px 0; font-size: 15px; }
.chat-header .hint { font-size: 12px; color: #718096; }
.chat-presets { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 20px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px 20px; }
.msg { margin-bottom: 12px; display: flex; }
.msg.user { justify-content: flex-end; }
.msg.bot { justify-content: flex-start; }
.bubble { max-width: 80%; padding: 8px 12px; border-radius: 10px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.bubble.user { background: #2b6cb0; color: #fff; border-bottom-right-radius: 2px; }
.bubble.bot { background: #edf2f7; color: #1f2933; border-bottom-left-radius: 2px; }
.bubble.bot.error { background: #fed7d7; color: #742a2a; }
.chat-input { padding: 12px 20px; background: #fff; border-top: 1px solid #e2e8f0; display: flex; gap: 8px; }
.chat-input input { flex: 1; padding: 8px 12px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 14px; }
.chat-input button { padding: 8px 20px; background: #2b6cb0; color: #fff; border: none; border-radius: 6px; font-size: 14px; }

/* 反馈 */
.banner { padding: 8px 20px; font-size: 13px; }
.banner.ok { background: #c6f6d5; color: #22543d; }
.banner.err { background: #fed7d7; color: #742a2a; }
.banner.hidden { display: none; }
.error { padding: 8px 20px; background: #fed7d7; color: #742a2a; font-size: 13px; }
.error.hidden { display: none; }

.muted { color: #718096; font-size: 12px; }
