/* ============================================================
   学习成果看板（dashboard.css）
   配色沿用主站翡翠绿调，金为模考强调色；全部类以 dash- 前缀避免冲突
   ============================================================ */
.dash{ max-width:1120px; margin:0 auto; }
.dash-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
  padding:22px 20px 4px; flex-wrap:wrap; }
.dash-head h1{ font-size:24px; font-weight:800; letter-spacing:-.02em; color:var(--color-text); }
@media (min-width:820px){ .dash-head h1{ font-size:30px; } }
.dash-sub{ font-size:12.5px; color:var(--color-text-muted); margin-top:3px; }
.dash-tabs{ display:flex; gap:4px; padding:4px; background:#FBFAF7;
  border:1px solid var(--color-border); border-radius:14px; }
.dash-tab{ padding:9px 18px; font-size:14px; font-weight:600; color:var(--color-text-muted);
  border-radius:11px; cursor:pointer; transition:.2s; border:none; background:transparent; }
.dash-tab.active{ background:var(--color-primary); color:#fff; box-shadow:0 4px 12px rgba(14,138,99,.28); }

.dash-scroll{ padding:14px 20px 34px; display:flex; flex-direction:column; gap:14px; }
.dash-hidden{ display:none !important; }
/* 练习记录标签：普通块级容器（避免桌面端网格把历史分区挤成窄列） */
.dash-history{ padding:14px 20px 34px; display:flex; flex-direction:column; gap:14px; }

.dash-card{ background:#fff; border:1px solid var(--color-border); border-radius:20px;
  padding:16px; box-shadow:0 1px 2px rgba(28,27,25,.04), 0 8px 24px rgba(28,27,25,.05); }
.dash-card h2{ font-size:15px; font-weight:700; display:flex; align-items:center; gap:7px; color:var(--color-text); }
.dash-card h2 .tag{ font-size:10.5px; font-weight:600; color:var(--color-primary); background:var(--color-primary-bg);
  padding:2px 8px; border-radius:999px; }

/* ===== Hero：大数字 + 趋势 ===== */
.dash-hero{ display:flex; gap:14px; align-items:stretch; }
.dash-hero-left{ flex:none; width:42%; display:flex; flex-direction:column; justify-content:flex-start;
  border-right:1px solid var(--color-border); padding-right:14px; }
.dash-hero-label{ font-size:13px; line-height:1.3; color:var(--color-text-muted); font-weight:600; }
.dash-hero-score{ font-size:58px; font-weight:800; line-height:.95; letter-spacing:-.03em; margin-top:4px;
  font-family:system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif; }
.dash-hero-score .max{ font-size:16px; font-weight:600; color:var(--color-text-muted); margin-left:3px; }
.dash-hero-delta{ display:inline-flex; align-items:center; gap:3px; margin-top:8px; font-size:12px; font-weight:700;
  color:var(--color-primary); background:var(--color-primary-bg); padding:3px 10px; border-radius:999px; align-self:flex-start; }
.dash-hero-right{ flex:1; display:flex; flex-direction:column; justify-content:flex-start; min-width:0; }
.dash-t-label{ font-size:13px; line-height:1.3; color:var(--color-text-muted); font-weight:600; }
.dash-spark{ width:100%; height:96px; margin:4px 0 2px; display:block; }
.dash-trend{ position:relative; width:100%; }
.dash-dot{ position:absolute; width:9px; height:9px; border-radius:50%; transform:translate(-50%,-50%);
  border:2px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,.12); z-index:3; }
.dash-dot-start{ background:#C9C3B8; }
.dash-dot-end{ background:var(--color-primary); }
.dash-sp-start,.dash-sp-end{ position:absolute; z-index:4; font-weight:800; font-size:15px; line-height:1;
  font-family:system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
  text-shadow:0 0 4px #fff, 0 0 4px #fff, 0 1px 2px rgba(255,255,255,.9); }
.dash-sp-start{ color:var(--color-text-muted); }
.dash-sp-end{ color:var(--color-primary); }
.dash-spark-foot{ display:flex; justify-content:space-between; font-size:10px; color:var(--color-text-muted); }
.dash-spark-foot b{ color:var(--color-primary); font-weight:700; }
.dash-locked-note{ font-size:12px; color:var(--color-text-muted); background:var(--color-primary-bg);
  border:1px dashed var(--color-primary); border-radius:10px; padding:10px 12px; line-height:1.5; }

/* ===== 三列统计 ===== */
.dash-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.dash-stat{ background:#FBFAF7; border:1px solid var(--color-border); border-radius:14px; padding:12px 10px; text-align:center; }
.dash-stat .n{ font-size:21px; font-weight:800; line-height:1; }
.dash-stat .l{ font-size:11px; color:var(--color-text-muted); margin-top:5px; }
.dash-stat .t{ font-size:10.5px; color:var(--color-primary); font-weight:600; margin-top:2px; }

/* ===== 时长汇总 ===== */
.dash-timebars{ display:flex; flex-direction:column; gap:13px; margin-top:12px; }
.dash-tb-row{ display:flex; flex-direction:column; gap:5px; }
.dash-tb-head{ display:flex; justify-content:space-between; align-items:baseline; font-size:12.5px; }
.dash-tb-head .nm{ font-weight:600; color:#4A4742; }
.dash-tb-head .vl{ font-weight:800; font-size:14px; }
.dash-tb-head .vl.p{ color:var(--color-primary); }
.dash-tb-head .vl.m{ color:var(--gold,#B8860B); }
.dash-tb-track{ height:15px; border-radius:999px; background:var(--color-border); overflow:hidden; }
.dash-tb-fill{ display:block; height:100%; border-radius:999px; }
.dash-tb-fill.p{ background:linear-gradient(90deg,var(--color-primary-dark),var(--color-primary)); }
.dash-tb-fill.m{ background:linear-gradient(90deg,#9A6E08,var(--gold,#B8860B)); }
.dash-time-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:14px; }
.dash-time-label{ font-size:12px; color:var(--color-text-muted); font-weight:600; }
.dash-time-total{ font-size:34px; font-weight:800; line-height:1; letter-spacing:-.02em; margin-top:3px; }
.dash-time-total small{ font-size:13px; color:var(--color-text-muted); font-weight:600; margin-left:2px; }
.dash-time-tag{ font-size:10.5px; font-weight:600; color:var(--color-primary); background:var(--color-primary-bg);
  padding:3px 9px; border-radius:999px; flex:none; margin-top:2px; }
.dash-time-foot{ font-size:11px; color:var(--color-text-muted); margin-top:12px; text-align:right; }
.dash-invest-divider{ height:1px; background:var(--color-border); margin:16px 0 14px; }

/* ===== 四项能力：三段式成长条 ===== */
.dash-ability{ display:flex; flex-direction:column; gap:16px; margin-top:12px; }
.dash-abil{ display:grid; grid-template-columns:1fr auto; gap:4px 10px; align-items:center; }
.dash-abil .name{ font-size:13.5px; font-weight:600; }
.dash-abil .cur{ font-size:16px; font-weight:800; justify-self:end; }
.dash-abil .cur small{ font-size:10px; color:var(--color-text-muted); font-weight:600; margin-left:2px; }
.dash-abil .track{ grid-column:1/3; height:14px; border-radius:999px; background:transparent; position:relative; overflow:hidden; }
.dash-abil .fill-found{ position:absolute; top:0; left:0; height:100%; background:#D4EADD; border-radius:999px 0 0 999px; }
.dash-abil .fill-grow{ position:absolute; top:0; height:100%; background:var(--color-primary); border-radius:999px; }
.dash-abil .gap{ position:absolute; top:0; height:100%; border:1.5px dashed var(--color-text-muted);
  border-radius:999px; box-sizing:border-box; opacity:.6; }
.dash-abil .base{ position:absolute; top:-3px; width:2px; height:20px; background:var(--color-text-muted); border-radius:2px; z-index:3; }
.dash-abil .foot{ grid-column:1/3; display:flex; justify-content:space-between; align-items:center; font-size:11px; color:var(--color-text-muted); }
.dash-abil .peak{ color:var(--gold,#B8860B); font-weight:700; background:#F6EEDA; padding:1px 7px; border-radius:999px; }
.dash-abil .up{ display:inline-flex; align-items:center; gap:3px; color:#fff; font-weight:700;
  background:var(--color-primary); padding:1px 8px; border-radius:999px; font-size:10.5px; }
.dash-abil-legend{ display:flex; gap:14px; flex-wrap:wrap; font-size:10.5px; color:var(--color-text-muted); margin-top:4px; }
.dash-abil-legend span{ display:inline-flex; align-items:center; gap:5px; }
.dash-abil-legend i{ width:14px; height:9px; border-radius:999px; display:inline-block; }
.dash-abil-legend .sw-found{ background:#D4EADD; }
.dash-abil-legend .sw-grow{ background:var(--color-primary); }
.dash-abil-legend .sw-gap{ border:1.5px dashed var(--color-text-muted); background:transparent; }

/* ===== 发音正确率 ===== */
.dash-pron{ display:flex; align-items:center; gap:16px; }
.dash-pron .big{ font-size:40px; font-weight:800; color:var(--color-primary); line-height:1; }
.dash-pron .right{ font-size:12.5px; color:#4A4742; }
.dash-pron .right .up{ color:var(--color-primary); font-weight:700; }

/* ===== 模考成绩单 ===== */
.dash-mock{ background:linear-gradient(135deg,#FBF7EC,#F6EEDA); border:1px solid #EAD9AE; }
.dash-mock .badge{ font-size:10.5px; font-weight:700; color:var(--gold,#B8860B); background:#fff; border:1px solid #EAD9AE;
  padding:2px 9px; border-radius:999px; }
.dash-mock .main{ font-size:30px; font-weight:800; margin-top:8px;
  font-family:system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif; }
.dash-mock .main small{ font-size:13px; color:var(--color-text-muted); font-weight:600; }
.dash-mock .peak-label{ font-size:11px; font-weight:700; color:var(--gold,#B8860B); background:#F6EEDA;
  border:1px solid #EAD9AE; padding:2px 9px; border-radius:999px; margin-left:8px; vertical-align:middle; }
.dash-mock .grid4{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:12px; text-align:center; }
.dash-mock .grid4 .n{ font-size:17px; font-weight:800; }
.dash-mock .grid4 .l{ font-size:10px; color:var(--color-text-muted); margin-top:2px; }

/* ===== 模考成绩单 · 较上场提升（增量胶囊 + 四维增量小字） =====
   配色沿用主站语义色：升=primary 绿；降=柔和赤陶（学习成果页的下降是提醒而非警告，
   不用高饱和 danger 红）；持平=中性灰。白底胶囊在金色卡面上对比清晰。 */
.dash-mock .mock-delta{ display:inline-flex; align-items:center; gap:4px; vertical-align:middle;
  margin-left:8px; background:#fff; border-radius:999px; padding:3px 9px;
  font-size:11.5px; font-weight:750; font-variant-numeric:tabular-nums; white-space:nowrap; }
.dash-mock .mock-delta .arw{ font-size:9px; }
.dash-mock .mock-delta .vs{ font-weight:600; opacity:.7; font-size:10.5px; }
.dash-mock .mock-delta.up{ color:var(--color-primary,#0E8A63); border:1px solid #BFE3D2; }
.dash-mock .mock-delta.down{ color:#B4694E; border:1px solid #EBD3C8; }
.dash-mock .mock-delta.flat{ color:#9A948A; border:1px solid #E2DDD0; }

.dash-mock .grid4 .mock-d{ display:block; margin-top:3px; font-size:10.5px; font-weight:750;
  font-variant-numeric:tabular-nums; }
.dash-mock .grid4 .mock-d.up{ color:var(--color-primary,#0E8A63); }
.dash-mock .grid4 .mock-d.down{ color:#B4694E; }
.dash-mock .grid4 .mock-d.flat{ color:#9A948A; }

/* 仅 1 场模考时没有对比基准：把「缺失」写成下一步行动 */
.dash-mock .mock-once-note{ margin-top:9px; font-size:11.5px; font-weight:600; color:#8A7A4A;
  background:#FBF3DD; border:1px solid #EAD9AE; border-radius:10px; padding:7px 11px; }

/* ===== 里程碑 ===== */
.dash-mile{ display:flex; flex-wrap:wrap; gap:9px; margin-top:10px; }
.dash-m{ flex:0 0 calc((100% - 18px)/3); background:#FBFAF7; border:1px solid var(--color-border); border-radius:14px;
  padding:11px; position:relative; }
.dash-m .ic{ font-size:18px; line-height:1; font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",emoji,sans-serif; }
.dash-m .t{ font-size:12px; font-weight:700; margin-top:5px; }
.dash-m .d{ font-size:10.5px; color:var(--color-text-muted); margin-top:2px; }
.dash-m.got{ background:linear-gradient(160deg,#fff,#EFF8F3); border-color:#BFE3D2; box-shadow:0 4px 14px rgba(14,138,99,.16); }
.dash-m.got .t{ color:var(--color-primary-dark); }
.dash-m.got .check{ display:inline-flex; }
.dash-m.lock{ opacity:.45; filter:grayscale(1); }
.dash-m .check{ display:none; position:absolute; top:8px; right:8px; width:16px; height:16px; border-radius:50%;
  background:var(--color-primary); color:#fff; font-size:10px; align-items:center; justify-content:center; }

/* ===== 桌面端仪表盘网格 ===== */
@media (min-width:820px){
  .dash-scroll{ display:grid; grid-template-columns:repeat(12,1fr); gap:18px; padding:20px 28px 34px; align-items:stretch; }
  .dash-history{ padding:20px 28px 34px; }
  #cHero{ grid-column:1 / 13; grid-row:1; }
  #cAbil{ grid-column:1 / 8;  grid-row:2; }
  #cInvest{ grid-column:8 / 13; grid-row:2; }
  #cMock{ grid-column:1 / 8;  grid-row:3; }
  #cPron{ grid-column:8 / 13; grid-row:3; }
  #cMile{ grid-column:1 / 13; grid-row:4; }
  #cInvest,#cPron{ display:flex; flex-direction:column; justify-content:center; }
  .dash-card{ padding:20px; }
  .dash-card h2{ font-size:16px; }
  .dash-hero{ min-height:300px; }
  .dash-hero-left{ width:34%; justify-content:flex-start; }
  .dash-hero-right{ justify-content:flex-start; }
  .dash-hero-score{ font-size:112px; }
  .dash-spark{ height:250px; margin:8px 0 2px; }
  .dash-dot{ width:11px; height:11px; }
  .dash-sp-start,.dash-sp-end{ font-size:19px; }
  .dash-ability{ gap:20px; }
  .dash-mile{ gap:14px; }
  .dash-m{ flex:1 1 0; min-width:150px; }
}

/* ========================================================
   练习记录：分段筛选 + 卡片式记录条目（适配移动端 & 桌面端）
   ======================================================== */
.hist-wrap{ padding:6px 0 30px; }
.hist-seg{
  display:flex; gap:6px; padding:5px;
  background:#F1EEE6; border-radius:14px;
  border:1px solid var(--color-border);
  margin-bottom:18px;
}
.hist-seg-btn{
  flex:1; display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:10px 12px; border:0; background:transparent; cursor:pointer;
  border-radius:10px;
  font-family:inherit; font-size:14px; font-weight:600;
  color:var(--color-text-muted);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.hist-seg-btn:hover{ color:var(--color-text); }
.hist-seg-btn .n{
  display:inline-flex; min-width:22px; height:20px; padding:0 7px;
  align-items:center; justify-content:center;
  font-size:11.5px; font-weight:700; line-height:1;
  background:#fff; color:var(--color-text-muted);
  border-radius:999px;
}
.hist-seg-btn.active{
  background:#fff; color:var(--color-text);
  box-shadow:0 1px 2px rgba(0,0,0,.06), 0 0 0 1px var(--color-border);
}
.hist-seg-btn.active .n{ background:var(--color-primary-bg); color:var(--color-primary); }

.hist-list{ display:flex; flex-direction:column; gap:10px; }
.hist-item{
  display:flex; align-items:center; gap:14px;
  background:var(--color-surface);
  border:1px solid var(--color-border);
  border-radius:14px;
  padding:14px 16px;
  cursor:pointer;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.hist-item:hover{ box-shadow:var(--shadow-sm); border-color:#DCD8CC; }
.hist-item:active{ transform:scale(.997); }

.hist-icon{
  flex-shrink:0; width:44px; height:44px;
  display:flex; align-items:center; justify-content:center;
  border-radius:12px;
}
.hist-item.is-practice .hist-icon{ background:#E1F1EA; color:var(--color-primary); }
.hist-item.is-mock .hist-icon{ background:#F6EED5; color:#9A6E08; }

.hist-info{ flex:1; min-width:0; }
.hist-title{
  font-size:15px; font-weight:600; color:var(--color-text);
  line-height:1.35;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.hist-sub{
  display:flex; flex-wrap:wrap; align-items:center;
  margin-top:4px; font-size:12.5px; color:var(--color-text-muted);
  line-height:1.4;
}
.hist-sub .hist-kind{ color:var(--color-text); font-weight:600; }
.hist-sub .hist-sep{ margin:0 6px; color:#C9C3B8; }

.hist-score{
  flex-shrink:0;
  display:flex; align-items:baseline; justify-content:flex-end;
  font-size:23px; font-weight:800; line-height:1; color:var(--color-text);
  letter-spacing:-.02em;
  min-width:42px;
}
.hist-score.high{ color:#1F8A5C; }
.hist-score.mid{ color:#B8860B; }
.hist-score.low{ color:#C0392B; }

.hist-empty{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:48px 18px; gap:10px;
  background:var(--color-surface);
  border:1px dashed var(--color-border);
  border-radius:14px;
  color:var(--color-text-muted); font-size:14px; text-align:center;
}
.hist-empty-icon{ font-size:36px; }
.hist-empty-text{ line-height:1.6; }

/* 桌面端：分段控件略宽，文字与卡片更舒展 */
@media (min-width:820px){
  .hist-seg{ padding:6px; border-radius:16px; }
  .hist-seg-btn{ font-size:14.5px; padding:11px 18px; }
  .hist-seg-btn .n{ height:22px; min-width:24px; padding:0 8px; font-size:12px; }
  .hist-item{ padding:16px 20px; border-radius:16px; }
  .hist-icon{ width:48px; height:48px; border-radius:13px; }
  .hist-title{ font-size:16px; }
  .hist-sub{ font-size:13px; }
  .hist-score{ font-size:30px; min-width:54px; }
}
