﻿:root {
  /* 用户端浅色系 · 黑字 · 咖啡强调色 */
  --bg: #f3efe9;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: #ebe4db;
  --text: #1a1510;
  --text-secondary: #5c534a;
  --text-tertiary: #8a8076;
  --accent: #9a6b4f;
  --accent-hot: #b4805f;
  --accent-deep: #6e4a36;
  --accent-soft: rgba(154, 107, 79, 0.14);
  --green: #2f9e5f;
  --orange: #c47d1a;
  --red: #d6453d;
  --pink: #c45d72;
  --separator: rgba(110, 74, 54, 0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 8px 28px rgba(90, 60, 40, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
  --tab-h: 78px;
  --tab-float: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --icon: var(--accent-deep);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
a { color: var(--accent-deep); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

/* 总后台默认浅色；.theme-dark 可一键切深色 */
.admin-body {
  --bg: #f3efe9;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: #ebe4db;
  --text: #1a1510;
  --text-secondary: #5c534a;
  --text-tertiary: #8a8076;
  --accent-soft: rgba(154, 107, 79, 0.14);
  --separator: rgba(110, 74, 54, 0.12);
  --shadow: 0 8px 28px rgba(90, 60, 40, 0.08);
  --green: #2f9e5f;
  --orange: #c47d1a;
  --red: #d6453d;
  --pink: #c45d72;
  background: var(--bg);
  color: var(--text);
}
.admin-body.theme-dark {
  --bg: #000000;
  --bg-elevated: #1c1c1e;
  --bg-card: #2c2c2e;
  --bg-soft: #3a3a3c;
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #636366;
  --accent-soft: rgba(154, 107, 79, 0.22);
  --separator: rgba(84, 84, 88, 0.65);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --pink: #ff375f;
  background: #000;
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 28px);
  background:
    radial-gradient(1000px 520px at 8% -8%, rgba(154, 107, 79,.12), transparent 55%),
    radial-gradient(800px 420px at 100% 0%, rgba(196, 125, 26,.06), transparent 50%),
    var(--bg);
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--separator);
}
.topbar .brand {
  font-size: 20px; font-weight: 750; letter-spacing: .02em;
  color: var(--text);
}
.topbar .brand-with-logo {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text);
}
.topbar .brand-with-logo img {
  width: 28px; height: 28px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--separator);
  box-shadow: 0 2px 8px rgba(110, 74, 54, .12);
}
.topbar .brand-with-logo span {
  color: var(--text);
  font-weight: 750;
}
.topbar .sub { color: var(--text-secondary); font-size: 13px; font-weight: 600; }

.page {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 18px 16px 28px;
}
.page-wide { width: min(1100px, 100%); }

.h1 { font-size: 28px; font-weight: 750; margin: 0 0 6px; letter-spacing: -.02em; }
.h2 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.muted { color: var(--text-secondary); }
.tiny { font-size: 12px; color: var(--text-tertiary); }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; background: var(--bg-card); }
.card-title { font-weight: 650; margin-bottom: 10px; display:flex; align-items:center; gap:8px; color: var(--text); }
.card-title i, .card-title .bi { color: var(--accent); font-size: 1.05em; }

.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display:grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 .span-all { grid-column: 1 / -1; }
}

.stat {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.stat .n { font-size: 24px; font-weight: 750; }
.stat .l { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--accent); color: #fff; font-weight: 650;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-secondary { background: var(--bg-soft); color: var(--text); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--separator); }
.btn-danger { background: var(--red); }
.btn-green { background: var(--green); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }

.field { margin-bottom: 14px; }
.field label { display:block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--separator);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 96px; resize: vertical; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: var(--radius-pill);
  background: var(--bg-soft); color: var(--text-secondary); font-size: 12px;
  border: 0; cursor: pointer; font: inherit; font-weight: 650;
}
.chip:empty { display: none !important; }
.chip.active { background: var(--accent-soft); color: var(--accent-deep); }
.chip.warn { background: rgba(196,125,26,.12); color: var(--orange); }
.chip.danger { background: rgba(214,69,61,.12); color: var(--red); }
.chip.ok { background: rgba(47,158,95,.12); color: var(--green); }
.chip i { font-size: 13px; line-height: 1; }

.progress-ring {
  --p: 0;
  width: 92px;
  height: 92px;
  min-width: 92px;
  min-height: 92px;
  max-width: 92px;
  max-height: 92px;
  aspect-ratio: 1 / 1;
  flex: 0 0 92px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--bg-soft) 0);
  display: grid;
  place-items: center;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}
.progress-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--bg-elevated);
  border-radius: 50%;
}
.progress-ring span {
  position: relative;
  z-index: 1;
  font-weight: 750;
  font-size: 16px;
  color: var(--text);
  line-height: 1;
}

.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.list-item:active, .list-item.active { border-color: var(--accent); background: rgba(154, 107, 79,.08); }
.list-item .icon {
  width: 40px; height: 40px; border-radius: 12px;
  display:grid; place-items:center;
  background: var(--accent-soft); color: var(--accent); font-size: 18px;
}
.list-item .meta { flex: 1; min-width: 0; }
.list-item .meta .t { font-weight: 650; }
.list-item .meta .d { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .chev { color: var(--text-tertiary); }

.check-item {
  display:flex; align-items:center; gap:12px;
  padding: 14px; border-radius: 14px; background: var(--bg-card); margin-bottom: 8px;
}
.check-item input { width: 22px; height: 22px; accent-color: var(--accent); }
.check-item.required .name::after { content: " · 必选"; color: var(--orange); font-size: 12px; }

/* 悬浮毛玻璃底栏 · 4 入口 */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0; z-index: 50;
  pointer-events: none;
  padding: 0 var(--tab-float) calc(var(--safe-bottom) + 12px);
  display: flex;
  justify-content: center;
  background: transparent;
  border: 0;
  height: auto;
}
.tabbar-glass {
  pointer-events: auto;
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 8px 10px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(110, 74, 54, .14);
  box-shadow:
    0 12px 36px rgba(90, 60, 40, .14),
    inset 0 1px 0 rgba(255,255,255,.95);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  border-radius: 20px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .02em;
  transition: color .18s ease, background .18s ease, transform .15s ease;
}
.tabbar a .tab-ico {
  width: 34px; height: 34px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.tabbar a:active { transform: scale(.96); }
.tabbar a.active {
  color: var(--accent-deep);
  background: var(--accent-soft);
}
.tabbar a.active .tab-ico {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(154, 107, 79,.32);
}

/* 首页设计 */
.home-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px 18px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--separator);
  background:
    linear-gradient(160deg, #fff 0%, #f7f2ec 100%);
  box-shadow: var(--shadow);
}
.home-hero-glow {
  position: absolute;
  width: 220px; height: 220px;
  right: -40px; top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(154, 107, 79,.18), transparent 70%);
  pointer-events: none;
}
.home-hero-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.home-hero-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.home-hero-top .progress-ring {
  align-self: flex-start;
  margin-top: 2px;
}
.home-hero-title {
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-top: 4px;
  line-height: 1.2;
}
.home-hero-sub {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}
.home-hero-book {
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 12px;
}
.home-chips { position: relative; margin-top: 14px; }

.home-cta {
  display: grid;
  grid-template-columns: 1.55fr .85fr;
  gap: 10px;
  margin-bottom: 12px;
}
.home-cta-primary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #9a6b4f 0%, #6e4a36 100%);
  box-shadow: 0 12px 28px rgba(154, 107, 79,.28);
}
.home-cta-primary i { font-size: 26px; }
.home-cta-primary .t { font-size: 17px; font-weight: 750; }
.home-cta-primary .d { font-size: 12px; opacity: .85; margin-top: 2px; }
.home-cta-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--separator);
  border-radius: 22px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.home-cta-side i { font-size: 24px; color: var(--green); }

.home-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.home-quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--separator);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 4px 14px rgba(90, 60, 40, .05);
  text-decoration: none;
}
.home-quick a em { font-style: normal; color: var(--text-secondary); }
.home-quick a i {
  width: 40px; height: 40px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 18px;
  line-height: 1;
}
.home-quick a:nth-child(2) i { background: rgba(47,158,95,.12); color: var(--green); }
.home-quick a:nth-child(3) i { background: rgba(196,125,26,.12); color: var(--orange); }
.home-quick a:nth-child(4) i { background: rgba(196,93,114,.12); color: var(--pink); }
.home-chips { gap: 8px; }
.home-cta-ico {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18);
  flex-shrink: 0;
}
.home-cta-ico i { font-size: 22px; }

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.home-stats .stat {
  border: 1px solid var(--separator);
  background: #fff;
}

.banner {
  display:flex; align-items:center; gap:10px;
  padding: 12px 14px; border-radius: 14px; margin-bottom: 14px;
  background: rgba(255,159,10,.12); color: var(--orange); font-size: 13px;
}
.banner.danger { background: rgba(255,69,58,.12); color: var(--red); }
.banner.info { background: var(--accent-soft); color: var(--accent); }

.modal-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.55);
  display:none; align-items: flex-end; justify-content: center;
}
.modal-mask.show { display:flex; }
.sheet {
  width: min(560px, 100%);
  max-height: 86vh; overflow: auto;
  background: var(--bg-elevated);
  border-radius: 20px 20px 0 0;
  padding: 12px 16px calc(20px + var(--safe-bottom));
  animation: rise .28s ease;
}
.sheet .handle {
  width: 36px; height: 5px; border-radius: 99px; background: var(--bg-soft);
  margin: 4px auto 14px;
}
@keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform:none; opacity:1; } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-bottom) + 18px); transform: translateX(-50%);
  z-index: 99; background: rgba(26, 21, 16, .92); color: #fff;
  padding: 10px 16px; border-radius: 99px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
  max-width: 90vw;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}
.toast.show { opacity: 1; }
.admin-body .toast { bottom: calc(72px + var(--safe-bottom)); }

.tag-row { display:flex; flex-wrap:wrap; gap:8px; }
.char-card {
  background: var(--bg-card); border-radius: 14px; padding: 14px; margin-bottom: 10px;
  border: 1px solid var(--separator);
}
.char-glyph {
  width: 64px; height: 64px; border-radius: 14px;
  display:grid; place-items:center;
  font-size: 34px; font-weight: 600;
  background: #f7f2ec; border: 1px solid var(--separator);
  color: var(--text);
}

.auth-wrap {
  min-height: 100vh; display:grid; place-items:center; padding: 24px;
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(154, 107, 79,.16), transparent 60%),
    var(--bg);
}
.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--separator);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
  color: var(--text);
}
.auth-card .logo {
  font-size: 32px; font-weight: 800; text-align: center; margin-bottom: 6px;
}
.auth-card .lead { text-align:center; color: var(--text-secondary); margin-bottom: 22px; font-size: 14px; }

.admin-shell {
  display:flex;
  min-height: 100vh;
  background: var(--bg);
}
.admin-side {
  width: 260px; flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--separator);
  padding: 18px 14px;
  position: sticky; top: 0; height: 100vh; overflow: auto;
  box-shadow: 2px 0 18px rgba(90, 60, 40, .04);
}
.admin-body.theme-dark .admin-side {
  background: #0b0b0d;
  box-shadow: none;
}
.admin-side .brand {
  font-size: 20px;
  font-weight: 750;
  padding: 10px 12px 20px;
  color: var(--text);
  letter-spacing: .02em;
}
.admin-side a {
  display:flex; align-items:center; gap:12px;
  padding: 12px 14px; border-radius: 14px; color: var(--text-secondary);
  margin-bottom: 4px; font-size: 16px; font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.admin-side a i {
  font-size: 18px;
  width: 22px;
  text-align: center;
  color: var(--accent);
  flex-shrink: 0;
}
.admin-side a:hover, .admin-side a.active {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.admin-body.theme-dark .admin-side a:hover,
.admin-body.theme-dark .admin-side a.active {
  color: var(--accent);
}
.admin-side a.active {
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--accent);
}
.admin-main { flex: 1; min-width: 0; padding: 22px 24px 28px; background: var(--bg); }
.admin-top {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.admin-top .h1 { color: var(--text); }
.admin-top-actions { display:flex; align-items:center; gap: 8px; flex-wrap: wrap; }
.admin-theme-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: var(--bg-soft);
  color: var(--text);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  transition: background .15s ease, transform .15s ease, color .15s ease;
}
.admin-theme-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.admin-theme-btn:active { transform: scale(.96); }
/* 浅色显示月亮（切深色）；深色显示太阳（切浅色） */
.admin-theme-btn .bi-sun-fill { display: none; }
.admin-theme-btn .bi-moon-stars-fill { display: inline-block; }
.admin-body.theme-dark .admin-theme-btn .bi-sun-fill { display: inline-block; }
.admin-body.theme-dark .admin-theme-btn .bi-moon-stars-fill { display: none; }
.admin-side a.front-link {
  margin-top: 10px;
  color: var(--accent-deep);
  border: 1px dashed rgba(154, 107, 79,.35);
}
.admin-body.theme-dark .admin-side a.front-link { color: var(--accent); }
.table-wrap { overflow:auto; border-radius: 16px; border: 1px solid var(--separator); }
table.data {
  width: 100%; border-collapse: collapse; background: var(--bg-elevated); font-size: 14px;
  color: var(--text);
}
table.data th, table.data td {
  padding: 12px 14px; border-bottom: 1px solid var(--separator); text-align: left; white-space: nowrap;
}
table.data th { color: var(--text-secondary); font-weight: 600; background: var(--bg-soft); }
table.data tr:hover td { background: rgba(154, 107, 79,.04); }
.admin-body.theme-dark table.data th { background: #161618; }
.admin-body.theme-dark table.data tr:hover td { background: rgba(255,255,255,.02); }

/* 个人中心 */
.profile-hero {
  display:flex; align-items:center; gap: 14px;
  padding: 18px 16px; margin-bottom: 14px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(154, 107, 79,.16), rgba(196, 125, 26,.06)),
    #fff;
  border: 1px solid var(--separator);
  box-shadow: var(--shadow);
}
.profile-hero .avatar {
  width: 56px; height: 56px; border-radius: 18px;
  display:grid; place-items:center;
  font-size: 22px; font-weight: 800;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(154, 107, 79,.28);
}
.profile-hero .name { font-size: 20px; font-weight: 750; }
.list-item .icon.accent { color: var(--accent); background: var(--accent-soft); }
.list-item .icon.green { color: var(--green); background: rgba(48,209,88,.15); }
.list-item .icon.orange { color: var(--orange); background: rgba(255,159,10,.15); }
.list-item .icon.pink { color: var(--pink); background: rgba(255,55,95,.12); }
.section-card .list-item { padding-left: 0; padding-right: 0; }
.points-hero { text-align:center; padding: 24px 16px; }
.points-hero .balance { font-size: 48px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 6px; }
.points-delta { font-weight: 750; font-variant-numeric: tabular-nums; }
.points-delta.plus { color: var(--green); }
.points-delta.minus { color: var(--red); }
.progress-weeks { display:flex; flex-direction:column; gap: 8px; }
.progress-week {
  display:flex; align-items:center; gap: 10px;
  padding: 12px; border-radius: 14px;
  background: var(--bg-card); color: inherit;
}
.progress-week .num {
  width: 44px; height: 44px; border-radius: 12px;
  display:grid; place-items:center;
  background: rgba(154, 107, 79,.15); color: var(--accent);
  font-weight: 750; font-size: 13px; flex-shrink: 0;
}
.progress-week .body { flex:1; min-width:0; }
.progress-week .t { font-weight: 650; }
.progress-week .d { color: var(--text-secondary); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-week.locked { opacity: .45; }
.progress-week.current { outline: 1px solid rgba(154, 107, 79,.45); }
.progress-week.done .num { background: rgba(48,209,88,.18); color: var(--green); }

/* 个人中心九宫格 */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.menu-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px; border-radius: 16px;
  background: var(--bg-card); color: var(--text);
  font-size: 12px; font-weight: 650; text-align: center;
}
.menu-grid a i {
  width: 40px; height: 40px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 18px;
}
.menu-grid a:nth-child(2) i { background: rgba(48,209,88,.15); color: var(--green); }
.menu-grid a:nth-child(3) i { background: rgba(255,159,10,.15); color: var(--orange); }
.menu-grid a:nth-child(4) i { background: rgba(255,55,95,.12); color: var(--pink); }
.menu-grid a:nth-child(5) i { background: rgba(255,159,10,.15); color: var(--orange); }
.menu-grid a:nth-child(6) i { background: rgba(154, 107, 79,.15); color: var(--accent); }
.menu-grid a:nth-child(7) i { background: rgba(48,209,88,.15); color: var(--green); }
.menu-grid a:nth-child(8) i { background: rgba(255,55,95,.12); color: var(--pink); }
.profile-hero .info { flex: 1; min-width: 0; }

/* 周条 / 日历 */
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  width: 100%;
}
.week-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: 14px;
  background: var(--bg-card); color: var(--text-secondary);
  border: 1px solid transparent; font: inherit; cursor: pointer; text-decoration: none;
}
.week-day .w { font-size: 11px; }
.week-day .n { font-size: 15px; font-weight: 750; color: var(--text); }
.week-day.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.week-day.full .n { color: var(--green); }
.week-day.partial .n { color: var(--orange); }
.date-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 10px;
}
.date-switch-mid { text-align: center; }
.date-switch-mid .t { font-weight: 700; font-size: 16px; }

.cal-nav { display:flex; align-items:center; justify-content:space-between; margin-bottom: 12px; }
.cal-weekdays {
  display:grid; grid-template-columns: repeat(7,1fr); gap: 4px;
  margin-bottom: 6px; text-align:center;
  color: var(--text-tertiary); font-size: 12px;
}
.cal-grid { display:grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 14px; border: 0;
  background: var(--bg-card); color: var(--text);
  font: inherit; font-weight: 650; cursor: pointer;
  display:grid; place-items:center;
}
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell.today { outline: 1px solid var(--accent); }
.cal-cell.full { background: rgba(48,209,88,.18); color: var(--green); }
.cal-cell.partial { background: rgba(255,159,10,.16); color: var(--orange); }
.cal-cell.future { opacity: .4; }

/* 上传缩略图 */
.upload-box input[type=file] {
  width: 100%;
  background: var(--bg-card);
  border: 1px dashed var(--separator);
  border-radius: 12px;
  padding: 12px;
}
.thumb-preview, .thumb-item {
  border-radius: 14px; overflow: hidden;
  background: #f7f2ec; border: 1px solid var(--separator);
}
.thumb-preview img, .thumb-item img {
  display:block; width: 100%; height: 120px; object-fit: cover;
}
.thumb-preview .cap, .thumb-item .cap {
  padding: 6px 8px; font-size: 11px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.thumb-item { color: inherit; text-decoration: none; }
.thumb-item img { height: 96px; }

/* 后台手机底栏 */
.admin-tabbar { display: none; }
.admin-more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.admin-more-grid a {
  display:flex; flex-direction:column; align-items:center; gap: 10px;
  padding: 18px 10px; border-radius: 18px;
  background: var(--bg-elevated); border: 1px solid var(--separator);
  color: var(--text); font-size: 13px; font-weight: 650;
}
.admin-more-grid a i {
  width: 44px; height: 44px; border-radius: 14px;
  display:grid; place-items:center;
  background: var(--accent-soft); color: var(--accent); font-size: 20px;
}

@media (max-width: 900px) {
  .admin-body { padding-bottom: calc(64px + var(--safe-bottom)); }
  .admin-shell { flex-direction: column; min-height: auto; }
  .admin-side { display: none; }
  .admin-main { padding: 14px 12px 28px; }
  .admin-top .h1 { font-size: 20px !important; }
  .admin-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    height: calc(64px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--separator);
  }
  .admin-body.theme-dark .admin-tabbar {
    background: rgba(18,18,20,.96);
  }
  .admin-tabbar a {
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 2px;
    color: var(--text-tertiary); font-size: 10px; font-weight: 650;
  }
  .admin-tabbar a i { font-size: 20px; }
  .admin-tabbar a.active { color: var(--accent); }
  .admin-more-grid { grid-template-columns: repeat(3, 1fr); }
  .menu-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .menu-grid a { padding: 12px 4px; font-size: 11px; }
  .thumb-grid { grid-template-columns: repeat(3, 1fr); }
  .captcha-row { grid-template-columns: 1fr 100px; }
  .captcha-img { width: 100px; }
  .table-wrap { margin: 0 -4px; }
  table.data { font-size: 13px; }
}

@media (min-width: 901px) {
  .admin-tabbar { display: none !important; }
}

.timer {
  font-variant-numeric: tabular-nums;
  font-size: 40px; font-weight: 720; letter-spacing: .04em; text-align:center;
}
.empty {
  text-align:center; padding: 40px 16px; color: var(--text-secondary);
}
.lock-overlay {
  opacity: .55; filter: grayscale(.3);
}
.pre {
  white-space: pre-wrap; font-family: inherit; line-height: 1.7;
  color: var(--text-secondary); font-size: 14px;
}

/* —— 会员金黑条 —— */
.vip-bar {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 14px; padding: 14px 16px;
  border-radius: 16px; text-decoration: none; color: #f5d78e;
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(245,215,142,.22), transparent 55%),
    linear-gradient(135deg, #1a1510 0%, #2c241c 55%, #1a1510 100%);
  border: 1px solid rgba(245, 215, 142, .35);
  box-shadow: 0 10px 28px rgba(26, 21, 16, .22);
}
.vip-bar.is-guest { color: #f8e7b0; }
.vip-bar-ico {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #f5d78e, #c9a24b);
  color: #1a1510; font-size: 18px;
}
.vip-bar-copy { flex: 1; min-width: 0; }
.vip-bar-copy .t { font-weight: 750; font-size: 15px; letter-spacing: .02em; }
.vip-bar-copy .d { font-size: 12px; opacity: .78; margin-top: 2px; color: rgba(245,215,142,.85); }
.vip-bar > .bi-chevron-right { opacity: .7; }

.plan-card .plan-price {
  font-size: 32px; font-weight: 800; margin: 8px 0; letter-spacing: -.03em;
  color: var(--accent-deep);
}
.pay-sheet .pay-qr-box {
  display: grid; place-items: center;
  padding: 16px; border-radius: 16px;
  background: #fff; border: 1px solid var(--separator);
}
.pay-sheet .pay-qr-box img {
  width: min(220px, 70vw); height: auto; border-radius: 8px;
}
.pay-qr-preview {
  display: grid; place-items: center; min-height: 180px;
  padding: 16px; border-radius: 16px;
  background: var(--bg-soft); border: 1px dashed var(--separator);
}
.pay-qr-preview img { max-width: 220px; border-radius: 10px; }

/* —— 后台设置中心卡片 —— */
.settings-hub {
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 720px) {
  .settings-hub { grid-template-columns: 1fr 1fr; }
}
.settings-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 16px; border-radius: 18px;
  background: var(--bg-elevated); color: inherit; text-decoration: none;
  border: 1px solid var(--separator); box-shadow: var(--shadow);
}
.settings-card .ico {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 22px;
  background: var(--accent-soft); color: var(--accent-deep);
}
.settings-card.pay .ico { background: rgba(26,21,16,.92); color: #f5d78e; }
.settings-card.mail .ico { background: rgba(48,209,88,.14); color: var(--green); }
.settings-card .body { flex: 1; min-width: 0; }
.settings-card .t { font-weight: 750; font-size: 16px; }
.settings-card .d { color: var(--text-secondary); font-size: 12px; margin-top: 4px; }
.settings-card .chev { color: var(--text-tertiary); }

/* —— 后台消息铃铛 / 红点 —— */
.admin-side a { position: relative; }
.nav-badge {
  margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #e53935; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.admin-bell-wrap { position: relative; }
.admin-bell-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--separator);
  background: var(--bg-elevated); color: var(--text); display: grid; place-items: center;
  cursor: pointer; position: relative;
}
.admin-bell-dot {
  position: absolute; top: 7px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #e53935; box-shadow: 0 0 0 2px var(--bg-elevated);
}
.admin-bell-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  width: min(300px, 78vw);
  background: var(--bg-elevated); border: 1px solid var(--separator);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.admin-bell-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid var(--separator); font-size: 13px;
}
.admin-bell-item {
  display: block; padding: 12px; color: inherit; text-decoration: none; font-size: 13px;
  border-bottom: 1px solid var(--separator);
}
.admin-bell-item:hover { background: var(--bg-soft); }
.admin-tabbar a { position: relative; }
.tab-badge {
  position: absolute; top: 6px; right: 18px;
  width: 8px; height: 8px; border-radius: 50%; background: #e53935;
}
.chip.danger { background: rgba(214,69,61,.14); color: var(--red); }
