/* ===========================================================
 * AI 备课助手 - Stitch 设计系统
 * 1:1 还原原系统 web/ 项目的 Stitch 设计稿风格
 * ===========================================================
 * 主色：#409eff (Element Plus 默认蓝)
 * 字体：Inter + Hanken Grotesk + 中文回退
 * 图标：Material Symbols Outlined
 * =========================================================== */

:root {
  --primary: #409eff;
  --primary-10: rgba(64, 158, 255, 0.1);
  --primary-20: rgba(64, 158, 255, 0.2);
  --primary-50: rgba(64, 158, 255, 0.5);
  --on-primary: #ffffff;
  --surface: #ffffff;
  --surface-container-lowest: #ffffff;
  --surface-container: #edeef2;
  --surface-container-50: rgba(237, 238, 242, 0.5);
  --surface-variant: #e1e2e7;
  --on-surface: #191c1f;
  --on-surface-variant: #404752;
  --on-surface-secondary: #8d9095;
  --outline: #707784;
  --outline-variant: #c0c7d4;
  --error: #ba1a1a;
  --warning: #f59f00;
  --success: #07c160;
  --wechat: #07c160;
  --bg-page: #f8f9fe;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 12px rgba(64, 158, 255, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
}

/* ============== 全局重置 ============== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Inter", "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--on-surface);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: transparent; padding: 0; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ============== Material Symbols ============== */
/* 字体定义在 fonts.css；这里只补全浏览器优化属性 */

/* ============== 字体 ============== */
.font-headline-lg { font-size: 32px; line-height: 40px; letter-spacing: -0.01em; font-weight: 600; }
.font-headline-md { font-size: 24px; line-height: 32px; font-weight: 500; }
.font-headline-sm { font-size: 18px; line-height: 24px; font-weight: 500; }
.font-label-md { font-size: 14px; line-height: 20px; font-weight: 500; }
.font-label-sm { font-size: 12px; line-height: 16px; font-weight: 600; }
.font-body { font-size: 14px; line-height: 1.6; color: var(--on-surface-variant); }

/* ============== 颜色 ============== */
.text-primary { color: var(--primary) !important; }
.text-on-surface { color: var(--on-surface) !important; }
.text-on-surface-variant { color: var(--on-surface-variant) !important; }
.text-secondary { color: var(--on-surface-secondary) !important; }
.text-error { color: var(--error) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-error { background-color: var(--error) !important; }
.bg-surface { background-color: var(--surface) !important; }
.bg-page { background-color: var(--bg-page) !important; }
.bg-primary-10 { background-color: var(--primary-10) !important; }
.bg-primary-20 { background-color: var(--primary-20) !important; }
.bg-error-10 { background-color: rgba(186, 26, 26, 0.1) !important; }

/* ============== 通用组件 ============== */
.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 30px rgba(64, 158, 255, 0.05);
  border-radius: var(--radius-xl);
}

/* ============== 按钮 ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { box-shadow: 0 6px 16px rgba(64, 158, 255, 0.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary-20);
}
.btn-secondary:hover { border-color: var(--primary); background: rgba(64, 158, 255, 0.05); }

.btn-wechat {
  background: var(--wechat);
  color: #fff;
}
.btn-wechat:hover { background: #06ad56; }

.btn-block { width: 100%; }
.btn-lg { padding: 12px 32px; font-size: 14px; }
.btn-sm { padding: 6px 16px; font-size: 12px; }
.btn-icon { font-size: 18px !important; }

/* ============== 布局 ============== */
/* page-shell 是整页外壳：必须锁高度（min-height 会被内容撑高，导致整页出现滚动条）
   + dvh 兜底移动端地址栏变化 + overflow:hidden 兜底万一子级溢出 */
.page-shell { height: 100vh; max-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
@supports (height: 100dvh) {
  .page-shell { height: 100dvh; max-height: 100dvh; }
}
.stitch-wrap { display: flex; flex: 1; min-height: 0; overflow: hidden; }  /* 加 overflow:hidden 防子级撑高 */
.content-container { padding: 48px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.relative { position: relative; }
.absolute { position: absolute; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; } .mb-12 { margin-bottom: 48px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none; }
.w-full { width: 100%; }
.h-full { height: 100%; }

/* ============== 顶部导航 ============== */
.stitch-nav {
  width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(225, 226, 231, 0.4);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 100%;
  width: 100%;
}
.nav-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; }
.brand-name { font-size: 20px; font-weight: 700; color: var(--on-surface); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-action-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.nav-action-btn .btn-icon { font-size: 18px; }
.contact-btn { background: var(--primary); color: #fff; }
.contact-btn:hover { transform: scale(1.05); box-shadow: 0 10px 15px -3px rgba(64, 158, 255, 0.3); }
.points-btn { background: #e0e7ff; color: #3b5bdb; }
.points-btn:hover { transform: scale(1.05); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08); }
.vip-btn {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-weight: 700;
  border: 1px solid rgba(251, 191, 36, 0.4);
}
.vip-btn:hover { transform: scale(1.05); box-shadow: 0 10px 15px -3px rgba(251, 191, 36, 0.3); }
.download-btn { background: #4f46e5; color: #fff; }
.download-btn:hover { transform: scale(1.05); box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3); }

.nav-login-btn {
  font-size: 14px; font-weight: 500; color: var(--on-surface-variant);
  padding: 6px 12px; border-radius: 8px;
}
.nav-login-btn:hover { color: var(--primary); background: var(--primary-10); }
.nav-register-btn {
  font-size: 14px; font-weight: 600; color: #fff;
  background: var(--primary);
  padding: 6px 16px; border-radius: 8px;
}
.nav-register-btn:hover { background: rgba(64, 158, 255, 0.85); transform: translateY(-1px); }

.user-info-wrap {
  display: flex; align-items: center; gap: 8px;
  margin-left: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.user-info-wrap:hover { background: var(--surface-container-50); }
.user-nickname {
  font-size: 14px; font-weight: 600; color: var(--on-surface);
  max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.avatar-ring {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid transparent;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.avatar-ring:hover { border-color: var(--primary-20); }
.avatar-img { width: 100%; height: 100%; object-fit: cover; }

/* ============== 主体布局：侧边栏 + 内容 ============== */
.body-layout { display: flex; flex: 1; overflow: hidden; min-height: 0; }
.sidebar {
  display: flex; flex-direction: column;
  width: 240px; flex-shrink: 0;
  background: #fff;
  border-right: 1px solid rgba(225, 226, 231, 0.5);
  padding: 16px 12px;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;          /* 允许 flex 子项收缩 + 触发内部滚动 */
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding: 0 8px;
}
.brand-icon-wrap {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--primary-10);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.brand-icon-wrap .brand-icon { color: var(--primary); font-size: 22px; }
.brand-title { font-size: 24px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.brand-sub { font-size: 12px; line-height: 16px; color: var(--on-surface-variant); font-weight: 600; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-section { margin-top: 10px; }
.sidebar-section:first-child { margin-top: 0; }
.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--on-surface-secondary, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 14px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--surface-container, #edeef2) 0%, transparent 100%);
  margin-left: 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--on-surface-variant, #404752);
  transition: all 0.18s ease;
  text-align: left;
  width: 100%;
  cursor: pointer;
  border: none;
  background: transparent;
  position: relative;
}
.nav-item:hover {
  background: var(--surface-container-50, #f3f3f8);
  color: var(--on-surface, #191c1f);
  transform: translateX(2px);
}
.nav-item.active {
  background: var(--primary-10, rgba(64, 158, 255, 0.1));
  color: var(--primary, #409eff);
  font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--primary, #409eff);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 20px; }
.tool-icon { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }

.nav-divider { height: 1px; background: #efefef; margin: 0.75rem 0; border-radius: 1px; }

/* main-area：flex 容器，让 content-container 自己滚动（避免小屏时内容被截断） */
.main-area {
  width: 100%;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.main-area > .content-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ============== Hero ============== */
.hero-section {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin-bottom: 48px;
  background: #fff;
  border: 1px solid rgba(225, 226, 231, 0.5);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .hero-section { flex-direction: row; }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #ffffff 0%, #ffffff 66%, transparent 100%);
  z-index: 10;
}
.hero-text-area {
  position: relative; z-index: 20;
  padding: 32px;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 24px;
}
@media (min-width: 768px) { .hero-text-area { padding: 48px; } }
.hero-title {
  font-size: 32px; line-height: 40px; letter-spacing: -0.01em;
  font-weight: 600; color: var(--on-surface); margin: 0;
}
@media (min-width: 768px) {
  .hero-title { font-size: 48px; line-height: 56px; letter-spacing: -0.02em; font-weight: 700; }
}
.hero-desc {
  font-size: 18px; line-height: 28px;
  color: var(--on-surface-variant);
  max-width: 540px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.hero-image-area {
  position: relative; height: 256px; flex: 1;
  overflow: hidden;
  background: rgba(64, 158, 255, 0.05);
}
@media (min-width: 768px) { .hero-image-area { height: 400px; } }
.hero-image {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0.8; mix-blend-mode: multiply;
}
.hero-gradient {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 33.333%;
  background: linear-gradient(to right, #fff, transparent);
}

/* ============== 分类网格 ============== */
.section-header { margin-bottom: 24px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 24px;
}
@media (min-width: 768px) { .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.category-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 30px rgba(64, 158, 255, 0.05);
  border-radius: 24px;
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex; flex-direction: column;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-20); }
.category-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.cat-icon-wrap {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-10);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); flex-shrink: 0;
}
.cat-icon { font-size: 28px; }
.category-header h4 { font-size: 24px; line-height: 32px; font-weight: 500; color: var(--on-surface); }
.category-tools { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tool-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  width: 100%;
  cursor: pointer;
  text-align: left;
}
.tool-item:hover { background: var(--surface-container-50); border-color: rgba(225, 226, 231, 0.5); }
.tool-item:hover .tool-icon { transform: scale(1.1); }
.tool-icon { font-size: 20px; color: var(--primary); transition: transform 0.2s ease; flex-shrink: 0; width: 24px; height: 24px; object-fit: contain; }
.tool-name { font-size: 18px; line-height: 24px; color: var(--on-surface); flex: 1; }
.tool-arrow { font-size: 18px; color: var(--outline-variant); flex-shrink: 0; }

/* ============== 骨架屏 ============== */
.skeleton {
  background: linear-gradient(90deg, #edeef2 25%, #f3f3f8 50%, #edeef2 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
.skeleton-circle { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.skeleton-title { height: 24px; width: 120px; }
.skeleton-list { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.skeleton-row { height: 44px; border-radius: 12px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============== 空状态 / 开发中 ============== */
.empty-state {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px;
  color: var(--on-surface-variant);
  gap: 12px;
}
.empty-icon { font-size: 48px; color: var(--outline-variant); }
.developing-wrap {
  height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.developing-card {
  padding: 48px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-width: 420px;
}
.developing-icon { font-size: 56px; color: var(--primary-20); }
.developing-card h3 { font-size: 24px; font-weight: 600; color: var(--on-surface); }
.developing-card p { font-size: 16px; color: var(--on-surface-variant); line-height: 1.6; }

/* ============== 登录页 ============== */
.login-page { min-height: 100vh; background: #fff; }
.login-wrapper { display: flex; min-height: 100vh; }
.login-image-section {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: #fff;
}
.login-image { max-width: 90%; max-height: 90vh; object-fit: contain; }
.login-form-section {
  flex: 1; display: flex; align-items: center; justify-content: flex-start;
  background: #fff; padding-left: 60px;
}
.login-container {
  width: 100%; max-width: 400px;
  padding: 40px;
  border: 1px solid #e4e7ed;
  border-radius: 16px;
  background: #fff;
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-header .logo { display: inline-flex; align-items: center; text-decoration: none; margin-bottom: 24px; }
.login-header .logo-img { height: 48px; width: auto; }
.login-header h2 { font-size: 24px; font-weight: 600; color: #1a1a1a; margin: 0; }
.login-tip { margin: 8px 0 0; font-size: 12px; color: #909399; line-height: 1.5; }
.login-form .form-group { margin-bottom: 20px; }
.login-form .form-input {
  width: 100%; height: 44px;
  padding: 0 15px; font-size: 14px;
  border: 1px solid #dcdfe6; border-radius: 8px;
  background: #fff; color: #1a1a1a;
  transition: border-color 0.2s;
}
.login-form .form-input:focus { outline: none; border-color: var(--primary); }
.form-options { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.form-options label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--on-surface-variant); cursor: pointer; }
.form-options .link { color: var(--primary); font-size: 14px; cursor: pointer; }
.submit-btn { width: 100%; height: 48px; font-size: 16px; font-weight: 600; }
.divider { width: 100%; display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #e4e7ed; }
.divider-text { color: #909399; font-size: 12px; white-space: nowrap; }
.wechat-btn {
  width: 100%; height: 48px; font-size: 16px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--wechat); color: #fff; border-radius: 24px;
  border: none; cursor: pointer;
}
.wechat-btn:hover { background: #06ad56; }
.wechat-icon { width: 22px; height: 22px; fill: #fff; }

@media (max-width: 900px) {
  .login-wrapper { flex-direction: column; }
  .login-image-section { display: none; }
  .login-form-section { min-height: 100vh; padding: 30px 20px; }
}

/* ============== 弹窗 ============== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 20px;
}
.modal {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow: auto;
  padding: 28px;
  border: 1px solid #f1f3f7;
  box-shadow: 0 8px 32px rgba(20, 24, 40, 0.08), 0 2px 6px rgba(20, 24, 40, 0.04);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 700; color: #141828; letter-spacing: -.01em; }
.modal-close { font-size: 20px; color: #9ca3af; cursor: pointer; padding: 4px; border-radius: 6px; transition: background .15s ease, color .15s ease; }
.modal-close:hover { background: #f5f5f7; color: #141828; }

/* ============== Toast ============== */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; }
.toast {
  background: rgba(0, 0, 0, 0.85); color: #fff;
  padding: 10px 20px; border-radius: 8px;
  font-size: 14px; margin-bottom: 8px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.warn { background: var(--warning); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ============== 用户下拉面板 ============== */
.profile-overlay { position: fixed; inset: 0; z-index: 99; }
.profile-popup {
  position: fixed; right: 32px; top: 76px;
  width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  z-index: 100;
}
.popup-user-row {
  display: flex; align-items: center; gap: 16px;
  padding: 24px 24px 0;
}
.popup-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover; border: 2px solid #f1f5f9; flex-shrink: 0;
}
.popup-username { font-size: 18px; font-weight: 700; color: var(--on-surface); margin: 0 0 4px; }
.popup-id { font-size: 14px; color: var(--on-surface-secondary); }
.popup-points-text { font-size: 14px; color: var(--on-surface-variant); padding: 20px 24px; line-height: 1.6; }
.popup-points-val { color: var(--primary); font-weight: 700; }
.popup-member-card {
  background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 100%);
  border: 1px solid var(--primary-10);
  border-radius: 16px;
  padding: 16px 24px;
  margin: 0 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.popup-member-title { font-size: 14px; font-weight: 700; color: var(--on-surface); margin-bottom: 2px; }
.popup-member-sub { font-size: 12px; color: var(--on-surface-secondary); }
.popup-member-buy {
  background: #fff; color: var(--primary);
  font-size: 12px; font-weight: 700;
  padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--primary-20);
  cursor: pointer;
  white-space: nowrap;
}
.popup-footer { border-top: 1px solid #f1f5f9; margin-top: 20px; }
.popup-logout {
  display: block; width: 100%;
  text-align: center; padding: 20px 0;
  font-size: 14px; font-weight: 500; color: var(--on-surface-secondary);
  cursor: pointer; background: transparent; border: none;
}
.popup-logout:hover { color: #ef4444; }

/* ============== 表单元素 ============== */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface);
  margin-bottom: 8px;
  line-height: 1.4;
}
.form-label .required { color: var(--error); font-weight: 600; }
.form-label .label-hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--on-surface-secondary, #6b7280);
  font-weight: 400;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  color: var(--on-surface);
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.form-input {
  height: 42px;
  padding: 0 14px;
  line-height: 42px;
}
.form-textarea {
  min-height: 96px;
  padding: 10px 14px;
  resize: vertical;
  line-height: 1.6;
}
.form-select {
  height: 42px;
  padding: 0 36px 0 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%236b7280'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: #b9bcc3;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary, #409eff);
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.12);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: #b0b4bb;
}
.form-help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--on-surface-secondary, #6b7280);
  line-height: 1.5;
}

/* checkbox + switch */
.form-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--on-surface);
  padding: 6px 0;
}
.form-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.form-check .check-box {
  width: 20px;
  height: 20px;
  border: 2px solid #dcdfe6;
  border-radius: 6px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.form-check .check-box::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.12s;
  margin-bottom: 2px;
}
.form-check input:checked ~ .check-box {
  background: var(--primary, #409eff);
  border-color: var(--primary, #409eff);
}
.form-check input:checked ~ .check-box::after {
  transform: rotate(45deg) scale(1);
}
.form-check:hover .check-box {
  border-color: var(--primary, #409eff);
}
.form-check input:focus-visible ~ .check-box {
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.18);
}

/* multiSelect chips */
.multi-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.multi-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #dcdfe6;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: var(--on-surface-variant, #404752);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.multi-chip:hover {
  border-color: var(--primary, #409eff);
  color: var(--primary, #409eff);
}
.multi-chip.active {
  background: rgba(64, 158, 255, 0.08);
  border-color: var(--primary, #409eff);
  color: var(--primary, #409eff);
  font-weight: 600;
}
.multi-chip .chip-check {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.multi-chip.active .chip-check::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin-bottom: 1px;
}

/* ============== 卡片 / 列表 ============== */
.card {
  background: #fff;
  border: 1px solid #edeef2;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(15, 16, 20, 0.04);
}
.card-hover { transition: all 0.2s; cursor: pointer; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-20); }

/* ============== 标签 ============== */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; font-size: 12px;
  border-radius: 9999px;
  background: var(--primary-10); color: var(--primary);
  font-weight: 500;
}
.tag-success { background: rgba(7, 193, 96, 0.1); color: var(--success); }
.tag-warning { background: rgba(245, 159, 0, 0.1); color: var(--warning); }
.tag-error { background: rgba(186, 26, 26, 0.1); color: var(--error); }
.tag-default { background: var(--surface-container); color: var(--on-surface-variant); }

/* ============== 滚动条 ============== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { border-radius: 3px; background-color: var(--primary-20); }
::-webkit-scrollbar-thumb:hover { background-color: var(--primary-50); }

/* ============== Markdown 渲染区 ============== */
.markdown-body {
  line-height: 1.8;
  color: var(--on-surface);
  font-size: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 {
  margin: 1.6em 0 0.6em;
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.4;
}
.markdown-body h1 { font-size: 1.8em; border-bottom: 1px solid #e8e8e8; padding-bottom: 0.3em; }
.markdown-body h2 { font-size: 1.5em; border-bottom: 1px solid #e8e8e8; padding-bottom: 0.3em; }
.markdown-body h3 { font-size: 1.25em; color: var(--primary, #409eff); }
.markdown-body h4 { font-size: 1.1em; }
.markdown-body h5 { font-size: 1em; color: var(--on-surface-variant); }
.markdown-body h6 { font-size: 0.9em; color: var(--on-surface-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.markdown-body p { margin: 0.8em 0; }
.markdown-body ul, .markdown-body ol { padding-left: 1.6em; margin: 0.8em 0; }
.markdown-body ul li { list-style: disc; }
.markdown-body ol li { list-style: decimal; }
.markdown-body li { margin: 0.3em 0; }
.markdown-body li::marker { color: var(--primary, #409eff); }
.markdown-body strong { font-weight: 600; color: var(--on-surface); }
.markdown-body em { font-style: italic; color: var(--on-surface-variant); }
.markdown-body code {
  background: #f0f1f3;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
  font-size: 0.88em;
  color: #c7254e;
}
.markdown-body pre {
  background: #1f2937;
  color: #f3f4f6;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1em 0;
  font-size: 0.88em;
  line-height: 1.6;
  position: relative;
}
.markdown-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
}
.markdown-body pre {
  border-left: 3px solid var(--primary, #409eff);
}
.markdown-body blockquote {
  border-left: 4px solid var(--primary, #409eff);
  padding: 8px 0 8px 16px;
  color: var(--on-surface-variant);
  margin: 1em 0;
  background: rgba(64, 158, 255, 0.04);
  border-radius: 0 8px 8px 0;
}
.markdown-body blockquote p { margin: 0.3em 0; }
.markdown-body table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #e8e8e8;
}
.markdown-body table th, .markdown-body table td {
  border: 1px solid #e8e8e8;
  padding: 8px 14px;
  text-align: left;
}
.markdown-body table th {
  background: linear-gradient(180deg, #f7f8fa 0%, #f0f1f3 100%);
  font-weight: 600;
  color: var(--on-surface);
}
.markdown-body table tbody tr:hover { background: rgba(64, 158, 255, 0.03); }
.markdown-body table tbody tr:nth-child(even) { background: #fafbfc; }
.markdown-body a {
  color: var(--primary, #409eff);
  text-decoration: none;
  border-bottom: 1px solid rgba(64, 158, 255, 0.3);
}
.markdown-body a:hover { border-bottom-color: var(--primary, #409eff); }
.markdown-body hr {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, #ddd, transparent);
  margin: 2em 0;
}

/* Markdown 内的代码块右上角"复制"按钮 */
.md-code-block {
  position: relative;
}
.md-code-block .md-copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 8px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
}
.md-code-block:hover .md-copy-btn { opacity: 1; }
.md-copy-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
}
.md-copy-btn.copied {
  background: var(--success, #67c23a);
  border-color: var(--success, #67c23a);
  color: #fff;
  opacity: 1;
}

/* ============== 创作页：参数/结果卡片 ============== */
.param-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #edeef2;
  box-shadow: 0 1px 3px rgba(15, 16, 20, 0.04);
  padding: 20px 22px;
  overflow: hidden;
}
.param-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f1f3;
}
.param-card-header .cat-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(64, 158, 255, 0.12), rgba(64, 158, 255, 0.04));
  display: flex;
  align-items: center;
  justify-content: center;
}
.param-card-header .cat-icon-wrap .cat-icon { color: var(--primary, #409eff); font-size: 20px; }
.param-card-header h2 { font-size: 17px; font-weight: 600; line-height: 1.3; margin: 0; }
.param-card-header .text-secondary { font-size: 12px; margin-top: 2px; }
.param-card-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.param-card-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f0f1f3;
}

/* ============== 结果区卡片（含历史 tabs） ============== */
.result-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #edeef2;
  box-shadow: 0 1px 3px rgba(15, 16, 20, 0.04);
  overflow: hidden;
}
.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid #f0f1f3;
  flex-shrink: 0;
  gap: 12px;
}
.result-card-header h2 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}
.result-card-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}
.result-card-tabs::-webkit-scrollbar { display: none; }
.result-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--on-surface-secondary, #6b7280);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  position: relative;
  flex-shrink: 0;
  max-width: 220px;
}
.result-tab .tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}
.result-tab .tab-close {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: inherit;
  opacity: 0.5;
  flex-shrink: 0;
}
.result-tab .tab-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); }
.result-tab:hover { background: #f3f3f8; color: var(--on-surface); }
.result-tab.active {
  background: rgba(64, 158, 255, 0.1);
  color: var(--primary, #409eff);
  border-color: rgba(64, 158, 255, 0.2);
  font-weight: 600;
}
.result-tab.active .tab-close { color: var(--primary); }
.result-tab.add-tab {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  background: #f3f3f8;
  color: var(--on-surface-secondary);
  flex-shrink: 0;
}
.result-tab.add-tab:hover { background: var(--primary-10, rgba(64, 158, 255, 0.1)); color: var(--primary); }
.result-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.result-actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  background: #f3f3f8;
  color: var(--on-surface-variant);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.result-actions button:hover { background: var(--primary-10, rgba(64, 158, 255, 0.1)); color: var(--primary); }
.result-actions button .icon { width: 16px !important; height: 16px !important; }

.result-card-body {
  flex: 1;
  min-height: 0;            /* 关键：允许收缩到比内容小，触发内部滚动 */
  overflow: auto;
  background: #fafbfc;
  padding: 24px 28px;
}

/* ============== 创作页空状态 + 快捷示例 ============== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--on-surface-secondary, #6b7280);
}
.empty-state .empty-icon {
  font-size: 80px !important;
  background: linear-gradient(135deg, var(--primary, #409eff) 0%, #7ab8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  opacity: 0.9;
}
.empty-state .empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 6px;
}
.empty-state .empty-desc {
  font-size: 13px;
  color: var(--on-surface-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}
.quick-examples {
  width: 100%;
  max-width: 600px;
  margin-top: 8px;
}
.quick-examples-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.quick-examples-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #e1e2e7 0%, transparent 100%);
}
.quick-examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.quick-example {
  padding: 12px 14px;
  border: 1px solid #e8e8eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quick-example:hover {
  border-color: var(--primary, #409eff);
  background: rgba(64, 158, 255, 0.03);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(64, 158, 255, 0.08);
}
.quick-example .qe-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface);
}
.quick-example .qe-meta {
  font-size: 11px;
  color: var(--on-surface-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.quick-example .qe-meta .icon { width: 13px !important; height: 13px !important; }

/* 顶栏 thin progress */
.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: 1000;
  pointer-events: none;
}
.top-progress.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--primary, #409eff), transparent);
  animation: top-progress 1.2s ease-in-out infinite;
}
@keyframes top-progress {
  0%   { left: -30%; }
  100% { left: 100%; }
}

/* ============== 4 级联动 cascader ============== */
.cascade-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  position: relative;
}
.cascade-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cascade-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.cell-label {
  font-size: 12px;
  color: var(--on-surface-secondary, #6b7280);
  font-weight: 500;
}
.cell-trigger-wrap {
  position: relative;
  width: 100%;
}
.cell-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  background: #fff;
  color: var(--on-surface, #1a1a1a);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left;
  outline: none;
}
.cell-trigger:hover:not(.is-disabled):not(.is-loading) {
  border-color: var(--primary, #409eff);
}
.cell-trigger:focus-visible,
.cell-trigger.is-active {
  border-color: var(--primary, #409eff);
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.12);
}
.cell-trigger.is-disabled {
  background: #f7f8fa;
  color: #c0c4cc;
  cursor: not-allowed;
}
.cell-trigger.is-loading {
  cursor: wait;
  background: #fff;
  border-color: #e4e7ed;
}
.cell-trigger.is-empty {
  background: #fff;
  border-style: dashed;
}
.cell-trigger-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.cell-trigger-placeholder {
  color: #c0c4cc;
}
.cell-arrow,
.cell-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #909399;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.cell-trigger.is-active .cell-arrow {
  transform: rotate(180deg);
  color: var(--primary, #409eff);
}
.cell-spinner {
  color: var(--primary, #409eff);
}
.cell-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  padding: 4px 0;
  animation: cascade-dropdown-in 0.14s ease-out;
}
@keyframes cascade-dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cell-option {
  padding: 8px 12px;
  font-size: 14px;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-option:hover {
  background: #f2f6fc;
}
.cell-option.selected {
  background: #ecf5ff;
  color: var(--primary, #409eff);
  font-weight: 500;
}
.cell-empty {
  padding: 16px 12px;
  font-size: 13px;
  color: #c0c4cc;
  text-align: center;
}
/* skeleton 占位（loading 中） */
.cell-skeleton {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cell-skeleton .sk-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f1f3 0%, #e6e8eb 50%, #f0f1f3 100%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.2s ease-in-out infinite;
}
.cell-skeleton .sk-line:nth-child(2) { width: 88%; }
.cell-skeleton .sk-line:nth-child(3) { width: 70%; }
.cell-skeleton .sk-line:nth-child(4) { width: 92%; }
.cell-skeleton .sk-line:nth-child(5) { width: 60%; }
@keyframes sk-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (max-width: 768px) {
  .cascade-row { grid-template-columns: 1fr; }
  .cell-dropdown { max-height: 200px; }
}

/* ============== 响应式 ============== */
@media (max-width: 768px) {
  .content-container { padding: 16px; }
  .nav-inner { padding: 0 16px; }
  .nav-action-btn span:not(.icon) { display: none; }
  .nav-action-btn .btn-icon { margin: 0; }
  .sidebar { display: none; }
}

/* ============== 联系客服弹窗 ============== */
.contact-modal-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  animation: cm-fade .18s ease-out;
}
.contact-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  z-index: 1001;
  padding: 28px 24px 22px;
  animation: cm-pop .22s cubic-bezier(.22,1,.36,1);
}
@keyframes cm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cm-pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.95); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.contact-modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  border-radius: 8px; cursor: pointer; color: #94a3b8;
  -webkit-tap-highlight-color: transparent;
}
.contact-modal-close:hover { background: #f1f5f9; color: #475569; }
.contact-modal-close .icon { width: 20px; height: 20px; }

.contact-modal-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; color: #191C1F;
  margin-bottom: 18px; justify-content: center;
}
.contact-modal-title .icon { width: 22px; height: 22px; }

.contact-modal-body {
  text-align: center;
}
.contact-loading {
  padding: 60px 0;
  color: #94a3b8; font-size: 14px;
}
.contact-qr-img {
  width: 220px; height: 220px;
  display: block; margin: 0 auto 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.contact-tip {
  font-size: 14px; color: #191C1F; font-weight: 600;
  margin-bottom: 4px;
}
.contact-tip-sub {
  font-size: 12px; color: #94a3b8;
}
.contact-empty-icon {
  padding: 24px 0 8px;
}
.contact-empty {
  font-size: 14px; color: #64748B;
  padding: 8px 0 14px;
}

