/* ============================================================
   学知台 · AI学习工作台  全站视觉 v2（知序式：墨绿侧栏 + 浅绿白底 + 产品叙事）
   ============================================================ */
:root {
  /* 色板 */
  --ink-900: #10241c;          /* 最深文字 */
  --ink-700: #1f3a30;          /* 标题文字 */
  --ink-500: #42594f;          /* 正文 */
  --ink-400: #6b7d74;          /* 次级 */
  --ink-300: #97a79e;          /* 弱化 */
  --ink-200: #c3d0ca;          /* 分隔线强 */
  --line: #e4ede8;             /* 卡片描边 */
  --line-soft: #eef4f0;        /* 弱分隔 */
  --green: #16a34a;            /* 主强调 */
  --green-deep: #0e7a3d;
  --green-soft: #e9f6ee;       /* 浅绿底 */
  --green-soft-2: #f3faf5;
  --mint: #34c98e;             /* 亮点缀 */
  --amber: #d9930c; --amber-soft: #fdf3e0;
  --red: #dc4630; --red-soft: #fdeeea;
  --purple: #7c5cff; --purple-soft: #f0ecff;
  --blue: #2f7fe8; --blue-soft: #e8f1fc;
  /* 侧栏 */
  --side-bg: linear-gradient(178deg, #0e2c21 0%, #12352a 60%, #0f2b21 100%);
  --side-text: #b9cdc2;
  --side-active-bg: rgba(52, 201, 142, .16);
  --side-active-text: #eafff5;
  /* 通用 */
  --bg: #f6f9f7;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 36, 28, .04), 0 8px 24px -12px rgba(16, 36, 28, .10);
  --shadow-lift: 0 2px 6px rgba(16, 36, 28, .05), 0 16px 40px -16px rgba(16, 36, 28, .16);
  --sidebar-w: 236px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-deep); text-decoration: none; transition: color .12s; }
a:hover { color: var(--green); }
img { max-width: 100%; }
code { background: var(--green-soft); padding: 1px 6px; border-radius: 6px; font-size: 13px; color: var(--green-deep); }
.hidden { display: none !important; }
.muted { color: var(--ink-400); }
.small { font-size: 12px; }
.center { text-align: center; }
.link { color: var(--green-deep); }
.req { color: var(--red); font-style: normal; }
b, strong { font-weight: 600; }

/* ---------- 布局：墨绿侧栏 + 内容区 ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: var(--side-bg);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
  padding: 0 14px;
  color: var(--side-text);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 22px 6px 18px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(140deg, #3dd68f, #0f8a4f);
  color: #fff; font-weight: 700; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px -4px rgba(22, 163, 74, .55);
  flex-shrink: 0;
}
.brand-name { font-size: 16px; font-weight: 700; color: #f2faf6; letter-spacing: .3px; line-height: 1.2; }
.brand-sub { font-size: 10.5px; color: #7f9a8d; letter-spacing: 2.5px; margin-top: 2px; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; padding-top: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10.5px 12px; border-radius: 10px;
  color: var(--side-text); font-size: 14px; font-weight: 500;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #eafaf2; }
.nav-item.active { background: var(--side-active-bg); color: var(--side-active-text); font-weight: 600; }
.nav-ico { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-ico svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-foot { padding: 14px 4px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.user-chip { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(52,201,142,.22); color: #7df0c0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.user-name { font-size: 13px; color: #d8e8e0; }
.btn-link { background: none; border: none; color: #7f9a8d; cursor: pointer; font-size: 12.5px; }
.btn-link:hover { color: #ffd7ce; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(246,249,247,.88);
  backdrop-filter: blur(8px);
  padding: 14px 28px;
  display: flex; align-items: center; gap: 12px;
}
.page-title { font-size: 19px; font-weight: 700; color: var(--ink-900); flex: 1; letter-spacing: .2px; }
.page-sub { font-size: 12.5px; color: var(--ink-400); margin-top: 2px; font-weight: 400; }
.topbar-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--green); color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 6px 16px -6px rgba(22,163,74,.5);
}
.topbar-action:hover { background: var(--green-deep); color: #fff; }
.burger { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--ink-900); padding: 4px; }
.mask { display: none; position: fixed; inset: 0; background: rgba(8,20,16,.4); z-index: 35; }
.content { padding: 22px 28px 56px; max-width: 1320px; width: 100%; }

/* ---------- 卡片 / 提示 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}
.card-title { font-size: 15.5px; font-weight: 700; color: var(--ink-900); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title .en { font-size: 10.5px; color: var(--ink-300); letter-spacing: 1.6px; text-transform: uppercase; font-weight: 600; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head .card-title { margin-bottom: 0; }
.card-more { font-size: 13px; color: var(--ink-400); font-weight: 500; }
.card-more:hover { color: var(--green-deep); }
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.flash-success { background: var(--green-soft); color: #0e7a3d; border: 1px solid #bfe8d2; }
.flash-error { background: var(--red-soft); color: #b33a2a; border: 1px solid #f6cdc2; }
.empty { text-align: center; padding: 46px 10px; color: var(--ink-400); }
.empty .empty-icon { font-size: 34px; margin-bottom: 10px; }
.empty .btn { margin-top: 14px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 10px;
  padding: 8px 17px; font-size: 14px; cursor: pointer;
  transition: all .15s; line-height: 1.45; white-space: nowrap; font-weight: 500;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-deep); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-500); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-deep); }
.btn-danger-ghost { background: #fff; border-color: var(--line); color: var(--red); }
.btn-danger-ghost:hover { border-color: var(--red); background: var(--red-soft); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 11px 26px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 8px; }
.form-item { margin-bottom: 4px; }
.span-2 { grid-column: span 2; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-700); margin-bottom: 7px; }
.form-hint { font-size: 12.5px; color: var(--ink-400); margin-top: 7px; line-height: 1.6; }
.input {
  width: 100%; padding: 10px 13px;
  border: 1px solid #d9e4dd; border-radius: 10px;
  background: #fff; font-size: 14px; color: var(--ink-700); font-family: inherit;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,.13); }
textarea.input { resize: vertical; font-family: inherit; line-height: 1.7; }
.textarea-lg { min-height: 220px; }
.form-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-row .input { width: auto; flex: 1; min-width: 140px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.capsule-row { display: flex; gap: 10px; flex-wrap: wrap; }
.capsule {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-size: 13.5px; color: var(--ink-500);
  transition: all .13s;
}
.capsule input { display: none; }
.capsule.active { background: var(--green-soft); border-color: var(--green); color: var(--green-deep); font-weight: 600; }
.switch-row { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: 13.5px; }
.switch-row .switch-ui {
  width: 40px; height: 23px; border-radius: 999px; background: #d5e0da;
  position: relative; flex-shrink: 0; margin-top: 2px; transition: background .15s;
}
.switch-row .switch-ui::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 19px; height: 19px; border-radius: 50%; background: #fff;
  transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.22);
}
.switch-row input { display: none; }
.switch-row input:checked + .switch-ui { background: var(--green); }
.switch-row input:checked + .switch-ui::after { transform: translateX(17px); }

/* ---------- 首页 Hero ---------- */
.hero { padding: 26px 4px 8px; margin-bottom: 6px; }
.hero h1 { font-size: 30px; font-weight: 800; color: var(--ink-900); letter-spacing: .3px; line-height: 1.3; }
.hero .hero-en { font-size: 12px; color: var(--green-deep); letter-spacing: 3px; text-transform: uppercase; font-weight: 700; margin-top: 10px; }
.hero .hero-desc { color: var(--ink-400); margin-top: 10px; max-width: 560px; font-size: 14px; }
.hero-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- 首页：学习闭环统计卡 ---------- */
.loop-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 20px; }
.loop-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 15px; box-shadow: var(--shadow);
  position: relative; overflow: hidden; transition: box-shadow .16s, transform .16s;
}
.loop-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.loop-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3.5px; background: var(--green); }
.loop-card .loop-ico { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; margin-bottom: 10px; }
.loop-num { font-size: 27px; font-weight: 800; color: var(--ink-900); line-height: 1.15; font-variant-numeric: tabular-nums; }
.loop-num em { font-style: normal; font-size: 13px; color: var(--ink-300); font-weight: 600; margin-left: 2px; }
.loop-label { font-size: 12.5px; color: var(--ink-400); margin-top: 4px; }
.loop-trend { font-size: 11.5px; color: var(--ink-300); margin-top: 2px; }
/* 圆环（掌握率） */
.ring-card { display: flex; align-items: center; gap: 13px; }
.ring {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--card); }
.ring b { position: relative; z-index: 1; font-size: 14.5px; font-weight: 800; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.ring .ring-note { position: absolute; right: -34px; bottom: -8px; font-size: 10px; color: var(--ink-300); }

/* ---------- 首页主网格 ---------- */
.dash-grid { display: grid; grid-template-columns: 1.75fr 1fr; gap: 18px; align-items: start; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 18px; }

/* 你的下一步 */
.todo-item { display: flex; align-items: center; gap: 13px; padding: 12px 4px; border-bottom: 1px dashed var(--line-soft); }
.todo-item:last-child { border-bottom: none; }
.todo-flag { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 14.5px; font-weight: 600; color: var(--ink-900); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-title:hover { color: var(--green-deep); }
.todo-meta { display: flex; align-items: center; gap: 9px; margin-top: 5px; flex-wrap: wrap; }
.todo-meta .tag-chip { background: var(--green-soft-2); }
.todo-cnt { font-size: 12px; color: var(--ink-300); }
.todo-go { color: var(--ink-300); font-size: 16px; flex-shrink: 0; }

/* 动态流 */
.feed-list { list-style: none; }
.feed-list li { display: flex; gap: 13px; padding: 11px 0; border-bottom: 1px dashed var(--line-soft); }
.feed-list li:last-child { border-bottom: none; }
.feed-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; box-shadow: 0 0 0 3px var(--green-soft); }
.dot-blue { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.dot-green { background: var(--green); }
.dot-purple { background: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.dot-gray { background: #c9d5cf; box-shadow: 0 0 0 3px #f0f4f2; }
.feed-body { flex: 1; min-width: 0; }
.feed-line { display: flex; gap: 8px; align-items: baseline; }
.feed-action { color: var(--green-deep); font-size: 12.5px; font-weight: 600; flex-shrink: 0; }
.feed-title { color: var(--ink-700); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-title:hover { color: var(--green-deep); }
.feed-remark { font-size: 12.5px; color: var(--ink-400); margin-top: 2px; }
.feed-time { font-size: 11.5px; color: var(--ink-300); }

/* 学习日历（绿阶热力） */
.cal-nav { display: flex; gap: 8px; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--ink-400); margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 9px; background: #f2f7f4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 13px; color: var(--ink-500); position: relative; transition: transform .12s;
}
.cal-cell b { font-weight: 500; }
.cal-cell i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin-top: 2px; }
.cal-cell.empty { background: transparent; }
.cal-cell.lv1 { background: #e0f2e8; }
.cal-cell.lv2 { background: #b9e6cd; }
.cal-cell.lv3 { background: #7fd4a8; }
.cal-cell.lv4 { background: #2fae6f; color: #fff; }
.cal-cell.lv4 b { color: #fff; }
.cal-cell.today { outline: 2px solid var(--green); outline-offset: 1px; }
.cal-legend { display: flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 11.5px; color: var(--ink-300); justify-content: flex-end; }
.cal-legend i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }

/* 分类分布 */
.cat-bar-row { margin-bottom: 13px; }
.cat-bar-label { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; color: var(--ink-500); }
.cat-bar-cnt { margin-left: auto; color: var(--ink-300); font-size: 12px; font-variant-numeric: tabular-nums; }
.cat-dot { width: 10px; height: 10px; border-radius: 4px; display: inline-block; flex-shrink: 0; }
.cat-bar-track { height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 999px; transition: width .4s; }
.quick-links { display: flex; flex-direction: column; gap: 10px; }

/* ---------- 笔记列表 ---------- */
.filter-bar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-bar .input { width: auto; }
.search-input { flex: 1; min-width: 220px; }
.note-list-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.note-row { display: flex; gap: 16px; align-items: center; padding: 14px 6px; border-bottom: 1px solid var(--line-soft); transition: background .12s; border-radius: 10px; }
.note-row:hover { background: var(--green-soft-2); }
.note-row:last-child { border-bottom: none; }
.note-row-main { flex: 1; min-width: 0; }
.note-row-title { font-size: 15px; font-weight: 600; color: var(--ink-900); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-row-title:hover { color: var(--green-deep); }
.note-row-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 7px; }
.note-row-summary { color: var(--ink-400); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.note-row-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.inline-form { display: inline; }
.chip { display: inline-flex; align-items: center; padding: 2.5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.chip-gray { background: #f0f4f2; color: #5d6f66; }
.chip-blue { background: var(--blue-soft); color: #2366bd; }
.chip-green { background: var(--green-soft); color: var(--green-deep); }
.chip-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-500); font-weight: 500; }
.tag-chip { display: inline-flex; padding: 2px 9px; border-radius: 7px; background: #f3f6f4; color: #5d6f66; font-size: 12px; }
.pager { display: flex; gap: 6px; justify-content: center; padding-top: 18px; flex-wrap: wrap; }
.page-link { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink-500); }
.page-link:hover { border-color: var(--green); color: var(--green-deep); }
.page-link.active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }

/* ---------- 笔记详情 ---------- */
.note-detail { max-width: 960px; }
.detail-top { background: linear-gradient(150deg, #ffffff 0%, var(--green-soft-2) 100%); border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.detail-title-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.detail-title { font-size: 25px; font-weight: 800; line-height: 1.4; margin-bottom: 12px; color: var(--ink-900); letter-spacing: .2px; }
.open-source { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 18px; padding: 16px 20px; background: linear-gradient(135deg, #f2fbf5 0%, #f8fdfa 100%); border: 1px solid #cdeeda; border-radius: var(--radius); }
.open-source .btn-lg { box-shadow: 0 6px 16px rgba(22, 163, 74, .22); }
.open-source-hint { font-size: 13px; color: var(--ink-400); }
.detail-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-400); }
.detail-meta a { font-weight: 500; }
.detail-tags { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.summary-card { background: linear-gradient(140deg, var(--green-soft) 0%, #f6fcf8 100%); border: 1px solid #cdeeda; }
.summary-card .card-title { color: var(--green-deep); }
.summary-card p { font-size: 15px; line-height: 1.8; color: var(--ink-700); }
.kp-list { list-style: none; counter-reset: kp; }
.kp-list li { display: flex; gap: 13px; padding: 10px 0; border-bottom: 1px dashed var(--line-soft); }
.kp-list li:last-child { border-bottom: none; }
.kp-num { width: 26px; height: 26px; border-radius: 8px; background: var(--green-soft); color: var(--green-deep); font-weight: 700; font-size: 13.5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.kp-text { flex: 1; line-height: 1.75; color: var(--ink-700); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.detail-grid .card { margin-bottom: 0; }
.dot-list { list-style: none; }
.dot-list li { position: relative; padding: 5px 0 5px 19px; line-height: 1.75; color: var(--ink-700); }
.dot-list li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); opacity: .75; }
.q-list li::before { background: var(--amber); }
.suggest-card { background: var(--green-soft-2); border: 1px dashed #bfe8d2; }
.suggest-body { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.raw-content { white-space: pre-wrap; line-height: 1.9; font-size: 14px; color: var(--ink-500); max-height: 460px; overflow-y: auto; background: #fbfdfc; border: 1px solid var(--line-soft); border-radius: 12px; padding: 18px; }
.tl-list { list-style: none; }
.tl-list li { display: flex; gap: 13px; padding: 8px 0; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); margin-top: 9px; flex-shrink: 0; box-shadow: 0 0 0 3px var(--green-soft); }
.tl-dot-green { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.tl-dot-purple { background: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.tl-dot-gray { background: #c9d5cf; box-shadow: 0 0 0 3px #f0f4f2; }
.tl-body { flex: 1; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }
.tl-time { color: var(--ink-300); font-size: 12px; margin-left: auto; }
.detail-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.mobile-actionbar { display: none; }

/* ---------- 导入页（左侧步骤导航） ---------- */
.import-page { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
.step-nav {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow); position: sticky; top: 84px;
}
.step-item { display: flex; gap: 13px; align-items: flex-start; padding: 13px; border-radius: 11px; color: var(--ink-400); transition: background .13s; }
.step-item.active { background: var(--green-soft); color: var(--green-deep); }
.step-item.done .step-num { background: var(--green); color: #fff; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: #eef3f0; color: var(--ink-400); font-weight: 700; font-size: 13.5px;
  display: flex; align-items: center; justify-content: center; transition: all .13s;
}
.step-item.active .step-num { background: var(--green); color: #fff; box-shadow: 0 4px 10px -3px rgba(22,163,74,.5); }
.step-text b { display: block; font-size: 14px; color: var(--ink-700); }
.step-item.active .step-text b { color: var(--green-deep); }
.step-text i { font-style: normal; font-size: 12px; opacity: .85; }
.import-card { margin-bottom: 0; }
.step-pane { padding: 6px 0 10px; }
.url-row { display: flex; gap: 10px; }
.url-row .input { flex: 1; }
.drop-area {
  border: 1.5px dashed #a8d8bd !important; background: var(--green-soft-2) !important;
  min-height: 210px; font-size: 13.5px; color: var(--ink-400);
}
.drop-area::placeholder { color: #9fb8ab; text-align: center; line-height: 3.2; }

/* ---------- 分类管理 ---------- */
.cat-table { display: flex; flex-direction: column; gap: 10px; }
.cat-row { display: flex; gap: 10px; align-items: center; }
.cat-row .input { width: auto; }
.cat-row .input:first-of-type { flex: 1; }
.input-color { width: 52px; padding: 4px; height: 40px; }
.input-sort { width: 76px; }
.cat-count { font-size: 13px; color: var(--ink-400); min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.cat-row-delete { display: flex; justify-content: flex-end; margin-top: -8px; margin-bottom: 6px; }

/* ---------- 复盘 ---------- */
.review-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.wide-card { grid-column: span 1; text-align: left; }
.wide-card .stat-label { font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.tl-day { margin-bottom: 18px; }
.tl-day-head { font-weight: 700; font-size: 14px; padding: 6px 0 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px; color: var(--ink-900); }
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px 16px; box-shadow: var(--shadow); text-align: center;
}
.stat-num { font-size: 27px; font-weight: 800; color: var(--ink-900); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-num.blue { color: var(--blue); }
.stat-num.green { color: var(--green-deep); }
.stat-num.amber { color: var(--amber); }
.stat-num.purple { color: var(--purple); }
.stat-label { font-size: 12.5px; color: var(--ink-400); margin-top: 4px; }

/* ---------- 设置 ---------- */
.settings-page { max-width: 900px; }
#providerHint { color: var(--ink-400); }
#testResult { font-size: 13px; }

/* ---------- 认证页 ---------- */
.auth-body { background: linear-gradient(160deg, #0e2c21 0%, #154334 55%, #10291f 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-wrap { width: 100%; max-width: 410px; }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand .brand-logo { margin: 0 auto 12px; width: 54px; height: 54px; font-size: 26px; border-radius: 15px; }
.auth-title { font-size: 22px; font-weight: 800; color: #f2faf6; }
.auth-sub { color: #8fb3a2; font-size: 13px; margin-top: 6px; letter-spacing: .3px; }
.auth-card { background: var(--card); border-radius: 18px; padding: 28px; box-shadow: 0 20px 60px -18px rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.1); }
.auth-form .form-item { margin-bottom: 17px; }
.auth-form .form-label { color: var(--ink-700); }
.auth-links { text-align: center; margin-top: 15px; font-size: 13px; }
.auth-links a { color: var(--green-deep); font-weight: 600; }
.auth-foot { text-align: center; color: #7f9a8d; font-size: 12px; margin-top: 18px; }

/* ---------- 安装页 ---------- */
.install-wrap { max-width: 720px; margin: 0 auto; padding: 30px 0; }
.install-wrap h2 { margin-bottom: 8px; font-size: 22px; font-weight: 800; color: var(--ink-900); }
.check-list { list-style: none; margin-bottom: 6px; }
.check-list li { padding: 5px 0; font-size: 13.5px; color: var(--ink-500); }
.check-list .ok { color: var(--green-deep); font-weight: 600; }
.check-list .fail { color: var(--red); font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .loop-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s; box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .mask.show { display: block; }
  .main { margin-left: 0; }
  .burger { display: block; }
  .content { padding: 16px 14px 90px; }
  .topbar { padding: 12px 14px; }
  .detail-grid, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .import-page { grid-template-columns: 1fr; }
  .step-nav { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .step-item { padding: 8px; }
  .step-text i { display: none; }
  .review-stats { grid-template-columns: repeat(2, 1fr); }
  .note-row { flex-direction: column; align-items: flex-start; }
  .note-row-actions { width: 100%; }
  .hero h1 { font-size: 24px; }
  .mobile-actionbar {
    display: flex; gap: 10px;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    backdrop-filter: blur(8px);
  }
  .mobile-actionbar .inline-form { flex: 1; }
  .mobile-actionbar .btn { width: 100%; }
}
@media (max-width: 560px) {
  .loop-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .loop-num { font-size: 23px; }
}
