/* 辅学活动规划 · 设计系统（暖灰 + 品牌橙） */
:root {
  --bg: #faf8f5;
  --bg-elevated: #ffffff;
  --bg-muted: #f3f0eb;
  --border: #e8e4dd;
  --border-focus: #f97316;
  --text: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #a8a29e;
  --brand: #ea580c;
  --brand-hover: #c2410c;
  --brand-light: #fff7ed;
  --brand-ring: rgba(234, 88, 12, 0.15);
  --success: #16a34a;
  --info: #2563eb;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 16px rgba(28, 25, 23, 0.06);
  --shadow-lg: 0 12px 32px rgba(28, 25, 23, 0.08);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── 导航 ── */
.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.navbar .logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar .subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.nav-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-segment {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}

.nav-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
}

.nav-btn.active {
  background: var(--bg-elevated);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.nav-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.ai-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--success);
  padding: 6px 12px;
  background: #f0fdf4;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
}

.ai-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── 布局 ── */
.main {
  display: flex;
  gap: 24px;
  padding: 24px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: flex-start;
}

.left-panel {
  width: 400px;
  flex-shrink: 0;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
}

.right-panel {
  flex: 1;
  min-width: 0;
}

.page-panel {
  min-height: calc(100vh - 60px);
  padding: 24px;
}

/* ── 卡片 ── */
.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.card-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--brand);
  border-radius: 2px;
}

/* ── 定位 ── */
.location-bar {
  background: var(--brand-light);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.loc-btn {
  background: var(--bg-elevated);
  color: var(--brand);
  border: 1px solid #fdba74;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.loc-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.loc-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.loc-status {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ── 表单 ── */
.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.form-group { flex: 1; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group label .required { color: #dc2626; }

.form-label-block {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: -2px 0 8px;
  line-height: 1.4;
}

.sub-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.date-range-row {
  margin-bottom: 0;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.form-textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.6;
}

.form-select { appearance: auto; cursor: pointer; }

/* ── 活动类型 ── */
.type-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.type-btn {
  padding: 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  text-align: center;
  color: var(--text-secondary);
}

.type-btn:hover {
  border-color: #fdba74;
  background: var(--brand-light);
}

.type-btn.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 0 0 1px var(--brand);
}

/* ── 主 CTA ── */
.generate-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.25);
}

.generate-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.35);
}

.generate-btn:active:not(:disabled) {
  transform: translateY(0);
}

.generate-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── 结果区头部 ── */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.results-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.results-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

.results-actions {
  display: flex;
  gap: 8px;
}

.btn-outline {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-primary-sm {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-primary-sm:hover {
  background: var(--brand-hover);
}

/* ── 方案卡片 ── */
.plan-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.plan-card:hover {
  box-shadow: var(--shadow-md);
}

.plan-header {
  padding: 16px 20px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.plan-rank1 .plan-header { background: linear-gradient(135deg, #ea580c, #fb923c); }
.plan-rank2 .plan-header { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.plan-rank3 .plan-header { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

.plan-rank-badge {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.plan-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.plan-cost-tag {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.plan-body { padding: 20px; }

.plan-restaurant {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.plan-restaurant h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.plan-restaurant .info-row {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.plan-restaurant .info-item { display: flex; align-items: center; gap: 4px; }

.plan-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 14px;
}

.plan-highlights {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.highlight-tag {
  background: var(--brand-light);
  color: var(--brand);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #fed7aa;
}

.plan-ai-reason {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.65;
  margin-bottom: 14px;
}

.plan-ai-reason .label {
  font-size: 11px;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.plan-tips {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  line-height: 1.5;
}

.plan-actions { display: flex; gap: 10px; }

.vote-btn {
  flex: 1;
  padding: 11px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.vote-btn.primary {
  background: var(--brand);
  color: #fff;
}

.vote-btn.primary:hover:not(:disabled) {
  background: var(--brand-hover);
}

.vote-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.share-btn {
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.share-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.vote-bar-wrap { margin: 12px 0; }

.vote-bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.vote-bar {
  height: 6px;
  background: var(--bg-muted);
  border-radius: 3px;
  overflow: hidden;
}

.vote-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.plan-rank1 .vote-bar-fill { background: linear-gradient(90deg, #ea580c, #fb923c); }
.plan-rank2 .vote-bar-fill { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.plan-rank3 .vote-bar-fill { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

/* ── 空状态 ── */
.empty-state {
  text-align: center;
  padding: 64px 32px;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--border);
}

.empty-icon {
  margin-bottom: 16px;
  line-height: 1;
}

.empty-icon-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.empty-state p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state .hint {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.empty-steps {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.empty-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 120px;
}

.empty-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fed7aa;
}

.empty-step-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.empty-tags {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── 设置页 ── */
.settings-wrap {
  max-width: 680px;
  margin: 0 auto;
}

.settings-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.status-box {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 16px;
  margin-bottom: 16px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.status-row:last-child { border-bottom: none; }

.status-label { color: var(--text-muted); flex-shrink: 0; }
.status-value { color: var(--text); text-align: right; word-break: break-all; font-weight: 500; }
.status-mono { font-family: ui-monospace, monospace; font-size: 11px; font-weight: 400; }

.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.settings-btn {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.settings-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.settings-btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.settings-btn.primary:hover {
  background: var(--brand-hover);
}

.settings-msg {
  margin-top: 12px;
  font-size: 13px;
  min-height: 20px;
}

.settings-msg.ok { color: var(--success); }
.settings-msg.err { color: #dc2626; }

.settings-list {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
  padding-left: 18px;
}

.settings-list code {
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--bg-muted);
  cursor: pointer;
  transition: var(--transition);
}

.history-item:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}

.history-item-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.history-item-meta { font-size: 12px; color: var(--text-muted); }
.history-empty { text-align: center; color: var(--text-muted); padding: 48px 0; font-size: 14px; }

/* ── 吉祥物 & 对话 ── */
.assistant-avatar {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 200;
  text-align: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: opacity 0.25s;
}

.assistant-avatar.dragging { cursor: grabbing; opacity: 0.92; }
.assistant-avatar.hidden-avatar { opacity: 0; pointer-events: none; }

.assistant-avatar img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(234, 88, 12, 0.2));
  pointer-events: none;
}

.assistant-label {
  font-size: 11px;
  color: var(--brand);
  font-weight: 600;
  margin-top: 4px;
}

.assistant-sub { font-size: 10px; color: var(--text-muted); }

.chat-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.4);
  z-index: 210;
  opacity: 0;
  transition: opacity 0.3s;
}

.chat-backdrop.show { display: block; opacity: 1; }

.chat-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100vw);
  height: 100vh;
  background: var(--bg-elevated);
  z-index: 220;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-panel.open { transform: translateX(0); }

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--brand-light);
}

.chat-header strong { font-size: 15px; color: var(--text); }
.chat-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.chat-header-actions { display: flex; gap: 6px; }

.chat-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.chat-icon-btn:hover { border-color: var(--brand); color: var(--brand); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
}

.chat-msg { display: flex; gap: 8px; margin-bottom: 14px; }
.chat-msg-user { justify-content: flex-end; }
.chat-avatar { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.65;
}

.chat-bubble-user {
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble-ai {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  margin-right: 4px;
  animation: chatDot 1.2s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatDot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

.chat-quick {
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.quick-btn {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #fed7aa;
  background: var(--brand-light);
  color: var(--brand);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.quick-btn:hover { background: #ffedd5; }

.chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--bg-elevated);
}

.chat-input-bar textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 14px;
  resize: none;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.chat-input-bar textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.chat-send-btn {
  padding: 0 18px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.chat-send-btn:hover { background: var(--brand-hover); }
.chat-send-btn:disabled { background: var(--text-muted); cursor: not-allowed; }

/* ── 弹窗 ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.modal-icon { font-size: 44px; margin-bottom: 12px; line-height: 1; }

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.modal-hint {
  font-size: 12px;
  margin-bottom: 12px;
}

.modal-hint.ok { color: var(--success); }
.modal-hint.err { color: #dc2626; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.modal-actions .btn-primary-sm,
.modal-actions .btn-outline {
  flex: 1;
  padding: 11px;
  font-size: 14px;
}

/* ── 动画 ── */
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.4s ease-out both; }

/* ── 响应式 ── */
@media (max-width: 900px) {
  .main { flex-direction: column; padding: 16px; }
  .left-panel {
    width: 100%;
    position: static;
    max-height: none;
  }
  .type-btns { grid-template-columns: 1fr; }
  .navbar { height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .nav-toolbar { width: 100%; justify-content: space-between; }
}

@media (max-width: 768px) {
  .assistant-avatar { right: 16px; bottom: 16px; }
  .assistant-avatar img { width: 60px; height: 60px; }
  .chat-panel { width: 100vw; }
  .empty-steps { flex-direction: column; align-items: center; }
}
