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

/* ===== 登录页面 ===== */
.auth-page {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #fdf4ff 0%, #f3e8ff 50%, #e9d5ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

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

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-badge {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #c026d3, #9333ea);
  color: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(192, 38, 211, 0.3);
}

.auth-logo-text {
  font-size: 24px;
  font-weight: 700;
  color: #86198f;
  font-family: 'Noto Serif SC', serif;
  margin-bottom: 2px;
}

.auth-logo-sub {
  font-size: 12px;
  color: #a855f7;
  letter-spacing: 2px;
}

.auth-card {
  background: white;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 4px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-form .form-row {
  margin-bottom: 16px;
}

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

.auth-form .form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
}

.auth-form .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(192, 38, 211, 0.1);
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-4);
  font-size: 12px;
}

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

.auth-tip {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #a855f7;
}

/* ===== 用户菜单 ===== */
.sidebar-footer {
  position: relative;
}

.user-info {
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 12px;
  padding: 8px;
  margin: -8px;
}

.user-info:hover {
  background: var(--bg-hover);
}

.sync-status {
  font-size: 12px;
  color: var(--text-3);
}

.sync-status.online {
  color: #10b981;
}

.user-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 100;
}

.user-menu-item {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.2s;
}

.user-menu-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

:root {
  /* 主色调 - 粉紫渐变系 */
  --primary: #c026d3;
  --primary-light: #e879f9;
  --primary-dark: #a21caf;
  --primary-bg: #fdf4ff;
  --primary-soft: #fae8ff;
  --primary-gradient: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  --primary-gradient-soft: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 50%, #f5d0fe 100%);
  --banner-gradient: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 50%, #f5d0fe 100%);

  /* 中性色 */
  --text-1: #1a1a2e;
  --text-2: #4a4a68;
  --text-3: #787890;
  --text-4: #a0a0b8;

  /* 背景色 */
  --bg-sidebar: #faf8ff;
  --bg-main: #ffffff;
  --bg-hover: #f3f0ff;
  --bg-active: #ede9fe;
  --bg-soft: #f9f8fc;

  /* 边框 */
  --border-1: #e8e4f0;
  --border-2: #f0edf6;

  /* 其他 */
  --shadow-sm: 0 1px 2px rgba(192, 38, 211, 0.05);
  --shadow-md: 0 4px 12px rgba(192, 38, 211, 0.08);
  --shadow-lg: 0 8px 24px rgba(192, 38, 211, 0.1);
  --shadow-xl: 0 12px 32px rgba(192, 38, 211, 0.12);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(180deg, #fef9ff 0%, #fdf4ff 100%);
  min-height: 100vh;
}

/* ===== 图标样式 ===== */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
}

.icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 导航图标 */
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.nav-icon .icon {
  width: 18px;
  height: 18px;
}

/* 子标签图标 */
.sub-tab .icon {
  width: 16px;
  height: 16px;
}

/* 模块卡片图标 */
.module-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--card-color, #8b5cf6);
}

.module-card-icon .icon {
  width: 24px;
  height: 24px;
}

/* 统计卡片图标 */
.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

.stat-icon .icon {
  width: 28px;
  height: 28px;
}

/* 页面标题图标 */
.page-title .icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  vertical-align: -4px;
}

/* 板块标题图标 */
.section-head-icon .icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  vertical-align: -3px;
  color: var(--primary);
}

/* 列表项图标 */
.item-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-3);
}

.item-type-icon .icon {
  width: 18px;
  height: 18px;
}

/* 类型筛选标签 */
.type-filter-chip .icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

/* 搜索图标 */
.list-search-icon .icon,
.search-icon-mini .icon {
  width: 100%;
  height: 100%;
}

/* 视图切换按钮 */
.view-toggle-btn .icon {
  width: 16px;
  height: 16px;
}

/* 批量选择按钮 */
.batch-select-btn .icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

/* 欢迎横幅图标 */
.welcome-wave .icon {
  width: 24px;
  height: 24px;
}

/* 壁纸设置按钮 */
.wallpaper-settings-btn .icon {
  width: 18px;
  height: 18px;
}

/* 编辑排序按钮 */
.section-edit-btn .icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

/* ===== 工作台布局 ===== */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ===== 左侧导航栏 ===== */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #faf8ff 0%, #fdf4ff 100%);
  border-right: 1px solid var(--border-1);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: width 0.3s ease;
  overflow: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  flex-shrink: 0;
}

.workspace-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  flex: 1;
  min-width: 0;
}

.workspace-logo:hover {
  background: var(--bg-hover);
}

.logo-badge {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.logo-text-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar.collapsed .logo-text-wrap {
  display: none;
}

.logo-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-4);
  letter-spacing: 1px;
  font-weight: 500;
  white-space: nowrap;
}

.collapse-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 14px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.collapse-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.sidebar.collapsed .collapse-btn .collapse-icon {
  transform: rotate(180deg);
}

.collapse-icon {
  transition: transform 0.3s ease;
  display: block;
  line-height: 1;
}

/* 导航菜单 */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-group {
  margin-bottom: 8px;
}

.nav-group-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px 6px;
  white-space: nowrap;
}

.sidebar.collapsed .nav-group-title {
  display: none;
}

.nav-list {
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-2);
  margin-bottom: 2px;
  position: relative;
  white-space: nowrap;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: linear-gradient(180deg, #ec4899, #8b5cf6);
  border-radius: 0 2px 2px 0;
}

.sidebar.collapsed .nav-item.active::before {
  display: none;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .nav-label {
  display: none;
}

.nav-count {
  font-size: 11px;
  color: var(--text-4);
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.sidebar.collapsed .nav-count {
  display: none;
}

.nav-item.active .nav-count {
  background: rgba(192, 38, 211, 0.15);
  color: var(--primary-dark);
}

/* 底部用户信息 */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-2);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
}

.user-info:hover {
  background: var(--bg-hover);
}

.sidebar.collapsed .user-info {
  justify-content: center;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

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

.sidebar.collapsed .user-detail {
  display: none;
}

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

.user-role {
  font-size: 11px;
  color: var(--text-4);
}

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

.main-area.expanded {
  margin-left: var(--sidebar-collapsed-width);
}

/* 顶部栏 */
.top-bar {
  height: 56px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-1);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text-2);
  border-radius: 1px;
}

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

.breadcrumb-current {
  color: var(--text-1);
  font-weight: 500;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-search {
  position: relative;
  width: 240px;
}

.search-icon-mini {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.5;
}

.top-search-input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  background: var(--bg-soft);
  transition: all 0.2s ease;
  font-family: inherit;
}

.top-search-input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: var(--bg-main);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.08);
}

.add-btn-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.25);
}

.add-btn-top:hover {
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
  transform: translateY(-1px);
}

.add-icon {
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

/* 子标签导航 */
.sub-tabs-bar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-1);
  padding: 0 24px;
  position: sticky;
  top: 56px;
  z-index: 40;
}

.sub-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sub-tabs::-webkit-scrollbar {
  display: none;
}

.sub-tab {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-tab:hover {
  color: var(--primary);
}

.sub-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.sub-tab-count {
  font-size: 11px;
  background: var(--bg-soft);
  padding: 1px 7px;
  border-radius: 10px;
  color: var(--text-4);
}

.sub-tab.active .sub-tab-count {
  background: rgba(192, 38, 211, 0.1);
  color: var(--primary-dark);
}

/* 内容区 */
.content-area {
  flex: 1;
  padding: 24px 32px 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  background: transparent;
}

.page-view {
  animation: fadeIn 0.3s ease;
}

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

/* ===== 页面头部 ===== */
.page-header {
  margin-bottom: 24px;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.page-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
}

.page-desc {
  font-size: 13px;
  color: var(--text-3);
}

/* ===== 概览卡片 ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-main);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.25s ease;
}

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

.stat-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ===== 首页仪表盘 ===== */
.dashboard-view {
  animation: fadeIn 0.3s ease;
}

/* 欢迎横幅 - 粉紫渐变 */
.welcome-banner {
  background: var(--banner-gradient);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  color: #86198f;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.15);
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.welcome-content {
  position: relative;
  z-index: 1;
}

.welcome-greeting {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.welcome-wave {
  font-size: 28px;
  animation: wave 2s ease-in-out infinite;
  display: inline-block;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
}

.welcome-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: #86198f;
}

.welcome-desc {
  font-size: 13.5px;
  opacity: 0.75;
  margin-top: 4px;
}

.welcome-stats {
  display: flex;
  gap: 32px;
  position: relative;
  z-index: 1;
}

.welcome-stat {
  text-align: center;
}

.welcome-stat-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
  color: #a21caf;
}

.welcome-stat-label {
  font-size: 12px;
  opacity: 0.7;
}

.wallpaper-settings-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 6px 10px;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--primary-dark);
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
  font-family: inherit;
  opacity: 0.7;
}

.wallpaper-settings-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 1;
}

.wallpaper-settings-btn .icon {
  width: 14px;
  height: 14px;
}

.wallpaper-banner-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

/* 每日壁纸横幅 */
.wallpaper-banner {
  height: 240px;
  border-radius: var(--radius-xl);
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  background: var(--banner-gradient);
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.15);
}

.wallpaper-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.wallpaper-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 36px;
  z-index: 1;
}

.wallpaper-banner-text {
  color: #86198f;
}

.wallpaper-banner-greeting {
  font-family: 'Noto Serif SC', serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.wallpaper-banner-desc {
  font-size: 14px;
  opacity: 0.8;
}

.wallpaper-banner-stats {
  display: flex;
  gap: 24px;
}

.wallpaper-banner-stat {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 14px 24px;
  text-align: center;
  color: #86198f;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.wallpaper-banner-stat-num {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2px;
}

.wallpaper-banner-stat-label {
  font-size: 11px;
  opacity: 0.8;
}

/* 有图片时的文字样式 */
.wallpaper-banner:has(.wallpaper-banner-img) .wallpaper-banner-text {
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.wallpaper-banner:has(.wallpaper-banner-img) .wallpaper-banner-desc {
  opacity: 0.9;
}

.wallpaper-banner:has(.wallpaper-banner-img) .wallpaper-banner-stat {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.wallpaper-banner:has(.wallpaper-banner-img) .wallpaper-banner-overlay {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.3) 0%, rgba(139, 92, 246, 0.2) 100%);
}

/* ===== 内容板块 ===== */
.section-block {
  margin-bottom: 32px;
}

.section-block.dragging {
  opacity: 0.5;
}

.section-block.drag-over {
  border: 2px dashed var(--primary);
  border-radius: var(--radius-xl);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-2);
}

.section-head-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-left: 12px;
}

.section-head-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.section-head-icon {
  font-size: 18px;
  color: var(--primary);
}

.section-head-sub {
  font-size: 12px;
  color: var(--text-4);
}

.section-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.section-edit-btn {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid var(--border-1);
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-3);
  transition: all 0.2s ease;
}

.section-edit-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.drag-handle {
  cursor: grab;
  padding: 4px 8px;
  color: var(--text-4);
  font-size: 16px;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.section-order-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-1);
  background: var(--bg-main);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.section-order-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.module-card {
  background: var(--bg-main);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-color, var(--primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.module-card:hover {
  border-color: var(--card-color, var(--primary));
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.12);
}

.module-card:hover::before {
  transform: scaleX(1);
}

.module-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
}

.module-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}

.module-card-desc {
  font-size: 12px;
  color: var(--text-4);
  line-height: 1.5;
  margin-bottom: 12px;
  min-height: 36px;
}

.module-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-2);
}

.module-card-count {
  font-size: 12px;
  color: var(--text-3);
}

.module-card-count strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--card-color, var(--primary));
}

.module-card-arrow {
  font-size: 13px;
  color: var(--text-4);
  transition: all 0.2s ease;
}

.module-card:hover .module-card-arrow {
  color: var(--card-color, var(--primary));
  transform: translateX(3px);
}

/* ===== 列表视图工具栏 ===== */
.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.list-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.list-toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.list-search-wrap {
  position: relative;
  min-width: 240px;
}

.list-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  opacity: 0.5;
}

.list-search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-main);
  transition: all 0.2s ease;
  font-family: inherit;
}

.list-search-input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.08);
}

.view-toggle {
  display: flex;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-toggle-btn {
  padding: 8px 12px;
  background: var(--bg-main);
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-toggle-btn.active {
  background: var(--primary);
  color: white;
}

.view-toggle-btn:hover:not(.active) {
  background: var(--bg-hover);
  color: var(--primary);
}

.sort-select, .type-filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-main);
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
}

.sort-select:focus, .type-filter-select:focus {
  outline: none;
  border-color: var(--primary-light);
}

.batch-select-btn {
  padding: 8px 14px;
  border: 1px solid var(--border-1);
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.batch-select-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.batch-select-btn.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* ===== 类型筛选 ===== */
.type-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.type-filter-chip {
  padding: 6px 14px;
  background: var(--bg-main);
  border: 1px solid var(--border-1);
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.type-filter-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.type-filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ===== 标签筛选 ===== */
.tags-filter {
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
}

.filter-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.filter-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  padding: 4px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-1);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tag-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.tag-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.tag-chip .tag-count {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 4px;
}

/* ===== 卡片网格内容视图 ===== */
.content-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.content-card {
  background: var(--bg-main);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.content-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.content-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(192, 38, 211, 0.15);
}

.content-card-checkbox {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

.content-card-thumb {
  height: 120px;
  background: linear-gradient(135deg, #fdf4ff, #fae8ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
}

.content-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-card-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-2);
}

.content-card-body {
  padding: 12px 14px;
}

.content-card-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 38px;
}

.content-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-4);
}

.content-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.content-card-tag {
  font-size: 10px;
  padding: 1px 6px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  border-radius: 8px;
}

/* ===== 列表内容视图 ===== */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-1);
}

.item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.item-row:hover {
  background: var(--bg-hover);
}

.item-row.selected {
  background: var(--primary-soft);
}

.item-row + .item-row {
  border-top: 1px solid var(--border-2);
}

.item-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.item-type-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.item-title-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-1);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.item-tags-inline {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.item-tag-mini {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  border-radius: 10px;
  font-weight: 500;
}

.item-link-indicator {
  font-size: 13px;
  color: var(--primary);
  flex-shrink: 0;
}

.item-date-text {
  font-size: 12px;
  color: var(--text-4);
  flex-shrink: 0;
  width: 80px;
  text-align: right;
}

/* ===== 批量操作栏 ===== */
.batch-action-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-main);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px 20px;
  display: none;
  align-items: center;
  gap: 24px;
  z-index: 300;
  animation: slideUp 0.3s ease;
}

.batch-action-bar.active {
  display: flex;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.batch-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.batch-count {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.batch-label {
  font-size: 13px;
  color: var(--text-3);
}

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

.batch-btn {
  padding: 7px 14px;
  border: 1px solid var(--border-1);
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.batch-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.batch-btn.danger:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.batch-btn.cancel {
  background: var(--bg-soft);
}

/* ===== 编辑模式栏 ===== */
.edit-mode-bar {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 10px 24px;
  display: none;
  align-items: center;
  gap: 24px;
  z-index: 300;
  animation: slideDown 0.3s ease;
}

.edit-mode-bar.active {
  display: flex;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.edit-mode-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

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

.edit-mode-btn {
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edit-mode-btn.primary {
  background: white;
  color: var(--primary);
  font-weight: 500;
}

.edit-mode-btn.cancel {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.edit-mode-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: all 0.25s ease;
  box-shadow: var(--shadow-xl);
}

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

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

.modal-head-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-soft);
  border-radius: 6px;
  font-size: 20px;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--border-1);
  color: var(--text-1);
}

.modal-body {
  padding: 20px 24px;
}

.form-row {
  margin-bottom: 18px;
}

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

.required {
  color: #e74c3c;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--bg-main);
  transition: all 0.2s ease;
  color: var(--text-1);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.08);
}

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

.form-range {
  width: 100%;
  accent-color: var(--primary);
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-1);
}

.btn {
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border-1);
}

.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--text-1);
}

/* ===== 类型选择器 ===== */
.type-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-main);
}

.type-option:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
}

.type-option.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.type-icon {
  font-size: 22px;
}

.type-name {
  font-size: 11px;
  color: var(--text-3);
}

.type-option.active .type-name {
  color: var(--primary-dark);
  font-weight: 500;
}

/* ===== 文件上传区域 ===== */
.file-upload-area {
  border: 2px dashed var(--border-1);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  background: var(--bg-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-area.small {
  padding: 20px;
}

.file-upload-area:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
}

.upload-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.file-upload-area.small .upload-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.upload-text {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 11px;
  color: var(--text-4);
}

.upload-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-hover);
  border-radius: 4px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.upload-progress-text {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  min-width: 40px;
  text-align: right;
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-1);
}

.file-remove-btn {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--text-4);
  cursor: pointer;
  font-size: 16px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.file-remove-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ===== 封面选择器 ===== */
.book-cover-picker {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cover-preview {
  width: 80px;
  height: 110px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cover-options {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cover-upload-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.cover-upload-btn,
.cover-remove-btn {
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid var(--border-2);
  background: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.2s ease;
  font-family: inherit;
}

.cover-upload-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

.cover-remove-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fef2f2;
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.cover-emoji-row,
.cover-color-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cover-emoji-option {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  background: var(--bg-soft);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.cover-emoji-option:hover {
  background: var(--primary-bg);
}

.cover-emoji-option.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.cover-color-option {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.cover-color-option.active {
  border-color: var(--text-1);
  transform: scale(1.1);
}

/* ===== 壁纸设置 ===== */
.wallpaper-source-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.wp-source-option {
  padding: 16px 12px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-main);
}

.wp-source-option:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
}

.wp-source-option.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.wp-source-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.wp-source-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 2px;
}

.wp-source-desc {
  font-size: 11px;
  color: var(--text-4);
}

.wallpaper-preview {
  height: 140px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-1);
}

.wallpaper-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.custom-wallpaper-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.custom-wallpaper-item {
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.custom-wallpaper-item:hover {
  border-color: var(--primary-light);
}

.custom-wallpaper-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.custom-wallpaper-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ===== 图书馆 ===== */
.library-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.library-stat-card {
  background: var(--bg-main);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.library-stat-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.library-stat-icon {
  font-size: 28px;
}

.library-stat-info {
  flex: 1;
  min-width: 0;
}

.library-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
}

.library-stat-label {
  font-size: 12px;
  color: var(--text-3);
}

.library-add-btn {
  padding: 10px 20px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.25);
  transition: all 0.2s ease;
}

.library-add-btn:hover {
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
  transform: translateY(-1px);
}

/* 书架视图 */
.bookshelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px 16px;
}

.book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.book-card:hover {
  transform: translateY(-4px);
}

.book-card.selected .book-cover {
  box-shadow: 0 0 0 3px var(--primary);
}

.book-card-checkbox {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.book-cover {
  width: 100px;
  height: 140px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  transition: all 0.25s ease;
}

.book-card:hover .book-cover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.book-status-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
}

.book-status-reading { background: #10b981; }
.book-status-want { background: #f59e0b; }
.book-status-finished { background: #8b5cf6; }

.book-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

.book-progress-fill {
  height: 100%;
  background: white;
  transition: width 0.3s ease;
}

.book-info {
  text-align: center;
  width: 100%;
}

.book-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 36px;
}

.book-author {
  font-size: 11px;
  color: var(--text-4);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 图书馆列表视图 */
.book-list-table {
  background: var(--bg-main);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.book-list-header {
  display: grid;
  grid-template-columns: 40px 60px 1fr 120px 100px 100px 80px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-1);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  align-items: center;
}

.book-list-row {
  display: grid;
  grid-template-columns: 40px 60px 1fr 120px 100px 100px 80px;
  padding: 12px 16px;
  align-items: center;
  border-bottom: 1px solid var(--border-2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.book-list-row:hover {
  background: var(--bg-hover);
}

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

.book-list-row.selected {
  background: var(--primary-soft);
}

.book-list-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.book-list-cover {
  width: 40px;
  height: 56px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.book-list-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-list-author {
  font-size: 12px;
  color: var(--text-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-list-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  text-align: center;
  display: inline-block;
}

.status-want { background: #fef3c7; color: #b45309; }
.status-reading { background: #d1fae5; color: #047857; }
.status-finished { background: #ede9fe; color: #6d28d9; }

.book-list-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.book-list-tag {
  font-size: 10px;
  padding: 1px 6px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  border-radius: 8px;
}

.book-list-progress {
  font-size: 12px;
  color: var(--text-3);
}

.book-list-date {
  font-size: 12px;
  color: var(--text-4);
}

/* ===== 详情侧边栏 ===== */
.detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.detail-overlay.active {
  opacity: 1;
  visibility: visible;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: -500px;
  width: 480px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-main);
  z-index: 201;
  box-shadow: -4px 0 20px rgba(236, 72, 153, 0.08);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.detail-panel.active {
  right: 0;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-1);
  flex-shrink: 0;
}

.detail-back {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.detail-back:hover {
  background: var(--bg-soft);
  color: var(--text-1);
}

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

.detail-action-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-1);
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.detail-action-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.detail-action-btn.danger:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.detail-type-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 10px;
}

.detail-category-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 14px;
  margin-left: 8px;
}

.detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 10px;
  line-height: 1.4;
}

.detail-meta {
  font-size: 12px;
  color: var(--text-4);
  margin-bottom: 16px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-tags .item-tag-mini {
  font-size: 12px;
  padding: 4px 12px;
}

.detail-content {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 20px;
}

/* ===== 预览区域 ===== */
.detail-preview-wrap {
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.detail-preview-image {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-soft);
}

.detail-preview-image img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
}

.detail-preview-video {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.detail-preview-video video {
  width: 100%;
  max-height: 400px;
  display: block;
}

.detail-preview-text {
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.detail-preview-text-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-1);
}

.detail-preview-text-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.detail-preview-text-actions {
  display: flex;
  gap: 8px;
}

.preview-text-btn {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid var(--border-2);
  background: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.2s ease;
  font-family: inherit;
}

.preview-text-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.preview-text-btn.save {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
}

.preview-text-btn.save:hover {
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.detail-preview-text-content {
  padding: 16px;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-1);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 400px;
  overflow-y: auto;
  background: white;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

.detail-preview-text-editor {
  width: 100%;
  min-height: 300px;
  padding: 16px;
  border: none;
  outline: none;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-1);
  resize: vertical;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  background: #fefce8;
}

/* 文档预览提示 */
.detail-preview-doc {
  padding: 20px;
}

.doc-preview-hint {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-2);
}

.doc-preview-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.doc-preview-info {
  flex: 1;
  min-width: 0;
}

.doc-preview-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-preview-desc {
  font-size: 12px;
  color: var(--text-4);
}

.detail-file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-1);
  margin-bottom: 16px;
}

.detail-file-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.detail-file-info {
  flex: 1;
  min-width: 0;
}

.detail-file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-file-size {
  font-size: 12px;
  color: var(--text-4);
}

.detail-file-replace {
  padding: 8px 12px;
  background: white;
  color: var(--text-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-family: inherit;
}

.detail-file-replace:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

.detail-file-download {
  padding: 8px 16px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.detail-file-download:hover {
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.detail-link-wrap {
  margin-top: 16px;
}

.detail-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary-bg);
  color: var(--primary-dark);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.detail-link-btn:hover {
  background: var(--primary-soft);
}

/* ===== 子分类板块 ===== */
.sub-section {
  margin-bottom: 28px;
}

.sub-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sub-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.sub-section-count {
  font-size: 12px;
  color: var(--text-4);
}

.sub-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.sub-cat-card {
  background: var(--bg-main);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub-cat-card:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
}

.sub-cat-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.sub-cat-info {
  flex: 1;
  min-width: 0;
}

.sub-cat-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 2px;
}

.sub-cat-num {
  font-size: 11px;
  color: var(--text-4);
}

/* ===== 空状态 ===== */
.empty-state {
  padding: 60px 20px;
  text-align: center;
}

.empty-illustration {
  font-size: 48px;
  margin-bottom: 14px;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 13px;
  color: var(--text-4);
}

/* ===== 设置页面 ===== */
.settings-container {
  padding: 0;
}

.settings-page {
  padding: 8px 4px 40px;
}

.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.page-desc {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.setting-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-2);
  transition: all 0.2s ease;
}

.setting-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
  transform: translateY(-2px);
}

.setting-card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 12px;
}

.setting-card-icon .icon {
  width: 24px;
  height: 24px;
}

.setting-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 8px 0;
}

.setting-card-desc {
  font-size: 13px;
  color: var(--text-3);
  margin: 0 0 12px 0;
}

.setting-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
}

.setting-list li {
  margin-bottom: 4px;
}

.settings-section {
  margin-bottom: 32px;
}

.settings-section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section-title .icon {
  width: 20px;
  height: 20px;
}

.settings-section-desc {
  font-size: 13px;
  color: var(--text-3);
  margin: 0 0 16px 0;
}

.settings-tip-box {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.settings-tip-box p {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

.settings-tip-box p:last-child {
  margin-bottom: 0;
}

/* 自定义名称列表 */
.custom-name-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.custom-name-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.custom-name-item:hover {
  border-color: var(--primary-light);
}

.custom-name-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  flex-shrink: 0;
}

.custom-name-icon .icon {
  width: 18px;
  height: 18px;
}

.custom-name-info {
  flex: 1;
  min-width: 0;
}

.custom-name-group {
  font-size: 11px;
  color: var(--text-4);
  margin-bottom: 2px;
}

.custom-name-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  font-family: inherit;
  outline: none;
  padding: 2px 0;
}

.custom-name-input:focus {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0;
}

.custom-name-reset {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg-2);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.custom-name-reset:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* 设置操作按钮 */
.settings-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--border-2);
  background: white;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.settings-action-btn:hover {
  border-color: var(--primary-light);
  background: var(--bg-2);
}

.settings-action-btn .icon {
  width: 18px;
  height: 18px;
}

.settings-action-btn.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.settings-action-btn.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.settings-action-btn.danger {
  color: #ef4444;
  border-color: #fecaca;
}

.settings-action-btn.danger:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

/* 设置统计 */
.settings-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.settings-stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border-2);
}

.settings-stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.settings-stat-label {
  font-size: 13px;
  color: var(--text-3);
}

/* 关于页面 */
.about-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  margin-bottom: 32px;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.about-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.about-logo-inner {
  font-size: 36px;
  font-weight: 700;
  color: white;
  font-family: 'Noto Serif SC', serif;
}

.about-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 4px 0;
}

.about-subtitle {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 2px;
  margin: 0 0 12px 0;
}

.about-desc {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 16px 0;
}

.about-version {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  font-size: 12px;
  color: var(--primary-dark);
  font-weight: 500;
}

/* 功能列表 */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: white;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  flex-shrink: 0;
}

.feature-icon .icon {
  width: 20px;
  height: 20px;
}

.feature-info {
  flex: 1;
  min-width: 0;
}

.feature-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 2px;
}

.feature-desc {
  font-size: 12px;
  color: var(--text-3);
}

/* ===== 分享弹窗 ===== */
.share-modal {
  max-width: 480px;
}

.share-preview {
  background: var(--bg-2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.share-preview-type {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 8px;
}

.share-preview-type .icon {
  width: 20px;
  height: 20px;
}

.share-preview-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}

.share-link-section label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 8px;
}

.share-link-input-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.share-link-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: white;
  color: var(--text-1);
}

.share-copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.share-copy-btn:hover {
  background: var(--primary-dark);
}

.share-copy-btn .icon {
  width: 16px;
  height: 16px;
}

.share-tip {
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
}

/* 分享内容查看弹窗 */
.share-content-modal {
  max-width: 560px;
}

.shared-content-type {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 12px;
}

.shared-content-type .icon {
  width: 20px;
  height: 20px;
}

.shared-content-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 16px 0;
}

.shared-content-body {
  margin-bottom: 16px;
}

.shared-text-content {
  background: var(--bg-2);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
}

.shared-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-2);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--primary);
  font-size: 14px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.shared-link:hover {
  background: rgba(139, 92, 246, 0.1);
}

.shared-link .icon {
  width: 18px;
  height: 18px;
}

.shared-image {
  max-width: 100%;
  border-radius: var(--radius-md);
}

.shared-file-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-2);
  border-radius: var(--radius-md);
}

.shared-file-info .icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.shared-file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 6px;
}

.shared-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.shared-download-btn .icon {
  width: 14px;
  height: 14px;
}

.shared-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.shared-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-2);
  text-align: center;
}

.shared-footer p {
  font-size: 13px;
  color: var(--text-3);
  margin: 0 0 12px 0;
}

/* ===== 分享只读模式 ===== */
.shared-readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border-radius: 20px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 16px;
}

.shared-readonly-badge .icon {
  width: 14px;
  height: 14px;
}

.shared-file-readonly {
  font-size: 12px;
  color: var(--text-4);
  margin-top: 4px;
}

/* ===== 回收站 ===== */
.recycle-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recycle-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.recycle-item:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.06);
}

.recycle-item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  border-radius: 10px;
  flex-shrink: 0;
}

.recycle-item-icon .icon {
  width: 20px;
  height: 20px;
}

.recycle-item-info {
  flex: 1;
  min-width: 0;
}

.recycle-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recycle-item-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-4);
}

.recycle-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.recycle-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--border-2);
  background: white;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  color: var(--text-2);
}

.recycle-btn .icon {
  width: 14px;
  height: 14px;
}

.recycle-btn.restore:hover {
  border-color: #10b981;
  color: #10b981;
  background: #ecfdf5;
}

.recycle-btn.delete:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fef2f2;
}

/* ===== 邮件通知设置 ===== */
.email-settings-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-2);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-1);
}

.setting-row:last-of-type {
  border-bottom: none;
}

.setting-row label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}

.setting-input {
  width: 280px;
  padding: 8px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-1);
  outline: none;
  transition: border-color 0.2s ease;
}

.setting-input:focus {
  border-color: var(--primary);
}

/* 开关按钮 */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.settings-tip-text {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-1);
  font-size: 12px;
  color: var(--text-4);
  line-height: 1.7;
}

.settings-tip-text a {
  text-decoration: none;
}

/* ===== 访问记录 ===== */
.visit-record-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visit-record-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
}

.visit-record-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary);
  border-radius: 10px;
  flex-shrink: 0;
}

.visit-record-icon .icon {
  width: 18px;
  height: 18px;
}

.visit-record-info {
  flex: 1;
  min-width: 0;
}

.visit-record-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visit-record-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-4);
}

.visit-record-type {
  flex-shrink: 0;
  padding: 4px 10px;
  background: var(--bg-2);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-3);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .library-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .welcome-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 20px;
  }

  .welcome-stats {
    gap: 24px;
  }

  .welcome-stat-num {
    font-size: 22px;
  }

  .wallpaper-banner {
    height: 200px;
  }

  .wallpaper-banner-overlay {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
  }

  .wallpaper-banner-stats {
    gap: 12px;
  }

  .wallpaper-banner-stat {
    padding: 10px 16px;
  }

  .wallpaper-banner-stat-num {
    font-size: 18px;
  }

  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-area {
    margin-left: 0 !important;
  }

  .menu-toggle {
    display: flex;
  }

  .content-area {
    padding: 16px;
  }

  .top-bar {
    padding: 0 16px;
  }

  .sub-tabs-bar {
    padding: 0 16px;
  }

  .top-search {
    display: none;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .item-date-text {
    display: none;
  }

  .detail-panel {
    width: 100%;
    max-width: 100%;
  }

  .page-title {
    font-size: 20px;
  }

  .collapse-btn {
    display: none;
  }

  .type-selector {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .book-list-header,
  .book-list-row {
    grid-template-columns: 30px 50px 1fr 80px;
  }

  .book-list-author,
  .book-list-tags,
  .book-list-date {
    display: none;
  }

  .library-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .batch-action-bar {
    left: 16px;
    right: 16px;
    transform: none;
    flex-wrap: wrap;
    gap: 12px;
  }

  .batch-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .add-label {
    display: none;
  }

  .add-btn-top {
    padding: 7px 10px;
  }

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

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

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

  .list-toolbar-left,
  .list-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .list-search-wrap {
    min-width: auto;
    width: 100%;
  }

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

  .bookshelf-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 10px;
  }

  .book-cover {
    width: 80px;
    height: 112px;
    font-size: 32px;
  }

  .modal {
    max-width: calc(100% - 24px);
  }

  .sub-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .type-selector {
    grid-template-columns: repeat(3, 1fr);
  }

  .batch-action-bar {
    bottom: 12px;
    padding: 10px 14px;
  }

  .batch-count {
    font-size: 16px;
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--border-1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-4);
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

/* ===== 数据报表 ===== */
.section-head-with-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-tab-btn {
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  background: white;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-2);
  font-family: inherit;
}

.report-tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: transparent;
}

.report-tab-btn:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.settings-action-btn.small {
  padding: 6px 14px;
  font-size: 12px;
  gap: 6px;
}

.settings-action-btn.small .icon {
  width: 14px;
  height: 14px;
}

.report-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.report-stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.report-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.report-stat-card.new::before { background: linear-gradient(90deg, #22c55e, #86efac); }
.report-stat-card.deleted::before { background: linear-gradient(90deg, #f97316, #fdba74); }
.report-stat-card.type::before { background: linear-gradient(90deg, #8b5cf6, #c4b5fd); }
.report-stat-card.category::before { background: linear-gradient(90deg, #06b6d4, #67e8f9); }

.report-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-stat-card.new .report-stat-icon { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.report-stat-card.deleted .report-stat-icon { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.report-stat-card.type .report-stat-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.report-stat-card.category .report-stat-icon { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }

.report-stat-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.report-stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
}

.report-stat-label {
  font-size: 13px;
  color: var(--text-3);
}

.report-stat-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
}

.report-stat-detail > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-new { background: #22c55e; }
.dot-book { background: #8b5cf6; }
.dot-del { background: #f97316; }
.dot-del-book { background: #fb923c; }

/* 柱状图 */
.chart-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-2);
  margin-bottom: 16px;
}

.chart-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 20px 0;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 140px;
  gap: 2px;
  padding: 0 4px;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}

.bar {
  width: 100%;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 4px 4px 0 0;
  min-height: 0;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.bar-item:hover .bar {
  opacity: 1;
}

.bar-label {
  font-size: 10px;
  color: var(--text-4);
  margin-top: 6px;
  transform: rotate(-45deg);
  white-space: nowrap;
}

/* 双栏统计卡片 */
.stats-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stats-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-2);
}

.type-stats-list,
.category-stats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.type-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.type-stat-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.type-stat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.type-stat-name {
  font-size: 13px;
  color: var(--text-2);
}

.type-stat-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.category-stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  flex-shrink: 0;
}

.category-rank.top {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.category-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-2);
}

.category-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

/* 导出记录 */
.action-buttons-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.export-record-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-record-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.export-record-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
}

.export-record-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.export-record-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.export-record-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}

.export-record-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-3);
}

.export-record-size {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  flex-shrink: 0;
}

/* 响应式 */
@media (max-width: 1024px) {
  .report-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section-head-with-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .stats-grid-2 {
    grid-template-columns: 1fr;
  }
  
  .export-record-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .action-buttons-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .report-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 分类管理 ===== */
.manage-cat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border-2);
  background: white;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-2);
  font-family: inherit;
}

.manage-cat-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(139, 92, 246, 0.05);
}

.manage-cat-btn .icon {
  width: 16px;
  height: 16px;
}

.cat-manage-header {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-1);
}

.cat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.cat-input:focus {
  border-color: var(--primary);
}

.cat-icon-select {
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  background: white;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.cat-icon-select:focus {
  border-color: var(--primary);
}

.cat-manage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.cat-manage-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-2);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.cat-manage-item:hover {
  background: rgba(139, 92, 246, 0.06);
}

.cat-manage-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.cat-manage-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cat-manage-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}

.cat-manage-count {
  font-size: 12px;
  color: var(--text-3);
}

.cat-manage-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.cat-action-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-2);
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-3);
}

.cat-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cat-action-btn.delete:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

.cat-action-btn .icon {
  width: 16px;
  height: 16px;
}

.cat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-4);
}

.cat-empty p {
  margin: 12px 0 0 0;
  font-size: 14px;
}

@media (max-width: 480px) {
  .cat-manage-header {
    flex-wrap: wrap;
  }
  
  .cat-icon-select {
    order: 2;
    flex: 1;
  }
  
  .cat-manage-header .btn {
    order: 3;
    width: 100%;
  }
}

/* ===== Toast 提示 ===== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  pointer-events: auto;
  border-left: 4px solid var(--primary);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.info {
  border-left-color: #3b82f6;
}
