/* ==========================================================================
 * 鹿梦内训平台 · 全局样式
 * 学员端：深色壁垒主题（深墨底 + 香槟金，稀缺感 / 会员制质感）
 * 后台端：藏青橙专业主题（第一版工作台视觉语言，长时间办公不刺眼）
 * 说明：全部原有 class 名保留，仅通过变量分主题，不牵动 JS 逻辑
 * ========================================================================== */

:root {
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ------------------------- 学员端 · 深色壁垒 ------------------------- */
body.student {
  --bg: #080B11;
  --surface: #12171F;
  --surface-2: #182029;
  --surface-3: #212B38;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --text-1: #EDF0F6;
  --text-2: #97A1B4;
  --text-3: #6A7488;

  --gold: #C9A65B;
  --gold-2: #EBD6A3;
  --gold-soft: rgba(201, 166, 91, .13);

  --accent: #C9A65B;
  --accent-2: #EBD6A3;
  --accent-soft: rgba(201, 166, 91, .14);
  --accent-ink: #EBD6A3;
  --urgent: #FF7A45;

  --red: #FF6369;
  --green: #3CC97E;
  --blue: #6E9BFF;

  --btn-bg: linear-gradient(135deg, #EBD6A3 0%, #C9A65B 100%);
  --btn-ink: #191207;
  --link: #EBD6A3;

  --warn-bg: rgba(255, 176, 74, .10);
  --warn-line: rgba(255, 176, 74, .28);
  --warn-ink: #F0C682;

  --bar: linear-gradient(90deg, #C9A65B, #EBD6A3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .40), 0 10px 28px rgba(0, 0, 0, .32);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, .48), 0 34px 76px rgba(0, 0, 0, .52);
}

/* ------------------------- 后台端 · 藏青橙 ------------------------- */
body.admin {
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #FAFBFE;
  --surface-3: #F0F3F9;
  --line: #E6EAF2;
  --line-2: #D9DFEB;
  --text-1: #1B2437;
  --text-2: #465068;
  --text-3: #7C869C;

  --gold: #FF6A2B;
  --gold-2: #FF8A4C;
  --gold-soft: #FFF1E9;

  --accent: #FF6A2B;
  --accent-2: #FF8A4C;
  --accent-soft: #FFF1E9;
  --accent-ink: #B8481A;
  --urgent: #FF6A2B;

  --red: #DC2626;
  --green: #12A150;
  --blue: #2B6CF6;

  --btn-bg: linear-gradient(135deg, #FF6A2B 0%, #FF8A4C 100%);
  --btn-ink: #FFFFFF;
  --link: #2B6CF6;

  --warn-bg: #FFF8E6;
  --warn-line: #FFE58F;
  --warn-ink: #874D00;

  --bar: linear-gradient(90deg, #FF6A2B, #FF8A4C);
  --navy: #1E2A4A;
  --navy-deep: #141D33;
  --shadow: 0 2px 6px rgba(20, 30, 60, .05), 0 12px 28px rgba(20, 30, 60, .07);
  --shadow-lg: 0 8px 20px rgba(20, 30, 60, .08), 0 24px 60px rgba(20, 30, 60, .12);
}

/* ============================== 基础 ============================== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.student {
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(201, 166, 91, .10), transparent 62%),
    radial-gradient(700px 460px at 105% 8%, rgba(110, 155, 255, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--link); text-decoration: none; }
b, strong { font-weight: 700; }

/* 滚动条（深色端） */
body.student ::-webkit-scrollbar { width: 8px; height: 8px; }
body.student ::-webkit-scrollbar-thumb { background: rgba(201, 166, 91, .22); border-radius: 8px; }
body.student ::-webkit-scrollbar-track { background: transparent; }

/* ============================== 通用 ============================== */
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
}
body.student .card {
  margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0)) , var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), var(--shadow);
}
body.admin .card { margin-bottom: 14px; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.tag-orange { background: var(--accent-soft); color: var(--accent-ink); }
.tag-blue { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
body.admin .tag-blue { background: #EAF0FE; color: #1D4FD7; }
.tag-green { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
body.admin .tag-green { background: #E7F7EE; color: var(--green); }
.tag-red { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
body.admin .tag-red { background: #FDECEC; color: var(--red); }
.tag-gray { background: var(--surface-3); color: var(--text-3); }
.tag-gold {
  background: linear-gradient(135deg, rgba(235, 214, 163, .18), rgba(201, 166, 91, .10));
  color: var(--accent-ink);
  border: 1px solid rgba(201, 166, 91, .32);
}

/* 兼容兜底：不支持 color-mix 的浏览器直接取实色 */
body.student .tag-blue { background: rgba(110, 155, 255, .14); color: #6E9BFF; }
body.student .tag-green { background: rgba(60, 201, 126, .16); color: #3CC97E; }
body.student .tag-red { background: rgba(255, 99, 105, .16); color: #FF6369; }
body.admin .tag-blue { background: #EAF0FE; color: #1D4FD7; }
body.admin .tag-green { background: #E7F7EE; color: #12A150; }
body.admin .tag-red { background: #FDECEC; color: #DC2626; }
body.student .opt.right { background: rgba(60, 201, 126, .16); }
body.student .opt.wrong { background: rgba(255, 99, 105, .16); }
body.admin .opt.right { background: #E7F7EE; }
body.admin .opt.wrong { background: #FDECEC; }
body.admin .btn-danger { background: #DC2626; color: #fff; }
body.student .btn-danger { background: #FF6369; color: #fff; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm); padding: 9px 18px; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-ink);
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
body.admin .btn { box-shadow: 0 4px 12px rgba(255, 106, 43, .26); }
body.student .btn { box-shadow: 0 4px 14px rgba(201, 166, 91, .22); }
.btn:disabled { background: var(--surface-3); color: var(--text-3); cursor: not-allowed; box-shadow: none; filter: none; }
.btn-ghost {
  background: transparent; color: var(--text-1);
  border: 1px solid var(--line-2); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); filter: none; }
.btn-orange { background: linear-gradient(135deg, var(--urgent), color-mix(in srgb, var(--urgent) 70%, #FFB37A)); color: #fff; }
body.admin .btn-orange { background: linear-gradient(135deg, #FF6A2B, #FF8A4C); }
.btn-danger { background: color-mix(in srgb, var(--red) 90%, transparent); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 20px; font-size: 15px; border-radius: var(--radius); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 13px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--text-1); outline: none;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
body.admin .input, body.admin .select, body.admin .textarea { background: #fff; }
.textarea { min-height: 84px; resize: vertical; }
select.select { appearance: none; }

/* ---------- 进度条 ---------- */
.bar { height: 7px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--bar); transition: width .5s var(--ease); }
body.student .bar { background: rgba(255, 255, 255, .09); }
.bar.orange > i { background: var(--bar); }
.bar.green > i { background: linear-gradient(90deg, #16B364, #4CD08A); }

/* ---------- 表格 ---------- */
table.tb { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 13px; border-radius: var(--radius); overflow: hidden; }
table.tb th, table.tb td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
table.tb th { background: var(--surface-2); color: var(--text-3); font-weight: 700; font-size: 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.tb tbody tr { transition: background .14s; }
table.tb tbody tr:hover { background: var(--surface-2); }
table.tb tbody tr:last-child td { border-bottom: none; }

.empty { text-align: center; color: var(--text-3); padding: 40px 12px; font-size: 13px; }

/* ---------- 提示条 ---------- */
.warn-box {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: var(--radius); padding: 11px 13px; font-size: 12.5px; color: var(--warn-ink); line-height: 1.7;
}
.nx-notice {
  border: 1px solid rgba(201, 166, 91, .26);
  background: linear-gradient(135deg, rgba(201, 166, 91, .12), rgba(201, 166, 91, .03));
  border-radius: var(--radius-lg); padding: 14px 16px;
}
.nx-notice .n-title {
  font-size: 12.5px; font-weight: 800; color: var(--accent-ink);
  letter-spacing: .4px; display: flex; align-items: center; gap: 6px;
}
.nx-notice .n-title::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); flex: none;
}
.nx-notice .n-body { font-size: 11.5px; color: var(--text-2); margin-top: 5px; line-height: 1.7; }

.code-box {
  background: #0F141C; color: #B6F0C0; padding: 13px; border-radius: var(--radius-sm);
  font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  white-space: pre-wrap; line-height: 1.7; border: 1px solid rgba(255, 255, 255, .06);
}
.steps { counter-reset: s; padding-left: 0; list-style: none; margin: 0; }
.steps li { position: relative; padding-left: 30px; margin-bottom: 10px; font-size: 13.5px; }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-ink); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; top: 22px; transform: translateX(-50%); z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast-item {
  background: rgba(18, 24, 38, .94); color: #fff; padding: 10px 18px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: toastin .26s var(--ease);
  border: 1px solid rgba(255, 255, 255, .08); max-width: 86vw;
}
body.admin .toast-item { background: var(--navy); border: none; }
@keyframes toastin { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(6, 9, 14, .62); backdrop-filter: blur(3px);
  z-index: 900; display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadein .16s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); width: 100%; max-width: 520px; max-height: 86vh; overflow: auto;
  box-shadow: var(--shadow-lg); animation: pop .22s var(--ease);
}
.modal-head {
  padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
}
body.student .modal-head {
  background: linear-gradient(180deg, rgba(201, 166, 91, .10), transparent);
  border-bottom: 1px solid rgba(201, 166, 91, .20);
}
.modal-body { padding: 16px 18px; }
.modal-foot { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.close-x { cursor: pointer; color: var(--text-3); font-size: 19px; line-height: 1; padding: 0 4px; border-radius: 6px; }
.close-x:hover { color: var(--text-1); background: var(--surface-3); }

/* ====================== 学员端（深色壁垒） ====================== */
.student-shell {
  max-width: 520px; margin: 0 auto; min-height: 100vh;
  padding-bottom: 84px; position: relative;
}

/* 顶部品牌区 */
.top-bar {
  position: relative; overflow: hidden;
  padding: 18px 18px 20px; color: #fff;
  background:
    radial-gradient(120% 150% at 10% -10%, rgba(201, 166, 91, .22), transparent 58%),
    linear-gradient(160deg, #1B2333 0%, #10151D 58%, #0B0F16 100%);
  border-bottom: 1px solid rgba(201, 166, 91, .22);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.top-bar::after {
  content: ""; position: absolute; right: -70px; top: -70px;
  width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 166, 91, .26), transparent 68%);
  pointer-events: none;
}
.top-bar .title { font-size: 18px; font-weight: 800; letter-spacing: .3px; position: relative; }
.top-bar .brand-line {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px; position: relative;
}
.top-bar .brand-mark {
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #191207;
  background: linear-gradient(135deg, #EBD6A3, #C9A65B);
  box-shadow: 0 4px 14px rgba(201, 166, 91, .38);
}
.top-bar .brand-name { font-size: 12.5px; font-weight: 800; letter-spacing: .6px; color: #EBD6A3; }
.top-bar .brand-tag {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-pill);
  border: 1px solid rgba(201, 166, 91, .40); color: #EBD6A3; background: rgba(201, 166, 91, .10);
}
.top-bar .pt-box { text-align: right; position: relative; }
.top-bar .pt-num {
  font-size: 22px; font-weight: 800; line-height: 1.1; color: #EBD6A3;
  font-variant-numeric: tabular-nums; letter-spacing: -.4px;
}
.top-bar .pt-lbl { font-size: 10.5px; color: var(--text-2); letter-spacing: .3px; }

/* 倒计时 Hero 卡 */
.countdown-card {
  margin: 14px 12px 0; position: relative; overflow: hidden;
  border-radius: var(--radius-lg); padding: 15px 16px;
  background: linear-gradient(150deg, #182031 0%, #121822 55%, #101620 100%);
  border: 1px solid rgba(201, 166, 91, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 12px 30px rgba(0, 0, 0, .38);
  cursor: pointer; transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.countdown-card:hover { transform: translateY(-2px); border-color: rgba(201, 166, 91, .45); }
.countdown-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #EBD6A3, #C9A65B);
}
.countdown-num {
  font-size: 30px; font-weight: 800; line-height: 1; color: #EBD6A3;
  font-variant-numeric: tabular-nums; letter-spacing: -1px;
}
.clock { font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 700; letter-spacing: .5px; color: var(--text-1); }
.seat-chip {
  display: inline-block; padding: 4px 11px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 800; white-space: nowrap;
  background: rgba(255, 122, 69, .14); color: var(--urgent);
  border: 1px solid rgba(255, 122, 69, .34);
}

#app { padding: 12px 12px 0; }

/* 课程卡 */
.course-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0)), var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), var(--shadow);
  padding: 0 0 14px; margin-bottom: 14px; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.course-card:hover { transform: translateY(-3px); border-color: rgba(201, 166, 91, .34); box-shadow: var(--shadow-lg); }
.course-card h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 700; letter-spacing: .2px; }
.course-card .cc-pad { padding: 14px 15px 0; }

/* 课程封面（渐变 + 编号水印） */
.cc-cover {
  position: relative; overflow: hidden; height: 84px; padding: 14px 16px;
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
}
.cc-cover.general { background: linear-gradient(120deg, #1D2740 0%, #35507F 100%); }
.cc-cover.ip {
  background: linear-gradient(120deg, #4A3410 0%, #8B6420 48%, #C9A65B 130%);
}
.cc-cover .cc-idx {
  position: absolute; right: 10px; top: -12px; font-size: 52px; font-weight: 800;
  opacity: .16; letter-spacing: -3px; line-height: 1;
}
.cc-cover .cc-kicker {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; opacity: .85; position: relative;
}
.cc-cover .cc-name {
  font-size: 16px; font-weight: 800; line-height: 1.35; position: relative; letter-spacing: .3px;
}
.cc-cover.general::after {
  content: ""; position: absolute; right: -40px; bottom: -50px; width: 150px; height: 150px;
  border-radius: 50%; background: radial-gradient(circle, rgba(110, 155, 255, .32), transparent 70%);
}
.cc-cover.ip::after {
  content: ""; position: absolute; right: -40px; bottom: -50px; width: 150px; height: 150px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 150, .40), transparent 70%);
}

/* 我的 · 会员身份卡 */
.nx-member {
  border-color: rgba(201, 166, 91, .26);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(201, 166, 91, .14), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0)), var(--surface);
}
.nx-member .m-name { font-size: 17px; font-weight: 800; letter-spacing: .4px; }
.nx-member .m-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.nx-member .m-num {
  font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
}
.nx-member .m-num.gold { color: var(--gold-2); }
.nx-member .m-lbl { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.pain-list { margin: 8px 0 0; padding-left: 16px; color: var(--text-2); font-size: 12.5px; }
.pain-list li { margin-bottom: 2px; }
.pain-list li::marker { color: var(--accent); }

.session-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.session-item:last-child { border-bottom: none; }
.dot {
  width: 21px; height: 21px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line-2); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; background: transparent; transition: .16s var(--ease);
}
.dot.done { background: var(--green); border-color: var(--green); }
.dot.wait { border-color: var(--accent); color: var(--accent); }

/* 底部导航 */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 60;
  background: rgba(13, 17, 24, .90); backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line); display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav > div {
  flex: 1; text-align: center; padding: 8px 0 7px; font-size: 11px;
  color: var(--text-3); cursor: pointer; transition: color .16s var(--ease);
  position: relative;
}
.bottom-nav > div.active { color: #EBD6A3; font-weight: 700; }
.bottom-nav > div.active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 2px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #C9A65B, #EBD6A3);
}
.bottom-nav .ico { font-size: 17px; line-height: 1; display: block; margin-bottom: 3px; }

/* 测评 */
.q-item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.q-item:last-child { border-bottom: none; }
.opt {
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 13px;
  margin-top: 8px; cursor: pointer; background: var(--surface-2); transition: .15s var(--ease); font-size: 13.5px;
}
.opt:hover { border-color: var(--accent); }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.opt.right { border-color: var(--green); background: color-mix(in srgb, var(--green) 16%, transparent); }
.opt.wrong { border-color: var(--red); background: color-mix(in srgb, var(--red) 16%, transparent); }

/* 登录 / 注册 */
.login-wrap { max-width: 420px; margin: 0 auto; padding: 56px 20px 40px; }
.login-hero { text-align: center; margin-bottom: 26px; }
.login-logo {
  width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 14px;
  display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #191207;
  background: linear-gradient(135deg, #EBD6A3, #C9A65B);
  box-shadow: 0 10px 30px rgba(201, 166, 91, .34);
}
body.admin .login-logo {
  background: linear-gradient(135deg, #FF7A3D, #FFA35C); color: #fff;
  box-shadow: 0 8px 22px rgba(255, 106, 43, .34);
}
.login-hero h2 { margin: 0 0 6px; font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.login-hero .lsub {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: var(--accent-ink); border: 1px solid rgba(201, 166, 91, .30);
  background: var(--accent-soft); padding: 3px 11px; border-radius: var(--radius-pill);
}
body.admin .login-hero .lsub { color: var(--accent-ink); border-color: #FBD5BC; background: var(--accent-soft); }

/* ====================== 后台端（藏青橙） ====================== */
.admin-shell { display: flex; min-height: 100vh; background: var(--bg); }

.admin-side {
  width: 218px; flex: none; background: var(--navy-deep); color: #C6CEE0;
  padding: 16px 12px 18px; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 70;
}
.admin-side .logo {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 16px; margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 14.5px; font-weight: 800; color: #fff;
}
.admin-side .logo .brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #FF6A2B, #FF9A5A);
  box-shadow: 0 4px 12px rgba(255, 106, 43, .35);
}
.admin-side .logo b { display: block; font-size: 14.5px; line-height: 1.2; }
.admin-side .logo small { display: block; font-size: 10.5px; color: #7C8AA8; font-weight: 500; }

.nav-group {
  padding: 14px 12px 6px; font-size: 10.5px; color: #6B7896;
  font-weight: 800; letter-spacing: .8px;
}
.nav-item {
  padding: 9px 12px; margin-bottom: 2px; cursor: pointer;
  color: #B9C3D8; display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; border-radius: var(--radius-sm);
  transition: .16s var(--ease);
}
.nav-item::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: #55628A; flex: none; transition: .16s var(--ease);
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, #FF6A2B, #FF8A4C);
  color: #fff; font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 106, 43, .35);
}
.nav-item.active::before { background: #fff; }
/* 外链型导航项（如「扫码注册海报」，新窗口打开） */
a.nav-item.nav-link { text-decoration: none; }
a.nav-item.nav-link:hover { text-decoration: none; }

.admin-main { flex: 1; min-width: 0; margin-left: 218px; padding: 0 24px 32px; }
.admin-top {
  position: sticky; top: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 16px 0 14px; margin-bottom: 16px;
  background: rgba(244, 246, 251, .88); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.admin-top h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.admin-top .crumb { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.user-badge { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
  background: linear-gradient(135deg, #4B5A80, #2B3555);
}

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-box {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 16px 18px;
}
.stat-box::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--bar);
}
.stat-box .num { font-size: 27px; font-weight: 800; line-height: 1.15; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-box .lbl { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-top: 3px; }
.stat-box.neutral::before { background: var(--line-2); }
.stat-box .kdot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { width: auto; min-width: 140px; }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 9px; }
.perm-item {
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 11px;
  font-size: 13px; cursor: pointer; display: flex; gap: 7px; align-items: center; transition: .15s var(--ease);
}
.perm-item:hover { border-color: var(--accent); }
.perm-item.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.poster-stage { display: flex; gap: 18px; flex-wrap: wrap; }
.poster-preview canvas { max-width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.poster-form { flex: 1; min-width: 260px; }
.poster-tpl { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.poster-tpl > span {
  border: 1px solid var(--line-2); border-radius: var(--radius-pill);
  padding: 5px 13px; font-size: 12.5px; cursor: pointer; transition: .15s var(--ease);
}
.poster-tpl > span:hover { border-color: var(--accent); }
.poster-tpl > span.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

.switch { width: 42px; height: 23px; border-radius: 12px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch.on { background: var(--accent); }
.switch > i { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: left .2s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch.on > i { left: 21px; }

.view { display: none; }
.view.active { display: block; }

/* ============================== 响应式 ============================== */
@media (max-width: 900px) {
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .grid3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .admin-shell { flex-direction: column; }
  .admin-side { position: static; width: 100%; height: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; }
  .admin-side .logo { width: 100%; border-bottom: none; padding-bottom: 8px; }
  .nav-group { width: 100%; padding: 8px 8px 2px; }
  .nav-item { flex: 1 1 auto; justify-content: center; }
  .admin-main { margin-left: 0; padding: 0 16px 24px; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  .login-wrap { padding-top: 36px; }
}

/* ==================================================================
   头像 / 个人资料 / 互动社区（2026-10-21 新增）
   两端共用：头像与圈子主题色均为渐变实色，不依赖主题变量，
   因此学员端深色与后台浅色下都能直接复用。
   ================================================================== */
.av {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff; line-height: 1;
  background: var(--surface-3); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.av-lg { width: 56px; height: 56px; font-size: 22px; }
.av-sm { width: 26px; height: 26px; font-size: 12px; }
.av-img { padding: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.av-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pf-row { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.pf-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.pf-preset {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.pf-preset:hover { transform: translateY(-2px); }
.pf-preset.on { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--accent); }

/* 分段切换 */
.seg {
  display: inline-flex; gap: 3px; padding: 3px;
  border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--line);
}
.seg span { padding: 5px 12px; border-radius: var(--radius-pill); font-size: 12px; color: var(--text-2); cursor: pointer; }
.seg span.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }

/* 圈子卡片 */
.cir-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 12px;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.cir-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.cir-hero { height: 76px; padding: 12px 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.cir-name { font-size: 16px; font-weight: 800; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .38); }
.cir-badge {
  font-size: 10.5px; padding: 3px 9px; border-radius: var(--radius-pill); flex: none;
  background: rgba(255, 255, 255, .22); color: #fff; border: 1px solid rgba(255, 255, 255, .34);
}
.cir-pad { padding: 11px 14px 13px; }
.cir-top { border-radius: var(--radius-lg); padding: 15px; box-shadow: var(--shadow); }

/* 帖子 */
.post-card { cursor: pointer; padding: 14px 16px; }
.post-head { display: flex; gap: 9px; align-items: center; }
.post-title { font-size: 14.5px; font-weight: 700; margin-top: 10px; }
.post-body {
  margin-top: 6px; font-size: 13.5px; line-height: 1.65; color: var(--text-1);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.post-body.full { -webkit-line-clamp: unset; overflow: visible; display: block; }
.post-foot { margin-top: 10px; display: flex; gap: 16px; align-items: center; }
.act { font-size: 12.5px; color: var(--text-3); cursor: pointer; transition: color .15s var(--ease); }
.act:hover { color: var(--text-2); }
.act.on { color: var(--red); font-weight: 700; }

/* 评论 */
.cmt-item { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cmt-item.sub { margin-left: 34px; padding-left: 12px; border-left: 2px solid var(--line); border-bottom: none; }
.cmt-item:last-child { border-bottom: none; }

/* 后台社区管理：圈子色块 */
.cir-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; flex: none; }

/* 后台痛点海报库（2026-10-21 新增） */
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 14px; }
.poster-card { background: var(--surface, #fff); border: 1px solid var(--line, #e8ecf2); border-radius: 12px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.poster-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20, 29, 51, .12); }
.poster-card img { width: 100%; display: block; aspect-ratio: 3 / 4; object-fit: cover; background: #0b0f18; }
.poster-card .pc-body { padding: 10px 12px 12px; }
.pc-name { font-weight: 600; font-size: 13.5px; color: var(--text, #1f2329); }
