/* ============================================================
   苗屋托育中心 · 蒙氏家长平台 —— 样式表
   品牌色：深绿 #0f5c4a 主色 / 金 #c9a227 强调 / 米白 #f7f6f2 底
   ============================================================ */

:root {
  /* ---------- 品牌主色（沿用苗屋既有识别） ---------- */
  --brand: #0f5c4a;
  --brand-2: #17795f;
  --brand-3: #0b4638;
  --brand-soft: #e7f1ed;
  --brand-soft-2: #f2f8f5;
  --brand-tint: rgba(15, 92, 74, .10);   /* 悬浮底色 */

  --gold: #c9a227;
  --gold-2: #e0be4d;
  --gold-soft: #fdf7e6;

  --bg: #f6f5f0;
  --bg-sunken: #f0eee7;                  /* 下沉色，用于分割带 / 表头 */
  --card: #ffffff;
  --text: #22302c;
  --text-2: #5d6f68;
  --text-3: #6e7d77;                     /* 由 #94a29c 加深，白底对比度 4.3:1 达 AA */
  --border: #e8e5dc;
  --border-2: #f0eee7;

  --danger: #c0392b;
  --danger-soft: #fdecea;
  --warn: #b45c06;                       /* 由 #d97706 加深，白底可读 */
  --warn-soft: #fdf4e3;
  --ok: #2f855a;
  --ok-soft: #e8f6ee;
  --info: #2b6cb0;
  --info-soft: #e9f1fb;

  /* ---------- 蒙氏教具色 · 六大发展领域 ----------
     取色自真实教具：粉红塔 / 棕色梯 / 红棒 / 色板蓝 / 数棒绿 / 金色串珠。
     每个领域同时提供「主色 + 浅底色」，主色用于图表与描边，浅底用于标签与卡片背景。 */
  --m-practical:  #a97b56;  --m-practical-bg: #f5ece3;   /* 日常生活 · 棕色梯 */
  --m-sensory:    #d1737f;  --m-sensory-bg:   #fbeef0;   /* 感官 · 粉红塔 */
  --m-language:   #5b8cb8;  --m-language-bg:  #ecf3fa;   /* 语言 · 色板蓝 */
  --m-math:       #cf5c52;  --m-math-bg:      #fbeceb;   /* 数学 · 红棒 */
  --m-culture:    #4f9d7a;  --m-culture-bg:   #e9f4ee;   /* 科学文化 · 数棒绿 */
  --m-art:        #c99a2e;  --m-art-bg:       #fbf3e0;   /* 运动与艺术 · 金色串珠 */

  /* ---------- 圆角梯队 ---------- */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;
  --radius: 14px;                        /* 向后兼容别名 */
  --radius-sm: 10px;
  --radius-lg: 20px;

  /* ---------- 8pt 间距体系 ---------- */
  --s-1: 4px;  --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px; --s-6: 24px;  --s-8: 32px;  --s-10: 40px;
  --s-12: 48px; --s-16: 64px;

  /* ---------- 字阶 / 行高 / 字距 ---------- */
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px;
  --fs-15: 15px; --fs-17: 17px; --fs-20: 20px; --fs-24: 24px;
  --fs-32: 32px;
  --lh-tight: 1.35;
  --lh-base: 1.7;
  --lh-loose: 1.9;
  --ls-title: -.01em;
  --ls-caps: .04em;

  /* ---------- 阴影层级（统一带绿色调，避免灰黑脏感） ---------- */
  --sh-1: 0 1px 2px rgba(15, 92, 74, .05);
  --sh-2: 0 1px 2px rgba(15, 92, 74, .04), 0 4px 16px rgba(15, 92, 74, .06);
  --sh-3: 0 2px 6px rgba(15, 92, 74, .06), 0 12px 32px rgba(15, 92, 74, .10);
  --sh-4: 0 8px 40px rgba(15, 92, 74, .14);
  --shadow: var(--sh-2);                 /* 向后兼容别名 */
  --shadow-lg: var(--sh-4);

  /* ---------- 缓动 ---------- */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .18s;

  --sidebar-w: 236px;
  --topbar-h: 60px;
  --content-max: 1280px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ------------------------------ 滚动条 ------------------------------ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d8d5cc; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   登录页
   ============================================================ */
.login-view {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
  overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 12% 8%, rgba(201,162,39,.16), transparent 60%),
    radial-gradient(800px 600px at 88% 92%, rgba(23,121,95,.18), transparent 60%),
    linear-gradient(160deg, #0f5c4a 0%, #0b4638 45%, #123f35 100%);
}
.login-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.06) 0 2px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.05) 0 2px, transparent 2px);
  background-size: 48px 48px, 72px 72px;
}
.login-wrap { position: relative; width: 100%; max-width: 430px; }
.login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 30px 26px;
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-logo {
  width: 62px; height: 62px; margin: 0 auto 12px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  box-shadow: 0 8px 20px rgba(15,92,74,.28);
}
.login-brand h1 { margin: 0; font-size: 24px; letter-spacing: .5px; color: var(--brand); }
.login-sub { margin: 4px 0 0; font-size: 13px; color: var(--text-3); letter-spacing: 2px; }

.login-roles { display: grid; gap: 8px; margin-bottom: 20px; }
.role-chip {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfaf7;
  transition: .16s;
}
.role-chip .role-ico { font-size: 20px; }
.role-chip div { display: flex; flex-direction: column; line-height: 1.35; }
.role-chip strong { font-size: 14px; color: var(--text); }
.role-chip em { font-style: normal; font-size: 12px; color: var(--text-3); }

.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; color: var(--text);
  background: #fff; outline: none; transition: .16s;
}
.field textarea { resize: vertical; min-height: 78px; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(23,121,95,.12);
}
.login-error {
  min-height: 20px; color: var(--danger); font-size: 13px; margin-bottom: 6px;
}

/* 登录 / 注册 切换 */
.login-switch {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; font-size: 13px; color: var(--text-3);
}
.login-switch button {
  font-size: 13px; font-weight: 600; color: var(--brand);
  background: none; border: none; padding: 0; cursor: pointer;
  border-bottom: 1px solid var(--brand-2);
}
.login-switch button:hover { color: var(--brand-2); }

.reg-head { margin-bottom: 16px; }
.reg-head strong { font-size: 15px; color: var(--brand); }
.reg-head p {
  margin: 6px 0 0; font-size: 12.5px; line-height: 1.75; color: var(--text-3);
}
.reg-tip { display: block; margin-top: 5px; font-size: 12px; min-height: 16px; }
.reg-tip.ok { color: var(--brand); }
.reg-tip.bad { color: var(--danger); }

.login-tips {
  margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border);
}
.login-tips-title { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.login-demos { display: flex; flex-wrap: wrap; gap: 6px; }
.login-demos button {
  font-size: 12px; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 20px;
  background: #fbfaf7; color: var(--text-2); transition: .16s;
}
.login-demos button:hover { border-color: var(--brand-2); color: var(--brand); background: var(--brand-soft-2); }
.login-foot {
  margin: 18px 0 0; text-align: center; font-size: 12px;
  color: rgba(255,255,255,.62); letter-spacing: .4px;
}

/* ============================================================
   应用骨架
   ============================================================ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: linear-gradient(170deg, var(--brand) 0%, var(--brand-3) 100%);
  color: #fff;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.sidebar-logo {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.sidebar-title { display: flex; flex-direction: column; line-height: 1.25; }
.sidebar-title strong { font-size: 15px; letter-spacing: .4px; }
.sidebar-title em { font-style: normal; font-size: 11px; color: rgba(255,255,255,.58); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-group-title {
  font-size: 11px; color: rgba(255,255,255,.42);
  padding: 12px 10px 6px; letter-spacing: 1px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.82);
  font-size: 14px; cursor: pointer;
  transition: .15s; border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.10); color: #fff; }
.nav-item.active {
  background: rgba(255,255,255,.16); color: #fff; font-weight: 600;
  box-shadow: inset 3px 0 0 var(--gold);
}
.nav-item .ni-ico { font-size: 16px; width: 20px; text-align: center; }
.nav-item .ni-badge {
  margin-left: auto; background: var(--gold); color: #4a3a05;
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px;
}

.sidebar-foot { padding: 12px 14px 16px; border-top: 1px solid rgba(255,255,255,.10); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sidebar-user .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
}
.sidebar-user .su-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sidebar-user .su-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .su-role { font-size: 11px; color: rgba(255,255,255,.55); }
.btn-logout {
  width: 100%; padding: 8px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.22); background: transparent;
  color: rgba(255,255,255,.82); font-size: 13px; transition: .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.12); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; flex-shrink: 0;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 17px; font-weight: 600; letter-spacing: .3px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.btn-menu {
  display: none; border: none; background: none; font-size: 20px; padding: 4px 8px; color: var(--text-2);
}
.btn-bell {
  position: relative; border: none; background: #f6f5f0;
  width: 36px; height: 36px; border-radius: 50%; font-size: 16px; transition: .15s;
}
.btn-bell:hover { background: var(--brand-soft); }
.badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 17px;
  border-radius: 9px; text-align: center;
  border: 2px solid #fff;
}
.topbar-user { display: flex; align-items: center; gap: 8px; }
.topbar-user .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-soft); display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.topbar-user .tu-name { font-size: 13px; font-weight: 600; }
.topbar-user .tu-role {
  font-size: 11px; color: #fff; background: var(--brand);
  padding: 1px 8px; border-radius: 10px;
}

.content { flex: 1; padding: 22px; max-width: 1280px; width: 100%; }

/* ============================================================
   通用组件
   ============================================================ */
.btn {
  padding: 9px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 14px; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand-2); color: var(--brand); }
.btn-primary {
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-2) 100%);
  border-color: transparent; color: #fff; font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.08); color: #fff; }
.btn-gold {
  background: linear-gradient(145deg, var(--gold) 0%, var(--gold-2) 100%);
  border-color: transparent; color: #4a3a05; font-weight: 600;
}
.btn-gold:hover { filter: brightness(1.06); color: #4a3a05; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }

/* 微信一键登录按钮 */
.btn-wechat {
  background: #07c160; border-color: transparent; color: #fff; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-wechat:hover { background: #06ad56; color: #fff; }
.btn-wechat .wx-ico { font-size: 17px; }

/* 登录表单分隔线 */
.login-divider {
  display: flex; align-items: center; text-align: center;
  color: var(--text-3); margin: 16px 0; font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.login-divider span { padding: 0 12px; }

/* 微信绑定浮层提示 */
.wx-bind-tip { font-size: 13px; color: var(--text-2); margin-bottom: 14px; line-height: 1.6; }
.wx-bind-tip strong { color: var(--brand); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { color: var(--danger); border-color: #f0d3cf; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border-2);
}
.card-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.card-head .ch-sub { font-size: 12px; color: var(--text-3); }
.card-head .ch-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* 课程视频库：拖拽上传区 */
.dropzone {
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  padding: 26px 16px; text-align: center; cursor: pointer;
  background: var(--bg-2, transparent); transition: border-color .15s, background .15s;
  font-size: 14px; color: var(--text-2);
}
.dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }

.page-head { margin-bottom: 20px; }
.page-head h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: .3px; }
.page-head p { margin: 0; color: var(--text-2); font-size: 14px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-auto-lg { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; background: var(--brand-soft); color: var(--brand);
}
.tag-gold { background: var(--gold-soft); color: #8a6d0b; }
.tag-gray { background: #f1efe9; color: var(--text-2); }
.tag-red { background: var(--danger-soft); color: var(--danger); }
.tag-green { background: var(--ok-soft); color: var(--ok); }
.tag-orange { background: var(--warn-soft); color: var(--warn); }
.tag-blue { background: var(--info-soft); color: var(--info); }

.empty {
  text-align: center; padding: 54px 20px; color: var(--text-3);
}
.empty .empty-ico { font-size: 40px; display: block; margin-bottom: 10px; opacity: .55; }

/* ------------------------------ 数据卡 ------------------------------ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 17px;
  position: relative; overflow: hidden;
}
.stat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand); opacity: .8;
}
.stat.gold::before { background: var(--gold); }
.stat.blue::before { background: var(--info); }
.stat.orange::before { background: var(--warn); }
.stat-label { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }
.stat-value { font-size: 25px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat-hint { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ------------------------------ 入口卡片（参考站卡片网格） ------------------------------ */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.entry-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  text-align: left; cursor: pointer; transition: .18s;
  display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden;
}
.entry-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-2);
}
.entry-card .ec-ico {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: var(--brand-soft); margin-bottom: 2px;
}
.entry-card .ec-title { font-size: 16px; font-weight: 600; }
.entry-card .ec-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.entry-card .ec-foot {
  margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--brand-2); display: flex; align-items: center; gap: 4px;
}
.entry-card .ec-foot::after { content: '→'; transition: .18s; }
.entry-card:hover .ec-foot::after { transform: translateX(3px); }

/* ------------------------------ 步骤条（参考站三步式） ------------------------------ */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; position: relative; }
.step {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; position: relative;
}
.step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; margin-bottom: 10px;
}
.step h4 { margin: 0 0 6px; font-size: 15px; }
.step p { margin: 0; font-size: 13px; color: var(--text-2); }

/* ------------------------------ 课程卡片 ------------------------------ */
.course-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: .18s;
  display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-2); }
.cc-cover {
  height: 92px; display: flex; align-items: center; justify-content: center;
  font-size: 42px; position: relative;
}
.cc-cover .cc-cat {
  position: absolute; left: 12px; top: 12px;
  background: rgba(255,255,255,.9); color: var(--text);
  font-size: 11.5px; padding: 2px 9px; border-radius: 20px; font-weight: 600;
}
.cc-cover .cc-level {
  position: absolute; right: 12px; top: 12px;
  background: rgba(0,0,0,.28); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 20px;
}
.cc-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.cc-title { font-size: 15.5px; font-weight: 600; line-height: 1.45; margin-bottom: 5px; }
.cc-sub { font-size: 12.5px; color: var(--text-2); line-height: 1.6; flex: 1; }
.cc-meta {
  display: flex; gap: 12px; font-size: 12px; color: var(--text-3);
  margin: 10px 0 10px;
}
.cc-progress { margin-top: auto; }
.pbar {
  height: 6px; background: #eeebe3; border-radius: 4px; overflow: hidden;
}
.pbar-fill { height: 100%; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%); border-radius: 4px; transition: width .5s; }
.pbar-fill.gold { background: linear-gradient(90deg, var(--gold) 0%, var(--gold-2) 100%); }
.cc-progress-text { font-size: 12px; color: var(--text-3); margin-top: 5px; display: flex; justify-content: space-between; }

/* ------------------------------ 分类标签 ------------------------------ */
.cat-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px;
}
.cat-tab {
  padding: 7px 15px; border-radius: 22px; font-size: 13.5px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2); transition: .15s;
}
.cat-tab:hover { border-color: var(--brand-2); color: var(--brand); }
.cat-tab.active {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
}

/* ------------------------------ 章节列表 ------------------------------ */
.lesson-list { display: flex; flex-direction: column; gap: 8px; }
.lesson-item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; cursor: pointer; transition: .15s;
}
.lesson-item:hover { border-color: var(--brand-2); background: var(--brand-soft-2); }
.lesson-item.done { background: var(--brand-soft-2); border-color: #cfe4dc; }
.li-check {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #d8d5cc; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; background: #fff; transition: .15s;
}
.lesson-item.done .li-check { background: var(--brand); border-color: var(--brand); }
.li-main { flex: 1; min-width: 0; }
.li-title { font-size: 14.5px; font-weight: 500; }
.lesson-item.done .li-title { color: var(--brand); }
.li-sum { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.li-meta { font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* ------------------------------ 学习页 ------------------------------ */
.lesson-read {
  display: grid; grid-template-columns: 1fr 260px; gap: 20px; align-items: start;
}
.lesson-body {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 30px 30px;
}
.lesson-body h1 { font-size: 23px; margin: 0 0 8px; line-height: 1.4; }
.lesson-body .lb-sum { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }
.lesson-body .lb-content p { font-size: 15.5px; line-height: 1.95; margin: 0 0 18px; color: #2c3a35; }
.lesson-body h5 {
  font-size: 15px; margin: 26px 0 10px; color: var(--brand);
  display: flex; align-items: center; gap: 6px;
}
.kp-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.kp-list li {
  padding: 11px 14px; background: var(--brand-soft-2);
  border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0;
  font-size: 14px; line-height: 1.7;
}
.homework {
  background: var(--gold-soft); border: 1px dashed var(--gold);
  border-radius: var(--radius-sm); padding: 16px 18px; font-size: 14px; line-height: 1.8; color: #6b5510;
}
.lesson-nav { display: flex; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-2); }
.lesson-nav .btn { flex: 1; justify-content: center; text-align: center; }

.lesson-side { position: sticky; top: 80px; display: grid; gap: 14px; }
.side-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px; }
.side-card h4 { margin: 0 0 10px; font-size: 14px; }
.side-lessons { max-height: 320px; overflow-y: auto; display: grid; gap: 4px; }
.side-lesson {
  padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; color: var(--text-2); transition: .14s;
}
.side-lesson:hover { background: var(--brand-soft-2); }
.side-lesson.active { background: var(--brand); color: #fff; font-weight: 600; }
.side-lesson.done .sl-dot { background: var(--brand); border-color: var(--brand); }
.side-lesson.active .sl-dot { background: #fff; border-color: #fff; }
.sl-dot {
  width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #cfccc3; flex-shrink: 0;
}

/* ------------------------------ 环形进度 ------------------------------ */
.ring-wrap { display: flex; align-items: center; gap: 14px; }
.ring { width: 76px; height: 76px; position: relative; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.1;
}
.ring-text strong { font-size: 19px; }
.ring-text span { font-size: 10px; color: var(--text-3); }

/* ------------------------------ 表格 ------------------------------ */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; padding: 11px 12px; font-size: 12.5px; font-weight: 600;
  color: var(--text-3); border-bottom: 1px solid var(--border); white-space: nowrap;
  background: #fbfaf7;
}
table.tbl td { padding: 12px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
table.tbl tr:hover td { background: #fcfbf8; }
.tbl-actions { display: flex; gap: 6px; }

/* ------------------------------ 表单 ------------------------------ */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; }
.form-section { margin-bottom: 26px; }
.form-section > h4 {
  margin: 0 0 14px; font-size: 15px; padding-left: 11px;
  border-left: 3px solid var(--brand); line-height: 1.3;
}
.form-section > h4 small { font-weight: 400; color: var(--text-3); font-size: 12.5px; margin-left: 6px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 7px 14px; border-radius: 20px; font-size: 13.5px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2); transition: .15s;
}
.chip:hover { border-color: var(--brand-2); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.chip.gold.active { background: var(--gold); border-color: var(--gold); color: #4a3a05; }

/* 记录详情 */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.detail-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px;
}
.detail-box h5 {
  margin: 0 0 11px; font-size: 14px; display: flex; align-items: center; gap: 7px;
}
.detail-box h5 .db-ico {
  width: 26px; height: 26px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 14px; background: var(--brand-soft);
}
.dl { display: grid; grid-template-columns: 78px 1fr; gap: 7px 10px; font-size: 13.5px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; color: var(--text); }

/* 时间线 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before {
  content: ''; position: absolute; left: -23px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--brand);
}
.tl-date { font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.tl-title { font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.tl-content { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }

/* 日期选择条 */
.date-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.date-bar input[type=date] {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; color: var(--text); background: #fff; outline: none;
}
.date-bar input[type=date]:focus { border-color: var(--brand-2); }
.db-nav { display: flex; gap: 6px; }
.db-nav button {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); font-size: 15px; transition: .15s;
}
.db-nav button:hover { border-color: var(--brand-2); color: var(--brand); }
.range-tabs { display: flex; gap: 6px; margin-left: auto; }
.range-tab {
  padding: 7px 14px; border-radius: 8px; font-size: 13px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2); transition: .15s;
}
.range-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 柱状图 */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.bar-val { font-size: 10.5px; color: var(--text-3); }
.bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); border-radius: 4px 4px 0 0; min-height: 3px; transition: height .5s; }
.bar.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.bar-label { font-size: 10px; color: var(--text-3); white-space: nowrap; }

/* 分布条 */
.dist-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.dist-label { width: 62px; font-size: 13px; color: var(--text-2); flex-shrink: 0; }
.dist-bar { flex: 1; height: 20px; background: #f1efe9; border-radius: 5px; overflow: hidden; }
.dist-fill { height: 100%; border-radius: 5px; transition: width .5s; display: flex; align-items: center; justify-content: flex-end; padding-right: 7px; }
.dist-fill span { font-size: 11px; color: #fff; font-weight: 600; }
.dist-count { width: 30px; text-align: right; font-size: 13px; color: var(--text-3); }

/* 孩子切换 */
.child-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.child-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 9px; border-radius: 24px;
  border: 1px solid var(--border); background: #fff; cursor: pointer; transition: .15s;
}
.child-chip:hover { border-color: var(--brand-2); }
.child-chip.active { border-color: var(--brand); background: var(--brand-soft-2); box-shadow: 0 0 0 2px rgba(15,92,74,.08); }
.child-chip .cc-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.child-chip .cc-name { font-size: 13.5px; font-weight: 500; }
.child-chip .cc-class { font-size: 11.5px; color: var(--text-3); }

/* 教师录入列表 */
.pending-list { display: grid; gap: 8px; }
.pending-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; transition: .15s;
}
.pending-item:hover { border-color: var(--brand-2); }
.pi-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0;
}
.pi-main { flex: 1; min-width: 0; }
.pi-name { font-size: 14.5px; font-weight: 500; }
.pi-sub { font-size: 12px; color: var(--text-3); }

/* Toast */
.toast {
  position: fixed; left: 50%; top: 28px; transform: translate(-50%, -20px);
  background: rgba(34,48,44,.95); color: #fff;
  padding: 10px 22px; border-radius: 24px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 999;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: rgba(192,57,43,.95); }
.toast.success { background: rgba(15,92,74,.96); }

/* 抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(20,30,26,.4); z-index: 60;
}
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 370px; max-width: 88vw;
  background: #fff; z-index: 61; display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.14);
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.drawer-head strong { font-size: 16px; }
.drawer-head > div { display: flex; align-items: center; gap: 12px; }
.link-btn { border: none; background: none; color: var(--brand-2); font-size: 13px; }
.icon-btn { border: none; background: none; font-size: 17px; color: var(--text-3); padding: 0 2px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px 24px; }
.notif-item {
  padding: 13px 14px; border-radius: var(--radius-sm); margin-bottom: 8px;
  border: 1px solid var(--border); cursor: pointer; transition: .15s;
}
.notif-item:hover { border-color: var(--brand-2); background: var(--brand-soft-2); }
.notif-item.unread { background: var(--brand-soft-2); border-color: #cfe4dc; }
.notif-item .nf-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.notif-item .nf-msg { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.notif-item .nf-time { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

/* Loading */
.loading-mask {
  position: fixed; inset: 0; background: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
.spinner {
  width: 34px; height: 34px; border: 3px solid var(--brand-soft);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ 模态框 ------------------------------ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20,30,26,.45); z-index: 120;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 560px;
  max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: popIn .2s ease;
}
@keyframes popIn { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-head strong { font-size: 16px; }
.modal-body { padding: 20px; }

/* ------------------------------ FAQ 折叠 ------------------------------ */
.faq details {
  border-bottom: 1px solid var(--border-2); padding: 12px 0;
}
.faq details:last-child { border-bottom: none; }
.faq summary {
  cursor: pointer; font-size: 14.5px; font-weight: 500; list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '＋'; color: var(--brand); font-weight: 700; }
.faq details[open] summary::before { content: '－'; }
.faq details p {
  margin: 10px 0 0; padding-left: 20px; font-size: 13.5px;
  color: var(--text-2); line-height: 1.8;
}

/* ------------------------------ 移动端底部导航 ------------------------------ */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: none; background: none; padding: 4px 2px; color: var(--text-3); font-size: 11px;
}
.tabbar .tab .tab-ico { font-size: 19px; line-height: 1; }
.tabbar .tab.active { color: var(--brand); font-weight: 600; }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1080px) {
  .lesson-read { grid-template-columns: 1fr; }
  .lesson-side { position: static; }
}
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 70;
    transform: translateX(-100%); transition: .22s;
    box-shadow: 8px 0 30px rgba(0,0,0,.2);
  }
  .sidebar.open { transform: translateX(0); }
  .btn-menu { display: block; }
  .tabbar { display: flex; }
  .content { padding: 16px 14px 90px; }
  .topbar { padding: 0 14px; }
  .topbar-user .tu-name { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .lesson-body { padding: 20px 18px 24px; }
  .lesson-body h1 { font-size: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .range-tabs { margin-left: 0; width: 100%; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   视觉增强层 v2 · 蒙氏设计系统落地
   ------------------------------------------------------------
   本区块独立于上方基础样式，仅做「观感升级」不动结构。
   如需回滚：删除本区块（含文件末尾的响应式补丁）即可，功能不受影响。
   原则：低刺激 / 高秩序 / 少决策
   ============================================================ */

/* ---------- 全局基底 ---------- */
@supports (font-variant-numeric: tabular-nums) {
  .stat-value, .dist-count, .bar-val, .li-meta, table.tbl td { font-variant-numeric: tabular-nums; }
}
::selection { background: #cfe4dc; color: var(--brand-3); }

/* 统一焦点环：键盘可达，鼠标不打扰 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
/* 尊重系统「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* 滚动条：细、柔、悬浮才显形 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #d6d2c8; border-radius: var(--r-pill);
  border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #bdb9ae; background-clip: content-box; }

/* ---------- 侧边栏：品牌深度 + 秩序感 ---------- */
.sidebar {
  background:
    radial-gradient(120% 60% at -10% 0%, rgba(201,162,39,.16), transparent 55%),
    linear-gradient(170deg, #10604d 0%, var(--brand-3) 100%);
  width: var(--sidebar-w);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.06);
}
.sidebar-brand { padding: 18px 16px 15px; gap: 11px; }
.sidebar-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.10));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
  font-size: 20px;
}
.sidebar-title strong { font-size: 15.5px; letter-spacing: var(--ls-title); }
.sidebar-title em { font-size: 11px; letter-spacing: 1.2px; }

.sidebar-nav { padding: 10px 10px 16px; }
.nav-group-title {
  font-size: 11px; letter-spacing: 1.6px; color: rgba(255,255,255,.38);
  padding: 14px 10px 6px; text-transform: none;
}
.nav-item {
  gap: 11px; padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: rgba(255,255,255,.76);
  position: relative;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.nav-item:hover { background: rgba(255,255,255,.09); color: #fff; }
.nav-item.active {
  background: rgba(255,255,255,.15);
  color: #fff; font-weight: 600;
  box-shadow: inset 3px 0 0 var(--gold), 0 2px 10px rgba(0,0,0,.10);
}
.nav-item .ni-ico { font-size: 16px; width: 20px; opacity: .92; }
.nav-item.active .ni-ico { opacity: 1; }
.nav-item .ni-badge {
  background: linear-gradient(145deg, var(--gold-2), var(--gold));
  color: #4a3a05; font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: var(--r-pill);
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
}

.sidebar-foot { padding: 12px 14px 16px; border-top: 1px solid rgba(255,255,255,.10); }
.sidebar-user { gap: 10px; }
.sidebar-user .avatar {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.sidebar-user .su-name { font-size: 13px; letter-spacing: .2px; }
.sidebar-user .su-role { font-size: 11px; color: rgba(255,255,255,.55); }
.btn-logout {
  border-radius: var(--r-sm); font-size: 13px;
  border-color: rgba(255,255,255,.20); color: rgba(255,255,255,.80);
}
.btn-logout:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: var(--topbar-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 22px;
}
.topbar-title { font-size: 17px; font-weight: 600; letter-spacing: var(--ls-title); }
.btn-menu {
  font-size: 19px; color: var(--text-2); border-radius: var(--r-xs);
  width: 38px; height: 38px; display: none; align-items: center; justify-content: center;
}
.btn-menu:hover { background: var(--brand-tint); color: var(--brand); }
.btn-bell {
  width: 38px; height: 38px; font-size: 16px;
  background: #faf9f5; box-shadow: inset 0 0 0 1px var(--border-2);
}
.btn-bell:hover { background: var(--brand-soft); transform: translateY(-1px); }
.topbar-user { gap: 9px; }
.topbar-user .avatar {
  width: 34px; height: 34px; background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px #d6e6df;
}
.topbar-user .tu-name { font-size: 13.5px; }
.topbar-user .tu-role {
  font-size: 11px; padding: 2px 9px; border-radius: var(--r-pill);
  background: var(--brand-soft); color: var(--brand); font-weight: 600;
}

/* ---------- 内容区：留白与呼吸 ---------- */
.content {
  padding: 24px 24px 32px;
  max-width: var(--content-max);
  margin: 0 auto;
}
.page-head { margin-bottom: 22px; }
.page-head h2 { font-size: 22px; letter-spacing: var(--ls-title); line-height: 1.35; }
.page-head p { font-size: 14px; color: var(--text-2); }

/* ---------- 卡片 ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--sh-2);
}
.card + .card { margin-top: 16px; }
.card-head {
  margin-bottom: 16px; padding-bottom: 13px;
  border-bottom: 1px solid var(--border-2);
}
.card-head h3 { font-size: 16.5px; letter-spacing: var(--ls-title); }

/* ---------- 按钮 ---------- */
.btn {
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--sh-1);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease), color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.btn:hover { border-color: var(--brand-2); color: var(--brand); transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); box-shadow: var(--sh-1); }
.btn-primary {
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-2) 100%);
  border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,92,74,.18), 0 4px 14px rgba(15,92,74,.20);
}
.btn-primary:hover { filter: brightness(1.07); color: #fff; box-shadow: 0 2px 6px rgba(15,92,74,.20), 0 8px 22px rgba(15,92,74,.26); }
.btn-gold {
  background: linear-gradient(145deg, var(--gold) 0%, var(--gold-2) 100%);
  border-color: transparent; color: #4a3a05; font-weight: 600;
  box-shadow: 0 1px 2px rgba(201,162,39,.22), 0 4px 14px rgba(201,162,39,.26);
}
.btn-gold:hover { filter: brightness(1.05); color: #4a3a05; }
.btn-block { padding: 12px; font-size: 15px; border-radius: var(--r-md); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: var(--sh-1); }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-danger:hover { transform: translateY(-1px); }

/* 每屏只留一个「主行动」的视觉重心：同级并排的次级按钮弱化 */
.card-head .ch-right .btn, .tbl-actions .btn { box-shadow: none; }
.card-head .ch-right .btn-primary, .tbl-actions .btn-primary { box-shadow: var(--sh-2); }

/* ---------- 数据卡：结论优先，弱化装饰 ---------- */
.stat {
  border-radius: var(--r-md);
  padding: 17px 18px;
  box-shadow: var(--sh-2);
  border: 1px solid var(--border);
}
.stat::before { width: 3px; border-radius: 3px 0 0 3px; opacity: .9; }
.stat-label { font-size: 12.5px; letter-spacing: .2px; }
.stat-value { font-size: 26px; letter-spacing: -.02em; }
.stat-hint { color: var(--text-3); }
.stat-grid { gap: 14px; }

/* ---------- 表格 ---------- */
.table-wrap {
  border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: auto; box-shadow: var(--sh-2); background: #fff;
}
table.tbl th {
  background: #fbfaf7; font-size: 12.5px; letter-spacing: .3px;
  color: var(--text-2); padding: 12px 14px;
}
table.tbl td { padding: 13px 14px; }
table.tbl tbody tr:last-child td { border-bottom: none; }

/* ---------- 入口卡 / 课程卡 ---------- */
.entry-card {
  border-radius: var(--r-md); padding: 22px; gap: 9px;
  box-shadow: var(--sh-2);
}
.entry-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--brand-2); }
.entry-card .ec-ico { width: 46px; height: 46px; border-radius: 13px; font-size: 22px; }
.entry-card .ec-title { font-size: 16.5px; letter-spacing: var(--ls-title); }

.course-card { border-radius: var(--r-md); box-shadow: var(--sh-2); }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--brand-2); }
.cc-cover { height: 100px; font-size: 44px; }
.cc-cover .cc-cat { border-radius: var(--r-pill); font-size: 11.5px; box-shadow: 0 1px 4px rgba(0,0,0,.10); }
.cc-title { font-size: 16px; letter-spacing: var(--ls-title); }

/* ---------- 标签 ---------- */
.tag { border-radius: var(--r-pill); padding: 3px 10px; font-size: 12px; font-weight: 500; }
.tag-gold, .tag-green, .tag-orange, .tag-blue, .tag-red { font-weight: 500; }

/* ---------- 章节项 / 列表项 ---------- */
.lesson-item { border-radius: var(--r-sm); padding: 13px 16px; }
.lesson-item.done { background: var(--brand-soft-2); border-color: #d3e5de; }
.li-check { width: 25px; height: 25px; }
.li-title { font-size: 14.5px; }

/* ---------- 时间线 ---------- */
.timeline::before { width: 2px; background: linear-gradient(180deg, var(--brand-soft) 0%, #dfe4e1 100%); }
.tl-item::before { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.tl-title { font-size: 14.5px; letter-spacing: var(--ls-title); }

/* ---------- 空态：必须给去处 ---------- */
.empty { padding: 56px 20px; color: var(--text-3); }
.empty .empty-ico { font-size: 42px; opacity: .5; margin-bottom: 12px; }
.empty p { margin: 6px 0 0; font-size: 13.5px; }
/* 空态行动区：空态必须给人一个去处，而不是一句「暂无数据」 */
.empty-action { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.empty .btn { min-height: 40px; }

/* ---------- 表单 ---------- */
.field input, .field select, .field textarea {
  border-radius: var(--r-sm); padding: 11px 13px; font-size: 15px;
  box-shadow: inset 0 1px 2px rgba(15,92,74,.03);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(23,121,95,.13);
}
.chip.active { font-weight: 600; }
.form-section > h4 { border-left-width: 3px; border-radius: 2px; font-size: 15px; letter-spacing: var(--ls-title); }

/* ---------- 孩子切换 ---------- */
.child-chip { border-radius: var(--r-pill); padding: 7px 15px 7px 8px; }
.child-chip.active { box-shadow: 0 0 0 2px rgba(15,92,74,.10); }

/* ---------- 移动端底部导航：毛玻璃 + 顶部指示点 ---------- */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 16px rgba(15,92,74,.06);
}
.tabbar .tab {
  flex: 1; gap: 3px; padding: 5px 2px; min-height: 48px;
  justify-content: center; color: var(--text-3); font-size: 11px;
  position: relative; border-radius: var(--r-sm);
  transition: color var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.tabbar .tab .tab-ico { font-size: 20px; line-height: 1; transition: transform var(--dur) var(--ease-out); }
.tabbar .tab.active { color: var(--brand); font-weight: 600; }
/* 选中指示：顶部一条短圆角指标，比整块变色更克制 */
.tabbar .tab.active::before {
  content: ''; position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 3px; border-radius: var(--r-pill); background: var(--gold);
}
.tabbar .tab:active { background: var(--brand-tint); }
@media (max-width: 768px) { .tabbar { display: flex; } }

/* ---------- 抽屉 / Toast / 加载 ---------- */
.drawer { width: 380px; max-width: 88vw; box-shadow: -8px 0 40px rgba(15,92,74,.16); }
.notif-item { border-radius: var(--r-sm); }
.notif-item.unread { background: var(--brand-soft-2); border-color: #d3e5de; }
.notif-item .nf-title { font-size: 14px; letter-spacing: var(--ls-title); }

.toast {
  border-radius: var(--r-pill); padding: 11px 24px; font-size: 14px;
  box-shadow: 0 8px 30px rgba(15,92,74,.28);
}
.loading-mask { background: rgba(255,255,255,.62); backdrop-filter: blur(2px); }

/* ---------- 模态框 ---------- */
.modal { border-radius: var(--r-lg); box-shadow: var(--sh-4); max-width: 580px; }
.modal-head { padding: 18px 22px; }
.modal-body { padding: 22px; }

/* ---------- 登录页：保持品牌沉浸感 ---------- */
.login-card { border-radius: var(--r-xl); padding: 34px 32px 26px; box-shadow: 0 24px 70px rgba(0,0,0,.26); }
.login-sub { letter-spacing: 2.4px; }
.role-chip { border-radius: var(--r-md); padding: 11px 13px; background: #fbfaf7; }
.role-chip:hover { border-color: var(--brand-2); background: var(--brand-soft-2); }
.field input::placeholder, .field textarea::placeholder { color: #b3bdb8; }

/* ============================================================
   响应式补丁（覆盖基础样式中的旧断点）
   ============================================================ */
@media (min-width: 1500px) {
  .content { padding: 28px 32px 40px; }
}
@media (max-width: 1080px) {
  .lesson-read { grid-template-columns: 1fr; gap: 18px; }
  .lesson-side { position: static; }
}
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 70;
    transform: translateX(-100%);
    transition: transform .24s var(--ease-out);
    box-shadow: 8px 0 34px rgba(15,92,74,.22);
  }
  .sidebar.open { transform: translateX(0); }
  .btn-menu { display: flex; }
  .content { padding: 16px 14px 96px; max-width: none; }
  .topbar { padding: 0 12px 0 8px; height: 56px; }
  .topbar-title { font-size: 16px; }
  .topbar-user .tu-name { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .card + .card { margin-top: 12px; }
  .page-head { margin-bottom: 16px; }
  .page-head h2 { font-size: 19px; }
  /* 移动端表单控件至少 44px 触控区 */
  .field input, .field select, .field textarea,
  .date-bar input[type=date], .chip, .cat-tab, .range-tab {
    min-height: 44px;
  }
  .chip, .cat-tab, .range-tab { display: inline-flex; align-items: center; }
  .lesson-body { padding: 20px 18px 24px; border-radius: var(--r-md); }
  .lesson-body h1 { font-size: 20px; line-height: 1.45; }
  .lesson-nav { flex-direction: column-reverse; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .range-tabs { margin-left: 0; width: 100%; }
  .modal-mask { padding: 12px; align-items: flex-end; }
  .modal { max-height: 90vh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .drawer { width: 100%; max-width: none; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .login-card { padding: 26px 20px 22px; border-radius: var(--r-lg); }
  .login-wrap { max-width: 100%; }
  .login-view { padding: 18px 12px 32px; align-items: flex-start; }
}
@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px 15px; }
  .stat-value { font-size: 22px; }
  .tabbar .tab { font-size: 10.5px; }
  .tabbar .tab .tab-ico { font-size: 19px; }
}

/* ---------- 打印 / 导出成长报告 ---------- */
@media print {
  .sidebar, .topbar, .tabbar, .drawer, .toast, .btn, .tbl-actions { display: none !important; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}


/* ============================================================
   视觉增强层 v3 · 结论优先 / 非工作日
   ============================================================ */

/* ---------- 今日结论卡：先给答案，再谈细节 ---------- */
.verdict-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px; margin-bottom: 16px;
  border-radius: var(--r-md); border: 1px solid var(--border);
  background: #fff; box-shadow: var(--sh-2);
  border-left: 4px solid var(--brand);
}
.verdict-card.verdict-good { border-left-color: var(--brand); background: linear-gradient(100deg, #f5faf8 0%, #fff 55%); }
.verdict-card.verdict-warn { border-left-color: var(--warn); background: linear-gradient(100deg, var(--warn-soft) 0%, #fff 55%); }
.verdict-card.verdict-care { border-left-color: var(--danger); background: linear-gradient(100deg, var(--danger-soft) 0%, #fff 55%); }

.verdict-card .vc-ico { font-size: 30px; line-height: 1; flex: 0 0 auto; margin-top: 2px; }
.verdict-card .vc-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.verdict-card .vc-main > strong { font-size: 16.5px; letter-spacing: var(--ls-title); }
.verdict-card .vc-detail { font-size: 13px; color: var(--text-2); }
.verdict-card .vc-action {
  font-size: 13.5px; color: var(--brand); line-height: 1.7; margin-top: 2px;
  padding-top: 8px; border-top: 1px dashed var(--border);
}
.verdict-card.verdict-warn .vc-action { color: #8a5a06; }
.verdict-card.verdict-care .vc-action { color: #8f2c20; }

/* ---------- 提示条：非工作日要家长自己填日志 ---------- */
.notice-bar {
  display: flex; align-items: center; gap: 13px;
  padding: 15px 18px; margin-bottom: 16px;
  border-radius: var(--r-md); border: 1px solid var(--border);
  background: #fff; box-shadow: var(--sh-1);
}
.notice-bar .nb-ico {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: var(--brand-soft);
}
.notice-bar .nb-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notice-bar .nb-body strong { font-size: 14.5px; letter-spacing: var(--ls-title); }
.notice-bar .nb-body em { font-style: normal; font-size: 13px; color: var(--text-2); line-height: 1.65; }
.notice-bar .nb-btn { flex: 0 0 auto; }

/* 待办：要吸引人去点 */
.notice-bar.notice-todo {
  border-color: #f0dfae;
  background: linear-gradient(100deg, var(--gold-soft) 0%, #fff 62%);
}
.notice-bar.notice-todo .nb-ico { background: #fbeec2; }
/* 已完成：退到背景里，别抢结论卡的风头 */
.notice-bar.notice-ok { background: var(--brand-soft-2); border-color: #d3e5de; }
.notice-bar.notice-ok .nb-ico { background: #d6e8e1; }
.notice-bar.notice-plain { background: #fbfaf7; }

@media (max-width: 768px) {
  .verdict-card { padding: 15px 16px; gap: 11px; }
  .verdict-card .vc-ico { font-size: 25px; }
  .verdict-card .vc-main > strong { font-size: 15.5px; }
  /* 手机上一行放不下按钮，让它整行铺开更好点 */
  .notice-bar { flex-wrap: wrap; }
  .notice-bar .nb-btn { width: 100%; min-height: 44px; margin-top: 2px; }
}

/* ===== 在籍 / 非在籍 模块切换条（孩子管理、家长管理共用） ===== */
.enroll-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.enroll-switch .btn {
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
}
/* 非在籍模块底部的说明条 */
.guest-note {
  margin-top: 14px;
  padding: 11px 15px;
  background: var(--brand-soft);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.75;
}

@media (max-width: 768px) {
  .enroll-switch .btn { flex: 1 1 auto; min-height: 42px; }
}

/* ============================================================
   备案号页脚
   工信部要求：备案号须在网站底部展示，并链接至 beian.miit.gov.cn
   拿到公安联网备案号后，在这里再补一行（链接 beian.mps.gov.cn）
   ============================================================ */
.site-footer {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  line-height: 2;
  color: var(--text-3);
}
.site-footer .sf-org { opacity: .85; letter-spacing: .3px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }

/* 登录页（深色底）的备案号 */
.login-foot-icp { margin-top: 8px; font-size: 11px; }
.login-foot-icp a { color: rgba(255,255,255,.55); text-decoration: none; }
.login-foot-icp a:hover { color: rgba(255,255,255,.92); text-decoration: underline; }

/* 移动端底部导航是 fixed 定位，页脚要让出它的高度，否则备案号被压住看不见 */
@media (max-width: 768px) {
  .site-footer {
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    margin-bottom: 62px;
  }
}
