*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #1e3a8a;
  --primary-light: #2563eb;
  --primary-bg: #eff6ff;
  --accent: #059669;
  --accent-light: #10b981;
  --warn: #d97706;
  --danger: #dc2626;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 300px;
  --header-h: 56px;
}
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  height: 100vh; overflow: hidden;
}
a { text-decoration: none; color: inherit; }

/* Header */
.top-header {
  height: var(--header-h); background: white; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px;
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
}
.top-header .back-link {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-secondary); font-size: 14px; padding: 6px 12px; border-radius: 6px; transition: all 0.2s;
}
.top-header .back-link:hover { background: var(--primary-bg); color: var(--primary); }
.top-header .logo { font-size: 18px; font-weight: 700; color: var(--primary); margin-left: 16px; }
.top-header .platform-name { font-size: 14px; color: var(--text-secondary); margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--border); }
.top-header .header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top-header .user-btn {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px;
  background: var(--primary-bg); border: none; color: var(--primary); font-size: 14px; cursor: pointer; transition: all 0.2s;
}
.top-header .user-btn:hover { background: #dbeafe; }
.top-header .avatar-sm { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }

/* Layout */
.app-layout { display: flex; margin-top: var(--header-h); height: calc(100vh - var(--header-h)); }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); background: white; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-header { padding: 16px; border-bottom: 1px solid var(--border); }
.new-chat-btn {
  width: 100%; padding: 10px; border-radius: 10px; border: 1.5px dashed var(--border);
  background: var(--primary-bg); color: var(--primary); font-size: 14px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s;
}
.new-chat-btn:hover { border-color: var(--primary-light); background: #dbeafe; }
.direction-selector { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.direction-selector label { font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 6px; }
.direction-select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; outline: none; background: white; }
.history-list { flex: 1; overflow-y: auto; padding: 8px; }
.history-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  cursor: pointer; transition: all 0.2s; font-size: 13px; color: var(--text-secondary);
  position: relative;
}
.history-item:hover { background: var(--primary-bg); color: var(--primary); }
.history-item.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.history-item .h-icon { font-size: 16px; flex-shrink: 0; }
.history-item .h-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .delete-btn {
  display: none; width: 20px; height: 20px; border-radius: 4px; border: none;
  background: transparent; color: #94a3b8; cursor: pointer; font-size: 14px;
  align-items: center; justify-content: center;
}
.history-item:hover .delete-btn { display: flex; }
.history-item .delete-btn:hover { background: #fee2e2; color: #dc2626; }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); }
.sidebar-footer .footer-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  font-size: 13px; color: var(--text-secondary); transition: color 0.2s;
}
.sidebar-footer .footer-link:hover { color: var(--primary); }

/* Chat Area */
.chat-area { flex: 1; display: flex; flex-direction: column; background: var(--bg); }

/* Stage Bar */
.stage-bar {
  display: flex; align-items: center; padding: 12px 24px;
  background: white; border-bottom: 1px solid var(--border); gap: 0;
  overflow-x: auto;
}
.stage-item { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.stage-node {
  display: flex; align-items: center; gap: 5px; padding: 5px 12px;
  border-radius: 20px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); background: #f1f5f9; transition: all 0.2s;
}
.stage-node .stage-dot {
  width: 18px; height: 18px; border-radius: 50%; background: #cbd5e1;
  color: white; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.stage-node.active { color: var(--primary); background: var(--primary-bg); }
.stage-node.active .stage-dot { background: var(--primary); color: white; }
.stage-node.done { color: var(--accent); }
.stage-node.done .stage-dot { background: var(--accent); color: white; }
.stage-line { width: 24px; height: 2px; background: #e2e8f0; flex-shrink: 0; }
.stage-line.done { background: var(--accent); }

/* Messages */
.messages-container { flex: 1; overflow-y: auto; padding: 24px; }
.messages-container::-webkit-scrollbar { width: 6px; }
.messages-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* Welcome Screen */
.welcome-screen {
  max-width: 720px; margin: 0 auto; padding-top: 24px; text-align: center;
}
.welcome-screen .welcome-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  border-radius: 16px; background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
}
.welcome-screen h2 { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.welcome-screen .subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.7; }

/* Direction Pills */
.direction-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 24px; }
.direction-pill {
  padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border); background: white; color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s; user-select: none;
}
.direction-pill:hover { border-color: var(--primary-light); color: var(--primary); }
.direction-pill.selected {
  border-color: var(--primary); background: var(--primary); color: white;
}

/* Stage Cards */
.stage-selector { text-align: left; }
.stage-selector h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 14px; text-align: center; }
.stage-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.stage-card {
  padding: 16px 10px; border-radius: 12px; border: 1.5px solid var(--border);
  background: white; text-align: center; cursor: pointer; transition: all 0.25s;
  user-select: none;
}
.stage-card:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stage-card.selected { border-color: var(--primary); background: var(--primary-bg); box-shadow: 0 0 0 2px var(--primary); }
.stage-card .sc-icon { font-size: 28px; margin-bottom: 6px; }
.stage-card .sc-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.stage-card .sc-desc { font-size: 11px; color: var(--text-secondary); }
.stage-confirm-bar { text-align: center; }
.stage-confirm-btn {
  padding: 10px 32px; border-radius: 10px; border: none;
  background: var(--primary); color: white; font-size: 14px; font-weight: 600;
  cursor: pointer; opacity: 1; transition: all 0.3s;
}
.stage-confirm-btn:hover { background: #1e40af; transform: translateY(-1px); box-shadow: var(--shadow-md); }
/* 兼容旧逻辑保留 .active（阶段可选项,按钮始终可点击） */
.stage-confirm-btn.active { background: var(--primary); opacity: 1; cursor: pointer; }
.stage-confirm-btn.active:hover { background: #1e40af; }

/* Message Bubbles */
.msg-row { display: flex; gap: 10px; margin-bottom: 20px; }
.msg-row.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
}
.msg-row.ai .msg-avatar { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
.msg-row.user .msg-avatar { background: #e2e8f0; color: var(--text-secondary); }
.msg-bubble {
  max-width: 70%; padding: 14px 18px; border-radius: 16px; font-size: 14px;
  line-height: 1.7; word-break: break-word;
}
.msg-row.ai .msg-bubble { background: white; border: 1px solid var(--border); border-top-left-radius: 4px; }
.msg-row.user .msg-bubble { background: var(--primary); color: white; border-top-right-radius: 4px; }
.msg-bubble h3, .msg-bubble h4 { margin: 8px 0 6px; }
.msg-bubble ul, .msg-bubble ol { padding-left: 20px; margin: 6px 0; }
.msg-bubble li { margin-bottom: 4px; }
.msg-bubble strong { font-weight: 600; }

/* Quality Score */
.quality-section { margin: 12px 0; padding: 14px 16px; background: #f0fdf4; border-radius: 10px; border: 1px solid #bbf7d0; }
.quality-section .qs-title { font-size: 13px; font-weight: 700; color: #166534; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.score-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.score-label { font-size: 12px; color: #374151; width: 72px; flex-shrink: 0; }
.score-track { flex: 1; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 3px; transition: width 0.6s; }
.score-val { font-size: 13px; font-weight: 700; width: 36px; text-align: right; }
.quality-warning {
  margin: 12px 0; padding: 14px 16px; background: #fef3c7;
  border: 1px solid #fbbf24; border-radius: 10px;
}
.quality-warning h4 { font-size: 13px; font-weight: 700; color: #92400e; margin-bottom: 6px; }
.quality-warning p { font-size: 13px; color: #78350f; line-height: 1.65; }
.human-transfer-card {
  background: linear-gradient(135deg, #fef3c7, #fde68a); border: 1.5px solid #f59e0b;
  border-radius: var(--radius-sm); padding: 18px; margin: 12px 0;
}
.human-transfer-card h4 { font-size: 14px; color: #92400e; margin-bottom: 8px; }
.human-transfer-card p { font-size: 13px; color: #78350f; line-height: 1.65; }
.human-transfer-card .transfer-btn {
  margin-top: 14px; padding: 9px 22px; border-radius: 8px;
  background: #d97706; color: white; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.human-transfer-card .transfer-btn:hover { background: #b45309; }

/* Stage Complete */
.stage-complete-msg {
  padding: 12px 16px; background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-radius: 10px; font-weight: 600; color: #065f46; margin-bottom: 12px;
}
.analysis-section { margin: 12px 0; padding: 14px 16px; background: #f8fafc; border-radius: 10px; border: 1px solid #e2e8f0; }
.analysis-section h4 { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.next-suggestion { margin: 14px 0; padding: 14px 16px; background: var(--primary-bg); border-radius: 10px; }
.next-suggestion p { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.next-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 8px; border: none;
  background: var(--primary); color: white; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.next-btn:hover { background: #1e40af; }

/* Suggestion Cards */
.suggestion-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.suggestion-card { padding: 12px 14px; background: var(--primary-bg); border-radius: 8px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.suggestion-card:hover { border-color: var(--primary-light); background: #dbeafe; }
.suggestion-card .sc-title { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.suggestion-card .sc-desc { font-size: 12px; color: var(--text-secondary); }

/* Typing Indicator */
.typing-indicator { display: flex; align-items: center; gap: 4px; padding: 12px 16px; }
.typing-indicator span { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: typing 1.2s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } }

/* Input Area */
.input-area { background: white; border-top: 1px solid var(--border); padding: 12px 24px 16px; }
.input-wrapper { max-width: 720px; margin: 0 auto; position: relative; display: flex; align-items: flex-end; gap: 8px; }

/* Attach Button */
.attach-btn {
  width: 36px; height: 36px; flex-shrink: 0; margin-bottom: 8px;
  border-radius: 10px; border: 1.5px solid var(--border); background: white;
  color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.attach-btn:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-bg); }
.attach-btn.has-files { border-color: var(--accent); color: var(--accent); background: #f0fdf4; }

.input-box {
  flex: 1; min-height: 48px; max-height: 120px; padding: 12px 50px 12px 14px;
  border: 1.5px solid var(--border); border-radius: 12px; font-size: 14px; line-height: 1.5;
  resize: none; outline: none; font-family: inherit; transition: border-color 0.2s;
}
.input-box-with-attach { padding-left: 14px; }
.input-box:focus { border-color: var(--primary-light); }
.send-btn {
  position: absolute; right: 4px; bottom: 4px; width: 36px; height: 36px;
  border-radius: 10px; background: var(--primary); color: white; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; opacity: 0.4; pointer-events: none;
}
.send-btn.active { opacity: 1; pointer-events: auto; }
.send-btn.active:hover { background: #1e40af; }
.input-hint { font-size: 11px; color: #94a3b8; text-align: center; margin-top: 6px; }

/* File Preview Bar */
.file-preview-bar {
  max-width: 720px; margin: 0 auto 8px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  animation: fileSlideIn 0.2s ease-out;
}
@keyframes fileSlideIn { from { transform: translateY(-6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.file-preview-list { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.file-clear-btn {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 6px;
  border: none; background: #fee2e2; color: #dc2626;
  font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.file-clear-btn:hover { background: #fecaca; }

/* File Chip */
.file-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 6px; border-radius: 8px;
  background: white; border: 1px solid #d1fae5;
  font-size: 12px; color: #374151; max-width: 180px;
  animation: chipPop 0.2s ease-out;
}
@keyframes chipPop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.file-chip .chip-icon { font-size: 16px; flex-shrink: 0; }
.file-chip .chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .chip-remove {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  border: none; background: transparent; color: #9ca3af; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: all 0.15s;
  padding: 0;
}
.file-chip .chip-remove:hover { background: #fee2e2; color: #dc2626; }

/* Image Preview in Chip */
.file-chip .chip-thumb {
  width: 28px; height: 28px; border-radius: 4px; object-fit: cover;
  flex-shrink: 0; border: 1px solid #e5e7eb;
}

/* Message Attachment */
.msg-attachment {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
}
.msg-row.user .msg-bubble .msg-attachment {
  background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.18);
}
.msg-attachment-header {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  color: #94a3b8; margin-bottom: 8px;
}
.msg-row.user .msg-bubble .msg-attachment-header { color: rgba(255,255,255,0.7); }
.msg-attachment-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-attachment-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 8px;
  background: white; border: 1px solid var(--border);
  font-size: 12px; color: var(--text); max-width: 200px;
}
.msg-row.user .msg-bubble .msg-attachment-item {
  background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
}
.msg-attachment-item .att-icon { font-size: 18px; flex-shrink: 0; }
.msg-attachment-item .att-info { overflow: hidden; }
.msg-attachment-item .att-filename { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-attachment-item .att-meta { font-size: 11px; color: #94a3b8; }
.msg-row.user .msg-bubble .msg-attachment-item .att-meta { color: rgba(255,255,255,0.5); }
.msg-attachment-img {
  max-width: 100%; max-height: 240px; border-radius: 8px;
  border: 1px solid var(--border); margin-top: 6px;
}

/* Report Card */
.report-card {
  background: white; border: 1px solid #d1d5db; border-radius: 16px;
  overflow: hidden; margin: 16px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  animation: reportSlideIn 0.5s ease-out;
}
@keyframes reportSlideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.report-header { background: linear-gradient(135deg, #1e3a8a, #2563eb); padding: 24px 28px; color: white; position: relative; overflow: hidden; }
.report-header::before { content:''; position: absolute; top: -40%; right: -15%; width: 200px; height: 200px; background: rgba(255,255,255,0.06); border-radius: 50%; }
.report-title { font-size: 18px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 4px; position: relative; z-index: 1; }
.report-subtitle { font-size: 13px; opacity: 0.85; position: relative; z-index: 1; }
.report-meta { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.report-meta span { font-size: 11.5px; opacity: 0.8; display: flex; align-items: center; gap: 4px; }
.report-body { padding: 24px 28px; }
.report-section { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid #f1f5f9; }
.report-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.report-section h3 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 3px solid var(--primary-light); }
.report-section p, .report-section li { font-size: 13.5px; color: #334155; line-height: 1.8; }
.report-section ul { padding-left: 18px; margin: 6px 0; }
.report-score-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.report-score-item { background: #f8fafc; border-radius: 10px; padding: 14px 16px; text-align: center; border: 1px solid #e2e8f0; }
.report-score-item .rs-label { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.report-score-item .rs-value { font-size: 26px; font-weight: 800; }
.generating { text-align: center; padding: 32px; color: var(--text-secondary); }
.generating .rg-spinner { width: 36px; height: 36px; margin: 0 auto 12px; border: 3px solid #e2e8f0; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.report-footer { background: #f8fafc; border-top: 1px solid #e2e8f0; padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.rf-btn { padding: 7px 16px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid #d1d5db; background: white; color: #475569; transition: all 0.2s; }
.rf-btn:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-bg); }
.rf-btn-primary { background: var(--primary) !important; color: white !important; border-color: var(--primary) !important; }
.rf-btn-primary:hover { background: #1e40af !important; }

/* Settings */
.settings-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3); z-index: 200;
  display: none; align-items: center; justify-content: center;
}
.settings-overlay.open { display: flex; }
.settings-panel { width: 480px; max-height: 80vh; background: white; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); overflow-y: auto; animation: slideUp 0.25s; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.settings-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.settings-header h3 { font-size: 17px; font-weight: 700; }
.settings-close { width: 32px; height: 32px; border-radius: 8px; border: none; background: #f1f5f9; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.2s; }
.settings-close:hover { background: #e2e8f0; }
.settings-body { padding: 24px; }
.setting-group { margin-bottom: 24px; }
.setting-group label { font-size: 13px; font-weight: 600; color: var(--text); display: block; margin-bottom: 8px; }
.setting-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; }
.setting-input:focus { border-color: var(--primary-light); }
.setting-select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; background: white; }
.save-btn { width: 100%; padding: 12px; border-radius: 10px; background: var(--primary); color: white; border: none; font-size: 14px; font-weight: 600; cursor: pointer; }
.save-btn:hover { background: #1e40af; }

@media (max-width: 768px) {
  .sidebar { position: fixed; top: var(--header-h); left: 0; bottom: 0; z-index: 90; box-shadow: var(--shadow-md); width: 260px; }
  .stage-cards { grid-template-columns: repeat(3, 1fr); }
  .messages-container { padding: 16px; }
  .input-area { padding: 12px; }
}
