:root {
  --blue: #1770EA;
  --blue-d: #0F5BC4;
  --blue-l: #EAF2FE;
  --ink: #141C2B;
  --ink-2: #33415A;
  --muted: #6B7A93;
  --line: #E4EAF3;
  --bg: #F4F7FC;
  --card: #FFFFFF;
  --green: #0E9F6E;
  --green-l: #E8F7F0;
  --amber: #D98B1F;
  --amber-l: #FDF3E3;
  --red: #C0392B;
  --red-l: #FBEDEB;
  --gold: #FFC000;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,28,43,.04), 0 8px 24px rgba(20,28,43,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.2px; }

/* ============ 顶栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: 60px; display: flex; align-items: center; gap: 16px;
  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: 700; font-size: 15px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), #3C8CF5);
  color: #fff; display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
}
.brand small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.topbar-spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--blue-l); color: var(--blue-d);
  font-size: 12.5px; font-weight: 600;
}
.ghost-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 7px 13px; border-radius: 9px; cursor: pointer; font-size: 13px;
  transition: .15s;
}
.ghost-btn:hover { border-color: #C8D6EA; background: #F8FAFE; }

/* ============ 布局 ============ */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.side {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 18px 12px 40px;
  position: sticky; top: 60px; height: calc(100vh - 60px);
  overflow-y: auto;
}
.side-group { margin-bottom: 18px; }
.side-label {
  font-size: 11px; font-weight: 700; color: #97A5BB;
  letter-spacing: .8px; padding: 0 10px 8px; text-transform: uppercase;
}
.side-link {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 9px; color: var(--ink-2);
  font-size: 13.5px; cursor: pointer; transition: .12s; border: none; background: none;
  width: 100%; text-align: left;
}
.side-link:hover { background: #F5F8FD; }
.side-link.active { background: var(--blue-l); color: var(--blue-d); font-weight: 700; }
.side-day {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
  font-size: 12.8px; color: var(--ink-2); border: none; background: none; width: 100%; text-align: left;
}
.side-day:hover { background: #F5F8FD; }
.side-day.active { background: var(--blue-l); color: var(--blue-d); font-weight: 700; }
.side-day .n {
  width: 22px; height: 22px; border-radius: 6px; flex: 0 0 22px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: #F0F4FA; color: var(--muted);
}
.side-day.done .n { background: var(--green-l); color: var(--green); }
.side-day.locked .n { background: #F0F4FA; color: #AEB9CB; }
.side-day .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { padding: 26px 32px 64px; max-width: 1180px; }
/* 未登记页无侧边栏时：占满整行并居中，避免被塞进侧栏列导致挤压 */
.main:only-child { grid-column: 1 / -1; justify-self: center; width: 100%; }

/* ============ 通用卡片 ============ */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.pad { padding: 22px 24px; }
.section { margin-bottom: 20px; }
.sec-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 15.5px; font-weight: 700; margin-bottom: 12px;
}
.sec-title .bar { width: 4px; height: 16px; border-radius: 2px; background: var(--blue); }
.sec-title .hint { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); }

/* ============ 首页 Hero ============ */
.hero {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 30px 32px;
  background: linear-gradient(120deg, #0E4FA8 0%, #1770EA 52%, #3E92F7 100%);
  color: #fff; margin-bottom: 22px;
}
.hero:after {
  content: ""; position: absolute; right: -60px; top: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), transparent 62%);
}
.hero .kicker { font-size: 12px; letter-spacing: 2px; opacity: .82; text-transform: uppercase; }
.hero h1 { font-size: 27px; margin: 8px 0 6px; letter-spacing: -.5px; }
.hero p { margin: 0; max-width: 640px; font-size: 13.5px; opacity: .9; line-height: 1.75; }
.hero-stats { display: flex; gap: 30px; margin-top: 22px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stat .v { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.hero-stat .l { font-size: 11.5px; opacity: .8; }

/* ============ 进度环 ============ */
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 74px; height: 74px; flex: 0 0 74px; }
.ring svg { transform: rotate(-90deg); }
.ring .val {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 17px; font-weight: 800; color: var(--ink);
}
.ring.sm { width: 54px; height: 54px; flex-basis: 54px; }
.ring.sm .val { font-size: 13px; }

/* ============ 阶段 & 日卡 ============ */
.phase-head { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 12px; }
.phase-head h2 { font-size: 17px; }
.phase-head .range { font-size: 12px; color: var(--muted); font-weight: 600; }
.phase-head .sum { font-size: 12.5px; color: var(--muted); margin-left: auto; max-width: 520px; text-align: right; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px; }
.day-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 16px; cursor: pointer; transition: .16s; position: relative;
}
.day-card:hover { border-color: #BFD5F2; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(23,112,234,.09); }
.day-card .top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.day-card .badge {
  font-size: 10.5px; font-weight: 800; letter-spacing: .4px;
  padding: 2px 7px; border-radius: 5px; background: #F0F4FA; color: var(--muted);
}
.day-card .badge.done { background: var(--green-l); color: var(--green); }
.day-card .badge.doing { background: var(--amber-l); color: var(--amber); }
.day-card .hrs { margin-left: auto; font-size: 11px; color: #97A5BB; }
.day-card h3 { font-size: 13.8px; line-height: 1.5; font-weight: 700; }
.day-card p { margin: 5px 0 0; font-size: 11.8px; color: var(--muted); line-height: 1.6; min-height: 34px; }

/* ============ 日详情 ============ */
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.crumb span { cursor: pointer; }
.crumb span:hover { color: var(--blue); }
.day-head { margin-bottom: 18px; }
.day-head .tag {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--blue-d);
  background: var(--blue-l); padding: 3px 9px; border-radius: 6px; margin-bottom: 9px;
}
.day-head h1 { font-size: 24px; line-height: 1.4; }
.day-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.side-card { position: sticky; top: 78px; }

.goal-list { margin: 0; padding: 0; list-style: none; }
.goal-list li {
  position: relative; padding-left: 24px; margin-bottom: 8px; font-size: 13.5px; color: var(--ink-2);
}
.goal-list li:before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 17px; height: 17px; border-radius: 5px; background: var(--green-l); color: var(--green);
  font-size: 11px; font-weight: 800; display: grid; place-items: center; margin-top: 4px;
}
.point {
  border-left: 3px solid #DCE7F7; padding: 2px 0 2px 14px; margin-bottom: 14px;
}
.point:last-child { margin-bottom: 0; }
.point h4 { font-size: 13.6px; margin-bottom: 3px; color: var(--ink); }
.point p { margin: 0; font-size: 13.2px; color: #44546E; line-height: 1.8; }

.res-list { display: grid; gap: 8px; }
.res-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px; background: #FBFCFE; font-size: 13px;
}
.res-item:hover { border-color: #BFD5F2; background: #F7FAFF; }
.res-item .ic {
  width: 26px; height: 26px; border-radius: 7px; background: var(--blue-l);
  color: var(--blue); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: 0 0 26px;
}
.res-item .nm { font-weight: 600; color: var(--ink-2); }
.res-item .nt { font-size: 11.5px; color: var(--muted); }

.task-list { margin: 0; padding-left: 18px; font-size: 13.2px; color: #44546E; }
.task-list li { margin-bottom: 6px; }

/* ============ 表单 ============ */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.field label .req { color: var(--red); margin-left: 2px; }
.field .tip { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-left: 4px; }
input[type=text], input[type=number], input[type=date], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-size: 13.2px; font-family: inherit; color: var(--ink);
  background: #fff; transition: .15s; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,112,234,.1); }
textarea { resize: vertical; min-height: 74px; line-height: 1.7; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.primary-btn {
  background: var(--blue); color: #fff; border: none; border-radius: 9px;
  padding: 10px 20px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: .15s;
}
.primary-btn:hover { background: var(--blue-d); }
.primary-btn:disabled { background: #B9CBE6; cursor: not-allowed; }
.primary-btn.wide { width: 100%; }
.secondary-btn {
  background: #fff; color: var(--blue-d); border: 1px solid #C9DAF2; border-radius: 9px;
  padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.secondary-btn:hover { background: var(--blue-l); }

/* ============ 实战情境强化卡 ============ */
.scenario-card {
  border: 1px solid #F0D9A8;
  background: linear-gradient(180deg, #FFFBF2 0%, #FFFFFF 100%);
}
.scenario-card .sec-title .bar { background: var(--amber); }
.sc-scene {
  font-size: 13.6px; line-height: 1.85; color: #3B2E18;
  padding: 13px 15px; border-radius: 10px; background: #FFF6E6;
  border-left: 3px solid var(--amber); margin-top: 4px;
}
.sc-trap, .sc-mentor {
  margin-top: 11px; padding: 10px 13px; border-radius: 9px;
  font-size: 12.9px; line-height: 1.75; color: #44546E;
}
.sc-trap { background: var(--red-l); color: #7A2E24; }
.sc-mentor { background: var(--blue-l); color: #1A4E94; }
.sc-trap b, .sc-mentor b {
  display: inline-block; margin-right: 9px; padding: 1px 7px;
  border-radius: 5px; font-size: 11px; letter-spacing: .3px;
}
.sc-trap b { background: #F6DCD8; }
.sc-mentor b { background: #D6E7FC; }

/* ============ 状态条 ============ */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 13px; border-radius: 10px; font-size: 12.8px; line-height: 1.65;
}
.notice.info { background: var(--blue-l); color: #1A4E94; }
.notice.ok { background: var(--green-l); color: #0A6B4A; }
.notice.warn { background: var(--amber-l); color: #8A5A10; }
.notice.bad { background: var(--red-l); color: #8B2A1F; }
.notice .ic { font-weight: 800; }

/* ============ 测验 ============ */
.q-item { padding: 18px 0; border-bottom: 1px dashed var(--line); }
.q-item:last-child { border-bottom: none; padding-bottom: 4px; }
.q-head { display: flex; gap: 10px; font-size: 13.8px; font-weight: 600; color: var(--ink); line-height: 1.7; }
.q-no {
  flex: 0 0 24px; height: 24px; border-radius: 7px; background: #F0F4FA; color: var(--muted);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 800;
}
.q-type { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.opts { margin: 10px 0 0 34px; display: grid; gap: 6px; }
.opt {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; font-size: 13px; color: var(--ink-2); transition: .12s; background: #fff;
}
.opt:hover { border-color: #C6D8F2; background: #FAFCFF; }
.opt input { margin: 4px 0 0; accent-color: var(--blue); }
.opt.sel { border-color: var(--blue); background: #F3F8FF; }
.opt.correct { border-color: var(--green); background: var(--green-l); }
.opt.wrong { border-color: var(--red); background: var(--red-l); }
.explain {
  margin: 9px 0 0 34px; font-size: 12.3px; color: #4B5C78;
  background: #F7F9FD; border-left: 3px solid #C9DAF2; padding: 8px 11px; border-radius: 0 7px 7px 0;
}
.explain b { color: var(--green); }
.explain.bad b { color: var(--red); }

/* ============ 成绩 ============ */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.metric { padding: 16px 18px; }
.metric .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.metric .v { font-size: 26px; font-weight: 800; letter-spacing: -1px; margin-top: 2px; }
.metric .s { font-size: 11.5px; color: #97A5BB; }
.bar-track { height: 7px; background: #EEF2F8; border-radius: 999px; overflow: hidden; margin-top: 9px; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--blue); transition: width .5s; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
table.tbl th {
  text-align: left; font-size: 11.5px; color: #7A889E; font-weight: 700;
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFBFE;
}
table.tbl td { padding: 9px 10px; border-bottom: 1px solid #F0F4FA; color: var(--ink-2); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: #FAFCFF; }
.pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.pill.ok { background: var(--green-l); color: var(--green); }
.pill.wait { background: var(--amber-l); color: var(--amber); }
.pill.none { background: #F0F4FA; color: #97A5BB; }
.pill.bad { background: var(--red-l); color: var(--red); }

/* ============ 弹层 ============ */
.overlay {
  position: fixed; inset: 0; background: rgba(16,24,38,.42);
  backdrop-filter: blur(3px); z-index: 90;
  display: grid; place-items: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
  box-shadow: 0 24px 60px rgba(10,20,40,.24); overflow: hidden;
  max-height: 92vh; display: flex; flex-direction: column;
}
.modal.wide { max-width: 860px; }
.modal-head { padding: 20px 24px 12px; }
.modal-head h3 { font-size: 18px; }
.modal-head p { margin: 5px 0 0; font-size: 12.8px; color: var(--muted); }
.modal-body { padding: 6px 24px 18px; overflow-y: auto; }
.modal-foot {
  padding: 14px 24px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end; background: #FCFDFF;
}

/* ============ 提示 ============ */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
  background: #1B2637; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; z-index: 200; opacity: 0; transition: .25s; pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #8B2A1F; }
.toast.ok { background: #0A6B4A; }

.timer {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 14px;
  padding: 5px 12px; border-radius: 8px; background: #F0F4FA; color: var(--ink-2);
}
.timer.hot { background: var(--red-l); color: var(--red); }

.empty {
  text-align: center; padding: 42px 20px; color: var(--muted); font-size: 13px;
}
.loading { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); padding: 22px; }
.spin {
  width: 15px; height: 15px; border: 2px solid #DCE5F2; border-top-color: var(--blue);
  border-radius: 50%; animation: sp .7s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

.mono { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }

@media (max-width: 1080px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 18px; }
  .split { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .hero { padding: 22px; }
  .hero h1 { font-size: 21px; }
  .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; gap: 8px; }
  .brand small { display: none; }
}
