/* =====================
   全局重置与基础
   灰白为主色，蓝色点缀
   ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #4a6cf7;
  --primary-light: #eef1fd;
  --primary-dark: #3651d5;
  --accent: #6c8aff;
  --bg: #f2f3f7;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --border: #e5e7eb;
  --sidebar-w: 88px;
  --header-h: 50px;
  --tab-h: 46px;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.10);
}
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
body { overflow: hidden; }
body.admin-page, body.login-page { overflow: auto; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
img { display: block; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

/* =====================
   顶部 Header - 灰白色
   ===================== */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border-bottom: 1px solid var(--border);
}
.app-header .logo { display: flex; align-items: center; gap: 8px; }
.app-header .logo-icon { 
  width: 30px; height: 30px; border-radius: 7px; 
  display: flex; align-items: center; justify-content: center; 
  font-size: 16px; overflow: hidden;
  background: var(--bg);
}
.app-header .logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-header .logo-text { color: var(--text); font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
.app-header .header-actions { display: flex; gap: 8px; align-items: center; position: relative; }
.app-header .admin-entry {
  font-size: 12px; color: var(--primary); font-weight: 600;
  padding: 5px 12px; border: 1px solid var(--primary);
  border-radius: 16px; transition: all 0.2s;
}
.app-header .admin-entry:active { background: var(--primary-light); }

/* =====================
   搜索框
   ===================== */
.search-box {
  position: relative;
  display: flex; align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 12px;
  height: 32px;
  transition: border-color 0.2s, box-shadow 0.2s;
  max-width: 160px;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,108,247,0.1);
  max-width: 200px;
}
.search-box .search-icon {
  font-size: 14px; color: var(--text-2);
  flex-shrink: 0; margin-right: 6px;
}
.search-box .search-input {
  border: none; outline: none; background: transparent;
  font-size: 13px; color: var(--text);
  width: 100%; padding: 4px 0;
  font-family: inherit;
}
.search-box .search-input::placeholder { color: var(--text-3); }
.search-box .search-clear {
  font-size: 12px; color: var(--text-3); cursor: pointer;
  padding: 2px 4px; flex-shrink: 0;
  line-height: 1;
}
.search-box .search-clear.hidden { display: none; }
.search-box .search-clear:active { color: var(--text); }

/* 搜索结果下拉 */
.search-results {
  position: absolute; top: 44px; left: 0; right: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  max-height: 300px; overflow-y: auto; z-index: 200;
}
.search-results.hidden { display: none; }
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  transition: background 0.15s; border-bottom: 1px solid #f5f5f5;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--primary-light); }
.search-result-item .sri-img {
  width: 36px; height: 36px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0; background: var(--bg);
}
.search-result-item .sri-info { flex: 1; min-width: 0; }
.search-result-item .sri-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-result-item .sri-price {
  font-size: 11px; color: var(--primary); font-weight: 600;
}
.search-result-item .sri-tag {
  font-size: 10px; color: #999;
}
.search-result-empty {
  padding: 20px; text-align: center; color: #999; font-size: 13px;
}
.search-result-more {
  padding: 8px; text-align: center; color: var(--primary);
  font-size: 12px; cursor: pointer; border-top: 1px solid #f5f5f5;
}

/* =====================
   自定义Logo上传区
   ===================== */
.logo-upload-tip {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.05); opacity: 0; transition: opacity 0.2s;
  border-radius: 7px; cursor: pointer;
}
.logo-icon:hover .logo-upload-tip { opacity: 1; }
.logo-upload-tip span { font-size: 10px; color: #666; font-weight: 600; }

/* =====================
   主体布局
   ===================== */
.app-body {
  position: fixed;
  top: var(--header-h); bottom: 0; left: 0; right: 0;
  display: flex;
}

/* =====================
   左侧分类菜单
   ===================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}
.sidebar::-webkit-scrollbar { display: none; }

.cat-group { }
.cat-parent {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 4px 6px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  user-select: none;
  transition: background 0.2s;
}
.cat-parent:active { background: var(--primary-light); }
.cat-parent.active { background: #f8f9fc; }
.cat-parent.active .cat-name { color: var(--primary); }
.cat-parent .cat-icon { font-size: 22px; line-height: 1; }
.cat-parent .cat-name { font-size: 11px; color: var(--text-2); margin-top: 4px; text-align: center; line-height: 1.3; }
.cat-parent.active .cat-name { color: var(--primary); font-weight: 600; }
.cat-parent .cat-arrow {
  font-size: 10px; color: var(--text-3); margin-top: 2px;
  transition: transform 0.25s;
  display: inline-block;
}
.cat-parent.expanded .cat-arrow { transform: rotate(180deg); }
.cat-parent .active-bar {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--primary); border-radius: 3px 0 0 3px;
  opacity: 0; transition: opacity 0.2s;
}
.cat-parent.active .active-bar { opacity: 1; }

.cat-children { display: none; background: #fafbfd; }
.cat-children.open { display: block; }
.cat-child {
  display: block; padding: 9px 6px 9px 12px;
  font-size: 12px; color: var(--text-2);
  border-bottom: 1px solid #f2f3f7;
  cursor: pointer; transition: all 0.15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  position: relative;
}
.cat-child:active { background: var(--primary-light); }
.cat-child.active {
  color: var(--primary); font-weight: 600;
  background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%);
}
.cat-child.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--primary); border-radius: 0 3px 3px 0;
}

/* =====================
   右侧内容区
   ===================== */
.main-content {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* =====================
   顶部 Tab 滑动导航
   ===================== */
.content-tabs {
  height: var(--tab-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-end;
  overflow-x: auto; overflow-y: hidden;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.content-tabs::-webkit-scrollbar { display: none; }
.tab-item {
  flex-shrink: 0;
  padding: 0 15px 10px;
  font-size: 13px; color: var(--text-3);
  cursor: pointer; position: relative;
  white-space: nowrap; transition: color 0.2s;
  scroll-snap-align: start;
  font-weight: 500;
}
.tab-item:active { color: var(--primary); }
.tab-item.active { color: var(--primary); font-weight: 700; }
.tab-item.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 3px;
  background: var(--primary); border-radius: 3px;
}

/* =====================
   内容区主体
   ===================== */
.content-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
}
.content-body::-webkit-scrollbar { display: none; }

/* =====================
   产品列表
   ===================== */
.product-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.product-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform 0.18s, box-shadow 0.18s;
  position: relative;
}
.product-card:active { transform: scale(0.97); }
.product-card .card-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.product-card .card-info { padding: 8px 10px 10px; }
.product-card .card-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 2px; }
.product-card .card-price-label { font-size: 10px; color: var(--text-3); margin-bottom: 1px; }
.product-card .card-price { font-size: 15px; font-weight: 700; color: #ef4444; }
.product-card .card-tag {
  position: absolute; top: 8px; left: 8px;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 20px;
}

/* =====================
   内容面板通用
   ===================== */
.panel-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  padding: 0 0 12px; display: flex; align-items: center; gap: 6px;
}
.panel-title::before { content: ''; display: inline-block; width: 4px; height: 16px; background: var(--primary); border-radius: 3px; }

/* 知识文章列表 */
.knowledge-list { display: flex; flex-direction: column; gap: 10px; }
.knowledge-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s;
}
.knowledge-card:active { transform: scale(0.98); }
.knowledge-card .kc-cover { width: 100%; height: 140px; object-fit: cover; }
.knowledge-card .kc-body { padding: 12px; }
.knowledge-card .kc-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.knowledge-card .kc-meta { display: flex; align-items: center; gap: 6px; }
.kc-type-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.kc-type-badge.article { background: #e8f0fe; color: #1a73e8; }
.kc-type-badge.video { background: #fef3f2; color: #d93025; }

/* 销售问答 */
.script-list { display: flex; flex-direction: column; gap: 10px; }
.script-card {
  background: var(--white); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); position: relative;
}
.script-card .sc-title { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.script-card .sc-text { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.script-card .sc-actions { display: flex; gap: 8px; margin-top: 12px; }
.sc-btn {
  flex: 1; height: 34px; border-radius: 20px; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: opacity 0.15s;
}
.sc-btn:active { opacity: 0.75; }
.sc-btn.copy { background: var(--primary-light); color: var(--primary); }
.sc-btn.share { background: var(--primary); color: #fff; }

/* 资料下载 */
.material-list { display: flex; flex-direction: column; gap: 8px; }
.material-item {
  background: var(--white); border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px;
}
.material-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.material-icon.pdf { background: #fef2f2; }
.material-icon.doc { background: #e8f0fe; }
.material-icon.docx { background: #e8f0fe; }
.material-icon.xlsx { background: #ecfdf5; }
.material-icon.ppt { background: #fff7ed; }
.material-icon.pptx { background: #fff7ed; }
.material-info { flex: 1; min-width: 0; }
.material-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.material-size { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.material-actions { display: flex; gap: 6px; flex-shrink: 0; }
.mat-btn {
  height: 30px; padding: 0 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; gap: 3px;
}
.mat-btn.preview { background: var(--primary-light); color: var(--primary); }
.mat-btn.download { background: var(--primary); color: #fff; }

/* 相关素材 */
.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.asset-item { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1/1; cursor: pointer; }
.asset-item img { width: 100%; height: 100%; object-fit: cover; }
.asset-item .asset-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  opacity: 0; transition: opacity 0.2s;
}
.asset-item:active .asset-overlay, .asset-item.show-overlay .asset-overlay { opacity: 1; }
.asset-item .asset-overlay button { background: rgba(255,255,255,0.9); border-radius: 6px; padding: 4px 10px; font-size: 11px; font-weight: 600; color: var(--primary); }
.asset-item .video-badge {
  position: absolute; top: 5px; left: 5px;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 10px; padding: 2px 6px; border-radius: 6px;
}
/* 视频缩略图 — 第一帧背景 */
.video-thumb { position: relative; overflow: hidden; }
.video-thumb-bg {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #1a1a2e;
}
/* 占位层 — 视频加载中或失败时显示 */
.video-thumb-placeholder {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  z-index: 1;
  transition: opacity 0.35s;
}
.video-thumb-placeholder.hidden { opacity: 0; pointer-events: none; }
.video-thumb-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px;
  padding-left: 2px;
}
.video-thumb-label {
  color: rgba(255,255,255,0.7);
  font-size: 9px;
  text-align: center;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 90%;
}
.asset-section-header { font-size: 12px; color: var(--text-3); margin: 8px 0 6px; font-weight: 600; }

/* 朋友圈素材 */
.moment-list { display: flex; flex-direction: column; gap: 14px; }
.moment-card {
  background: var(--white); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
}
.moment-text { font-size: 13px; color: var(--text); line-height: 1.75; margin-bottom: 10px; }
.moment-imgs { display: grid; gap: 4px; margin-bottom: 12px; }
.moment-imgs.cols-1 { grid-template-columns: 1fr; max-width: 220px; }
.moment-imgs.cols-2 { grid-template-columns: 1fr 1fr; }
.moment-imgs.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.moment-imgs img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; }
.moment-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.moment-btn {
  flex: 1; min-width: 80px; height: 36px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: opacity 0.15s;
}
.moment-btn:active { opacity: 0.75; }
.moment-btn.wechat { background: #07c160; color: #fff; }
.moment-btn.friend { background: #1aad19; color: #fff; }
.moment-btn.copy { background: var(--primary-light); color: var(--primary); }
.moment-btn.save { background: var(--bg); color: var(--text-2); }
/* 朋友圈视频 */
.moment-video {
  margin-bottom: 10px; border-radius: 8px; overflow: hidden;
  cursor: pointer;
  position: relative;
}
.mv-video-bg {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #1a1a2e;
}
.moment-video-inner {
  position: relative; z-index: 1;
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  transition: opacity 0.35s;
}
.moment-video-inner.fade { opacity: 0.3; }
.mv-play-btn {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  padding-left: 3px;
  transition: background 0.2s;
}
.moment-video:active .mv-play-btn { background: rgba(255,255,255,0.35); }
.mv-label {
  color: rgba(255,255,255,0.65);
  font-size: 11px;
}

/* =====================
   弹出层 / Modal
   ===================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.55);
  display: flex; flex-direction: column;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal-overlay.hidden { display: none !important; }

.modal-sheet {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-radius: 16px 16px 0 0;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: slideUp 0.28s cubic-bezier(0.34,1.2,0.64,1);
}
@keyframes slideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }

.modal-header {
  padding: 14px 16px 10px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.modal-close { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--text-3); }

.modal-body { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; }
.modal-body::-webkit-scrollbar { display: none; }

/* 知识内容 */
.knowledge-content h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 12px 0 8px; }
.knowledge-content p { font-size: 13px; color: var(--text-2); line-height: 1.8; margin-bottom: 10px; }
.knowledge-content strong { color: var(--primary); }
.knowledge-content img { width: 100%; border-radius: 8px; margin: 8px 0; }
.knowledge-content em { color: var(--accent); font-style: italic; }
.kc-video-wrap { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: #000; margin-bottom: 12px; }
.kc-video-wrap video { width: 100%; display: block; }
.knowledge-content video { width: 100%; border-radius: 8px; margin: 8px 0; background: #000; display: block; }

/* 文档预览 */
.doc-preview-wrap { width: 100%; }
.doc-preview-placeholder {
  background: var(--bg); border-radius: 12px; padding: 30px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-2); font-size: 13px; text-align: center;
}
.docx-preview { font-family: 'PingFang SC','Microsoft YaHei',sans-serif; }
.docx-preview h1,.docx-preview h2,.docx-preview h3 { margin: 12px 0 8px; font-weight: 700; }
.docx-preview h1 { font-size: 20px; }
.docx-preview h2 { font-size: 17px; }
.docx-preview h3 { font-size: 15px; }
.docx-preview p { margin: 6px 0; }
.docx-preview table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size:13px; }
.docx-preview table td,.docx-preview table th { border:1px solid #ddd; padding:6px 8px; }
.docx-preview img { max-width: 100%; border-radius: 6px; }
.docx-preview ul,.docx-preview ol { padding-left: 20px; margin: 6px 0; }

/* PPTX 预览 */
.pptx-preview { width: 100%; }
.pptx-preview .slide { margin-bottom: 16px; border: 1px solid #eee; border-radius: 10px; overflow: hidden; background: #fff; }
.pptx-slide-num { text-align: center; font-size: 11px; color: #999; padding: 8px 0; background: var(--bg); }

/* 素材预览 */
.asset-preview-img { width: 100%; border-radius: 10px; }
.asset-preview-actions { display: flex; gap: 10px; margin-top: 14px; }
.asset-preview-btn {
  flex: 1; height: 44px; border-radius: 22px;
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.asset-preview-btn.download { background: var(--primary); color: #fff; }
.asset-preview-btn.save { background: var(--primary-light); color: var(--primary); }

/* 分享面板 */
.share-panel { padding: 0 0 10px; }
.share-title { font-size: 13px; color: var(--text-3); text-align: center; margin-bottom: 16px; }
.share-options { display: flex; justify-content: space-around; }
.share-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.share-opt .share-icon { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--bg); }
.share-opt .share-label { font-size: 11px; color: var(--text-2); }
.share-opt:active .share-icon { opacity: 0.75; transform: scale(0.93); }
.share-cancel { display: block; width: 100%; height: 44px; margin-top: 14px; background: var(--bg); border-radius: 22px; color: var(--text-2); font-size: 14px; font-weight: 600; }

/* =====================
   Toast 提示
   ===================== */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: rgba(30,30,50,0.85); color: #fff;
  padding: 9px 20px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  z-index: 999; opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================
   分类名称标题区 - 灰白色
   ===================== */
.category-hero {
  background: var(--white);
  padding: 14px 14px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.category-hero .hero-title { font-size: 16px; font-weight: 700; color: var(--text); }
.category-hero .hero-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* =====================
   空状态
   ===================== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 50px 20px; color: var(--text-3);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* =====================
   图片全屏预览
   ===================== */
.img-viewer {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.img-viewer.hidden { display: none !important; }
.img-viewer img { max-width: 100%; max-height: 80vh; border-radius: 6px; }
.img-viewer .iv-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.img-viewer .iv-actions { position: absolute; bottom: 30px; display: flex; gap: 14px; }
.iv-action-btn { background: rgba(255,255,255,0.15); color: #fff; border-radius: 20px; padding: 8px 18px; font-size: 13px; font-weight: 600; }

/* 滚动条统一隐藏 */
* { scrollbar-width: none; -ms-overflow-style: none; }

/* =====================
   登录表单
   ===================== */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 360px;
  background: var(--white); border-radius: 16px;
  padding: 36px 28px;
  box-shadow: var(--shadow-lg);
}
.login-card .login-logo {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin: 0 auto 16px;
}
.login-card .login-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.login-card h2 { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.login-card .login-sub { text-align: center; font-size: 13px; color: var(--text-3); margin-bottom: 24px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card .form-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; display: block; }
.login-card .form-input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; color: var(--text); background: var(--bg);
  transition: border-color 0.2s;
}
.login-card .form-input:focus { outline: none; border-color: var(--primary); background: var(--white); }
.login-card .login-btn {
  width: 100%; height: 46px; border-radius: 23px;
  background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 700;
  margin-top: 8px; transition: opacity 0.2s;
}
.login-card .login-btn:active { opacity: 0.85; }
.login-card .login-error {
  color: #ef4444; font-size: 12px; text-align: center;
  margin-top: 12px; min-height: 18px;
}

/* =====================
   全局动画
   ===================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
