/* ================================================================
   设计系统：商品下单平台 — 红金商务主题
   主色 #C62828 | 强调 #FF3B30 | 深色 #0F0F0F
   浅色 #FAFAFA | 金色 #FFB800 | 翠绿 #00C853
   ================================================================ */

:root {
  --brand: #C62828;
  --brand-light: #FF3B30;
  --brand-glow: rgba(198, 40, 40, 0.15);
  --surface-dark: #0F0F0F;
  --surface-elevated: #1A1A1A;
  --surface-light: #FAFAFA;
  --surface-card: #FFFFFF;
  --gold: #FFB800;
  --gold-soft: rgba(255, 184, 0, 0.12);
  --success: #00C853;
  --warning: #FF9100;
  --text-primary: #1A1A1A;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-light: #E8E8E8;
  --border-dark: #2A2A2A;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  background: var(--surface-light);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }
button { font-family: inherit; cursor: pointer; transition: all var(--transition-fast); }
img { max-width: 100%; display: block; }

/* ================================================================
   动画入场
   ================================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(198,40,40,0.2); }
  50%      { box-shadow: 0 0 0 8px rgba(198,40,40,0); }
}

.animate-in {
  animation: fadeUp 0.5s ease-out both;
}

/* ================================================================
   顶部导航 — PC深色商务
   ================================================================ */
.pc-header {
  background: var(--surface-dark);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border-dark);
}
.pc-header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 36px;
}
.pc-logo {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 0.5px;
}
.pc-logo .logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
}
.pc-nav { display: flex; gap: 6px; flex: 1; }
.pc-nav a {
  color: rgba(255,255,255,0.65); font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: var(--radius-sm);
  position: relative;
}
.pc-nav a::after {
  content: ''; position: absolute; bottom: 2px; left: 50%;
  width: 0; height: 2px; background: var(--brand-light);
  border-radius: 2px; transition: all var(--transition-base);
  transform: translateX(-50%);
}
.pc-nav a:hover { color: #fff; }
.pc-nav a.active { color: #fff; }
.pc-nav a.active::after { width: 24px; }

.pc-user { display: flex; align-items: center; gap: 14px; color: #fff; font-size: 13px; }
.pc-user .u-pts {
  background: rgba(255,255,255,0.08); padding: 5px 14px; border-radius: 20px;
  font-weight: 500; color: var(--gold);
  border: 1px solid rgba(255,184,0,0.2);
}
.pc-user .u-pts b { font-size: 15px; font-weight: 700; }
.pc-user a { color: rgba(255,255,255,0.85); font-weight: 500; }
.pc-user a:hover { color: #fff; }
.pc-user .btn-login {
  background: #fff; color: var(--brand); border: none;
  padding: 8px 20px; border-radius: 20px; font-size: 13px; font-weight: 600;
}
.pc-user .btn-login:hover { background: var(--surface-light); }
.pc-user .btn-reg {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3);
  padding: 7px 18px; border-radius: 20px; font-size: 13px;
}
.pc-user .btn-reg:hover { border-color: #fff; background: rgba(255,255,255,0.06); }

/* ================================================================
   手机顶部
   ================================================================ */
.topbar {
  background: var(--surface-dark);
  color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar h1 { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.topbar a { color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 500; }

/* ================================================================
   内容容器
   ================================================================ */
.page {
  max-width: 1280px; margin: 0 auto;
  padding: 20px 24px 80px;
  min-height: calc(100vh - 64px);
}

/* ================================================================
   底部导航（手机）
   ================================================================ */
.tabbar {
  display: none;
}

/* ================================================================
   卡片系统
   ================================================================ */
.card {
  background: var(--surface-card); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ================================================================
   首页 — 分类页
   ================================================================ */
.banner-wrap { margin-bottom: 16px; border-radius: var(--radius-lg); overflow: hidden; }
.search-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.search-bar input {
  flex: 1; padding: 12px 18px; border: 1px solid var(--border-light); border-radius: var(--radius-xl);
  font-size: 14px; background: #fff; outline: none; box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-bar input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.search-bar button {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; border: none; padding: 0 24px;
  border-radius: var(--radius-xl); font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(198,40,40,0.25);
}
.search-bar button:hover {
  box-shadow: 0 6px 16px rgba(198,40,40,0.35);
  transform: translateY(-1px);
}

.swiper {
  width: 100%; height: 170px; border-radius: var(--radius-lg); overflow: hidden;
  position: relative; background: #e5e7eb;
}
.swiper-track { display: flex; height: 100%; transition: transform .35s; }
.swiper-item { flex-shrink: 0; width: 100%; height: 100%; }
.swiper-item img { width: 100%; height: 100%; object-fit: cover; }
.swiper-dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
}
.swiper-dots i {
  width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.5);
  transition: width .2s;
}
.swiper-dots i.on { width: 18px; background: #fff; }

/* 一级分类导航 */
.cat-nav { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 16px; scrollbar-width: none; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav .cat {
  flex-shrink: 0; padding: 7px 18px; border-radius: var(--radius-xl);
  background: #fff; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); border: 1px solid var(--border-light);
  cursor: pointer; transition: all var(--transition-fast);
}
.cat-nav .cat:hover { border-color: var(--brand); color: var(--brand); }
.cat-nav .cat.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(198,40,40,0.25);
}

/* 分类页左右布局 */
.category-page { display: flex; gap: 0; margin: 0 -20px; }
.sidebar {
  width: 94px; flex-shrink: 0; background: #f5f5f7;
  overflow-y: auto; scrollbar-width: none;
  position: sticky; top: 0; align-self: flex-start;
  max-height: calc(100vh - 140px);
  border-right: 1px solid var(--border-light);
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar-item {
  padding: 16px 8px; font-size: 12px; font-weight: 500;
  color: var(--text-secondary); text-align: center; line-height: 1.4;
  cursor: pointer; border-left: 3px solid transparent;
  word-break: break-all; transition: all var(--transition-fast);
}
.sidebar-item:hover { color: var(--brand); background: rgba(198,40,40,0.04); }
.sidebar-item.active {
  background: #fff; color: var(--brand); font-weight: 700;
  border-left-color: var(--brand); box-shadow: inset 0 0 0 1px var(--border-light);
}

.main-content { flex: 1; min-width: 0; padding: 0 20px; }

/* 列表式商品卡片 */
.task-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border-light);
}
.task-row:last-child { border-bottom: none; }
.row-thumb {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: #f0f2f5; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; font-size: 22px;
  box-shadow: var(--shadow-sm);
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-info { flex: 1; min-width: 0; }
.row-name { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text-primary); }
.row-price { margin-top: 6px; font-size: 16px; color: var(--brand); font-weight: 700; font-variant-numeric: tabular-nums; }
.row-price .p-comm { font-size: 18px; }
.row-action { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-buy {
  border: 1.5px solid var(--brand); color: var(--brand);
  background: #fff; padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.btn-buy:hover { background: var(--brand); color: #fff; }
.btn-cart {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; box-shadow: 0 2px 6px rgba(198,40,40,0.25);
}
.btn-cart:hover { transform: scale(1.08); }

/* 区块标题 */
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; margin: 8px 0 14px;
  letter-spacing: 0.3px;
}
.section-title::before {
  content: ''; width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-light));
}

/* ================================================================
   任务详情
   ================================================================ */
.detail-top {
  display: flex; flex-direction: column; gap: 20px;
}
.detail-img {
  width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-lg); overflow: hidden;
  background: #f0f2f5; display: flex; align-items: center; justify-content: center; font-size: 60px;
  box-shadow: var(--shadow-sm);
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; min-width: 0; }
.detail-info .d-name { font-size: 22px; font-weight: 800; line-height: 1.4; letter-spacing: -0.3px; }
.detail-info .d-meta { font-size: 13px; color: var(--text-muted); margin: 10px 0; }
.detail-info .d-price { font-size: 15px; margin: 12px 0; }
.detail-info .d-price b {
  color: var(--brand); font-size: 28px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.detail-info .d-range { font-size: 13px; color: var(--text-secondary); }

/* 表单 */
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 7px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-light);
  border-radius: var(--radius-md); font-size: 14px; background: #fff;
  outline: none; font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.btn-primary {
  width: 100%; background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; border: none; padding: 14px; border-radius: var(--radius-xl);
  font-size: 16px; font-weight: 700; margin-top: 8px;
  box-shadow: 0 6px 18px rgba(198,40,40,0.25);
}
.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(198,40,40,0.35);
  transform: translateY(-1px);
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ================================================================
   状态筛选 tabs
   ================================================================ */
.status-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs .st-tab {
  flex-shrink: 0; padding: 7px 16px; border-radius: var(--radius-xl); background: #fff;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  border: 1px solid var(--border-light); cursor: pointer;
  transition: all var(--transition-fast);
}
.status-tabs .st-tab:hover { border-color: var(--brand); color: var(--brand); }
.status-tabs .st-tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(198,40,40,0.25);
}

/* 状态标签 */
.st { font-size: 11px; padding: 3px 10px; border-radius: 10px; font-weight: 600; }
.st-0 { background: #E3F2FD; color: #1976D2; }
.st-1 { background: #FFF3E0; color: #F57C00; }
.st-2 { background: #E8F5E9; color: #388E3C; }
.st-4 { background: #FFEBEE; color: var(--brand); }
.st-5 { background: #F3E5F5; color: #7B1FA2; }
.st-6 { background: #F5F5F5; color: var(--text-muted); }

/* ================================================================
   订单卡片（我的订单新样式）
   ================================================================ */
.order-toggle { display: flex; gap: 10px; }
.toggle-btn {
  flex: 1; padding: 10px; border-radius: var(--radius-md); border: 1px solid var(--border-light);
  background: #fff; font-size: 13px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer;
}
.toggle-btn.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(198,40,40,0.25);
}

.order-card {
  background: var(--surface-card); border-radius: var(--radius-lg);
  padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.order-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.order-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.order-sn { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.btn-copy {
  padding: 2px 8px; border-radius: 4px; border: 1px solid var(--border-light);
  background: #fff; font-size: 11px; color: var(--text-secondary); cursor: pointer;
}
.btn-copy:hover { border-color: var(--brand); color: var(--brand); }
.order-status { font-size: 13px; font-weight: 700; }

.order-body {
  display: flex; gap: 12px; align-items: center;
}
.order-thumb {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: #f0f2f5; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; font-size: 24px;
}
.order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-info { flex: 1; min-width: 0; }
.order-name { font-size: 14px; font-weight: 600; line-height: 1.4; }
.order-params { font-size: 12px; color: var(--text-muted); margin-top: 4px; word-break: break-all; }
.order-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.order-price { text-align: right; flex-shrink: 0; }

.order-progress { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-light); }
.progress-info { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.progress-bar {
  height: 5px; background: #f0f0f0; border-radius: 3px; overflow: hidden; margin-top: 6px;
}
.progress-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 3px; transition: width .4s;
  background-size: 200% 100%;
}

.order-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.btn-act {
  padding: 6px 14px; border-radius: var(--radius-sm); border: none;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.btn-act.gray { background: #F5F5F5; color: var(--text-secondary); }
.btn-act.gray:hover { background: #ECECEC; }
.btn-act.primary { background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff; }
.btn-act.primary:hover { box-shadow: 0 4px 10px rgba(198,40,40,0.3); }

/* ================================================================
   个人中心 — VIP仪表盘
   ================================================================ */
.center-wrap { display: flex; gap: 24px; align-items: flex-start; }
.center-left { width: 220px; flex-shrink: 0; }
.center-right { flex: 1; min-width: 0; }

/* 用户信息横幅 */
.user-profile {
  background: linear-gradient(135deg, var(--surface-dark) 0%, #2D0A0A 60%, var(--brand) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 28px;
  display: flex; gap: 20px; align-items: center;
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.user-profile::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,0.03); pointer-events: none;
}
.user-profile .avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800;
  border: 2px solid rgba(255,255,255,0.3); flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.user-profile .u-name { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; }
.user-profile .u-id { font-size: 12px; opacity: .7; margin-top: 5px; }

/* 积分能量环 */
.user-profile .u-pts {
  margin-left: auto; text-align: center;
  background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
  padding: 16px 24px; border-radius: var(--radius-lg);
  border: 1px solid rgba(255,184,0,0.25);
  position: relative;
}
.user-profile .u-pts::before {
  content: ''; position: absolute; inset: -2px; border-radius: var(--radius-lg);
  background: conic-gradient(from 0deg, var(--gold) 0%, rgba(255,184,0,0.2) 70%, transparent 100%);
  z-index: -1; opacity: 0.6;
}
.user-profile .u-pts .num {
  font-size: 34px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold); text-shadow: 0 2px 8px rgba(255,184,0,0.3);
}
.user-profile .u-pts .label { font-size: 12px; opacity: .85; letter-spacing: 1px; margin-top: 2px; }

/* 左侧菜单 */
.menu { background: var(--surface-card); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.menu a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; color: var(--text-primary); border-bottom: 1px solid var(--border-light);
  font-size: 14px; font-weight: 500; transition: all var(--transition-fast);
}
.menu a:last-child { border-bottom: none; }
.menu a:hover { background: #FEF2F2; color: var(--brand); }
.menu a.active { background: linear-gradient(90deg, #FEF2F2, #fff); color: var(--brand); font-weight: 700; border-left: 3px solid var(--brand); }
.menu a .arrow { color: var(--text-muted); font-size: 16px; }
.menu a .m-icon { margin-right: 10px; font-size: 18px; }

/* 快捷入口 */
.quick-grid { display: flex; gap: 14px; flex-wrap: wrap; }
.quick-card {
  flex: 1; min-width: 160px; text-align: center; padding: 24px 16px;
  background: var(--surface-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border-light); box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.quick-card .icon { font-size: 32px; margin-bottom: 10px; display: block; }
.quick-card .label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.quick-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ================================================================
   登录注册
   ================================================================ */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 30px 16px;
  background: linear-gradient(180deg, var(--surface-light) 0%, #F5F0F0 100%);
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface-card);
  border-radius: var(--radius-lg); padding: 40px 36px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
}
.auth-logo {
  width: 64px; height: 64px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; font-size: 32px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; font-weight: 800;
  box-shadow: 0 6px 16px rgba(198,40,40,0.25);
}
.auth-title { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 32px; letter-spacing: 0.5px; }
.auth-link { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 18px; }
.auth-link a { color: var(--brand); font-weight: 600; }

/* ================================================================
   管理后台
   ================================================================ */
.admin-topbar {
  background: var(--surface-dark); color: #fff; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-dark);
}
.admin-topbar h1 { font-size: 18px; font-weight: 700; letter-spacing: 0.5px; }
.admin-topbar a { color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 500; }
.admin-topbar a:hover { color: #fff; }

.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--border-light); }
.admin-nav a {
  background: #F5F5F5; padding: 8px 16px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-secondary);
  font-size: 13px; font-weight: 500; border: 1px solid transparent;
  transition: all var(--transition-fast);
}
.admin-nav a:hover { background: #FEF2F2; color: var(--brand); border-color: var(--brand-glow); }
.admin-nav a.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 10px rgba(198,40,40,0.25);
}

/* 数据磁贴 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.stat-item {
  background: var(--surface-card); border-radius: var(--radius-lg);
  padding: 18px; border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.stat-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.stat-item.red::before   { background: linear-gradient(180deg, var(--brand), var(--brand-light)); }
.stat-item.green::before { background: linear-gradient(180deg, var(--success), #00E676); }
.stat-item.blue::before  { background: linear-gradient(180deg, #2196F3, #64B5F6); }
.stat-item.gold::before  { background: linear-gradient(180deg, var(--gold), #FFD54F); }
.stat-item .label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-item .num {
  font-size: 26px; font-weight: 800; margin-top: 6px;
  font-variant-numeric: tabular-nums; letter-spacing: -0.5px;
}
.stat-item .num.red   { color: var(--brand); }
.stat-item .num.green { color: var(--success); }
.stat-item .num.blue  { color: #2196F3; }
.stat-item .num.gold  { color: #E65100; }

/* 后台表格 */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface-card); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.admin-table th, .admin-table td { padding: 12px 14px; font-size: 13px; text-align: left; }
.admin-table th {
  background: #F8F8F8; color: var(--text-secondary); font-weight: 600;
  border-bottom: 1px solid var(--border-light); font-size: 12px; letter-spacing: 0.3px;
}
.admin-table tbody tr { transition: background var(--transition-fast); }
.admin-table tbody tr:nth-child(even) { background: #FAFAFA; }
.admin-table tbody tr:hover { background: #FEF2F2; }
.admin-table td { border-bottom: 1px solid var(--border-light); }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table td img { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; box-shadow: var(--shadow-sm); }

/* 按钮系统 */
.btn-sm {
  padding: 5px 14px; border-radius: var(--radius-sm); border: none;
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-light)); color: #fff;
  box-shadow: 0 2px 6px rgba(198,40,40,0.2);
}
.btn-sm:hover { box-shadow: 0 4px 10px rgba(198,40,40,0.3); transform: translateY(-1px); }
.btn-sm.gray { background: #F5F5F5; color: var(--text-secondary); box-shadow: none; }
.btn-sm.gray:hover { background: #ECECEC; transform: none; }
.btn-sm.red { background: linear-gradient(135deg, #D32F2F, #EF5350); box-shadow: 0 2px 6px rgba(211,47,47,0.2); }
.btn-sm.red:hover { box-shadow: 0 4px 10px rgba(211,47,47,0.3); }

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

/* 筛选栏 */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar input, .filter-bar select {
  padding: 9px 14px; border: 1px solid var(--border-light);
  border-radius: var(--radius-md); font-size: 13px; background: #fff;
  outline: none; transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.filter-bar input[type="text"] { min-width: 200px; }

/* 分页 */
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 18px 0; font-size: 13px; color: var(--text-secondary); }
.pager button {
  padding: 7px 16px; border: 1px solid var(--border-light);
  border-radius: var(--radius-md); background: #fff; font-size: 13px; cursor: pointer;
  font-weight: 500; transition: all var(--transition-fast);
}
.pager button:hover { border-color: var(--brand); color: var(--brand); }
.pager button:disabled { color: #ccc; cursor: default; border-color: var(--border-light); background: #FAFAFA; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--surface-card); border-radius: var(--radius-lg);
  max-width: 640px; width: 100%; max-height: 88vh;
  overflow-y: auto; padding: 22px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
}
.modal h3 { font-size: 18px; margin-bottom: 14px; font-weight: 700; }
.modal .kv { display: flex; font-size: 13px; line-height: 2.2; border-bottom: 1px solid var(--border-light); }
.modal .kv b { width: 110px; color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.modal .kv:last-child { border-bottom: none; }
.modal .modal-close { float: right; font-size: 22px; color: var(--text-muted); cursor: pointer; line-height: 1; background: none; border: none; padding: 4px; }
.modal .modal-close:hover { color: var(--brand); }
.modal .modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* 标签 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.checkbox-cell { width: 36px; text-align: center; }

/* ================================================================
   弹层（sheet）
   ================================================================ */
.mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200;
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.mask.show { display: flex; }
.sheet {
  background: var(--surface-card); border-radius: var(--radius-lg); width: 88%; max-width: 420px;
  padding: 24px; max-height: 82vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
}
.sheet h3 { font-size: 17px; margin-bottom: 16px; text-align: center; font-weight: 700; }

/* ================================================================
   提示
   ================================================================ */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--surface-dark); color: #fff; padding: 14px 28px;
  border-radius: var(--radius-lg); font-size: 14px; font-weight: 500;
  z-index: 300; display: none; box-shadow: var(--shadow-lg);
}

/* ================================================================
   空状态
   ================================================================ */
.empty { text-align: center; color: var(--text-muted); padding: 60px 0; font-size: 14px; }

/* ================================================================
   响应式：手机 <769px
   ================================================================ */
@media (max-width: 768px) {
  .pc-header { display: none; }

  body { max-width: 480px; margin: 0 auto; box-shadow: 0 0 20px rgba(0,0,0,.08); }

  .topbar {
    position: sticky; top: 0; z-index: 100;
    background: var(--surface-dark); padding: 14px 16px;
  }
  .topbar a { font-size: 13px; }

  /* 手机底部 tab */
  .tabbar {
    display: flex;
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px;
    background: var(--surface-card); border-top: 1px solid var(--border-light);
    z-index: 100; padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
  }
  .tabbar a {
    flex: 1; text-align: center; padding: 8px 0 10px;
    color: var(--text-muted); font-size: 10px; font-weight: 500;
    transition: color var(--transition-fast);
  }
  .tabbar a .icon { font-size: 22px; display: block; margin-bottom: 2px; }
  .tabbar a.active { color: var(--brand); }

  .page { padding: 14px 14px 80px; }

  .swiper { height: 130px; }
  .banner-wrap { margin: 0 -14px; padding: 0 14px 4px; }

  .task-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  .detail-img { aspect-ratio: 4/3; font-size: 44px; }
  .detail-info .d-name { font-size: 18px; }

  .center-wrap { display: block; }
  .center-left { display: none; }

  .user-profile { padding: 20px 16px; flex-direction: column; text-align: center; }
  .user-profile .avatar { width: 56px; height: 56px; font-size: 26px; }
  .user-profile .u-pts { margin-left: 0; margin-top: 14px; width: 100%; }
  .user-profile .u-pts .num { font-size: 28px; }

  .sidebar { width: 78px; }
  .sidebar-item { padding: 14px 4px; font-size: 11px; }

  .auth-wrap { min-height: 100vh; }
}

/* ================================================================
   响应式：平板/PC >=769px
   ================================================================ */
@media (min-width: 769px) {
  .topbar { display: none; }
  .mobile-page { display: block; }
  .detail-top { flex-direction: row; }
  .detail-img { width: 380px; flex-shrink: 0; }
  .task-grid { grid-template-columns: repeat(4, 1fr); }
  .sidebar { width: 110px; }
  .sidebar-item { font-size: 13px; padding: 18px 10px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .task-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 可点击复制文本（视频地址等） */
.copy-text { cursor: pointer; border-bottom: 1px dashed currentColor; }
.copy-text:hover { color: var(--brand); }
