/* ========================================
   豆包文章管理系统 - 设计系统
   风格参考: 墨刀 modao.cc/brand
   主色: #FF5C3A (橙红) / 深色: #0D0D1A
   ======================================== */

:root {
  /* 品牌色系 */
  --brand-primary: #FF5C3A;
  --brand-primary-hover: #E84E2E;
  --brand-primary-light: rgba(255, 92, 58, 0.1);
  --brand-gradient: linear-gradient(135deg, #FF6B4A, #FF5C3A, #FF3D1A);
  --brand-gradient-soft: linear-gradient(135deg, rgba(255,107,74,0.15), rgba(255,92,58,0.05));

  /* 深色系 */
  --dark-bg: #0D0D1A;
  --dark-surface: #141428;
  --dark-card: #1A1A2E;
  --dark-border: rgba(255,255,255,0.08);

  /* 浅色系 */
  --light-bg: #F5F6F8;
  --light-surface: #FFFFFF;
  --light-card: #FFFFFF;
  --light-border: #E8E8ED;

  /* 文字色 */
  --text-primary: #1A1A2E;
  --text-secondary: #555566;
  --text-tertiary: #888899;
  --text-inverse: #FFFFFF;
  --text-brand: #FF5C3A;

  /* 功能色 */
  --success: #00C48C;
  --success-light: rgba(0,196,140,0.1);
  --warning: #FFB020;
  --warning-light: rgba(255,176,32,0.1);
  --danger: #FF4757;
  --danger-light: rgba(255,71,87,0.1);
  --info: #3B82F6;
  --info-light: rgba(59,130,246,0.1);

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);
  --shadow-brand: 0 4px 20px rgba(255,92,58,0.3);

  /* 玻璃态 */
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: rgba(255,255,255,0.3);
  --glass-blur: blur(20px);

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* 动画 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* 侧边栏 */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
}

/* ========================================
   全局重置
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input, textarea, select {
  font-family: inherit;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ========================================
   滚动条美化
   ======================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}

/* ========================================
   通用组件
   ======================================== */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-normal);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255,92,58,0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--light-surface);
  color: var(--text-primary);
  border: 1px solid var(--light-border);
}

.btn-secondary:hover {
  background: var(--light-bg);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* 输入框 */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  padding: 10px 14px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--light-surface);
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* 卡片 */
.card {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
}

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

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.badge-brand {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--light-bg);
  color: var(--text-secondary);
  border: 1px solid var(--light-border);
}

/* 头像 */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

/* 进度条 */
.progress-bar {
  height: 8px;
  background: var(--light-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--brand-gradient);
  transition: width var(--transition-slow);
}

/* 分割线 */
.divider {
  height: 1px;
  background: var(--light-border);
  margin: var(--space-lg) 0;
}

/* ========================================
   布局系统
   ======================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-width);
  background: var(--dark-bg);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: all var(--transition-normal);
}

.sidebar-brand {
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--dark-border);
  height: var(--header-height);
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.sidebar-brand-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sidebar-brand-text span {
  color: var(--brand-primary);
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-md);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: var(--space-lg);
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 0 var(--space-md);
  margin-bottom: var(--space-sm);
  letter-spacing: 1px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

.sidebar-link.active {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.sidebar-link-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-link-badge {
  margin-left: auto;
  background: var(--brand-primary);
  color: white;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* 侧边栏底部用户区 */
.sidebar-user {
  padding: var(--space-md);
  border-top: 1px solid var(--dark-border);
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-user-info:hover {
  background: rgba(255,255,255,0.06);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #FF6B4A, #FF3D1A);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
}

.sidebar-user-detail {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-plan {
  font-size: 11px;
  color: var(--brand-primary);
  font-weight: 500;
}

/* 侧边栏用户下拉菜单 */
.sidebar-user-wrap {
  position: relative;
  padding: var(--space-md);
  border-top: 1px solid var(--dark-border);
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
}

.sidebar-user-info:hover {
  background: rgba(255,255,255,0.06);
}

.sidebar-user-info .user-arrow {
  margin-left: auto;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  transition: transform var(--transition-fast);
}

.sidebar-user-wrap.open .sidebar-user-info .user-arrow {
  transform: rotate(180deg);
}

.sidebar-user-dropdown {
  position: absolute;
  bottom: 100%;
  left: var(--space-md);
  right: var(--space-md);
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-fast);
  overflow: hidden;
  z-index: 100;
}

.sidebar-user-wrap.open .sidebar-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sidebar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.sidebar-dropdown-item:hover {
  background: rgba(255,255,255,0.06);
  color: white;
}

.sidebar-dropdown-item.danger {
  color: var(--danger);
}

.sidebar-dropdown-item.danger:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.sidebar-dropdown-divider {
  height: 1px;
  background: var(--dark-border);
  margin: 4px 0;
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部栏 */
.topbar {
  height: var(--header-height);
  background: rgba(255,255,255,0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--light-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-tertiary);
}

.topbar-breadcrumb span.current {
  color: var(--text-primary);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.topbar-search {
  position: relative;
}

.topbar-search input {
  padding: 8px 14px 8px 36px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-full);
  font-size: 13px;
  width: 240px;
  background: var(--light-bg);
  transition: all var(--transition-fast);
}

.topbar-search input:focus {
  border-color: var(--brand-primary);
  width: 300px;
  background: white;
}

.topbar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 14px;
}

.topbar-notification {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.topbar-notification:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.topbar-notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--brand-primary);
  border-radius: var(--radius-full);
  border: 2px solid white;
}

.topbar-credits {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--brand-gradient-soft);
  border: 1px solid rgba(255,92,58,0.2);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.topbar-credits:hover {
  background: var(--brand-primary-light);
}

.topbar-credits-icon {
  font-size: 16px;
}

/* 页面内容区 */
.page-content {
  flex: 1;
  padding: var(--space-xl);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ========================================
   登录/注册页面
   ======================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
}

.auth-bg {
  flex: 1;
  background: var(--dark-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-3xl);
}

.auth-bg-pattern {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.auth-bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}

.auth-bg-circle-1 {
  width: 400px;
  height: 400px;
  background: var(--brand-primary);
  top: -100px;
  right: -100px;
}

.auth-bg-circle-2 {
  width: 300px;
  height: 300px;
  background: #6366F1;
  bottom: -50px;
  left: -50px;
}

.auth-bg-circle-3 {
  width: 200px;
  height: 200px;
  background: #FF9A3C;
  top: 50%;
  left: 30%;
}

.auth-bg-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 480px;
}

.auth-bg-logo {
  width: 64px;
  height: 64px;
  background: var(--brand-gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto var(--space-lg);
  box-shadow: 0 8px 32px rgba(255,92,58,0.4);
}

.auth-bg-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: var(--space-md);
  letter-spacing: -1px;
  line-height: 1.2;
}

.auth-bg-title span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-bg-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
}

.auth-bg-stats {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.auth-bg-stat {
  text-align: center;
}

.auth-bg-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-primary);
}

.auth-bg-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.auth-form-side {
  width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  background: var(--light-surface);
  position: relative;
}

.auth-form-container {
  width: 100%;
  max-width: 380px;
}

.auth-form-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-form-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-xl);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth-form .form-input {
  padding: 12px 16px;
  font-size: 14px;
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.auth-form-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  cursor: pointer;
}

.auth-form-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-primary);
}

.auth-form-forgot {
  color: var(--brand-primary);
  font-weight: 500;
  cursor: pointer;
}

.auth-form-submit {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  background: var(--brand-gradient);
  color: white;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-brand);
}

.auth-form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255,92,58,0.4);
}

.auth-form-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--text-tertiary);
  font-size: 13px;
}

.auth-form-divider::before,
.auth-form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light-border);
}

.auth-form-social {
  display: flex;
  gap: var(--space-md);
}

.auth-form-social-btn {
  flex: 1;
  padding: 10px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: white;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-form-social-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.auth-form-footer {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: 13px;
  color: var(--text-tertiary);
}

.auth-form-footer a {
  color: var(--brand-primary);
  font-weight: 600;
  cursor: pointer;
}

/* ========================================
   数据看板
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--light-border);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-card-icon.brand {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.stat-card-icon.success {
  background: var(--success-light);
  color: var(--success);
}

.stat-card-icon.warning {
  background: var(--warning-light);
  color: var(--warning);
}

.stat-card-icon.info {
  background: var(--info-light);
  color: var(--info);
}

.stat-card-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.stat-card-trend.up {
  color: var(--success);
  background: var(--success-light);
}

.stat-card-trend.down {
  color: var(--danger);
  background: var(--danger-light);
}

.stat-card-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* 看板图表区 */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.chart-card {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  padding: var(--space-lg);
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.chart-card-title {
  font-size: 16px;
  font-weight: 700;
}

.chart-card-actions {
  display: flex;
  gap: var(--space-sm);
}

.chart-tab {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chart-tab.active {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.chart-tab:hover:not(.active) {
  background: var(--light-bg);
}

/* 简易图表占位 */
.chart-area {
  height: 240px;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0 8px;
}

.chart-bar {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: var(--brand-gradient);
  transition: all var(--transition-normal);
  position: relative;
  cursor: pointer;
  min-height: 20px;
}

.chart-bar:hover {
  opacity: 0.85;
  transform: scaleY(1.02);
}

.chart-bar-label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* 活动列表 */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--light-border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.brand { background: var(--brand-primary); }
.activity-dot.success { background: var(--success); }
.activity-dot.warning { background: var(--warning); }

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

.activity-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.activity-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* 额度卡片 */
.quota-card {
  background: var(--brand-gradient);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  color: white;
  position: relative;
  overflow: hidden;
}

.quota-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.quota-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: 40px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.quota-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.quota-title {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
}

.quota-btn {
  padding: 6px 16px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.3);
  transition: all var(--transition-fast);
}

.quota-btn:hover {
  background: rgba(255,255,255,0.3);
}

.quota-value {
  font-size: 36px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.quota-value span {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.8;
}

.quota-progress {
  margin-top: var(--space-md);
  position: relative;
  z-index: 1;
}

.quota-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.quota-progress-fill {
  height: 100%;
  background: white;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.quota-progress-text {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 6px;
}

/* ========================================
   文章列表
   ======================================== */
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  gap: var(--space-md);
  flex-wrap: wrap;
}

.list-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
}

.list-search {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.list-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  background: var(--light-surface);
  transition: all var(--transition-fast);
}

.list-search input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.list-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
}

.list-filter-group {
  display: flex;
  gap: var(--space-sm);
}

.list-filter-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: white;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.list-filter-btn.active,
.list-filter-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.list-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* 表格 */
.data-table {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  overflow: hidden;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-align: left;
  background: var(--light-bg);
  border-bottom: 1px solid var(--light-border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--light-border);
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(255,92,58,0.02);
}

.data-table .article-title {
  font-weight: 600;
  color: var(--text-primary);
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table .article-category {
  display: inline-flex;
  padding: 2px 10px;
  background: var(--light-bg);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
}

.data-table .actions-cell {
  display: flex;
  gap: var(--space-sm);
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-fast);
  background: transparent;
  color: var(--text-tertiary);
}

.action-btn:hover {
  background: var(--light-bg);
}

.action-btn.edit:hover {
  background: var(--info-light);
  color: var(--info);
}

.action-btn.delete:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.action-btn.publish:hover {
  background: var(--success-light);
  color: var(--success);
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--light-border);
}

.pagination-info {
  font-size: 13px;
  color: var(--text-tertiary);
}

.pagination-btns {
  display: flex;
  gap: var(--space-xs);
}

.pagination-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--light-border);
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.pagination-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
}

/* ========================================
   文章编辑/生成
   ======================================== */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.editor-form-card {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  padding: var(--space-xl);
}

.editor-form-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-form-card-title .icon {
  color: var(--brand-primary);
}

.editor-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.template-item {
  padding: 10px 14px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: white;
  text-align: center;
}

.template-item:hover,
.template-item.selected {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

/* 关键词批量输入区 */
.kw-batch-input {
  width: 100%;
  min-height: 80px;
  max-height: 160px;
  padding: 10px 12px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
  font-family: var(--font-family);
  color: var(--text-primary);
}

.kw-batch-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.kw-batch-input::placeholder {
  color: var(--text-tertiary);
}

.kw-batch-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: 8px;
}

.kw-batch-actions .btn {
  font-size: 12px;
  padding: 5px 12px;
}

/* 关键词列表 */
.kw-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: var(--light-bg);
  border-radius: var(--radius-md);
  min-height: 36px;
}

.kw-list:empty {
  display: none;
}

.kw-list-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  transition: all var(--transition-fast);
  animation: kwFadeIn 0.2s ease;
}

@keyframes kwFadeIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

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

.kw-list-item .kw-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 11px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}

.kw-list-item .kw-remove:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.kw-list-count {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.kw-list-count span {
  color: var(--brand-primary);
  font-weight: 600;
}

/* 提示词模板多选 */
.tpl-select-box {
  position: relative;
}

.tpl-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 42px;
}

.tpl-select-trigger:hover {
  border-color: var(--brand-primary);
}

.tpl-select-trigger.open {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.tpl-select-trigger-text {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}

.tpl-select-trigger-text.has-value {
  color: var(--text-primary);
  font-weight: 500;
}

.tpl-select-arrow {
  font-size: 10px;
  color: var(--text-tertiary);
  transition: transform var(--transition-fast);
  margin-left: 8px;
}

.tpl-select-trigger.open .tpl-select-arrow {
  transform: rotate(180deg);
}

.tpl-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--transition-fast);
}

.tpl-select-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tpl-select-group {
  padding: 6px 0;
}

.tpl-select-group-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 6px 14px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tpl-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: 13px;
  color: var(--text-primary);
}

.tpl-select-option:hover {
  background: var(--light-bg);
}

.tpl-select-option.selected {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.tpl-select-checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--light-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  font-size: 11px;
  color: transparent;
}

.tpl-select-option.selected .tpl-select-checkbox {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
}

.tpl-select-option-icon {
  font-size: 16px;
}

.tpl-select-option-info {
  flex: 1;
  min-width: 0;
}

.tpl-select-option-name {
  font-weight: 500;
  font-size: 13px;
}

.tpl-select-option-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 已选模板标签 */
.tpl-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tpl-selected-tags:empty {
  display: none;
}

.tpl-selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  animation: kwFadeIn 0.2s ease;
}

.tpl-selected-tag .tpl-tag-remove {
  cursor: pointer;
  font-size: 13px;
  opacity: 0.6;
  line-height: 1;
}

.tpl-selected-tag .tpl-tag-remove:hover {
  opacity: 1;
}

/* 表单分区 */
.form-section {
  padding: var(--space-lg);
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
}

.form-section + .form-section {
  margin-top: var(--space-lg);
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--light-border);
}

.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.form-section-icon {
  font-size: 16px;
}

.form-section-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: auto;
}

/* 编辑器新布局 */
.editor-layout-v2 {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

/* ========================================
   生成文章页面 - 三栏均分布局
   ======================================== */
.editor-triple-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  align-items: start;
}

@media (max-width: 1200px) {
  .editor-triple-layout {
    grid-template-columns: 1fr;
  }
  .editor-split-layout {
    grid-template-columns: 1fr;
  }
  .editor-layout-v2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .editor-split-layout {
    grid-template-columns: 1fr;
  }
  .tpl-select-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 60vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 200;
  }
}

.keywords-area {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  min-height: 40px;
  padding: 8px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  background: white;
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
}

.keyword-tag-remove {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0.6;
}

.keyword-tag-remove:hover {
  opacity: 1;
}

.keywords-input {
  border: none;
  outline: none;
  font-size: 13px;
  flex: 1;
  min-width: 100px;
  padding: 4px;
}

/* 生成预览区 */
.preview-card {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--light-border);
}

.preview-title {
  font-size: 14px;
  font-weight: 700;
}

.preview-body {
  flex: 1;
  padding: var(--space-lg);
  overflow-y: auto;
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-tertiary);
  text-align: center;
}

.preview-placeholder-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.3;
}

.preview-placeholder-text {
  font-size: 14px;
}

.preview-article {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

.preview-article h2 {
  font-size: 20px;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-md);
}

.preview-article p {
  margin-bottom: var(--space-md);
}

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--light-border);
}

/* 生成进度 */
.gen-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-2xl);
}

.gen-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--light-border);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.gen-progress-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.gen-progress-sub {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ========================================
   生成文章页面 - 新版布局（左右各50%）
   ======================================== */
.editor-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.editor-left-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.editor-right-panel {
  display: flex;
  flex-direction: column;
}

/* 表单卡片（替代 editor-form-card） */
.form-card {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  overflow: hidden;
}

.form-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--light-border);
  background: linear-gradient(135deg, rgba(255,92,58,0.04), rgba(255,92,58,0.01));
}

.form-card-icon {
  font-size: 16px;
}

.form-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.form-card-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-left: auto;
}

.form-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* 两列并行表单行 */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* 关键词批量输入 */
.kw-batch-textarea {
  width: 100%;
  min-height: 80px;
  max-height: 160px;
  padding: 10px 12px;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
  font-family: var(--font-family);
  color: var(--text-primary);
}

.kw-batch-textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.kw-batch-textarea::placeholder {
  color: var(--text-tertiary);
}

.kw-batch-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.kw-count {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: auto;
}

.kw-count b {
  color: var(--brand-primary);
  font-weight: 600;
}

/* 关键词标签容器 */
.kw-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  padding: 8px 10px;
  background: var(--light-bg);
  border-radius: var(--radius-md);
}

.kw-tags-wrap:empty {
  display: none;
}

.kw-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  animation: kwFadeIn 0.2s ease;
}

@keyframes kwFadeIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

.kw-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 11px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}

.kw-tag-remove:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* 模板保存提示 */
.tpl-save-hint {
  font-size: 12px;
  color: var(--success);
}

/* 表单操作区 */
.form-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

/* 预览卡片（下方全宽） */
.preview-card {
  background: var(--light-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-border);
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--light-border);
}

.preview-title {
  font-size: 14px;
  font-weight: 700;
}

.preview-body {
  flex: 1;
  padding: var(--space-lg);
  overflow-y: auto;
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  color: var(--text-tertiary);
  text-align: center;
}

.preview-placeholder-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.3;
}

.preview-placeholder-text {
  font-size: 14px;
  line-height: 1.8;
}

.preview-article {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

.preview-article h2 {
  font-size: 20px;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-md);
}

.preview-article p {
  margin-bottom: var(--space-md);
}

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--light-border);
}

/* 生成进度 */
.gen-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-2xl);
  min-height: 300px;
}

.gen-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--light-border);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.gen-progress-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.gen-progress-sub {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ========================================
   会员/充值页面
   ======================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.pricing-card {
  background: var(--light-surface);
  border-radius: var(--radius-xl);
  border: 2px solid var(--light-border);
  padding: var(--space-xl);
  text-align: center;
  position: relative;
  transition: all var(--transition-normal);
  overflow: hidden;
}

.pricing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--brand-primary);
  box-shadow: 0 8px 40px rgba(255,92,58,0.15);
}

.pricing-card.featured::before {
  content: '推荐';
  position: absolute;
  top: 16px;
  right: -28px;
  background: var(--brand-gradient);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 36px;
  transform: rotate(45deg);
}

.pricing-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.pricing-price {
  margin-bottom: var(--space-lg);
}

.pricing-price-amount {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -2px;
}

.pricing-price-amount span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.pricing-price-period {
  font-size: 13px;
  color: var(--text-tertiary);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-xl);
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-features li .check {
  color: var(--success);
  font-weight: 700;
  font-size: 16px;
}

.pricing-features li .cross {
  color: var(--text-tertiary);
  font-weight: 700;
  font-size: 16px;
}

.pricing-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.pricing-btn-primary {
  background: var(--brand-gradient);
  color: white;
  box-shadow: var(--shadow-brand);
}

.pricing-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255,92,58,0.4);
}

.pricing-btn-secondary {
  background: var(--light-bg);
  color: var(--text-primary);
  border: 1.5px solid var(--light-border);
}

.pricing-btn-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* 充值区 */
.recharge-section {
  background: var(--light-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--light-border);
  padding: var(--space-xl);
}

.recharge-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.recharge-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.recharge-option {
  padding: var(--space-lg);
  border: 2px solid var(--light-border);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.recharge-option:hover,
.recharge-option.selected {
  border-color: var(--brand-primary);
  background: var(--brand-primary-light);
}

.recharge-option-amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.recharge-option-credits {
  font-size: 13px;
  color: var(--brand-primary);
  font-weight: 600;
  margin-top: 4px;
}

.recharge-option-bonus {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--brand-gradient);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ========================================
   Toast 通知
   ======================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--light-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  animation: toastIn 0.3s ease;
  border-left: 3px solid var(--brand-primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ========================================
   模态框
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--light-surface);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--light-border);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: none;
  border: none;
  font-size: 18px;
}

.modal-close:hover {
  background: var(--light-bg);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--light-border);
}

/* ========================================
   移动端菜单按钮
   ======================================== */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  background: var(--light-bg);
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  .recharge-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-overlay.active {
    display: block;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .topbar-search {
    display: none;
  }

  .auth-bg {
    display: none;
  }

  .auth-form-side {
    width: 100%;
  }

  .page-content {
    padding: var(--space-md);
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .list-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .list-toolbar-left {
    flex-direction: column;
  }

  .list-search {
    max-width: 100%;
  }

  .template-grid {
    grid-template-columns: 1fr;
  }

  .recharge-options {
    grid-template-columns: 1fr;
  }

  .data-table {
    overflow-x: auto;
  }

  .auth-bg-stats {
    flex-direction: column;
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 0 var(--space-md);
  }

  .stat-card-value {
    font-size: 22px;
  }

  .pricing-card {
    padding: var(--space-lg);
  }
}
