/* ===== 设计令牌 ===== */
:root {
  --c-primary: #2563eb;
  --c-primary-soft: #dbeafe;
  --c-primary-light: #eff6ff;
  --c-accent: #059669;
  --c-accent-soft: #d1fae5;
  --c-accent-light: #ecfdf5;
  --c-warn: #f59e0b;
  --c-warn-soft: #fef3c7;
  --c-danger: #dc2626;
  --c-danger-soft: #fee2e2;
  --c-bg: #f1f5f9;
  --c-surface: #ffffff;
  --c-ink: #0f172a;
  --c-mid: #475569;
  --c-muted: #94a3b8;
  --c-line: #e2e8f0;
  --c-line-light: #f1f5f9;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 4px 16px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --max-w: 720px;
  --header-h: 56px;
  --bottom-nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
textarea { resize: vertical; min-height: 120px; }

/* ===== 顶部导航栏 ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-line);
  gap: 12px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.topbar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
}
.topbar-text b { display: block; font-size: .92rem; line-height: 1.2; }
.topbar-text small { display: block; font-size: .68rem; color: var(--c-muted); line-height: 1.2; }
.topbar-nav { display: flex; gap: 4px; flex-shrink: 0; }
.topbar-nav a, .topbar-nav button {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-mid);
  transition: all .15s;
}
.topbar-nav a:hover, .topbar-nav a.active,
.topbar-nav button:hover { background: var(--c-primary-soft); color: var(--c-primary); }

/* ===== 底部导航栏 (移动端) ===== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--bottom-nav-h);
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--c-line);
}
.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 100%;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: .66rem;
  font-weight: 600;
  color: var(--c-muted);
  transition: color .15s;
}
.bottom-nav-item.active { color: var(--c-primary); }
.bottom-nav-item .icon {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  font-size: 1.15rem;
}
.bottom-nav-item .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transition: opacity .15s;
}
.bottom-nav-item.active .dot { opacity: 1; }

/* ===== 主内容区 ===== */
.main-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 16px calc(var(--bottom-nav-h) + var(--safe-bottom) + 20px);
}
.main-wrap.no-bottom { padding-bottom: 24px; }

/* ===== Hero 区域 ===== */
.hero-section {
  background: linear-gradient(135deg, #fff, var(--c-primary-light));
  border-radius: var(--radius);
  padding: 28px 22px;
  margin-bottom: 16px;
  border: 1px solid var(--c-primary-soft);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: "";
  position: absolute;
  top: -60px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(5,150,105,.06));
  pointer-events: none;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 14px;
}
.hero-tag::before {
  content: ""; width: 6px; height: 6px;
  border-radius: 50%; background: var(--c-primary);
}
.hero-section h1 {
  font-size: 1.8rem;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}
.hero-lead {
  color: var(--c-mid);
  font-size: .94rem;
  line-height: 1.7;
  max-width: 560px;
}

/* ===== 微信卡片 ===== */
.wechat-card {
  background: linear-gradient(135deg, #07c160, #05944b);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 24px rgba(7,193,96,.25);
}
.wechat-card-qrcode {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  flex-shrink: 0;
}
.wechat-card-info { flex: 1; min-width: 0; }
.wechat-card-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,.2);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .03em;
  margin-bottom: 4px;
}
.wechat-card-id { font-size: .74rem; font-weight: 600; margin-bottom: 2px; word-break: break-all; }
.wechat-card-text { font-size: .68rem; opacity: .88; line-height: 1.4; word-break: break-all; }
.wechat-card-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.wechat-card-add {
  padding: 8px 14px;
  border-radius: 6px;
  background: #fff;
  color: #07c160 !important;
  font-size: .74rem !important;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: all .15s;
}
.wechat-card-add:hover, .wechat-card-add:active {
  transform: scale(1.04);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.wechat-card-copy {
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3) !important;
  color: #fff !important;
  font-size: .7rem !important;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}
.wechat-card-copy:hover, .wechat-card-copy:active { background: rgba(255,255,255,.28); }

/* ===== 输入区域 ===== */
.ask-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--c-line);
  margin-bottom: 16px;
}
.ask-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ask-card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--c-mid);
}
.ask-card-status .status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--c-accent-soft);
}
.ask-card textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--c-line);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  line-height: 1.7;
  background: var(--c-bg);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.ask-card textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px var(--c-primary-soft);
  background: #fff;
}
.ask-card textarea::placeholder { color: var(--c-muted); }
.ask-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.btn-clear {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-mid);
  background: var(--c-line-light);
  transition: all .15s;
}
.btn-clear:hover { background: var(--c-line); }
.btn-submit {
  flex: 1;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--c-primary), #1d4ed8);
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
  transition: all .15s;
  letter-spacing: .02em;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.35); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: .6; transform: none; box-shadow: none; }

/* ===== 快捷问题 ===== */
.chips-section {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-line);
  margin-bottom: 16px;
}
.chips-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.chips-section-header .icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--c-warn-soft);
  color: var(--c-warn);
  display: grid; place-items: center;
  font-size: .85rem;
}
.chips-section-header h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--c-ink);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-mid);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  transition: all .15s;
  white-space: nowrap;
}
.chip:hover, .chip:active {
  color: var(--c-primary);
  border-color: var(--c-primary-soft);
  background: var(--c-primary-light);
}
.chip:active { transform: scale(.97); }

/* ===== 回答面板 ===== */
.answer-section {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--c-line);
  margin-bottom: 16px;
  overflow: hidden;
}
.answer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-line-light);
  background: var(--c-bg);
}
.answer-head .ai-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-size: .74rem;
  font-weight: 700;
}
.answer-head .ai-badge::before {
  content: ""; width: 7px; height: 7px;
  border-radius: 50%; background: var(--c-accent);
}
.answer-copy {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--c-primary);
  background: var(--c-primary-soft);
  transition: all .15s;
}
.answer-copy:hover { background: var(--c-primary); color: #fff; }
.answer-body {
  padding: 20px;
}
.answer-question {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 12px 12px 12px 4px;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 16px;
  max-width: 100%;
  word-break: break-word;
}
.answer-text {
  font-size: .94rem;
  line-height: 1.85;
  color: var(--c-mid);
  white-space: pre-line;
}

/* ===== 功能卡片 ===== */
.features-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.feature-card {
  background: var(--c-surface);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.feature-card:active { transform: scale(.98); }
.feature-card .f-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  margin: 0 auto 10px;
  display: grid; place-items: center;
  font-size: 1.2rem;
  font-weight: 900;
}
.feature-card:nth-child(1) .f-icon { background: #dbeafe; color: #2563eb; }
.feature-card:nth-child(2) .f-icon { background: #d1fae5; color: #059669; }
.feature-card:nth-child(3) .f-icon { background: #fef3c7; color: #d97706; }
.feature-card h4 { font-size: .82rem; font-weight: 700; margin-bottom: 4px; }
.feature-card p { font-size: .7rem; color: var(--c-muted); line-height: 1.5; }

/* ===== 历史记录 ===== */
.history-section {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-line);
  margin-bottom: 20px;
}
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.history-header h3 {
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.history-header h3 .icon { font-size: .95rem; }
.history-tools {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}
.history-tools input {
  flex: 1;
  max-width: 200px;
  padding: 8px 14px;
  border: 1px solid var(--c-line);
  border-radius: 20px;
  font-size: .8rem;
  background: var(--c-bg);
  outline: none;
  transition: border-color .15s;
}
.history-tools input:focus { border-color: var(--c-primary); }
.history-tools input::placeholder { color: var(--c-muted); }
.btn-danger-ghost {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--c-danger);
  background: var(--c-danger-soft);
  white-space: nowrap;
  transition: all .15s;
}
.btn-danger-ghost:hover { background: var(--c-danger); color: #fff; }
.history-list { display: grid; gap: 10px; }
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  border: 1px solid var(--c-line-light);
  transition: border-color .15s;
}
.history-item:hover { border-color: var(--c-line); }
.history-item-content { flex: 1; min-width: 0; }
.history-item-content h4 {
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item-content p {
  font-size: .76rem;
  color: var(--c-mid);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.history-item-content small {
  display: block;
  margin-top: 6px;
  font-size: .68rem;
  color: var(--c-muted);
}
.history-item-btn {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: .76rem;
  font-weight: 700;
  color: #fff;
  background: var(--c-ink);
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity .15s;
}
.history-item-btn:hover { opacity: .85; }

/* ===== 页脚 ===== */
.site-footer {
  text-align: center;
  padding: 20px 0 0;
  font-size: .74rem;
  color: var(--c-muted);
  line-height: 1.8;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 32px 20px;
}
.empty-state .empty-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--c-bg);
  margin: 0 auto 12px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  color: var(--c-muted);
}
.empty-state p { font-size: .85rem; color: var(--c-muted); }
.empty, .history-list .empty { text-align: center; padding: 24px 16px; font-size: .85rem; color: var(--c-muted); }
.log-list .empty, .knowledge-list .empty { text-align: center; padding: 20px; font-size: .85rem; color: var(--c-muted); }

/* ===== 响应式 - 平板及以上 ===== */
@media (min-width: 768px) {
  .hero-section h1 { font-size: 2.2rem; }
  .hero-section { padding: 36px 32px; }
  .features-section { gap: 14px; }
  .feature-card { padding: 22px 18px; }
  .feature-card h4 { font-size: .88rem; }
  .feature-card p { font-size: .76rem; }
}

/* ===== 响应式 - 桌面 ===== */
@media (min-width: 1024px) {
  .main-wrap { padding-top: 32px; }
  .hero-section h1 { font-size: 2.6rem; }
}

/* ===== 移动端底部导航显示 ===== */
@media (max-width: 767px) {
  .bottom-nav { display: block; }
  .main-wrap { padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px); }
  .topbar-nav { display: none; }
  .features-section { grid-template-columns: 1fr; }
  .history-tools { flex-direction: column; }
  .history-tools input { max-width: 100%; }
}
@media (min-width: 768px) {
  .main-wrap.no-bottom { padding-bottom: 24px; }
}

/* ===== 管理后台 ===== */
.admin-page { min-height: 100vh; min-height: 100dvh; padding: 24px 16px; }
.login-card {
  max-width: 420px; margin: 10vh auto 0;
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-line);
}
.login-card .brand-center {
  display: flex; align-items: center; gap: 12px;
  justify-content: center; margin-bottom: 24px;
}
.login-card .brand-center .logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  color: #fff; display: grid; place-items: center;
  font-weight: 900; font-size: 1.1rem;
}

.admin-form { display: grid; gap: 14px; }
.admin-form label { display: grid; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--c-mid); }
.admin-form input, .admin-form textarea, .admin-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-xs);
  font-size: .88rem;
  background: var(--c-bg);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-soft);
  background: #fff;
}

.admin-dashboard { max-width: 1100px; margin: 0 auto; }
.admin-head {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.admin-head .admin-brand {
  display: flex; align-items: center; gap: 12px;
}
.admin-head .admin-brand .logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  color: #fff; display: grid; place-items: center;
  font-weight: 900; font-size: 1rem;
}
.admin-head .admin-brand b { font-size: .95rem; }
.admin-head .admin-brand small { display: block; font-size: .7rem; color: var(--c-muted); }
.admin-actions { display: flex; gap: 8px; }

.btn-primary {
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  font-size: .84rem; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--c-primary), #1d4ed8);
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
  transition: all .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(37,99,235,.3); }
.btn-primary.wide { width: 100%; }

.btn-ghost {
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  font-size: .84rem; font-weight: 600;
  color: var(--c-mid);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-ghost.danger { color: var(--c-danger); background: var(--c-danger-soft); border-color: transparent; }
.btn-ghost.danger:hover { background: var(--c-danger); color: #fff; }
.btn-ghost.tiny { padding: 6px 14px; font-size: .76rem; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-panel {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
}
.admin-panel.wide { grid-column: 1 / -1; }
.admin-panel .section-title {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.admin-panel .tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-size: .66rem; font-weight: 700;
  letter-spacing: .03em;
  margin-bottom: 4px;
}
.admin-panel h2 { font-size: 1rem; font-weight: 700; }

.setting-list {
  padding: 12px;
  border-radius: var(--radius-xs);
  background: var(--c-bg);
  font-size: .82rem;
  color: var(--c-mid);
  line-height: 1.7;
  margin-bottom: 14px;
}

.qrcode-upload { display: grid; gap: 10px; }
.qrcode-preview { display: flex; align-items: center; gap: 12px; }
.qrcode-preview img {
  width: 120px; height: 120px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--c-line);
  object-fit: contain;
  background: var(--c-bg);
}

.knowledge-list, .log-list { display: grid; gap: 12px; }
.knowledge-item {
  display: grid; gap: 10px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  border: 1px solid var(--c-line-light);
}
.knowledge-item input, .knowledge-item textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-xs);
  font-size: .84rem;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.knowledge-item input:focus, .knowledge-item textarea:focus { border-color: var(--c-primary); }
.row-actions { display: flex; gap: 8px; }

.log-item {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  border: 1px solid var(--c-line-light);
}
.log-item h3 { font-size: .88rem; font-weight: 700; margin-bottom: 6px; }
.log-item p { font-size: .82rem; color: var(--c-mid); line-height: 1.6; margin-bottom: 8px; }
.log-item small { font-size: .7rem; color: var(--c-muted); }

.toast {
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-size: .8rem;
  font-weight: 600;
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.muted { color: var(--c-muted); font-size: .8rem; }

@media (max-width: 767px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-panel.wide { grid-column: auto; }
  .admin-head { flex-direction: column; align-items: flex-start; }
  .admin-actions { width: 100%; }
  .admin-actions .btn-ghost { flex: 1; text-align: center; }
  .admin-panel .section-title { flex-direction: column; align-items: flex-start; }
  .row-actions { flex-direction: column; }
  .row-actions button { width: 100%; }
}

/* ===== 平滑过渡 ===== */
.answer-section[hidden] { display: none; }
.wechat-card[hidden] { display: none; }
