/* ==========================================================================
   蜀信金服 · 专业知识导航  样式表
   设计基调：深蓝（稳重）+ 暖金（专业感）+ 大量留白
   ========================================================================== */

:root {
  --brand: #12467b;
  --brand-600: #17548f;
  --brand-500: #1d6fb8;
  --brand-050: #eef4fa;
  --gold: #b98b3f;
  --gold-050: #fbf6ec;
  --ink: #17212f;
  --ink-2: #3c4a5c;
  --muted: #6b7a8d;
  --line: #e5e9f0;
  --line-2: #eef1f6;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --ok: #1f8a5f;
  --warn: #b7791f;
  --danger: #c0392b;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(23, 33, 47, .05), 0 1px 3px rgba(23, 33, 47, .04);
  --shadow: 0 4px 16px rgba(23, 33, 47, .07), 0 1px 3px rgba(23, 33, 47, .04);
  --shadow-lg: 0 20px 50px rgba(18, 70, 123, .16);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-500); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
input, select, textarea { font-family: inherit; font-size: 14px; }
[hidden] { display: none !important; }

/* ---------------------------------- 启动 ---------------------------------- */
.boot {
  position: fixed; inset: 0; display: grid; place-content: center; gap: 18px;
  background: #fff; z-index: 99; text-align: center;
}
.boot-logo { font-size: 20px; font-weight: 700; letter-spacing: .3em; color: var(--brand); text-indent: .3em; }
.boot-bar { width: 160px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; background: var(--brand-500); animation: slide 1s infinite ease-in-out; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(280%); } }

/* ---------------------------------- 登录 ---------------------------------- */
.login {
  min-height: 100dvh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff;
}
.login-brand {
  position: relative; overflow: hidden; padding: 56px 60px; color: #fff;
  background: radial-gradient(1200px 600px at 10% -10%, #1d6fb8 0%, transparent 55%),
              linear-gradient(150deg, #0e3a66 0%, #12467b 45%, #0b2a4a 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand::after {
  content: ""; position: absolute; right: -120px; bottom: -140px; width: 420px; height: 420px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 60px rgba(255, 255, 255, .03), 0 0 0 140px rgba(255, 255, 255, .02);
}
.login-brand h1 { font-size: 34px; line-height: 1.35; letter-spacing: .01em; }
.login-brand .sub { margin-top: 16px; font-size: 15px; color: rgba(255, 255, 255, .72); max-width: 430px; }
.login-brand .marks { display: flex; gap: 26px; margin-top: 40px; flex-wrap: wrap; }
.login-brand .marks b { display: block; font-size: 26px; font-weight: 650; }
.login-brand .marks span { font-size: 12px; color: rgba(255, 255, 255, .6); letter-spacing: .08em; }
.login-foot { font-size: 12px; color: rgba(255, 255, 255, .45); letter-spacing: .04em; }
.login-panel { display: grid; place-items: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 372px; }
.login-box h2 { font-size: 22px; }
.login-box .tip { color: var(--muted); font-size: 13px; margin: 8px 0 28px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.input, select.input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #fbfcfe; color: var(--ink); outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.input:focus { border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px rgba(29, 111, 184, .12); }
.input::placeholder { color: #a9b4c2; }
.input-row { display: flex; gap: 10px; }
.input-row .input { flex: 1; }

.btn {
  height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-weight: 500; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .16s, transform .06s, box-shadow .16s;
}
.btn:hover { background: var(--brand-600); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { background: #f7f9fc; border-color: #d7dee8; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: #fff; border-color: #f0d5d1; color: var(--danger); }
.btn.danger:hover { background: #fdf3f2; }
.btn.gold { background: var(--gold); }
.btn.gold:hover { background: #a67a33; }
.btn .spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.divider-or { display: flex; align-items: center; gap: 12px; color: #a9b4c2; font-size: 12px; margin: 22px 0; }
.divider-or::before, .divider-or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.btn-wechat { width: 100%; height: 44px; border-radius: 10px; border: 1px solid #d9e8d5; background: #f4faf1; color: #1f7a3f; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-wechat:hover { background: #ebf6e6; }
.btn-wechat svg { width: 18px; height: 18px; }
.form-note { font-size: 12px; color: var(--muted); margin-top: 14px; line-height: 1.7; }
.code-hint { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: var(--gold-050); color: var(--gold); font-size: 12px; margin-top: 8px; }
.err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* -------------------------------- 应用框架 -------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 18px;
  padding: 0 22px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: .02em; color: var(--ink); }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--brand-500), var(--brand)); font-size: 13px; font-weight: 700;
}
.brand small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; letter-spacing: .12em; }

.searchbar { flex: 1; max-width: 560px; position: relative; }
.searchbar input {
  width: 100%; height: 38px; padding: 0 74px 0 38px; border-radius: 10px;
  border: 1px solid var(--line); background: #f7f9fc; outline: none; color: var(--ink);
  transition: all .16s;
}
.searchbar input:focus { background: #fff; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(29,111,184,.1); }
.searchbar .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9aa7b6; display: grid; }
.searchbar kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: #93a1b1; background: #fff; border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 6px; font-family: inherit;
}
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--ink-2); display: grid; place-items: center; }
.icon-btn:hover { background: #f1f4f9; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-050); color: var(--brand); font-weight: 600; font-size: 13px; border: 1px solid #dbe7f3;
}
.user-menu {
  position: absolute; right: 18px; top: 56px; width: 232px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40;
}
.user-menu .head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.user-menu .head b { display: block; font-size: 14px; }
.user-menu .head span { font-size: 12px; color: var(--muted); }
.user-menu button {
  width: 100%; text-align: left; padding: 9px 12px; border: 0; background: transparent;
  border-radius: 8px; color: var(--ink-2); display: flex; align-items: center; gap: 9px; font-size: 13.5px;
}
.user-menu button:hover { background: #f5f8fb; color: var(--ink); }

.shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: calc(100dvh - 60px); }

/* --------------------------------- 侧边栏 -------------------------------- */
.sidebar {
  border-right: 1px solid var(--line); background: #fbfcfe; padding: 18px 12px 40px;
  position: sticky; top: 60px; height: calc(100dvh - 60px); overflow-y: auto;
}
.sidebar::-webkit-scrollbar, .view::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb, .view::-webkit-scrollbar-thumb { background: #dfe5ee; border-radius: 8px; }
.nav-label { font-size: 11px; letter-spacing: .14em; color: #9aa7b6; padding: 8px 12px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 9px;
  color: var(--ink-2); font-size: 13.5px; cursor: pointer; border: 0; background: transparent;
  width: 100%; text-align: left; line-height: 1.45;
}
.nav-item:hover { background: #eef3f9; color: var(--brand); text-decoration: none; }
.nav-item.active { background: var(--brand-050); color: var(--brand); font-weight: 600; }
.nav-item .dot { width: 6px; height: 6px; border-radius: 50%; background: #c3cede; flex: none; }
.nav-item.active .dot { background: var(--brand-500); }
.nav-item .count { margin-left: auto; font-size: 11px; color: #a3aebc; }
.nav-cat { margin-bottom: 2px; }
.nav-cat > .nav-item { font-weight: 600; color: var(--ink); }
.nav-children { margin: 2px 0 8px 16px; border-left: 1px solid var(--line); padding-left: 6px; }
.nav-children .nav-item { font-size: 13px; padding: 6px 10px; color: var(--muted); }
.nav-children .nav-item.active { color: var(--brand); background: var(--brand-050); }

/* ---------------------------------- 主区 --------------------------------- */
.view { padding: 28px 32px 72px; max-width: 1120px; }
.page-head { margin-bottom: 22px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.crumb span.sep { color: #cfd8e3; }
.page-head h1 { font-size: 26px; line-height: 1.35; }
.page-head .lead { color: var(--muted); margin-top: 8px; font-size: 14px; max-width: 780px; }

.hero {
  background: linear-gradient(135deg, #0f3d6b 0%, #12467b 50%, #0d3055 100%);
  border-radius: 16px; padding: 34px 36px; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 68%);
}
.hero h1 { font-size: 27px; letter-spacing: .01em; }
.hero p { color: rgba(255, 255, 255, .74); margin: 10px 0 22px; max-width: 620px; }
.hero-search { display: flex; gap: 10px; max-width: 620px; }
.hero-search input {
  flex: 1; height: 46px; border-radius: 11px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.12); color: #fff; padding: 0 16px; outline: none;
}
.hero-search input::placeholder { color: rgba(255,255,255,.6); }
.hero-search input:focus { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.42); }
.hero-search .btn { height: 46px; background: #fff; color: var(--brand); }
.hero-search .btn:hover { background: #f0f5fb; }
.hero-stats { display: flex; gap: 34px; margin-top: 26px; }
.hero-stats b { font-size: 22px; font-weight: 650; }
.hero-stats span { display: block; font-size: 12px; color: rgba(255,255,255,.55); letter-spacing: .06em; }

.section-title { display: flex; align-items: baseline; gap: 10px; margin: 34px 0 16px; }
.section-title h2 { font-size: 17px; }
.section-title span { font-size: 12.5px; color: var(--muted); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  cursor: pointer; transition: transform .16s, box-shadow .16s, border-color .16s; position: relative; overflow: hidden;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfdcea; text-decoration: none; }
.cat-card .tag { font-size: 11px; letter-spacing: .1em; color: var(--gold); background: var(--gold-050); border-radius: 5px; padding: 2px 7px; display: inline-block; }
.cat-card h3 { margin: 12px 0 6px; font-size: 16px; color: var(--ink); }
.cat-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.cat-card .meta { margin-top: 14px; font-size: 12px; color: #9aa7b6; display: flex; gap: 12px; }

.path-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.path-row { background: #fff; padding: 14px 18px; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.path-row:hover { background: #fafcfe; }
.path-num {
  width: 24px; height: 24px; border-radius: 7px; background: var(--brand-050); color: var(--brand);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none;
}
.path-row b { font-weight: 550; font-size: 13.5px; }
.path-row span { color: var(--muted); font-size: 12.5px; margin-left: auto; text-align: right; }

/* --------------------------------- 章节列表 -------------------------------- */
.ch-list { display: grid; gap: 10px; }
.ch-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  display: flex; gap: 16px; align-items: flex-start; cursor: pointer; transition: all .16s;
}
.ch-item:hover { border-color: #cfdcea; box-shadow: var(--shadow-sm); }
.ch-item .no {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand-050); color: var(--brand);
  display: grid; place-items: center; font-weight: 600; flex: none;
}
.ch-item h3 { font-size: 15px; margin-bottom: 4px; }
.ch-item p { margin: 0; color: var(--muted); font-size: 13px; }
.ch-item .n { margin-left: auto; font-size: 12px; color: #9aa7b6; flex: none; }

/* --------------------------------- 知识点卡片 ------------------------------- */
.k-list { display: grid; gap: 12px; }
.k-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  cursor: pointer; transition: all .16s;
}
.k-card:hover { border-color: #c9d8e8; box-shadow: var(--shadow); }
.k-card .kn { font-size: 11.5px; color: var(--gold); letter-spacing: .08em; }
.k-card h3 { font-size: 16px; margin: 6px 0 8px; line-height: 1.45; }
.k-card .sum { color: var(--ink-2); font-size: 13.5px; margin-bottom: 12px; }
.k-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.k-points li { position: relative; padding-left: 16px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.k-points li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: #c9d5e4; }
.k-card .more { margin-top: 12px; font-size: 12.5px; color: var(--brand-500); display: flex; align-items: center; gap: 6px; }

/* --------------------------------- 详情页 --------------------------------- */
.detail-head { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.detail-head .kn { font-size: 12px; color: var(--gold); letter-spacing: .1em; }
.detail-head h1 { font-size: 24px; margin: 8px 0 12px; line-height: 1.4; }
.detail-head .sum { font-size: 15px; color: var(--ink-2); border-left: 3px solid var(--gold); padding-left: 14px; line-height: 1.7; }
.detail-meta { display: flex; gap: 18px; margin-top: 18px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin-top: 16px; }
.panel > h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.panel > h2 .bar { width: 3px; height: 14px; background: var(--brand); border-radius: 2px; }

.pt-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.pt-list li {
  display: flex; gap: 12px; padding: 13px 15px; background: #fafcfe; border: 1px solid var(--line-2);
  border-radius: 9px; font-size: 14px; color: var(--ink-2); line-height: 1.65;
}
.pt-list li i {
  width: 20px; height: 20px; border-radius: 6px; background: var(--brand-050); color: var(--brand);
  font-size: 11px; font-weight: 600; display: grid; place-items: center; flex: none; font-style: normal; margin-top: 2px;
}

.prose p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.85; }
.prose h4 { font-size: 14.5px; margin: 20px 0 10px; color: var(--ink); padding-left: 10px; border-left: 3px solid var(--brand-500); }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin-bottom: 6px; color: var(--ink-2); line-height: 1.8; }
.table-wrap { overflow-x: auto; margin: 6px 0 18px; border: 1px solid var(--line); border-radius: 9px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 420px; }
.prose th, .prose td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 9px 12px; text-align: left; vertical-align: top; line-height: 1.6; }
.prose th { background: #f7f9fc; font-weight: 600; color: var(--ink); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose th:last-child, .prose td:last-child { border-right: 0; }

.pager { display: flex; gap: 12px; margin-top: 18px; }
.pager a, .pager .btn { flex: 1; height: auto; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-2); display: block; }
.pager .btn { justify-content: flex-start; }
.pager a:hover { border-color: #cfdcea; text-decoration: none; box-shadow: var(--shadow-sm); }
.pager .dir { font-size: 11.5px; color: var(--muted); display: block; margin-bottom: 3px; }
.pager .ttl { font-size: 13.5px; color: var(--ink); font-weight: 500; }
.pager .next { text-align: right; }

/* ---------------------------------- 搜索 --------------------------------- */
.search-head { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.res-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px; cursor: pointer; transition: all .16s; }
.res-item:hover { border-color: #c9d8e8; box-shadow: var(--shadow-sm); }
.res-item .path { font-size: 11.5px; color: #9aa7b6; margin-bottom: 5px; }
.res-item h3 { font-size: 15px; margin-bottom: 6px; }
.res-item .snip { font-size: 13px; color: var(--muted); line-height: 1.7; }
mark { background: #fff2cc; color: #7a5a00; border-radius: 3px; padding: 0 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: #c9d8e8; }
.chip.on { background: var(--brand-050); border-color: #cddff0; color: var(--brand); font-weight: 500; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty b { display: block; color: var(--ink-2); margin-bottom: 6px; }

/* --------------------------------- 我的 ---------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
.stat .lb { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.stat b { display: block; font-size: 26px; font-weight: 650; margin-top: 8px; letter-spacing: -.02em; }
.stat b em { font-size: 13px; font-style: normal; color: var(--muted); font-weight: 400; margin-left: 4px; }
.stat .sub { font-size: 12px; color: #9aa7b6; margin-top: 4px; }

.bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding: 10px 4px 0; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bars .bar { width: 100%; max-width: 46px; background: linear-gradient(180deg, #2b7cc4, #12467b); border-radius: 6px 6px 3px 3px; min-height: 3px; transition: height .5s cubic-bezier(.2,.8,.2,1); }
.bars .bar.zero { background: #e6ebf2; }
.bars .lb { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bars .val { font-size: 11px; color: var(--ink-2); }

/* ---------------------------------- 后台 --------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab {
  padding: 10px 16px; border: 0; background: transparent; color: var(--muted); font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { height: 36px; width: auto; min-width: 150px; }
.toolbar .grow { flex: 1; }

.tbl-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.tbl th, table.tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.tbl th { background: #f8fafc; font-weight: 600; color: var(--ink-2); font-size: 12.5px; letter-spacing: .02em; }
table.tbl tbody tr:hover { background: #fbfcfe; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .name { font-weight: 550; color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; background: #f1f4f9; color: var(--ink-2); }
.badge.on { background: #e9f7ef; color: var(--ok); }
.badge.off { background: #f4f6f9; color: #93a1b1; }
.badge.admin { background: var(--gold-050); color: var(--gold); }
.badge.pending { background: #fdf5e7; color: var(--warn); }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; }
.dot-live.off { background: #cfd8e3; }
.mini-bar { height: 6px; background: #eef2f7; border-radius: 4px; overflow: hidden; min-width: 70px; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2b7cc4, #12467b); border-radius: 4px; }
.row-actions { display: flex; gap: 6px; }
.link-btn { border: 0; background: transparent; color: var(--brand-500); font-size: 12.5px; padding: 2px 4px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.del { color: var(--danger); }
.hint { font-size: 12.5px; color: var(--muted); }
.dept-indent { display: inline-block; }

/* ---------------------------------- 弹窗 --------------------------------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-mask { position: absolute; inset: 0; background: rgba(15, 32, 51, .42); backdrop-filter: blur(2px); }
.modal-body {
  position: relative; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px; padding: 24px 26px; max-height: 88dvh; overflow-y: auto;
}
.modal-body h3 { font-size: 17px; margin-bottom: 6px; }
.modal-body .desc { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: #17212f; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13.5px;
  box-shadow: var(--shadow-lg); z-index: 80; animation: pop .22s ease-out;
}
.toast.err { background: #a5251a; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } }

/* --------------------------------- 响应式 -------------------------------- */
.menu-toggle { display: none; }
@media (max-width: 1080px) {
  .view { padding: 22px 20px 64px; }
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 60px; width: 268px; z-index: 25; height: calc(100dvh - 60px);
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  .menu-toggle { display: grid; }
  .searchbar kbd { display: none; }
  .searchbar input { padding-right: 12px; }
  .hero { padding: 26px 22px; }
  .hero h1 { font-size: 21px; }
  .hero-stats { gap: 22px; }
  .page-head h1 { font-size: 21px; }
  .detail-head, .panel { padding: 20px; }
  .pager { flex-direction: column; }
  .brand small { display: none; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 12px; gap: 10px; }
  .view { padding: 16px 14px 60px; }
  .stat b { font-size: 22px; }
  .hero-search .btn { padding: 0 14px; }
  .nav-label { padding-left: 8px; }
}

/* ==========================================================================
   学习闭环 / 测验 / 排行 / 贷款计算器  （2026-10 新增）
   ========================================================================== */

.toast.ok { background: #14713f; }

/* 侧边栏：锁与完成态 */
.nav-item.locked { color: #a9b4c2; }
.nav-item.locked .dot { background: #dde3ec; }
.nav-item .lock { margin-left: auto; color: #b6c0cd; }
.nav-item .count.done { color: var(--ok); font-weight: 700; }

/* 首页：进度条 */
.hero-progress {
  display: flex; align-items: center; gap: 12px; margin-top: 18px;
  font-size: 12.5px; color: rgba(255, 255, 255, .78); flex-wrap: wrap;
}
.hero-progress a { color: rgba(255, 255, 255, .92); font-size: 12.5px; }
.hp-bar { width: 160px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.2); overflow: hidden; flex: none; }
.hp-bar i { display: block; height: 100%; background: #ffd479; border-radius: 6px; transition: width .3s; }

/* 章节列表：进度与锁 */
.ch-item.locked { opacity: .72; background: #fafbfd; }
.lock-tag { font-size: 11px; color: #8b95a3; background: #eef1f6; border-radius: 20px; padding: 1px 8px; font-weight: 400; vertical-align: middle; }
.ch-progress { height: 5px; border-radius: 5px; background: #eef1f6; overflow: hidden; margin: 8px 0 4px; width: 100%; }
.ch-progress i { display: block; height: 100%; background: linear-gradient(90deg, #1d6fb8, #3f9ad6); border-radius: 5px; }
.ch-progress.lg { height: 7px; width: 220px; }
.ch-meta { font-size: 12px; color: #8b95a3; }
.ch-bar { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.quiz-chip { padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.quiz-chip.ok { background: #e9f7ef; color: var(--ok); }
.quiz-chip.fail { background: #fdeceb; color: var(--danger); }

/* 知识点卡片：已学完 */
.k-card.done { border-color: #cfe8da; background: #fbfefc; }
.done-tag { color: var(--ok); font-size: 11.5px; margin-left: 6px; }

/* 详情页：打勾条 */
.study-bar {
  display: flex; align-items: center; gap: 14px; margin: 4px 0 16px;
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--brand-500);
  border-radius: var(--radius); padding: 14px 18px;
}
.study-bar.is-done { border-left-color: var(--ok); background: #fbfefc; }
.sb-text { min-width: 0; flex: 1; }
.sb-text b { display: block; font-size: 13.5px; }
.sb-text span { font-size: 12.5px; color: var(--muted); }

/* 章节测验卡片 */
.quiz-card {
  display: flex; align-items: center; gap: 16px; margin-top: 18px;
  background: linear-gradient(120deg, #f7fafd, #fff);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px;
}
.quiz-card.passed { border-color: #cfe8da; background: linear-gradient(120deg, #f5fcf8, #fff); }
.quiz-left { min-width: 0; flex: 1; }
.quiz-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.quiz-desc { font-size: 12.8px; color: var(--muted); }

/* 测验弹窗 */
.quiz-list { max-height: 58vh; overflow: auto; padding-right: 4px; margin-bottom: 14px; }
.quiz-q { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.quiz-q:last-child { border-bottom: 0; }
.quiz-q .qt { font-size: 13.8px; margin-bottom: 10px; line-height: 1.6; }
.qopts { display: grid; gap: 8px; }
.qopt {
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  background: #fafcfe; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 12px; font-size: 13px; color: var(--ink-2); line-height: 1.55;
  transition: all .15s;
}
.qopt:hover { border-color: #c9d8e8; background: #f4f8fc; }
.qopt i {
  flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: #e9eef6; color: var(--brand); font-size: 11px; font-style: normal; font-weight: 700;
}
.qopt.on { border-color: var(--brand-500); background: #eef5fc; color: var(--brand); }
.qopt.on i { background: var(--brand-500); color: #fff; }

/* 未解锁页 */
.lock-page { text-align: center; padding: 56px 20px 40px; }
.lock-icon {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; background: #eef3f9; color: #8ba2bd;
}
.lock-page h2 { font-size: 19px; margin-bottom: 8px; }
.lock-page .desc { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.lock-card {
  max-width: 460px; margin: 0 auto; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px;
}
.lock-card-h { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.lock-steps { display: grid; gap: 8px; margin-bottom: 14px; }
.lock-steps > div { display: flex; gap: 9px; align-items: center; font-size: 13px; color: var(--muted); }
.lock-steps i {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: #eef1f6; font-size: 11px; font-style: normal; flex: none;
}
.lock-steps > div.ok { color: var(--ok); }
.lock-steps > div.ok i { background: #e9f7ef; }
.lock-card .btn { width: 100%; }

/* 排行榜 */
.rank-list { display: grid; gap: 6px; }
.rank-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 9px;
}
.rank-row:nth-child(odd) { background: #fafbfd; }
.rank-row.me { background: #eef5fc; box-shadow: inset 0 0 0 1px #cddff0; }
.rk { width: 26px; text-align: center; font-size: 14px; font-weight: 700; color: #9aa7b6; flex: none; }
.rn { min-width: 100px; display: flex; flex-direction: column; line-height: 1.4; }
.rn b { font-size: 13.5px; }
.rn span { font-size: 11.5px; color: #93a1b1; }
.rmeta { font-size: 12px; color: var(--muted); min-width: 190px; }
.rbar { flex: 1; height: 6px; border-radius: 6px; background: #eef1f6; overflow: hidden; min-width: 60px; }
.rbar i { display: block; height: 100%; background: linear-gradient(90deg, #1d6fb8, #59a6dc); }
.rscore { width: 56px; text-align: right; font-weight: 700; color: var(--brand); }

/* 热词榜 */
.hot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.hot-item {
  display: flex; align-items: center; gap: 9px; text-align: left;
  background: #fafcfe; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px;
}
.hot-item:hover { border-color: #c9d8e8; background: #f3f8fd; }
.hot-item i { font-style: normal; font-size: 11.5px; color: #9aa7b6; width: 16px; }
.hot-item i.top { color: var(--gold); font-weight: 700; }
.hot-item span { flex: 1; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-item b { font-size: 12px; color: #9aa7b6; font-weight: 500; }

/* 贷款计算器 */
.calc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; display: grid; grid-template-columns: 300px 1fr; gap: 22px;
}
.cf-grid { display: grid; gap: 12px; }
.cf-field { display: block; }
.cf-field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.cf-field .input { width: 100%; height: 38px; }
.calc-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 10px; }
.cbtn {
  height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: #fafcfe; color: var(--ink-2); font-size: 12.5px;
  white-space: nowrap; padding: 0 4px; line-height: 1; overflow: hidden; text-overflow: ellipsis;
}
.cbtn:hover { border-color: #c9d8e8; }
.cbtn.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.c-tip { font-size: 12px; color: #93a1b1; line-height: 1.6; margin-top: 2px; min-height: 0; }
.cf-quick { margin-top: 12px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qbtn {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 2px 8px; font-size: 12px; color: var(--ink-2);
}
.qbtn:hover { border-color: var(--brand-500); color: var(--brand); }
.calc-result { min-width: 0; }
.calc-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cs-item { background: #f7fafd; border-radius: 9px; padding: 10px 12px; }
.cs-item span { font-size: 12px; color: var(--muted); }
.cs-item b { display: block; font-size: 18px; color: var(--brand); margin-top: 2px; letter-spacing: -.02em; }
.cs-item b.warn { color: var(--danger); }
.cs-item b em { font-size: 11px; font-style: normal; color: #93a1b1; margin-left: 3px; }
.calc-planhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.calc-table { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; }
.calc-table.scroll { max-height: 300px; }
.calc-table .tbl { font-size: 12.5px; }
.calc-table .tbl th { position: sticky; top: 0; background: #f8fafc; z-index: 1; }

/* 我的学习：章节进度 */
.chp-list { display: grid; gap: 4px; }
.chp-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.chp-row:nth-child(odd) { background: #fafbfd; }
.chp-row:hover { background: #f2f7fc; }
.chp-row.locked { opacity: .6; }
.chp-name { min-width: 180px; font-size: 13px; }
.chp-row .ch-progress { margin: 0; max-width: 220px; }
.chp-num { font-size: 12px; color: var(--muted); min-width: 52px; text-align: right; }
.chp-quiz { font-size: 12px; color: #93a1b1; min-width: 62px; }

/* 后台：角色与未学习标记 */
.badge.mgr { background: #eef5fc; color: var(--brand); }
.badge.warn-badge { background: #fdeceb; color: var(--danger); }
tr.row-idle { background: #fffafa; }
tr.row-idle .name { color: #a03a2c; }

@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; }
  .ch-progress.lg { width: 100%; }
  .rmeta { display: none; }
  .chp-name { min-width: 0; flex: 1; }
  .chp-row .ch-progress { display: none; }
  .rank-row { gap: 8px; }
  .quiz-card { flex-direction: column; align-items: stretch; }
  .study-bar { flex-direction: column; align-items: stretch; }
}

/* ---------- 计算器扩展：组合分段 / 气球贷 / 计划性归本 ---------- */
.c-extra { margin: 4px 0 10px; }
.c-extra .seg-head { font-size: 13px; font-weight: 600; color: var(--brand); margin: 6px 0 4px; }
.c-extra .seg-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.c-extra .seg-row > span { min-width: 52px; font-size: 13px; color: var(--muted); }
.c-extra .seg-row .seg-m { width: 76px; text-align: center; }
.c-extra .seg-row .seg-method { width: auto; min-width: 0; padding: 6px 8px; }
.c-extra .seg-actions { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; }
.c-extra .xrow { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.c-extra .xrow .input { width: auto; min-width: 84px; padding: 6px 8px; }
.c-extra .hint { margin: 4px 0 0; }
.calc-form input[type="date"].c-start { min-width: 0; }

/* ---------- 通关恭喜广播 + 排行榜金标 ---------- */
.celebrate-bar {
  display: flex; align-items: center; gap: 10px; max-width: 720px; margin: 12px auto 0;
  padding: 10px 16px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; text-align: left;
  background: linear-gradient(100deg, #fff8e1 0%, #ffefc2 45%, #ffe3a3 100%);
  border: 1px solid #f2d489; color: #7a5a12;
  box-shadow: 0 2px 10px rgba(214, 168, 60, 0.18);
  animation: celebrate-in 0.5s ease-out;
}
.celebrate-bar .cb-icon { font-size: 20px; flex: none; }
.celebrate-bar .cb-text b { color: #a07714; }
@keyframes celebrate-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.rank-row .rk-gold {
  display: inline-block; margin-left: 5px; padding: 0 4px; border-radius: 5px;
  font-style: normal; font-size: 11px; line-height: 16px; vertical-align: 1px;
  color: #8a6407; background: linear-gradient(135deg, #ffe9a8, #ffd25e 55%, #f6c344);
  border: 1px solid #e8bd55; text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

/* ---------- ICP 备案页脚 ---------- */
.icp-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; justify-content: center; align-items: center; gap: 6px;
  padding: 4px 0 5px; font-size: 11px; line-height: 1.4;
  color: rgba(90, 100, 115, 0.55); pointer-events: none;
}
.icp-footer a { color: inherit; text-decoration: none; pointer-events: auto; }
.icp-footer a:hover { color: #5a6473; }
@media (max-width: 860px) { .icp-footer { font-size: 10px; } }

/* ---------- 黄金徽章：学完全部章节 ---------- */
.gold-badge {
  display: flex; align-items: center; gap: 13px;
  width: fit-content; margin: 18px auto 0; padding: 9px 24px 9px 10px;
  border-radius: 999px; color: #43320a; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #7a5c14 0%, #c9a227 26%, #f7e28b 48%, #c9a227 72%, #7a5c14 100%);
  border: 1px solid rgba(122, 92, 20, 0.65);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(96, 70, 10, 0.35);
}
.gold-badge::after {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
  animation: goldShine 3.4s ease-in-out infinite; pointer-events: none;
}
@keyframes goldShine { 0% { left: -70%; } 55% { left: 135%; } 100% { left: 135%; } }
.gold-medal {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #6b4e08;
  background: radial-gradient(circle at 32% 28%, #fff6c2 0%, #eac84f 46%, #a37f18 100%);
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.65), inset 0 -3px 6px rgba(80, 58, 5, 0.45), 0 1px 2px rgba(60, 44, 5, 0.4);
}
.gold-badge b { display: block; font-size: 15px; letter-spacing: 0.06em; text-shadow: 0 1px 0 rgba(255, 244, 190, 0.7); }
.gold-badge span { display: block; font-size: 12px; opacity: 0.78; margin-top: 2px; }
