:root {
  --bg: #F5F1E9;
  --card: #FFFDF8;
  --card-2: #FDFBF6;
  --ink: #4A443C;
  --ink-2: #7C746A;
  --ink-3: #A79E92;
  --line: #E8E0D2;
  --pink: #E8C4C4;
  --orange: #EBC9A8;
  --yellow: #EFDFA8;
  --purple: #D3C7DE;
  --sage: #C9D6C4;
  --blue: #C2D0DA;
  --accent: #B0705F;
  --accent-soft: #F6E7DF;
  --accent-line: #E8CDBD;
  --accent-grad: linear-gradient(100deg, #F6E7DF, #F7EDE3);
  --hero-grad: linear-gradient(150deg, #F7F2E7, #F3EDE4 50%, #EFE9F0);
  --quote-grad: linear-gradient(120deg, #EFDFA8, #EBC9A8 55%, #E8C4C4);
  --radius: 18px;
  --shadow: 0 2px 18px rgba(140, 125, 100, 0.07);
}

/* 主题二：薰衣草（柔紫） */
[data-theme="lavender"] {
  --bg: #F2EFF7; --card: #FCFBFE; --card-2: #F9F7FC;
  --ink: #443F52; --ink-2: #736C85; --ink-3: #A39BAD;
  --line: #E3DDEE;
  --pink: #DCC9E4; --orange: #D9CDE8; --yellow: #E4D9EF;
  --purple: #C9BBE0; --sage: #CDD4E4; --blue: #C4CDE4;
  --accent: #7A5FA8; --accent-soft: #EDE7F7; --accent-line: #D9CDEA;
  --accent-grad: linear-gradient(100deg, #EDE7F7, #F4EFFA);
  --hero-grad: linear-gradient(150deg, #F4F1FA, #EFEBF6 50%, #F0ECF4);
  --quote-grad: linear-gradient(120deg, #E4D9EF, #DCC9E4 55%, #D9CDE8);
  --shadow: 0 2px 18px rgba(122, 95, 168, 0.08);
}

/* 主题三：薄荷（清绿） */
[data-theme="mint"] {
  --bg: #EFF4EF; --card: #FBFEFC; --card-2: #F7FBF8;
  --ink: #3D4740; --ink-2: #6B7A70; --ink-3: #9CABA1;
  --line: #DCE7DF;
  --pink: #C9DFCF; --orange: #CFE0CE; --yellow: #DCE8CB;
  --purple: #C6D9CC; --sage: #BCD6C2; --blue: #C2D8CE;
  --accent: #3F7A57; --accent-soft: #E3F0E7; --accent-line: #C3DCC9;
  --accent-grad: linear-gradient(100deg, #E3F0E7, #EDF6EF);
  --hero-grad: linear-gradient(150deg, #F1F6F2, #ECF2ED 50%, #EEF4F0);
  --quote-grad: linear-gradient(120deg, #DCE8CB, #CFE0CE 55%, #C9DFCF);
  --shadow: 0 2px 18px rgba(63, 122, 87, 0.08);
}

/* 主题四：暖阳（蜜橘） */
[data-theme="sunset"] {
  --bg: #F8F1EA; --card: #FFFCF8; --card-2: #FEF9F3;
  --ink: #4E4034; --ink-2: #82705C; --ink-3: #AC9C86;
  --line: #EEE0CE;
  --pink: #F0CDBB; --orange: #F2D2AC; --yellow: #F5DEB0;
  --purple: #E8CFC0; --sage: #E0D4C2; --blue: #E4CFC4;
  --accent: #B5713F; --accent-soft: #FAEDE0; --accent-line: #F0D6BC;
  --accent-grad: linear-gradient(100deg, #FAEDE0, #FDF4EA);
  --hero-grad: linear-gradient(150deg, #FAF3EA, #F6EFE4 50%, #F8F0EA);
  --quote-grad: linear-gradient(120deg, #F5DEB0, #F2D2AC 55%, #F0CDBB);
  --shadow: 0 2px 18px rgba(181, 113, 63, 0.08);
}

/* 主题五：雾蓝（静谧） */
[data-theme="mist"] {
  --bg: #EEF3F7; --card: #FBFDFF; --card-2: #F6FAFD;
  --ink: #3C4650; --ink-2: #6A7783; --ink-3: #9BA8B4;
  --line: #DCE6EE;
  --pink: #C9D8E6; --orange: #CCDAE6; --yellow: #D8E4EE;
  --purple: #C4D2E2; --sage: #C6D6DF; --blue: #BCD2E4;
  --accent: #3D6E96; --accent-soft: #E4EEF6; --accent-line: #C6D9E8;
  --accent-grad: linear-gradient(100deg, #E4EEF6, #EDF4F9);
  --hero-grad: linear-gradient(150deg, #F0F5F9, #EBF1F6 50%, #EEF2F7);
  --quote-grad: linear-gradient(120deg, #D8E4EE, #CCDAE6 55%, #C9D8E6);
  --shadow: 0 2px 18px rgba(61, 110, 150, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; }

/* ---------- 侧栏三态：full / rail / drawer ---------- */
.app { display: flex; min-height: 100vh; }

.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sidebar {
  width: 244px; flex: 0 0 244px;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 18px 14px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  transition: width .2s ease, flex-basis .2s ease, transform .24s ease;
}

/* rail：收窄为图标条 */
.app.mode-rail .sidebar { width: 68px; flex: 0 0 68px; padding: 18px 9px; }
.app.mode-rail .sb-head { padding: 0 0 16px; justify-content: center; }
.app.mode-rail .sb-title, .app.mode-rail .sb-foot { display: none; }
.app.mode-rail .sb-close { display: none; }
.app.mode-rail .nav-item { justify-content: center; padding: 11px 0; }
.app.mode-rail .nav-item span { display: none; }

/* drawer：窄屏抽屉 */
.app.mode-drawer .sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 70;
  transform: translateX(-100%);
  box-shadow: 0 0 40px rgba(90, 78, 60, .18);
}
.app.mode-full .sidebar { transform: translateX(0); }

.sb-mask { display: none; }
.app.mode-full .sb-mask {
  display: block; position: fixed; inset: 0; z-index: 65;
  background: rgba(74, 68, 60, .3);
}

/* 窄屏"展开"态复用 mode-full：侧栏须浮在遮罩之上，否则遮罩会挡住 × 按钮 */
@media (max-width: 900px) {
  .app.mode-full .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 70;
    width: 244px; flex: 0 0 244px;
    transform: translateX(0);
  }
}

@media (min-width: 901px) {
  .app.mode-full .sb-mask { display: none; }
}

.sb-head {
  display: flex; align-items: center; gap: 11px;
  padding: 0 6px 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.sb-logo {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  background: linear-gradient(140deg, var(--orange), var(--pink));
  display: flex; align-items: center; justify-content: center; color: #FFF9F4;
}
.sb-logo svg { width: 20px; height: 20px; }
.sb-title { flex: 1; min-width: 0; line-height: 1.35; }
.sb-title strong { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.sb-title span { display: block; font-size: 11.5px; color: var(--ink-3); }
.sb-close {
  border: none; background: none; cursor: pointer; padding: 4px;
  color: var(--ink-3); border-radius: 8px; flex: 0 0 auto;
}
.sb-close:hover { background: var(--accent-soft); color: var(--ink); }
.sb-close svg { width: 17px; height: 17px; display: block; }

.sb-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 11px;
  cursor: pointer; font-size: 13.5px; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--card-2);
  width: 100%; text-align: left;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
}
.nav-item:hover {
  background: var(--card); border-color: var(--accent-line); color: var(--ink);
  box-shadow: 0 1px 5px rgba(140, 125, 100, .09);
}
.nav-item:active { transform: translateY(1px); }
.nav-item.active {
  background: linear-gradient(100deg, var(--accent-soft), var(--accent-soft));
  border-color: var(--accent-line); color: var(--accent); font-weight: 600;
  box-shadow: 0 1px 6px rgba(176, 112, 95, .12);
}
.nav-ico { width: 18px; height: 18px; flex: 0 0 18px; color: #9A9184; }
.nav-item:hover .nav-ico { color: #7E7466; }
.nav-item.active .nav-ico { color: var(--accent); }

.sb-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.sb-brand { line-height: 1.45; margin-bottom: 10px; }
.sb-brand strong { display: block; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.sb-brand span { display: block; font-size: 10.5px; color: var(--ink-3); }
.sb-qr {
  width: 92px; height: 92px; margin: 0 auto 7px; border-radius: 10px; overflow: hidden;
  background: var(--card); border: 1px solid #EAE1D2;
}
.sb-qr img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb-foot-line { font-size: 11px; color: var(--ink-3); }
.sb-foot-line.mail { color: var(--ink-2); text-decoration: none; margin-top: 3px; display: block; }
.sb-foot-line.mail:hover { color: var(--accent); }

.sb-mask { display: none; }

/* ---------- 顶部导航栏 ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 30px;
  background: rgba(255, 253, 248, .72);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.tb-menu {
  display: none; border: none; background: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 9px; color: var(--ink-2);
  align-items: center; justify-content: center; flex: 0 0 auto;
}
.tb-menu:hover { background: var(--accent-soft); }
.tb-menu svg { width: 19px; height: 19px; }

.tb-title { flex: 0 0 auto; }
.tb-title h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.tb-title span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.tb-search {
  flex: 1; max-width: 380px; margin-left: auto;
  display: flex; align-items: center; gap: 8px; position: relative;
  padding: 0 13px; height: 38px;
  background: var(--accent-soft); border-radius: 20px; border: 1px solid var(--line);
}
.tb-search:focus-within { background: var(--card); border-color: var(--orange); }
.tb-search svg { width: 16px; height: 16px; color: #B3A996; flex: 0 0 auto; }
.tb-search input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 13px; }
.tb-search input::placeholder { color: #BCB3A5; }

.tb-result {
  position: absolute; top: calc(100% + 7px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 10px 30px rgba(140, 125, 100, .16);
  padding: 7px; max-height: 320px; overflow-y: auto; z-index: 60;
}
.sr-group + .sr-group { margin-top: 5px; }
.sr-label { font-size: 10.5px; color: var(--ink-3); padding: 5px 9px 3px; }
.sr-item {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 7px 9px; border: none; background: none; border-radius: 9px;
  cursor: pointer; text-align: left; font-size: 12.5px;
}
.sr-item:hover { background: var(--accent-soft); }
.sr-nm { color: var(--ink); }
.sr-en { font-size: 11px; color: var(--ink-3); }
.sr-empty { padding: 14px; text-align: center; font-size: 12px; color: var(--ink-3); }

.tb-icon {
  position: relative; border: none; background: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 9px; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.tb-icon:hover { background: var(--accent-soft); }
.tb-icon svg { width: 18px; height: 18px; }
.tb-dot {
  position: absolute; top: 6px; right: 7px; width: 6px; height: 6px;
  border-radius: 50%; background: #D85A30; border: 1.5px solid var(--card);
}

.tb-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--orange), var(--pink));
  color: #FFF9F4; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ---------- 紧凑统计卡（对齐参考图） ---------- */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 16px;
}
.stat-mini {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 1px 8px rgba(140, 125, 100, .05);
}
.sm-info { min-width: 0; }
.sm-label { display: block; font-size: 11.5px; color: var(--ink-3); }
.sm-value {
  display: block; font-size: 22px; font-weight: 600; line-height: 1.25;
  margin: 2px 0 1px; font-variant-numeric: tabular-nums; color: var(--ink);
  letter-spacing: -0.3px;
}
.sm-foot { display: block; font-size: 10.5px; color: var(--ink-3); }
.sm-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.sm-ico svg { width: 18px; height: 18px; }
.stat-mini.tone-red .sm-ico { background: #FCEBEB; color: #A32D2D; }
.stat-mini.tone-amber .sm-ico { background: #FAEEDA; color: #854F0B; }
.stat-mini.tone-purple .sm-ico { background: #EEEDFE; color: #534AB7; }
.stat-mini.tone-green .sm-ico { background: #EAF3DE; color: #3B6D11; }
.stat-mini.tone-blue .sm-ico { background: #E6F1FB; color: #185FA5; }

/* 窄屏：抽屉由 .mode-drawer / .mode-full 控制，桌面 rail 态不生效 */
@media (max-width: 900px) {
  .app.mode-rail .sidebar { width: 244px; flex: 0 0 244px; padding: 18px 14px 16px; }
  .app.mode-rail .sb-title, .app.mode-rail .sb-foot { display: block; }
  .app.mode-rail .sb-close { display: block; }
  .app.mode-rail .nav-item { justify-content: flex-start; padding: 10px 12px; }
  .app.mode-rail .nav-item span { display: inline; }
  .app.mode-rail .sb-head { justify-content: flex-start; padding: 0 6px 16px; }
}

/* ---------- 首次引导 ---------- */
.guide-step {
  padding: 14px; border-radius: 13px;
  background: var(--card); border: 1px solid #F0E8DA;
  display: flex; flex-direction: column;
}
.gs-n {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(140deg, var(--orange), var(--pink));
  color: #FFF9F4; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 9px;
}
.gs-t { font-size: 13.5px; font-weight: 600; }
.gs-d { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin-top: 5px; flex: 1; }

/* ---------- 本周日程（时间轴网格） ---------- */
.wk-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 14px; flex-wrap: wrap;
}
.wk-range { font-size: 11.5px; color: var(--ink-3); }
.wk-nav { display: flex; gap: 6px; }

.wg-wrap { overflow-x: auto; }
.wg-grid { display: flex; gap: 0; min-width: 760px; }

.wg-times { flex: 0 0 52px; padding-top: 40px; }
.wg-time-row {
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding-right: 8px; border-top: 1px solid #F2ECE2;
}
.wg-time-row span { font-size: 10px; color: var(--ink-3); transform: translateY(-6px); white-space: nowrap; }

.wg-days { flex: 1; min-width: 0; }
.wg-headrow { display: grid; grid-template-columns: repeat(7, 1fr); height: 40px; }
.wg-cols { display: grid; grid-template-columns: repeat(7, 1fr); }

.wg-col {
  border-left: 1px solid #F2ECE2; position: relative; min-width: 0;
}
.wg-col.is-today { background: rgba(232, 196, 196, .07); }
.wg-col .wg-head {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 40px; gap: 1px; border-bottom: 1px solid var(--line);
}
.wg-w { font-size: 10.5px; color: var(--ink-3); }
.wg-d { font-size: 13px; font-weight: 600; color: var(--ink); }
.wg-col.is-today .wg-d { color: #B4675F; }
.wg-col.is-today .wg-head { background: rgba(232, 196, 196, .12); }

.wg-body { position: relative; height: 598px; }
.wg-empty {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; color: #CFC7BA;
}

.wg-item {
  position: absolute; left: 3px; right: 3px;
  display: flex; flex-direction: column; gap: 1px;
  padding: 5px 7px; border-radius: 8px; border: 1px solid;
  cursor: pointer; text-align: left; overflow: hidden;
  transition: filter .12s, transform .05s;
}
.wg-item:hover { filter: brightness(.97); }
.wg-item:active { transform: translateY(1px); }
.wg-t {
  font-size: 11px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}
.wg-time { font-size: 9.5px; opacity: .82; }
.wg-loc { font-size: 9.5px; opacity: .7; }
.wg-demo {
  position: absolute; top: 4px; right: 5px;
  font-size: 8.5px; padding: 0 4px; border-radius: 5px;
  background: rgba(255, 255, 255, .6); font-weight: 600;
}

/* ---------- 今日时间线 ---------- */
.tl-list { display: flex; flex-direction: column; gap: 4px; }
.tl-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 10px; border-radius: 11px;
  border: 1px solid transparent; background: none;
  cursor: pointer; text-align: left; width: 100%;
  transition: background .14s, border-color .14s;
}
.tl-item:hover { background: var(--card-2); border-color: var(--line); }
.tl-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; margin-top: 5px;
}
.tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tl-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.tl-demo {
  font-size: 10px; padding: 0 6px; border-radius: 10px;
  background: #FAEEDA; color: #854F0B; width: fit-content; font-weight: 500;
}
.tl-meta { font-size: 11.5px; color: var(--ink-2); }
.tl-loc { font-size: 11px; color: var(--ink-3); }
.tl-st {
  flex: 0 0 auto; font-size: 10.5px; padding: 2px 9px; border-radius: 12px;
  align-self: flex-start;
}
.tl-st.live { background: #EAF3DE; color: #27500A; font-weight: 600; }
.tl-st.upcoming { background: #F1EADF; color: var(--ink-2); }
.tl-st.done { background: #F6F2EA; color: #B4B2A9; }
.tl-empty {
  text-align: center; color: var(--ink-3); font-size: 13px;
  padding: 26px 10px; line-height: 1.7;
}

/* ---------- Demo 公开课 ---------- */
.demo-item { padding: 13px 0; border-bottom: 1px solid #F2ECE2; }
.demo-item:last-child { border-bottom: none; }
.di-head { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.di-topic { font-size: 13.5px; font-weight: 600; }
.di-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.di-note {
  font-size: 12px; color: var(--ink-2); line-height: 1.7; margin-top: 7px;
  padding: 9px 11px; background: #FBF7EF; border-radius: 9px;
}

.main { flex: 1; min-width: 0; padding: 26px 30px 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.page-head .desc { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 12px; font-size: 14.5px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.card h3 .hint { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }

.grid { display: grid; gap: 15px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g-2-1 { grid-template-columns: 2fr 1fr; }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .label { font-size: 12px; color: var(--ink-3); }
.stat .value { font-size: 30px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.stat .foot { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------- 元素 ---------- */
.btn {
  padding: 8px 15px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-size: 13px;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(0.98); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(100deg, var(--pink), var(--orange)); border: none; font-weight: 600; color: #4A4038; }
.btn.ghost { background: transparent; }
.btn.danger { color: #B4675F; border-color: #E8CFC9; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; padding: 8px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: #FFFDF9; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--orange); }
label.field { display: block; margin-bottom: 11px; }
label.field .lb { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
textarea { resize: vertical; min-height: 62px; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; background: #F1EADF; color: var(--ink-2); }
.tag.pink { background: var(--pink); }
.tag.orange { background: var(--orange); }
.tag.yellow { background: var(--yellow); }
.tag.purple { background: var(--purple); }
.tag.sage { background: var(--sage); }
.tag.blue { background: var(--blue); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 11.5px; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid #F2ECE2; font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FDFAF3; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

.tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { padding: 6px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.tab.active { background: linear-gradient(100deg, var(--pink), var(--orange)); color: #4A4038; border-color: transparent; font-weight: 600; }

.toolbar { display: flex; gap: 9px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=text], .toolbar select { width: auto; min-width: 150px; }

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

.notice {
  border-radius: 12px; padding: 10px 13px; font-size: 12.5px;
  background: #FBF3E2; border: 1px solid #EFE1C4; color: #7A6642;
}
.notice.lock { background: #F3EEF6; border-color: #E2D8E9; color: #6B5C77; }

.quote {
  border-radius: var(--radius); padding: 15px 18px;
  background: var(--quote-grad);
  color: #57493C; line-height: 1.65;
}
.quote .q-en { font-size: 13px; font-style: italic; }
.quote .q-cn {
  font-size: 12.5px; margin-top: 7px; padding-top: 7px;
  border-top: 1px solid rgba(87, 73, 60, .16); color: #6B5B4C;
}

/* ---------- 评估录入 ---------- */
.zone { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; background: #FFFDF9; }
.zone-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 10px; }
.zone-head .zn { font-weight: 600; font-size: 14px; }
.zone-head .zw { font-size: 11.5px; color: var(--ink-3); }

.dim-row { display: grid; grid-template-columns: 78px 1fr auto; gap: 11px; align-items: center; padding: 7px 0; border-bottom: 1px solid #F4EFE6; }
.dim-row:last-child { border-bottom: none; }
.dim-row.dim-off { opacity: .45; }
.dim-name { font-size: 12.5px; }
.dim-name .k { color: var(--ink-3); font-size: 11px; margin-right: 3px; }
.dim-point { font-size: 10.5px; color: var(--ink-3); }

.score-pick { display: flex; gap: 4px; }
.score-pick button {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-size: 12.5px; color: var(--ink-2);
}
.score-pick button.on { background: linear-gradient(140deg, var(--pink), var(--orange)); border-color: transparent; color: #4A4038; font-weight: 600; }
.score-pick button.blANK { opacity: .45; }

.anchor-tip { font-size: 11px; color: var(--ink-3); margin-top: 3px; min-height: 15px; }

/* ---------- 图表 ---------- */
.chart { width: 100%; }
.radar-note { text-align: center; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }

.bar-row { display: grid; grid-template-columns: 92px 1fr 46px; gap: 9px; align-items: center; margin-bottom: 7px; }
.bar-track { height: 8px; background: #F1EADF; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--purple), var(--pink)); }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #F4EFE6; }
.list-row:last-child { border-bottom: none; }
.list-row .nm { font-size: 13px; }
.list-row .en { font-size: 11px; color: var(--ink-3); margin-left: 5px; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(74, 68, 60, .34); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 18px; }
.modal { background: var(--card); border-radius: 20px; padding: 22px; width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(90, 78, 60, .2); }
.modal h3 { margin: 0 0 14px; font-size: 16px; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 16px; }

/* hidden 属性优先于组件的 display，避免 display:flex 覆盖隐藏 */
[hidden] { display: none !important; }

/* 邮箱 / 手机号切换 */
.id-switch {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  background: #F4EEE4; border-radius: 12px;
}
.id-switch button {
  flex: 1; height: 34px; border: none; border-radius: 9px;
  background: transparent; color: #8B8175; font-size: 12.5px;
  cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
}
.id-switch button.on {
  background: var(--card); color: var(--ink); font-weight: 500;
  box-shadow: 0 1px 4px rgba(140, 125, 100, .13);
}

/* 首次注册一次性验证提示 */
.one-time {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 16px 0 16px; padding: 11px 13px;
  border-radius: 12px; background: #FBF5EA; border: 1px solid #F0E4CC;
  font-size: 11.5px; line-height: 1.65; color: #7C6A48;
}
.ot-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #C9A227;
  margin-top: 6px; flex: 0 0 auto;
}

/* 登录 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(1100px 520px at 50% -8%, #FBF6EC 0%, rgba(251, 246, 236, 0) 62%),
    linear-gradient(150deg, #F6F1E6, #F2ECE3 52%, #EEE8EF);
}
.auth-shell { width: 100%; max-width: 396px; }

/* 顶部主题大字 */
.auth-hero { text-align: center; margin-bottom: 22px; }
.hero-title {
  margin: 0; font-size: 30px; font-weight: 600; letter-spacing: 4px;
  color: var(--ink);
}
.hero-sub {
  margin: 9px 0 0; font-size: 12.5px; color: var(--ink-3); letter-spacing: .6px;
}

/* 品牌名出处（装饰） */
.origin-note {
  margin: 22px auto 0; width: fit-content; max-width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 20px; border-radius: 14px;
  background: rgba(255, 253, 248, .62);
  border: 1px solid #EFE7D9;
  text-align: center;
}
.origin-src { font-size: 10.5px; color: #BCB3A5; letter-spacing: 1.2px; }
.origin-text {
  font-size: 13px; color: #7E7466; letter-spacing: 2.2px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
}

.auth-card {
  background: var(--card); border-radius: 22px; padding: 34px 32px 28px;
  box-shadow: 0 10px 40px rgba(140, 125, 100, .13);
}
.auth-head { margin-bottom: 24px; }
.auth-head h1 { margin: 0; font-size: 25px; font-weight: 600; letter-spacing: .5px; color: var(--ink); }
.auth-head p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-3); }

.fld { display: block; margin-bottom: 16px; }
.fld-lb { display: block; font-size: 12.5px; color: #6E675D; margin-bottom: 7px; font-weight: 500; }
.fld-box {
  display: flex; align-items: center; gap: 9px;
  padding: 0 13px; height: 46px;
  border: 1px solid #E6DED0; border-radius: 13px; background: #FFFDF9;
  transition: border-color .15s, box-shadow .15s;
}
.fld-box:focus-within { border-color: #DDBFAE; box-shadow: 0 0 0 3px rgba(221, 191, 174, .16); }
.fld-box > svg { width: 18px; height: 18px; color: #B3A996; flex: 0 0 auto; }
.fld-box input {
  flex: 1; min-width: 0; height: 100%; border: none; background: none;
  outline: none; font-size: 13.5px;
}
.fld-box input::placeholder { color: #C2B9AB; }
.fld-eye {
  border: none; background: none; cursor: pointer; padding: 3px;
  color: #B3A996; display: flex; border-radius: 6px;
}
.fld-eye:hover { color: #8B8175; }
.fld-eye svg { width: 18px; height: 18px; }
.fld-btn {
  flex: 0 0 auto; border: none; background: none; cursor: pointer;
  color: #A8796A; font-size: 12.5px; font-weight: 500; padding: 4px 2px;
  display: flex; align-items: center;
}
.fld-btn:hover { color: #8F5F50; }

.fld-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 20px; }
.remember { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #6E675D; cursor: pointer; }
.remember input { width: 15px; height: 15px; accent-color: #C98D7E; cursor: pointer; }
.forgot { font-size: 12.5px; color: #C98D7E; cursor: pointer; }
.forgot:hover { color: var(--accent); }

.btn-login {
  width: 100%; height: 46px; border: none; border-radius: 13px;
  background: linear-gradient(100deg, #D9A695, #C98D7E);
  color: #FFF9F4; font-size: 14.5px; font-weight: 600; letter-spacing: 3px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: filter .15s, transform .05s;
}
.btn-login:hover { filter: brightness(1.03); }
.btn-login:active { transform: translateY(1px); }
.btn-login:disabled { opacity: .68; cursor: not-allowed; }

.or {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0 18px; color: #BDB4A6; font-size: 12px;
}
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: #EDE5D8; }

.btn-demo {
  width: 100%; height: 46px; border-radius: 13px;
  border: 1px solid #E6DED0; background: #FFFDF9; color: #5D564C;
  font-size: 13.5px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s;
}
.btn-demo:hover { background: #FAF6EE; }
.btn-demo:disabled { opacity: .6; cursor: not-allowed; }
.btn-demo svg { width: 17px; height: 17px; color: #C9A227; }

.reg-line { text-align: center; font-size: 12.5px; color: var(--ink-3); margin: 18px 0 0; }
.reg-line span { color: #C98D7E; cursor: pointer; font-weight: 500; }
.reg-line span:hover { color: var(--accent); }

.brand-pill {
  margin: 26px auto 0; width: fit-content;
  display: flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: 22px;
  background: rgba(255, 253, 248, .9); border: 1px solid #EAE1D2;
  font-size: 12px; color: #8C8375;
}
.brand-pill svg { width: 14px; height: 14px; color: #C9A227; }

.admin-entry {
  margin: 16px auto 0; width: fit-content;
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: #C4BCB0; cursor: pointer;
}
.admin-entry svg { width: 13px; height: 13px; }
.admin-entry:hover { color: var(--ink-3); }

.auth-contact {
  margin-top: 30px; display: flex; align-items: center; justify-content: center;
  gap: 22px; flex-wrap: wrap;
}
.auth-contact .qr {
  width: 88px; height: 88px; border-radius: 10px; overflow: hidden;
  background: var(--card); border: 1px solid #EAE1D2;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.auth-contact .qr img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-contact .qr .qr-tip { display: none; }
.auth-contact .qr.qr-empty .qr-tip {
  display: block; font-size: 9px; color: #BDB4A6; text-align: center; line-height: 1.4; padding: 4px;
}
.auth-contact .mail {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: #6E675D; text-decoration: none;
}
.auth-contact .mail:hover { color: var(--ink); }
.auth-contact .mail svg { width: 17px; height: 17px; color: #B3A996; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 22px 24px; }
  .auth-head h1 { font-size: 22px; }
}

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #57493C; color: #FFF9F0; padding: 9px 18px; border-radius: 12px; font-size: 13px; z-index: 90; box-shadow: 0 6px 22px rgba(87, 73, 60, .28); }

.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.back-link { font-size: 12.5px; color: var(--ink-3); cursor: pointer; margin-bottom: 14px; display: inline-block; }

/* ---------- 成长分析 ---------- */
.action {
  border-left: 3px solid var(--line);
  padding: 10px 0 10px 13px; margin-bottom: 11px;
}
.action:last-child { margin-bottom: 0; }
.action.high { border-left-color: #D85A30; }
.action.warn { border-left-color: #EF9F27; }
.action.mid { border-left-color: #C2D0DA; }
.action.ok { border-left-color: #1D9E75; }
.act-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.act-tag {
  font-size: 10.5px; padding: 1px 8px; border-radius: 20px;
  background: #F1EADF; color: var(--ink-2);
}
.act-title { font-size: 13px; font-weight: 600; }
.act-detail { font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.act-target { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

.rhythm {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: #FBF7EF; border: 1px solid #F2ECE2;
}
.rd-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: #B4B2A9; }
.rhythm.ok .rd-dot { background: #1D9E75; }
.rhythm.warn { background: #FDF6E9; border-color: #EFE1C4; }
.rhythm.warn .rd-dot { background: #EF9F27; }
.rd-title { font-size: 12.5px; font-weight: 500; }
.rd-sub { font-size: 11px; color: var(--ink-3); }
.rd-note { margin-left: auto; font-size: 11px; color: var(--ink-3); white-space: nowrap; }

/* ---------- 紧凑表格与迷你页签 ---------- */
.tbl-compact th { padding: 7px 10px; font-size: 11px; }
.tbl-compact td { padding: 9px 10px; font-size: 12.5px; }
.td-nm { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mini-tabs { display: inline-flex; gap: 3px; }
.mini-tab {
  border: none; background: none; cursor: pointer;
  padding: 3px 9px; border-radius: 14px; font-size: 11px; color: var(--ink-3);
}
.mini-tab:hover { background: var(--accent-soft); color: var(--ink); }
.mini-tab.active { background: linear-gradient(100deg, var(--accent-soft), var(--accent-soft)); color: var(--accent); font-weight: 600; }

/* ---------- 成长心理学 ---------- */
.psy-use {
  margin-top: 11px; padding: 11px 13px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  font-size: 12px; color: var(--ink-2); line-height: 1.75;
}
.psy-stage {
  padding: 14px; border-radius: 13px; margin-bottom: 11px;
  background: var(--card-2); border: 1px solid var(--line);
}
.psy-stage:last-child { margin-bottom: 0; }
.ps-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; flex-wrap: wrap; }
.ps-head strong { font-size: 14px; }
.ps-w { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.ps-focus { font-size: 13px; color: var(--ink); margin-bottom: 9px; }
.ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.ps-grid > div { font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.ps-k {
  display: inline-block; margin-right: 7px; padding: 1px 7px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 500;
}
.ps-avoid { color: #A32D2D; }
.ps-avoid .ps-k { background: #FCEBEB; color: #A32D2D; }

@media (max-width: 720px) {
  .ps-grid { grid-template-columns: 1fr; }
}

/* ---------- 主题选择器 ---------- */
.theme-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 11px;
}
.theme-card {
  position: relative; display: flex; flex-direction: column; gap: 7px;
  padding: 13px; border-radius: 13px; cursor: pointer; text-align: left;
  background: var(--card-2); border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s, transform .05s;
}
.theme-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.theme-card:active { transform: translateY(1px); }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tc-swatch { display: flex; gap: 5px; }
.tc-swatch i {
  width: 22px; height: 22px; border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, .06);
}
.tc-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.tc-desc { font-size: 11px; color: var(--ink-3); }
.tc-check {
  position: absolute; top: 9px; right: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 10px; display: flex; align-items: center; justify-content: center;
}

/* ---------- 侧栏图标态 tooltip ---------- */
.nav-item[data-tip] { position: relative; }
.nav-item[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 11px); top: 50%;
  transform: translateY(-50%);
  padding: 5px 11px; border-radius: 8px; white-space: nowrap;
  background: var(--ink); color: var(--card);
  font-size: 12px; font-weight: 500; line-height: 1.4;
  opacity: 0; pointer-events: none; z-index: 80;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
  transition: opacity .14s ease .05s, transform .14s ease .05s;
}
.nav-item[data-tip]:hover::after { opacity: 1; transform: translateY(-50%) translateX(2px); }
/* 小三角 */
.nav-item[data-tip]::before {
  content: ''; position: absolute; left: calc(100% + 5px); top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--ink);
  opacity: 0; pointer-events: none; z-index: 81;
  transition: opacity .14s ease .05s;
}
.nav-item[data-tip]:hover::before { opacity: 1; }
/* 仅图标态显示 tooltip */
.app.mode-full .nav-item[data-tip]::after,
.app.mode-full .nav-item[data-tip]::before,
.app.mode-drawer .nav-item[data-tip]::after,
.app.mode-drawer .nav-item[data-tip]::before { display: none; }

/* 图标态展开按钮：明显的可点按钮 */
.app.mode-rail .sidebar { overflow: visible; }
.sb-expand {
  display: none; margin-top: 10px;
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  border-radius: 11px; cursor: pointer;
  width: 100%; padding: 9px 0;
  color: var(--accent); font-size: 11px; font-weight: 600;
  flex-direction: column; align-items: center; gap: 3px;
  transition: filter .14s, transform .05s;
}
.sb-expand:hover { filter: brightness(.97); }
.sb-expand:active { transform: translateY(1px); }
.sb-expand svg { width: 19px; height: 19px; }
.sb-expand span { line-height: 1.3; letter-spacing: .5px; }
.app.mode-rail .sb-expand { display: flex; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3, .g2, .g-2-1 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 12px 18px; gap: 10px; }
  .tb-title h2 { font-size: 15px; }
  .tb-search { max-width: none; }
}

@media (max-width: 720px) {
  .tb-menu { display: flex; }
  .tb-title span { display: none; }
  .tb-search { display: none; }
  .stat-row { grid-template-columns: 1fr; gap: 10px; }
  .main { padding: 16px 14px 46px; }
}
@media (max-width: 720px) {
  .main { padding: 16px 14px 46px; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .dim-row { grid-template-columns: 66px 1fr; }
  .dim-row .score-pick { grid-column: 1 / -1; }
  .hb-bar { margin: -16px -14px 14px; }
}

@media print {
  .sidebar, .btn, .toolbar, .tabs, .toast { display: none !important; }
  body, .main { background: #fff; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
