:root {
  --brand: #d97706;
  --brand-dark: #b45309;
  --brand-soft: #faf3e8;
  --ink: #2b2622;
  --ink-1: #2b2622;
  --ink-2: #57534e;
  --ink-3: #78716c;  /* 次级文字，白底 4.6:1 达 WCAG AA */
  --line: #e8e2d7;
  --bg: #f6f3ed;
  --side: #faf8f3;
  --card: #ffffff;
  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --warn: #ea580c;  /* 警告独立暖红橙，不再与品牌色撞色 */
  --warn-soft: #ffedd5;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --purple: #7c3aed;
  --purple-soft: #f3e8ff;
  --radius: 10px;
  --focus-ring: 0 0 0 3px rgba(217,119,6,.18);  /* 聚焦光晕跟随品牌色，换肤覆盖 */
  /* elevation 层次梯度：卡片默认 sm、悬浮 md、弹层 lg */
  --shadow-sm: 0 1px 3px rgba(84,66,43,.04);
  --shadow-md: 0 5px 16px rgba(84,66,43,.10);
  --shadow-lg: 0 16px 40px rgba(84,66,43,.18);
  /* 涨跌语义色：中文习惯「涨红跌绿」，仅用于同比/环比等涨跌场景；
     统计卡 .up/.down 是「正向/警示」标记，不表示涨跌，勿混用 */
  --gain: #dc2626;
  --loss: #16a34a;
  /* 皮肤变量（默认=暖棕） */
  --line-soft: #f0ebe2;
  --neutral: #f1ede5;
  --zebra: #fbf9f5;
  --th-bg: #faf8f4;
  --panel: #f8f5ef;
  --ink-4: #57534e;  /* 弱信息/表头，白底 7:1 */
  --sb-bg: #33291f;
  --sb-bd: #2a211a;
  --sb-bd-soft: rgba(255,255,255,.08);
  --sb-t1: #f6efe4;
  --sb-t2: #a4937d;
  --sb-t3: #8f7f6a;
  --sb-item: #d9cdbb;
  --sb-hover-bg: rgba(255,255,255,.07);
  --sb-act-bg: rgba(224,138,62,.18);
  --sb-act-tx: #f2b25c;
  --sb-act-bd: rgba(224,138,62,.35);
}

/* ---------- 皮肤：藏蓝 ---------- */
body[data-skin="navy"] {
  --brand: #2563eb; --brand-dark: #1d4ed8; --brand-soft: #eff6ff;
  --ink: #0f172a; --ink-1: #0f172a; --ink-2: #475569; --ink-3: #64748b; --ink-4: #475569;
  --line: #e2e8f0; --line-soft: #eef2f7; --neutral: #f1f5f9;
  --zebra: #fafbfd; --th-bg: #f9fafb; --panel: #f8fafc;
  --bg: #f1f4f9;
  --focus-ring: 0 0 0 3px rgba(37,99,235,.15);
  --sb-bg: #1e293b; --sb-bd: #172033; --sb-bd-soft: rgba(255,255,255,.08);
  --sb-t1: #f1f5f9; --sb-t2: #94a3b8; --sb-t3: #64748b; --sb-item: #cbd5e1;
  --sb-hover-bg: rgba(255,255,255,.08);
  --sb-act-bg: rgba(37,99,235,.28); --sb-act-tx: #93c5fd; --sb-act-bd: rgba(37,99,235,.45);
}

/* ---------- 皮肤：墨绿 ---------- */
body[data-skin="green"] {
  --brand: #047857; --brand-dark: #065f46; --brand-soft: #ecfdf5;
  --ink: #1c2420; --ink-1: #1c2420; --ink-2: #4b5a52; --ink-3: #5f7168; --ink-4: #47574e;
  --line: #d6d3cc; --line-soft: #e8e6e0; --neutral: #f0efeb;
  --zebra: #fafaf8; --th-bg: #f5f5f2; --panel: #f2f2ee;
  --bg: #f4f4f1;
  --focus-ring: 0 0 0 3px rgba(4,120,87,.16);
  --sb-bg: #1e2d26; --sb-bd: #17231d; --sb-bd-soft: rgba(255,255,255,.08);
  --sb-t1: #eaf2ec; --sb-t2: #8fa69a; --sb-t3: #6d8277; --sb-item: #c3d2c9;
  --sb-hover-bg: rgba(255,255,255,.07);
  --sb-act-bg: rgba(16,185,129,.18); --sb-act-tx: #6ee7b7; --sb-act-bd: rgba(16,185,129,.4);
}

/* ---------- 皮肤：浅驼 ---------- */
body[data-skin="camel"] {
  --sb-bg: #f0e7d8; --sb-bd: #e2d5bf; --sb-bd-soft: #e2d5bf;
  --sb-t1: #4a4034; --sb-t2: #93866f; --sb-t3: #a89a80; --sb-item: #6b5f4d;
  --sb-hover-bg: rgba(74,64,52,.08);
  --sb-act-bg: #ffffff; --sb-act-tx: #b45309; --sb-act-bd: #e8dcc6;
}

/* ---------- 皮肤切换色卡 ---------- */
.skin-dots { display: flex; align-items: center; gap: 8px; }
.skin-dot {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(84,66,43,.15);
}
.skin-dot.on { border-color: var(--brand); }
.skin-dot .sk { width: 12px; height: 12px; border-radius: 50%; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; color-scheme: light; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--brand); text-decoration: none; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px; flex: 0 0 216px; background: var(--sb-bg); border-right: 1px solid var(--sb-bd);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30;
}
.brand { padding: 12px 16px 10px; border-bottom: 1px solid var(--sb-bd-soft); }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; color: var(--sb-t1); }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.brand-logo { width: 24px; height: auto; display: block; flex: none; }

/* ---------- 校区下拉（顶栏，任务中心左侧） ---------- */
.campus-dd { position: relative; }
.campus-dd-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface,#fff); color: var(--ink); font-size: 13px; cursor: pointer; white-space: nowrap;
}
.campus-dd-btn:hover { border-color: var(--brand); color: var(--brand); }
.campus-dd-btn .chev { font-size: 10px; opacity: .7; }
.campus-dd-menu {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 140px; background: var(--surface,#fff);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(84,66,43,.14);
  padding: 4px; z-index: 60;
}
.campus-dd-item {
  display: flex; align-items: center; padding: 8px 12px; border-radius: 7px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.campus-dd-item:hover { background: var(--brand-soft); color: var(--brand-dark); }
.campus-dd-item.on { color: var(--brand); font-weight: 600; }
.brand-sub { font-size: 12px; color: var(--sb-t2); margin-top: 2px; padding-left: 34px; }

.org-switch { padding: 10px 12px; border-bottom: 1px solid var(--sb-bd-soft); }
.org-switch select { width: 100%; }
.org-switch .small { color: var(--sb-t2); }

.nav { flex: 1; overflow-y: auto; padding: 6px 10px 12px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-group {
  font-size: 13px; color: var(--sb-t2); padding: 10px 10px 4px; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; font-weight: 600;
}
.nav-group:hover { color: var(--sb-t1); }
.nav-chev { font-size: 10px; opacity: .8; font-weight: 400; }
.nav-soon {
  margin-left: auto; font-size: 10px; color: var(--sb-t3);
  border: 1px solid var(--sb-bd-soft); border-radius: 8px; padding: 0 5px; line-height: 14px; flex: none;
}
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 12px; border-radius: 8px;
  color: var(--sb-item); cursor: pointer; margin-bottom: 0; font-size: 13px; user-select: none;
}
.nav-item:hover { background: var(--sb-hover-bg); color: #fff; }
.nav-item.active { background: var(--sb-act-bg); color: var(--sb-act-tx); font-weight: 500; border: 1px solid var(--sb-act-bd); }
.nav-item .ico { width: 15px; height: 15px; flex: 0 0 15px; opacity: .85; }
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; border-radius: 9px; padding: 0 6px; line-height: 16px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; background: var(--surface,#fff); border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(84,66,43,.04);
  display: flex; align-items: center; gap: 14px; padding: 0 20px; position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: .3px; }  /* 字阶：页标题 20 > 区块 16 > 正文 14/13 > 表头 12 */
.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.content { padding: 20px; flex: 1; }

/* ---------- 通用组件 ---------- */
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); transition: box-shadow .18s ease, border-color .18s ease; }
.card:hover { box-shadow: var(--shadow-md); border-color: var(--line); }
.card-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card-title .spacer { flex: 1; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface,#fff); color: var(--ink); cursor: pointer; font-size: 13px;
  transition: all .15s;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--danger); border-color: #fecaca; background: var(--surface,#fff); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 12px; }
.btn.ghost { background: var(--surface,#fff); border-color: #e2e8f0; color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--danger); color: var(--danger); }
.btn.ghost-danger { background: var(--surface,#fff); border-color: #fecaca; color: var(--danger); }
.btn.ghost-danger:hover { background: var(--danger-soft); }
/* 开关与单选组 */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 auto; cursor: pointer; user-select: none; -webkit-user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.switch .track { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch .track:before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: var(--surface,#fff); border-radius: 50%; transition: .2s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track:before { transform: translateX(18px); }
.radio-group { display: flex; gap: 14px; align-items: center; padding: 6px 0; flex-wrap: nowrap; }
.radio-group label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.tip-bar { background: var(--brand-soft); color: var(--brand-dark); border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--surface,#fff); color: var(--ink);
  outline: none; width: 100%;
}
/* 单选/复选恢复原生尺寸：否则被上面的 width:100% 撑满、挤压文字折行 */
input[type="radio"], input[type="checkbox"] { width: auto; padding: 0; margin: 0; border: 0; flex: 0 0 auto; accent-color: var(--brand); vertical-align: middle; cursor: pointer; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: var(--focus-ring); }
label.fld { display: block; margin-bottom: 10px; }
label.fld > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--ink-4); background: var(--th-bg); padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--neutral); vertical-align: middle; }
tbody tr:nth-child(even) { background: var(--zebra); }
tbody tr:hover { background: var(--neutral); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 12px; line-height: 18px; }
.tag.ok { background: var(--ok-soft); color: #15803d; }
.tag.warn { background: var(--warn-soft); color: #c2410c; }
.tag.danger { background: var(--danger-soft); color: #b91c1c; }
.tag.info { background: var(--brand-soft); color: var(--brand-dark); }
.tag.gray { background: var(--neutral); color: var(--ink-2); }
.tag.purple { background: var(--purple-soft); color: var(--purple); }

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

/* ---------- 统计卡 ---------- */
.stat { background: var(--surface,#fff); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 3px rgba(84,66,43,.04); }
.stat .k { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 24px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat .d { font-size: 12px; margin-top: 2px; }
.up { color: var(--ok); } .down { color: var(--danger); }  /* 统计卡「正向/警示」标记，非涨跌 */
.gain { color: var(--gain); } .loss { color: var(--loss); }  /* 同比/环比涨跌：涨红跌绿 */

/* ---------- 排课表 ---------- */
.sched { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sched-head { background: var(--panel); padding: 8px 6px; text-align: center; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.sched-head.today { background: #fff7ed; color: #b45309; font-weight: 600; }
.sched-head.today::before { content: '●'; font-size: 8px; margin-right: 3px; vertical-align: 1px; }
.sched-cell { background: var(--surface,#fff); min-height: 96px; padding: 4px; }
.sched-cell.today { background: #fffbeb; }
.sched-time { background: var(--panel); font-size: 12px; font-weight: 500; color: var(--ink-3); display: flex; align-items: center; justify-content: center; }
.cell-add { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 88px; border: 1px dashed transparent; border-radius: 6px; color: var(--ink-3); font-size: 18px; opacity: .35; cursor: pointer; user-select: none; }
.sched-cell:hover .cell-add { opacity: .8; border-color: var(--line); color: var(--brand); }
.les {
  border-radius: 6px; padding: 5px 7px; font-size: 11px; line-height: 1.35; margin-bottom: 4px; cursor: pointer;
  border-left: 3px solid var(--les-bd, var(--brand)); background: var(--les-bg, var(--brand-soft)); color: var(--les-tx, #1e40af);
}
.les:hover { filter: brightness(.97); }
.les.done { border-left-color: var(--ok); background: var(--ok-soft); color: #15803d; }
.les.cancel { border-left-color: var(--ink-3); background: var(--neutral); color: var(--ink-3); text-decoration: line-through; }
/* 已点名/修改中：只覆盖底色，边框保留课程色（课程体系识别不丢） */
.les.rolled { background: var(--neutral); color: var(--ink-4); }
.les.rolled b { color: #57534e; }
.les.editing { background: #fffbeb; color: #b45309; }
.les.editing b { color: #92400e; }
/* 漏点名（标了完成却没考勤消课）：橙色警示，替代误导性的绿色 */
.les.missroll { border-left-color: #f97316; background: #fff7ed; color: #9a3412; }
.les.missroll b { color: #7c2d12; }
.les.missroll .rk { background: #ffedd5; color: #c2410c; border-radius: 8px; padding: 0 5px; }
.les .rk { float: right; font-size: 10px; font-weight: 500; }
.les b { font-weight: 600; }
.les-top { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.les-top .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.les-top .rk { float: none; flex-shrink: 0; }

/* 时间轴周历（课表管理，对齐慕）：左侧小时刻度，卡片按起止时间绝对定位铺满 */
.sched-tl { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tl-time { position: relative; background: var(--panel); }
.tl-time span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-col { position: relative; background-color: var(--surface,#fff); background-image: linear-gradient(var(--line-soft) 1px, transparent 1px); background-size: 100% 64px; cursor: pointer; min-height: 240px; }
.tl-col.today { background-color: #fffbf2; }
/* 拖拽调课：未点名课次可拖动到任意列（天）/任意位置（时间，15 分钟吸附） */
.les[draggable="true"] { cursor: grab; }
.les[draggable="true"]:active { cursor: grabbing; }
.les.dragging { opacity: .45; }
.tl-col.drop-hint { background-color: #eff6ff !important; box-shadow: inset 0 0 0 2px #93c5fd; }
.tl-col:hover { filter: brightness(.985); }
/* 时间轴卡片 方案C：柔和彩底 + 纯白字（老板偏好白字、底色要淡雅）
   --ev-soft 由 views.js softCardColor() 生成：课程色降饱和到 30%、明度按相对亮度反解，
   白字对比度恒定 ≈4.7:1；--ev-c 保留原课程色供角标/圆勾/描边识别，色相语义不丢。
   ⚠️ 不要在彩色底上覆盖 -webkit-font-smoothing:auto：ClearType 亚像素会让白字边缘溢出
      红/青彩边（真实显示器上就是「发晕」），保持全局 antialiased 灰度抗锯齿。 */
.tl-ev {
  position: absolute; margin: 0; z-index: 1; overflow: hidden;
  background: var(--ev-c, var(--brand)) !important;                  /* 不支持自定义属性变色时的兜底 */
  background: var(--ev-soft, var(--ev-c, var(--brand))) !important;  /* 柔和灰调彩底 */
  border: 0; border-radius: 6px; padding: 3px 7px;
  color: #fff; line-height: 1.18;
  /* 内描边用浅色硬边，避免外扩模糊阴影在白网格上糊出灰雾 */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 1px 2px rgba(15,23,42,.09);
  transition: box-shadow .15s, transform .15s;
}
.tl-ev:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 3px 9px rgba(15,23,42,.18); transform: translateY(-1px); z-index: 6; }
.tl-ev .ev-t { display: flex; align-items: center; gap: 4px; }
/* 白字一律纯 #fff：主次靠字重区分，不靠 rgba 透明度（半透明白正是「发木」主因） */
.tl-ev .ev-t b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.tl-ev .ev-n { font-size: 11px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-ev .ev-s { font-size: 10px; font-weight: 500; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-ev .ev-ok { flex-shrink: 0; width: 15px; height: 15px; line-height: 15px; border-radius: 50%; background: #fff; color: #16a34a; font-size: 10px; font-weight: 700; text-align: center; box-shadow: 0 0 0 1px rgba(0,0,0,.10); user-select: none; }
.tl-ev .ev-ok.warn { background: #dc2626; color: #fff; }
.tl-ev .ev-ok.warn.inv { background: #fff; color: #dc2626; }
.tl-ev .ev-ok.edit { color: #b45309; }
/* 课次卡片右下角角标：临=临时插班/补课学员、补=补课排班、假/代=节假日停课/代课 */
.tl-ev .ev-last { display: flex; align-items: center; gap: 4px; }
.tl-ev .ev-last .rm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-ev .ev-tag { flex-shrink: 0; font-size: 9px; line-height: 14px; padding: 0 4px; border-radius: 7px; font-weight: 700; background: #fff; }
.tl-ev .ev-tag.tmp { color: #b45309; }
.tl-ev .ev-tag.mk { color: #7c3aed; }
.tl-ev .ev-tag.hol { color: #1d4ed8; }
.tl-ev .rk { float: none; flex-shrink: 0; font-size: 10px; font-weight: 700; line-height: 15px; background: rgba(0,0,0,.24); border-radius: 8px; padding: 0 5px; white-space: nowrap; color: #fff; }
/* 已取消：柔和灰底 + 白字删除线（.les.cancel 的深色/整卡删除线在这里覆盖掉） */
.tl-ev.cancel { text-decoration: none; }
.tl-ev.cancel .ev-n { color: #fff; opacity: .82; text-decoration: line-through; }
.tl-ev.cancel .ev-s, .tl-ev.cancel .ev-t b { color: #fff; opacity: .78; }

/* ---------- 点名 ---------- */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.att-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--surface,#fff); }
.att-card .nm { font-weight: 500; margin-bottom: 2px; }
.att-card .sub { font-size: 11px; color: var(--ink-3); margin-bottom: 8px; }
.seg { display: flex; gap: 4px; }
.seg button {
  flex: 1; padding: 4px 0; font-size: 12px; border: 1px solid var(--line); background: var(--surface,#fff);
  border-radius: 6px; cursor: pointer; color: var(--ink-2);
}
.seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg button.on.leave { background: var(--warn); border-color: var(--warn); }
.seg button.on.absent { background: var(--danger); border-color: var(--danger); }

/* ---------- 弹窗 ---------- */
.mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: var(--surface,#fff); border-radius: 12px; width: 100%; max-width: 520px; max-height: 86vh; overflow: auto; }
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; align-items: center; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 18px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.x { cursor: pointer; color: var(--ink-3); font-size: 18px; line-height: 1; }
/* 确认框：橙色圆形问号图标 + 标题/正文（对齐慕批量操作确认弹窗） */
.cfm-help { display: flex; align-items: flex-start; gap: 14px; padding: 4px 2px 2px; }
.cfm-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; }
.cfm-main { flex: 1; min-width: 0; }
.cfm-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.cfm-text { font-size: 14px; line-height: 1.8; color: var(--ink-2); }

/* ---------- 提示 ---------- */
#toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.15); }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #faf3e8 0%, var(--panel) 60%); padding: 20px; }
.login-box { background: var(--surface,#fff); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: 100%; max-width: 420px; box-shadow: 0 10px 30px rgba(84,66,43,.06); }
.login-box h2 { margin: 0 0 4px; font-size: 20px; }
.role-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; }
.role-card:hover { border-color: var(--brand); background: var(--brand-soft); }
.role-card .rt { font-weight: 500; }
.role-card .rd { font-size: 12px; color: var(--ink-3); }

/* ---------- 家长端（手机） ---------- */
.phone { max-width: 420px; margin: 0 auto; }
.phone .card { border-radius: 14px; }
.kid-head { background: linear-gradient(135deg, #e08a3e, #c96a1f); color: #fff; border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.kid-head .nm { font-size: 18px; font-weight: 600; }
.hrs { font-size: 30px; font-weight: 700; letter-spacing: -1px; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .g4, .g5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g3 { grid-template-columns: repeat(1, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--line); }
  .nav { display: flex; overflow-x: auto; padding: 8px; }
  .nav-group { display: none; }
  .nav-item { white-space: nowrap; }
  .g4, .g5, .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .content { padding: 12px; }
  .sched { grid-template-columns: 44px repeat(7, minmax(56px, 1fr)); overflow-x: auto; }
}

/* ---------- 课程列表（对齐慕助教） ---------- */
/* ---------- Tab 使用规范 ----------
   一级页签（页面/模块切换）= 下划线式：.tabs/.tab 或 .sub-tabs/.sub-tab
   二级快捷筛选（记录/类型快切）= 胶囊式：.pill-tabs/.pill-tab
   两类禁止混用；新页签一律从这两套里选，不再新造第三套 */
.tabs, .sub-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.sub-tabs { align-items: center; }
.tab, .sub-tab { padding: 9px 16px; font-size: 14px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover, .sub-tab:hover { color: var(--ink-1); }
.tab.active, .sub-tab.active { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }

.course-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ct-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.inp { height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: 13px; outline: none; background: var(--surface,#fff); }
.inp:focus { border-color: var(--brand); box-shadow: var(--focus-ring); }
.filter-group { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-1); cursor: pointer; user-select: none; }
.chk input { width: 15px; height: 15px; accent-color: var(--brand); }

.course-tbl { background: var(--surface,#fff); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.course-tbl th, .course-tbl td { font-size: 13px; }
.course-tbl thead { background: var(--panel); }
.course-tbl .c-check { width: 38px; text-align: center; }
.course-tbl td.c-check { text-align: center; }
.course-tbl .c-check input { width: 15px; height: 15px; accent-color: var(--brand); }
.course-tbl .cname { font-weight: 600; color: var(--ink-1); }
.course-tbl .pricing { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.course-tbl .ops { white-space: nowrap; }

/* ---- 添加课程（对齐慕助教） ---- */
.form-sec { background: var(--surface,#fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.form-sec-t { font-size: 14px; font-weight: 700; color: var(--ink-1); margin-bottom: 10px; padding-left: 9px; border-left: 3px solid var(--brand); }
.color-dots { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.color-dot { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: 0 0 0 1px rgba(0,0,0,.08); flex-shrink: 0; }
.color-dot.on { border-color: var(--ink-1); transform: scale(1.12); }
.color-dots input[type=color] { width: 30px; height: 28px; border: 1px solid var(--line); border-radius: 6px; padding: 0; background: var(--surface,#fff); cursor: pointer; }
.charge-block { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fcfdff; }
.pricing-host { margin-top: 8px; }
.pricing-head, .pricing-row { display: grid; grid-template-columns: 1.6fr 0.8fr 0.9fr 1fr auto; gap: 8px; align-items: center; }
.pricing-head { font-size: 12px; color: var(--ink-3); padding: 0 2px 6px; }
.pricing-row { margin-bottom: 6px; }
.pricing-row input, .pricing-host input { height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: 13px; outline: none; background: var(--surface,#fff); width: 100%; }
.pricing-row input:focus, .pricing-host input:focus { border-color: var(--brand); }
.pp-unit { font-size: 12px; color: var(--ink-2); text-align: right; }
.pricing-host .btn.sm { margin-top: 4px; }

/* ============ 学员管理：双 tab / 筛选 / 表格 ============ */
/* .sub-tabs 页签样式已并入上方 .tabs 共享定义（见「Tab 使用规范」） */
.sub-tabs .spacer { flex: 1; }
.sub-tabs .link { color: var(--brand); cursor: pointer; font-size: 13px; padding: 0 8px 8px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 8px; }
.filter-grid .fld.slim, .filter-grid label.fld { margin: 0; }
.filter-grid label.fld span { font-size: 12px; color: var(--ink-3); }
.filter-grid label.fld select, .filter-grid label.fld input { height: 32px; }
.stat-bar { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 8px 14px; font-size: 13px; margin-bottom: 10px; }
.stat-bar b { font-size: 15px; }
.stat-bar .muted { color: #b45309; cursor: help; }

/* 学员报表 */
.rp-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 12px; }
.rp-card { background: var(--surface,#fff); border: 1px solid var(--line, #e2e8f0); border-radius: 12px; padding: 16px; min-width: 0; }
.rp-card .k { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-card .v { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -0.5px; }
@media (max-width: 1100px) { .rp-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .rp-cards { grid-template-columns: repeat(2, 1fr); } .rp-card .v { font-size: 20px; } }
/* 数据趋势折线图：桌面扁长画幅（viewBox 1080×230），窄屏兜底高度防压扁 */
.rp-chart svg { width: 100%; height: auto; display: block; }
@media (max-width: 760px) { .rp-chart svg { min-height: 200px; } }
/* 报表过滤行（报表+日期+快捷chips）：滚动吸顶（对齐慕），top 让过 56px 顶栏 */
.rp-stickybar {
  position: sticky; top: 56px; z-index: 15;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--card, #fff); border: 1px solid var(--line-soft, #eef1f5); border-top: none;
  border-radius: 0 0 var(--radius, 12px) var(--radius, 12px);
  padding: 10px 18px; margin: 0 0 16px;
  box-shadow: 0 8px 10px -9px rgba(84, 66, 43, .18);
}
@media (max-width: 760px) {
  .rp-stickybar { position: static; border-radius: 0 0 var(--radius, 12px) var(--radius, 12px); }
}
.stat-bar .sb-i { white-space: nowrap; }
.stat-bar .sb-i + .sb-i { margin-left: 18px; }

/* 详情页三列信息网格（学员详情/班级详情/订单详情；手机端降两列见底部媒体查询） */
.kv-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 24px; font-size: 13px; }
.kv-grid > div, .kv-grid > span { min-width: 0; }
.table-scroll { overflow-x: auto; background: var(--surface,#fff); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(84,66,43,.04); }
.card > .table-scroll, .form-sec > .table-scroll { box-shadow: none; }
.pagination { display: flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.pagination .pg { min-width: 28px; height: 28px; border: 1px solid var(--line); background: var(--surface,#fff); border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.pagination .pg:hover { border-color: var(--brand); color: var(--brand); }
.pagination .pg.active { background: var(--brand); color: #fff; border-color: var(--brand); }
/* .tag.blue 旧类名仅为兼容保留（历史上名叫 blue 实为奶油橙，名实不符已废弃）；
   新代码统一用 .tag.info。语义体系：ok=成功绿 / warn=预警橙红 / danger=错误红 / info=信息橙 / gray=中性灰 / purple=紫 */
.tag.blue { background: var(--brand-soft); color: var(--brand-dark); }

/* ===== 班级管理（班课 / 一对一）===== */
.class-toolbar { margin-bottom: 10px; }
.class-batch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.class-batch .spacer { flex: 1; }
.class-tbl { background: var(--surface,#fff); border: none; border-radius: 0; overflow: hidden; width: 100%; }
.class-tbl th, .class-tbl td { font-size: 13px; padding: 9px 10px; text-align: left; white-space: nowrap; }
.class-tbl thead { background: var(--panel); }
.class-tbl tbody tr { border-top: 1px solid var(--line); }
.class-tbl .c-check { width: 38px; text-align: center; }
.class-tbl td.c-check { text-align: center; }
.class-tbl .c-check input { width: 15px; height: 15px; accent-color: var(--brand); }
.class-tbl .ops { white-space: nowrap; }
.class-tbl .ops .btn { margin-right: 4px; }
.link { color: var(--brand); cursor: pointer; font-size: 13px; }
.link:hover { text-decoration: underline; }
.dropdown-wrap { position: relative; display: inline-block; }
.popmenu { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; background: var(--surface,#fff); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(15, 23, 42, .12); min-width: 180px; overflow: hidden; }
.popmenu[hidden] { display: none; }
.popitem { padding: 9px 14px; font-size: 13px; color: var(--ink-1); cursor: pointer; }
.popitem:hover { background: var(--brand-soft); }
.mini-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.mini-tbl th, .mini-tbl td { border: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: middle; }
.mini-tbl input[type="checkbox"] { vertical-align: middle; margin: 0; }
.mini-tbl thead { background: var(--panel); }
.mini-tbl .inp { width: 100%; }
/* 弹窗内表单分节 */
.form-section { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.form-section .form-title { font-weight: 600; font-size: 14px; color: var(--ink-1); margin-bottom: 10px; }
.up-box { background: var(--panel); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.up-box b { font-size: 13px; color: var(--ink-1); }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-list .btn.block { width: 100%; text-align: left; }

/* ⓘ 悬停说明气泡（对齐慕：深色气泡以图标为中心居中显示在上方） */
.tip-wrap { position: relative; display: inline-block; cursor: help; color: #a29d94; font-style: normal; }
.tip-wrap .tip-bubble { visibility: hidden; opacity: 0; position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%); background: #1f2937; color: #fff; font-size: 11px; line-height: 1.5; padding: 7px 10px; border-radius: 4px; width: max-content; max-width: min(340px, calc(100vw - 24px)); white-space: normal; text-align: left; transition: opacity .15s; z-index: 60; pointer-events: none; box-shadow: 0 4px 12px rgba(15, 23, 42, .2); }
.tip-wrap .tip-bubble::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1f2937; }
.tip-wrap:hover .tip-bubble { visibility: visible; opacity: 1; }

/* ---------- 自定义日期选择器（替换原生丑日历） ---------- */
input[type="date"] { font-family: inherit; cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
input[type="date"]::-webkit-inner-spin-button { display: none; }
.dpc { position: fixed; z-index: 300; width: 266px; background: var(--surface,#fff); border-radius: 12px; box-shadow: 0 8px 30px rgba(15, 23, 42, .18), 0 0 0 1px rgba(15, 23, 42, .06); padding: 10px 12px 8px; user-select: none; font-size: 13px; }
.dpc-h { display: flex; align-items: center; gap: 2px; padding: 2px 0 8px; }
.dpc-h b { flex: 1; text-align: center; font-size: 14px; color: var(--ink, #2b2622); }
.dpc-nav { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-4); font-size: 17px; line-height: 1; }
.dpc-nav:hover { background: var(--neutral); color: var(--brand); }
.dpc-now { color: var(--brand); cursor: pointer; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.dpc-now:hover { background: #fff7ed; }
.dpc-w { display: grid; grid-template-columns: repeat(7, 1fr); color: #a29d94; font-size: 12px; text-align: center; padding-bottom: 4px; }
.dpc-g { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.dpc-d { height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; color: #334155; }
.dpc-d:hover { background: var(--neutral); }
.dpc-d.dim { color: #cbd5e1; }
.dpc-d.today { box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand); font-weight: 600; }
.dpc-d.sel, .dpc-d.sel:hover { background: var(--brand); color: #fff; font-weight: 600; }
.dpc-f { display: flex; justify-content: flex-end; padding-top: 6px; border-top: 1px solid var(--neutral); margin-top: 6px; }
.dpc-f .dpc-clr { color: #a29d94; cursor: pointer; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.dpc-f .dpc-clr:hover { color: #ef4444; background: #fef2f2; }
.dpc-g.dpc-ms { grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dpc-d.dpc-m { height: 38px; border-radius: 10px; font-size: 13px; }
.dpc-d.dpc-m:hover { background: #fff7ed; color: var(--brand); }
.dpc-d.dpc-m.sel, .dpc-d.dpc-m.sel:hover { background: var(--brand); color: #fff; }
.dpc-link { color: var(--ink, #2b2622); font-weight: 600; cursor: pointer; text-decoration: none; }
.dpc-link:hover { color: var(--brand); }
.dpc-now { display: inline-block; }
.dpc-f .dpc-clr { display: inline-block; }

/* ============ 移动端适配（补全：覆盖后置组件） ============ */
@media (max-width: 760px) {
  /* 顶栏：允许换行、压缩 */
  .topbar { flex-wrap: wrap; height: auto; min-height: 48px; padding: 8px 12px; gap: 8px; }
  .topbar h1 { font-size: 15px; }
  .topbar .btn.sm { height: 32px; padding: 0 10px; font-size: 12px; }
  .user-chip { font-size: 12px; }
  .user-chip .tag { display: none; }

  /* 顶部横向导航紧凑化 */
  .brand { padding: 10px 12px 8px; }
  .brand-sub { display: none; }
  .org-switch { padding: 8px 12px; }
  .org-switch .small { display: none; }
  .nav { gap: 4px; padding: 6px 8px 10px; }
  .nav-item { padding: 6px 10px; font-size: 13px; border: 1px solid transparent; }
  .nav-item.active { border: 1px solid var(--sb-act-bd, transparent); }

  /* 内容区与卡片 */
  .content { padding: 10px; }
  .card, .stat, .form-sec { padding: 12px; }
  .skin-dots { flex-wrap: wrap; }

  /* 选项卡横向滚动 */
  .tabs, .sub-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab, .sub-tab { white-space: nowrap; padding: 8px 12px; }
  .sub-tabs .link { white-space: nowrap; }

  /* 筛选区两列 */
  .filter-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .course-toolbar, .class-toolbar, .class-batch { gap: 8px; }

  /* 表格紧凑 + 横滚顺滑：窄表自然铺满、宽表按内容撑开横滚（列不压缩逐字换行） */
  .table-scroll { -webkit-overflow-scrolling: touch; }
  .table-scroll table { width: max-content; min-width: 100%; }
  .table-scroll th, .table-scroll td { white-space: nowrap; }
  .kv-grid { grid-template-columns: 1fr 1fr; gap: 6px 14px; }
  .stat-bar { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .stat-bar .sb-i + .sb-i { margin-left: 0; }
  table { font-size: 12px; }
  th, td { padding: 8px; }
  .class-tbl th, .class-tbl td { padding: 7px 8px; }
  .pagination { font-size: 12px; }

  /* 弹窗：不许超过屏宽 */
  .modal { max-width: 94vw !important; max-height: 88vh; }
  .modal-head { padding: 12px 14px; }
  .modal-body { padding: 12px; }
  .modal-foot { padding: 10px 12px; }
  /* 排课弹窗周重复行：窄屏折行防溢出 */
  .wk-row { flex-wrap: wrap !important; }
  .wk-row .inp { min-width: 0; }
  .modal .fld, .modal .inp { max-width: 100%; }

  /* 报名/计费行压缩 */
  .pricing-head, .pricing-row { grid-template-columns: 1.4fr 66px 76px 1fr auto; gap: 6px; }

  /* 周历更紧凑 */
  .sched { grid-template-columns: 36px repeat(7, minmax(44px, 1fr)); }
}

/* ============ 手机版 H5 视图（老师点名 / 数据看板） ============ */
.m-wrap { max-width: 640px; margin: 0 auto; padding-bottom: 160px; }
.m-top {
  position: sticky; top: 0; z-index: 25; max-width: 640px; margin: 0 auto;
  background: var(--sb-bg); color: var(--sb-t1);
  display: flex; align-items: center; padding: 12px 14px;
}
.m-top .m-back { font-size: 22px; line-height: 1; cursor: pointer; width: 28px; color: var(--sb-t1); user-select: none; }
.m-top .m-title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; }
.m-hero { padding: 16px 16px 4px; }
.m-hero .hi { font-size: 17px; font-weight: 700; color: var(--ink); }
.m-hero .sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.m-hero .sub b { color: var(--brand); }
.m-card { background: var(--surface,#fff); border-radius: 14px; margin: 10px 12px; padding: 13px 15px; box-shadow: 0 1px 4px rgba(84,66,43,.06); }
.m-card-t { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.m-card-t .spacer { flex: 1; }
.m-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px; }
.m-stat { background: var(--surface,#fff); border-radius: 14px; padding: 13px 15px; box-shadow: 0 1px 4px rgba(84,66,43,.06); }
.m-stat .k { font-size: 11px; color: var(--ink-3); }
.m-stat .v { font-size: 20px; font-weight: 700; margin-top: 2px; }
.m-stat .v .u { font-size: 11px; font-weight: 400; color: var(--ink-3); margin-left: 2px; }
.m-stat.hot .v { color: var(--danger); }
/* 课次卡片 */
.m-les { border-left: 4px solid var(--brand); }
.m-les.today { border-left-color: var(--warn); }
.m-les .row1, .m-stu .row1, .m-les-info .row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.m-les .time, .m-les-info .time { font-weight: 700; font-size: 13px; color: var(--ink); }
.m-les .nm, .m-stu .nm { font-size: 17px; font-weight: 700; color: var(--ink); margin: 6px 0 2px; }
.m-les .sub, .m-les-info .sub, .m-stu .sub { font-size: 12px; color: var(--ink-3); }
.m-btn {
  display: block; width: 100%; margin-top: 10px; height: 42px; border-radius: 11px; border: none;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.m-btn.primary { background: var(--brand); color: #fff; }
.m-btn.ghost { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--brand-soft); }
.m-mini { margin-left: auto; height: 28px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font-size: 12px; cursor: pointer; }
.m-mini.ghost { background: var(--surface,#fff); color: var(--brand); }
.m-les-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--neutral); font-size: 12px; }
.m-les-row:last-child { border-bottom: none; }
.m-les-row .time { font-weight: 700; color: var(--ink); min-width: 44px; }
.m-les-row .nm { flex: 1; font-weight: 600; }
/* 点名页 */
.m-lockbar { margin-top: 8px; font-size: 12px; color: var(--ink-3); background: var(--neutral); border-radius: 8px; padding: 7px 10px; }
.m-lockbar.warn { color: var(--warn); background: var(--warn-soft); }
.m-stu .nm { font-size: 16px; margin: 0; }
.m-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.m-seg button {
  height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface,#fff);
  font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.m-seg button.on.present { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); font-weight: 700; }
.m-seg button.on.late { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); font-weight: 700; }
.m-seg button.on.leave { background: var(--neutral); color: var(--ink-2); border-color: var(--ink-3); font-weight: 700; }
.m-seg button.on.absent { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); font-weight: 700; }
.m-seg button:disabled { opacity: .45; cursor: not-allowed; }
.m-undo { display: block; margin: 8px auto 0; background: none; border: none; color: var(--ink-3); font-size: 12px; text-decoration: underline; cursor: pointer; }
.m-foot {
  position: fixed; bottom: calc(58px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; z-index: 30; max-width: 640px; margin: 0 auto;
  background: var(--surface,#fff); border-top: 1px solid var(--line);
  padding: 10px 14px 10px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 -1px 6px rgba(84,66,43,.05);
}
.m-foot .m-btn { flex: 1; margin-top: 0; height: 42px; font-size: 15px; }
.m-cnt { font-size: 12px; color: var(--ink-3); line-height: 1.7; }
.m-cnt b { color: var(--ink); font-size: 13px; }
.m-shell-bar { max-width: 640px; margin: 0 auto; background: var(--sb-bg); color: var(--sb-t2); display: flex; align-items: center; padding: 7px 14px; font-size: 12px; }
.m-shell-bar .sp { flex: 1; }
.m-logout { color: var(--sb-t1); cursor: pointer; text-decoration: underline; font-size: 12px; }

/* ============ 手机版底部标签栏 + 更多页 ============ */
.m-content { padding-bottom: 92px; min-height: calc(100vh - 30px); font-size: 13px; }
.m-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; max-width: 640px; margin: 0 auto;
  background: var(--surface,#fff); border-top: 1px solid var(--line);
  display: flex; padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -1px 6px rgba(84,66,43,.05);
}
.m-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--ink-3); font-size: 11px; padding: 3px 0;
}
.m-tab.on { color: var(--brand); font-weight: 600; }
.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 4px; }
.m-grid-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px; border-radius: 10px; color: var(--ink-2); font-size: 12px;
  cursor: pointer; user-select: none;
}
.m-grid-item:active { background: var(--neutral); }
.m-grid-item svg { color: var(--brand); }
.m-btn.danger { background: var(--danger-soft, #fee2e2); color: var(--danger, #dc2626); border: 1px solid var(--danger, #dc2626); }

/* ============ 手机版课表（竖向按天滚动） ============ */
.m-wk { display: flex; align-items: center; gap: 10px; }
.m-wk-nav {
  width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--surface,#fff);
  color: var(--ink-2); font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.m-wk-nav:active { background: var(--brand-soft); color: var(--brand); }
.m-day-h { display: flex; align-items: center; gap: 8px; margin: 14px 14px 8px; font-size: 13px; }
.m-day-h .d { color: var(--ink-3); font-size: 12px; }
.m-day-h .spacer { flex: 1; }
.m-day-h.today { border-left: 3px solid var(--brand); padding-left: 8px; margin-left: 11px; }
.m-day-h.today b { color: var(--brand-dark); }
.m-day-empty {
  margin: 0 12px 4px; padding: 7px 12px; background: var(--surface,#fff); border-radius: 10px;
  color: var(--ink-3); font-size: 12px; box-shadow: 0 1px 3px rgba(84,66,43,.04);
}
.m-les { cursor: pointer; }
.m-les:active { filter: brightness(.96); }
.m-les.canceled { border-left-color: var(--ink-3) !important; background: var(--neutral) !important; }
.m-les.canceled .nm { text-decoration: line-through; color: var(--ink-3); }
.m-les.trial { border-left-style: dashed; }

/* ============ 手机版学员列表（卡片行） ============ */
.m-pills { display: flex; gap: 6px; overflow-x: auto; flex-wrap: nowrap; }
.m-pills .pill-tab { flex: none; padding: 4px 10px; }
.m-stu-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--neutral); cursor: pointer; }
.m-stu-row:last-child { border-bottom: none; }
.m-stu-row:active { background: var(--neutral); }
.m-stu-row .mi { flex: 1; min-width: 0; }
.m-stu-row .mi .nm { font-size: 15px; font-weight: 600; color: var(--ink); }
.m-stu-row .mi .sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.m-stu-row .mr { flex: none; text-align: right; }
.m-stu-row .mr b { font-size: 17px; font-variant-numeric: tabular-nums; }
.m-stu-row .mr .u { font-size: 11px; color: var(--ink-3); margin-left: 2px; }

/* ============ 校区切换条（同品牌多校区） ============ */
.campus-switch { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.campus-opt {
  font-size: 12px; padding: 4px 10px; border-radius: 20px; cursor: pointer; user-select: none;
  background: transparent; color: var(--sb-t2, #8a8175); border: 1px solid var(--line);
}
.campus-opt:hover { color: var(--ink); border-color: var(--ink-3); }
.campus-opt.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }

/* ============ 内联日历（新建排课 / 一对一试听排课） ============ */
.cal9 { border: 1px solid var(--line); border-radius: 8px; padding: 8px; max-width: 280px; user-select: none; background: var(--surface,#fff); }
.cal9-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal9-nav { cursor: pointer; padding: 2px 10px; color: var(--brand); font-weight: 600; border-radius: 4px; font-size: 14px; }
.cal9-nav:hover { background: var(--brand-soft); }
.cal9-title { font-weight: 600; font-size: 13px; color: var(--ink); }
.cal9-w, .cal9-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal9-w span { text-align: center; font-size: 12px; color: var(--ink-3, #94a3b8); padding: 2px 0; }
.cal9-d { text-align: center; font-size: 12px; padding: 5px 0; border-radius: 4px; cursor: pointer; border: 1px solid transparent; color: var(--ink); }
.cal9-d:hover { background: var(--brand-soft); }
.cal9-d.sel { background: var(--brand); color: #fff; font-weight: 600; }
.cal9-d.today:not(.sel) { border-color: var(--brand); color: var(--brand); }

/* ============ 醒目返回按钮（详情页左上角，与「报名」等同级存在感） ============ */
.btn.back-c { display: inline-flex; align-items: center; gap: 4px; background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn.back-c:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
/* 页头可点班级名（点名页等：点名字进班级详情） */
.cls-link { color: var(--ink); text-decoration: none; cursor: pointer; }
.cls-link:hover { color: var(--brand); }

/* ============ 课表管理：课次卡片 hover 信息卡（对齐慕） ============ */
.lh-pop { position: fixed; z-index: 260; width: 300px; background: var(--surface,#fff); border-radius: 10px; box-shadow: 0 8px 30px rgba(15, 23, 42, .18), 0 0 0 1px rgba(15, 23, 42, .06); padding: 12px 14px 10px; font-size: 13px; user-select: none; }
.lh-name { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.lh-date { color: var(--ink-2); margin-bottom: 8px; }
.lh-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lh-k { flex: none; color: var(--ink-4); }
.lh-v { color: var(--ink); }
.lh-bar { flex: 1; min-width: 40px; height: 6px; border-radius: 4px; background: #eef2f7; overflow: hidden; }
.lh-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.lh-stu { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 2px; line-height: 1.6; }
.lh-stu .lh-v, .lh-stu { color: var(--ink-3); font-size: 12px; }
.lh-ops { display: flex; border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 7px; }
.lh-ops a { flex: 1; text-align: center; color: var(--ink); cursor: pointer; text-decoration: none; font-size: 13px; white-space: nowrap; }
.lh-ops a:hover { color: var(--brand); font-weight: 600; }
.lh-ops a + a { border-left: 1px solid var(--line-soft); }

/* ============ 胶囊按钮式页签（上课记录等，全部走主题色变量，换肤跟随变化） ============ */
.pill-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pill-tab { padding: 7px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; border: 1px solid var(--line); background: var(--brand-soft); color: var(--ink-2); transition: all .15s; white-space: nowrap; }
.pill-tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.pill-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pill-tab.active:hover { background: var(--brand-dark); }

/* 全局日期选择器（对齐慕）：占位「年-月-日」+ 日历图标，点击弹出日历面板 */
.date-ph { position: relative; display: inline-flex; width: max-content; max-width: 100%; cursor: pointer; }
.date-ico { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; pointer-events: none; opacity: .7; }
.date-panel { position: absolute; left: 0; top: calc(100% + 6px); z-index: 80; background: var(--surface,#fff); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .16); padding: 10px 12px; width: 246px; user-select: none; }
.dp-foot { display: flex; gap: 10px; margin-top: 6px; align-items: center; white-space: nowrap; }
.dp-foot button { border: none; background: none; padding: 0; font-size: 11px; white-space: nowrap; cursor: pointer; color: var(--brand); }
.dp-foot button:hover { text-decoration: underline; color: var(--brand-dark); }
.dp-foot button[data-dp-act="clear"] { color: var(--ink-3); }
.dp-foot button[data-dp-act="clear"]:hover { color: var(--danger); }
.pill-tab.sm { padding: 4px 14px; font-size: 12px; border-radius: 6px; }

/* ================= AI 助理（答疑/查数/排课助手） =================
   视觉规范：卡片=暖色渐变（非纯白）｜消息区=内嵌奶油画布｜气泡=渐变主色/白卡描边｜输入区=独立浮起输入坞
   全部走主题变量，换肤自动跟随；悬浮管家复用同一套 .ai-* 组件 */
.ai-card {
  display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 420px;
  padding: 14px 16px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--brand-soft) 0%, var(--panel) 45%, var(--bg) 100%);
  box-shadow: 0 3px 14px rgba(84,66,43,.07);
}
.ai-head {
  padding: 8px 12px; margin: 0 0 12px; border-radius: 10px;
  background: linear-gradient(90deg, var(--brand-soft), rgba(255,255,255,.55));
  border: 1px solid var(--line-soft);
}
.ai-head b { color: var(--brand-dark); }
.ai-avatar {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 2px 8px rgba(84,66,43,.16);
}
.ai-status { color: var(--ink-3); padding-left: 10px; border-left: 1px solid var(--line); }
.ai-head .btn.sm { background: var(--surface,#fff); border-color: var(--line); color: var(--ink-2); }
.ai-head .btn.sm:hover { border-color: var(--brand); color: var(--brand-dark); }

.ai-msgs {
  flex: 1; overflow: auto; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background:
    radial-gradient(circle at 14% 8%, rgba(217,119,6,.09), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.22));
  box-shadow: inset 0 1px 3px rgba(84,66,43,.05);
}
.ai-msg { display: flex; flex-shrink: 0; }  /* 禁止 flex 压缩：否则消息多时气泡被挤扁、内容裁切 */
.ai-empty { flex-shrink: 0; }
.ai-msg.user { justify-content: flex-end; }
.ai-bubble { max-width: 640px; padding: 10px 13px; border-radius: 14px; font-size: 13px; line-height: 1.7; word-break: break-word; }  /* 宽度由内容决定、上限 640px；外层 wrapper 的 78% 负责限制长文本，避免百分比嵌套把短气泡压窄 */
.ai-msg.user .ai-bubble {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
  border-bottom-right-radius: 4px; box-shadow: 0 3px 10px rgba(84,66,43,.16);
}
.ai-msg.bot .ai-bubble {
  background: var(--surface,#fff); color: var(--ink); border: 1px solid var(--line);
  border-bottom-left-radius: 4px; box-shadow: 0 2px 7px rgba(84,66,43,.06);
}
/* AI 回答里的「入口直达」链接（[[入口:key]] 渲染成小胶囊，点击一键跳页） */
.ai-bubble .ai-go { display: inline-block; margin: 2px 0 0 4px; padding: 1px 9px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--line); font-size: 12px; line-height: 1.7; text-decoration: none; cursor: pointer; }
.ai-bubble .ai-go:hover { background: var(--warn-soft); }

/* 空态欢迎卡：不再是一行灰字 */
.ai-empty { margin: auto; text-align: center; color: var(--ink-2); font-size: 13px; line-height: 1.8; padding: 14px 16px; max-width: 560px; }
.ai-empty::before {
  content: '慕'; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 15px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-size: 21px; font-weight: 700; box-shadow: 0 8px 20px rgba(217,119,6,.22);
}
.ai-empty-t { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.ai-empty-s { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.ai-empty-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ai-empty-chip {
  padding: 6px 12px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.85); border: 1px solid var(--line); color: var(--ink-2);
  cursor: pointer; transition: all .15s; user-select: none;
}
.ai-empty-chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--surface,#fff); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(84,66,43,.08); }
.ai-typing { color: var(--ink-3); }

/* 输入坞：整体浮起，聚焦时坞高亮（输入框本体不再单独套光晕） */
.ai-inputrow {
  display: flex; gap: 10px; align-items: stretch; margin-top: 12px;
  background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; box-shadow: 0 2px 10px rgba(84,66,43,.06);
  transition: border-color .15s, box-shadow .15s;
}
.ai-inputrow:focus-within { border-color: var(--brand); box-shadow: var(--focus-ring); }
.ai-inputrow textarea {
  flex: 1; resize: none; min-height: 52px; padding: 6px 8px;
  border: 0 !important; background: transparent !important; box-shadow: none !important;
}
.ai-inputrow textarea:focus { border: 0 !important; box-shadow: none !important; }
/* 2×2 按钮矩阵：避免四个按钮竖排把输入框拉成一大块空白 */
.ai-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; flex-shrink: 0; width: 164px; align-content: start; }
.ai-actions .btn { width: 100%; }
.ai-foot { margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.55); color: var(--ink-3); font-size: 12px; }
@media (max-width: 768px) {
  .ai-card { height: calc(100vh - 150px); min-height: 360px; padding: 10px; }
  .ai-msgs { padding: 12px; }
  .ai-bubble { max-width: 100%; }
  .ai-actions { width: 140px; }
}

/* AI 助理·语音输入录音态 */
.ai-mic-on { background: #fee2e2 !important; color: #dc2626 !important; border-color: #fca5a5 !important; animation: ai-mic-pulse 1.2s ease-in-out infinite; }
@keyframes ai-mic-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* AI 助理·发截图（待发送缩略图条 + 气泡内图片） */
.ai-imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ai-imgs:empty { display: none; }
.ai-thumb { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid #e2e8f0; background: #f1f5f9; flex-shrink: 0; }
.ai-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-thumb-x { position: absolute; top: 0; right: 0; width: 18px; height: 18px; border: none; border-radius: 0 0 0 6px; background: rgba(15, 23, 42, .55); color: #fff; font-size: 12px; line-height: 17px; padding: 0; cursor: pointer; }
.ai-msgstrip { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.ai-msgstrip img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(148, 163, 184, .5); display: block; }

/* ================= 悬浮 AI 管家（绿色毛球小精灵 + 聊天窗） ================= */
#ai-mascot {
  position: fixed; right: 20px; bottom: 24px; width: 58px; height: 58px; z-index: 90;
  cursor: grab; user-select: none; touch-action: none;
  filter: drop-shadow(0 0 10px rgba(142, 222, 107, .8)) drop-shadow(0 0 22px rgba(110, 203, 79, .45)) drop-shadow(0 6px 12px rgba(15, 23, 42, .18));
  animation: ai-bob 3.2s ease-in-out infinite;
}
#ai-mascot:active { cursor: grabbing; }
@keyframes ai-bob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-7px) scale(1.03); } }
.ai-eye { transform-box: fill-box; transform-origin: center; animation: ai-blink 4.2s infinite; }
@keyframes ai-blink { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.08); } 97% { transform: scaleY(1); } }
.ai-mascot-hint {
  position: absolute; right: 66px; top: 10px; background: #1f2937; color: #fff; font-size: 11px;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .2); animation: ai-hint-in .3s ease;
}
.ai-mascot-hint::after { content: ''; position: absolute; right: -5px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left-color: #1f2937; border-right: 0; }
@keyframes ai-hint-in { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
#ai-float-panel {
  position: fixed; z-index: 91; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(160deg, #fffdfa, var(--panel) 60%, var(--brand-soft));
  box-shadow: 0 18px 50px rgba(15, 23, 42, .28); display: flex; flex-direction: column; overflow: hidden;
  animation: ai-float-in .18s ease;
}
@keyframes ai-float-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.ai-float-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: linear-gradient(135deg, #6ecb4f, #4caf3f); color: #fff; flex-shrink: 0; }
.ai-float-head b { font-size: 13px; }
.ai-float-dot { width: 10px; height: 10px; border-radius: 50%; background: #eaffd8; box-shadow: 0 0 6px rgba(234, 255, 216, .9); animation: ai-bob 2.4s ease-in-out infinite; }
.ai-float-ib { background: rgba(255,255,255,.16); border: 0; color: #fff; width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 13px; line-height: 1; }
.ai-float-ib:hover { background: rgba(255,255,255,.3); }
#ai-float-panel .ai-msgs { flex: 1; overflow: auto; margin: 8px; padding: 10px; border-radius: 10px; }
#ai-float-panel .ai-empty { padding: 14px 8px; }
#ai-float-panel .ai-empty::before { width: 44px; height: 44px; border-radius: 14px; font-size: 19px; margin-bottom: 10px; }
#ai-float-panel .ai-empty-s, #ai-float-panel .ai-empty-chips { display: none; }  /* 小窗只留标题，避免拥挤 */
#ai-float-panel textarea { font-size: 13px; }
.ai-dock-float { margin: 0 8px 8px; padding: 8px; }
.ai-dock-float .ai-actions { display: flex; flex-direction: column; width: auto; min-width: 0; gap: 5px; }  /* 悬浮窗窄，按钮回竖排 */
@media (max-width: 768px) {
  #ai-mascot { width: 48px; height: 48px; right: 14px; bottom: 78px; }
  #ai-float-panel { left: 8px !important; right: 8px; width: auto !important; }
}

/* ===== 上课记录手机端卡片化（2026-11-03，对齐慕）===== */
.m-lr-bar { display: flex; align-items: center; gap: 8px; margin: 10px 12px; }
.m-lr-bar .inp { flex: 1; min-width: 0; }
.m-lr-bar .btn { flex-shrink: 0; }
.m-lr-panel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 12px 10px; background: var(--surface,#fff); border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 4px rgba(84,66,43,.06); }
.m-lr-day { margin: 14px 14px 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-lr-card { background: var(--surface,#fff); border-radius: 12px; margin: 0 12px 8px; padding: 11px 13px; box-shadow: 0 1px 4px rgba(84,66,43,.06); }
.m-lr-card .r1 { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.m-lr-card .r1 b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-lr-card .r1 .tag { flex-shrink: 0; }
.m-lr-card .r2 { margin-top: 4px; font-size: 12px; color: var(--ink-3); line-height: 1.6; word-break: break-all; }
.m-lr-card .go { color: var(--ink-3); font-size: 16px; flex-shrink: 0; font-weight: 400; }
.m-lr-back { display: flex; align-items: center; gap: 6px; margin: 10px 12px; font-size: 14px; color: var(--brand); cursor: pointer; }
.m-lr-back b { color: var(--ink); font-size: 15px; }
.m-lr-back .go { font-size: 18px; }
.m-fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: 74px; width: calc(100% - 24px); max-width: 616px; height: 46px; border-radius: 12px; background: #f59e0b; color: #fff; font-size: 16px; font-weight: 600; border: none; box-shadow: 0 4px 12px rgba(245,158,11,.35); z-index: 30; cursor: pointer; }

/* ===== 点名页控件缩小（2026-11-03 用户反馈：太大）===== */
.m-les-info .m-btn { height: 32px; font-size: 13px; border-radius: 8px; margin-top: 8px; }
.m-seg { gap: 6px; margin-top: 8px; }
.m-seg button { height: 32px; font-size: 13px; border-radius: 8px; }
.m-stu .att-hours-inp { height: 24px !important; }

/* ===== 手机端整体视觉焕新（2026-11-03 用户定：告别深棕黑暗风→清新渐变+字体再降一档；仅≤760px 生效，电脑端零影响）
   二次调整（20:00）：①主色换「珊瑚暖橙」与慕区分（#ff9d42→#ff7a45）②卡片排版对齐慕（大名字+右侧彩色状态字+图标信息行+浅灰日期胶囊条）③color-scheme light 对抗浏览器强制暗色 ===== */
@media (max-width: 760px) {
  /* 页面底色：暖奶油→更透亮的米白渐变 */
  body { background: linear-gradient(180deg, #fffaf3 0%, #fdf6ee 300px, #fbf5ec 100%); }
  /* 顶栏：珊瑚暖橙渐变（比慕更亮更粉嫩，有辨识度） */
  .m-top {
    background: linear-gradient(135deg, #ff9d42 0%, #ff7a45 70%, #ff8f5e 100%);
    color: #fff; padding: 10px 14px;
    box-shadow: 0 2px 12px rgba(255, 122, 69, .30);
  }
  .m-top .m-back { color: #fff; }
  .m-top .m-title { color: #fff; font-size: 14px; letter-spacing: .5px; }
  .m-shell-bar { background: linear-gradient(135deg, #ff7a45, #ff9d42); color: rgba(255,255,255,.96); border: none; }
  .m-shell-bar .m-logout { color: #fff; }
  /* 首页问候区：字号再降一档 */
  .m-hero { padding: 14px 16px 2px; }
  .m-hero .hi { font-size: 16px; }
  .m-hero .sub { font-size: 11px; }
  /* 卡片：更轻盈的悬浮感 + 留白加大（慕风） */
  .m-card, .m-stat, .m-lr-card, .m-lr-panel {
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(178,116,60,.04), 0 4px 14px rgba(178,116,60,.07);
  }
  .m-lr-card { padding: 13px 15px; margin: 0 12px 10px; }
  .m-lr-card .r1 b { font-size: 15px; }
  /* 状态字：慕风=右侧纯彩色文字（替代胶囊 tag） */
  .m-lr-card .st { flex-shrink: 0; font-size: 13px; font-weight: 700; }
  .m-lr-card .st.done { color: #10b981; }
  .m-lr-card .st.todo { color: #ff7a45; }
  /* 信息行：图标+灰字，间距舒展 */
  .m-lr-card .r2.meta { margin-top: 7px; color: #9a917f; letter-spacing: .2px; }
  .m-lr-card .r2.nm2 { color: #6f6754; font-size: 13px; }
  /* 数据卡：左侧彩色渐变条点缀，hot 卡走红橙 */
  .m-stat { position: relative; overflow: hidden; padding: 12px 14px 12px 17px; }
  .m-stat::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, #ff9d42, #ff7a45); border-radius: 4px 0 0 4px;
  }
  .m-stat.hot::before { background: linear-gradient(180deg, #ef4444, #ff7a45); }
  .m-stat .v { font-size: 19px; }
  .m-stat .k { font-size: 10px; letter-spacing: .3px; }
  /* 字号整体再降一档（告别"老年机"） */
  .m-content { font-size: 12px; }
  .m-card-t { font-size: 12px; }
  .m-les .nm, .m-stu .nm { font-size: 15px; }
  .m-les .time, .m-les-info .time { font-size: 12px; }
  .m-les-row { font-size: 11.5px; }
  .m-stu-row .mi .nm { font-size: 14px; }
  .m-stu-row .mr b { font-size: 15px; }
  .m-lr-card .r1 { font-size: 13px; }
  .m-lr-card .r1 b { font-size: 15px; }
  .m-lr-card .r2 { font-size: 11px; }
  /* 日期分组：浅灰胶囊条（慕风） */
  .m-lr-day {
    margin: 14px 14px 9px; padding: 5px 13px; font-size: 12px;
    background: #f3ede2; border-radius: 999px; color: #8a8172;
    display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
    width: calc(100% - 28px); box-sizing: border-box;
  }
  .m-lr-day { font-size: 12px; }
  .m-day-h { font-size: 12px; }
  .m-cnt { font-size: 11px; }
  .m-cnt b { font-size: 12px; }
  /* 主按钮：珊瑚暖橙渐变 */
  .m-btn.primary {
    background: linear-gradient(135deg, #ff9d42, #ff7a45); border: none;
    box-shadow: 0 3px 10px rgba(255, 122, 69, .32);
  }
  .m-mini { background: linear-gradient(135deg, #ff9d42, #ff7a45); border: none; box-shadow: 0 2px 6px rgba(255,122,69,.26); }
  .m-foot .m-btn { height: 40px; font-size: 14px; }
  .m-fab {
    background: linear-gradient(135deg, #ff9d42, #ff7a45);
    height: 44px; font-size: 15px;
    box-shadow: 0 6px 18px rgba(255, 122, 69, .42);
  }
  /* 底部导航：毛玻璃质感 + 选中态微光 */
  .m-tabbar {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(240, 229, 216, .8);
  }
  .m-tab.on { color: #f2622f; }
  .m-tab.on svg { filter: drop-shadow(0 2px 5px rgba(255, 122, 69, .42)); }
  /* 首页宫格图标：加暖色柔光底座 */
  .m-grid-item svg { filter: drop-shadow(0 2px 4px rgba(255, 157, 66, .24)); }
  /* 功能卡（点名/课次等）左条保留课程色，只柔化投影 */
  .m-les { box-shadow: 0 1px 3px rgba(178,116,60,.04), 0 4px 14px rgba(178,116,60,.07); }
  /* 标签/角标微圆 */
  .m-lr-card .tag { border-radius: 999px; }
  /* 记录页筛选输入框：暖色芯片风（日期/月份/下拉），告别裸白框（2026-11-03 用户反馈） */
  .m-lr-bar .inp, .m-lr-panel .inp {
    background: #faf5ec;
    border: 1px solid #ece0cd;
    border-radius: 10px;
    height: 36px;
    line-height: 34px;
    padding: 0 12px;
    font-size: 12px;
    color: #6b5138;
    box-shadow: inset 0 1px 2px rgba(178,116,60,.04);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .15s, box-shadow .15s;
  }
  .m-lr-panel .inp { flex: 1 1 44%; min-width: 0; max-width: none !important; }
  .m-lr-bar .inp:focus, .m-lr-panel .inp:focus {
    border-color: #ff9d42;
    box-shadow: 0 0 0 3px rgba(255,157,66,.14);
    outline: none;
  }
  .m-lr-panel .small.muted { flex: 0 0 auto; font-size: 11px; color: #a08b6d; }
  .m-lr-panel .date-ph { flex: 1 1 44%; display: flex; }
  .m-lr-panel .date-ph .inp { width: 100%; }
}

/* ================= V2 视觉增强：阶段 2（数据态/顶栏）+ 阶段 3（层次/暗色/涨跌） ================= */
/* ⑦ 空态升级：纯 CSS 绘制「空文档卡」插画（无图片资源），UI.table 空态自动带标题+引导 */
.empty { padding: 32px 20px; text-align: center; color: var(--ink-3); font-size: 13px; line-height: 1.7; }
.empty::before {
  content: ''; display: block; width: 62px; height: 46px; margin: 0 auto 12px;
  border: 2px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-sm);
  background:
    linear-gradient(var(--line),var(--line)) 12px 12px/26px 2px no-repeat,
    linear-gradient(var(--line),var(--line)) 12px 21px/18px 2px no-repeat,
    linear-gradient(var(--line),var(--line)) 12px 30px/22px 2px no-repeat,
    var(--panel);
}
.empty-plain::before { display: none; }  /* 已自带 emoji/插画的空态，不再叠一层 */
.empty-t { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.empty-s { color: var(--ink-3); font-size: 12px; margin-top: 4px; }
/* ⑧ 空值轻量化 + 低优先列窄屏折叠（列设置仍可手动勾选，见「表格」按钮） */
.nil { color: var(--ink-3); opacity: .55; user-select: none; }
@media (max-width: 1100px) {
  th[data-priority="low"], td[data-priority="low"] { display: none; }
}
/* ⑨ 顶栏收纳：云同步状态 + 任务中心收进「更多」下拉，切换账号等高频入口保留 */
.top-more-wrap { position: relative; flex-shrink: 0; }
.top-more-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 168px; padding: 8px; border-radius: 10px;
  background: var(--surface,#fff); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 6px;
}
.top-more-pop[hidden] { display: none; }
.top-more-pop .btn { width: 100%; justify-content: flex-start; }
.top-more-pop #cloud-chip { align-self: flex-start; }

/* ⑩ elevation：弹层/浮层统一用 lg，卡片 hover 用 md（见 .card/.ai-card） */
.modal, .popmenu, .date-panel, #ai-float-panel { box-shadow: var(--shadow-lg); }

/* ⑪ 暗夜皮肤：全变量覆盖 + 白底经 --surface 统一转深，换肤即时生效 */
body[data-skin="dark"] {
  --brand: #f59e0b; --brand-dark: #fbbf24; --brand-soft: #3b2c15;
  --ink: #f5f0e8; --ink-1: #f5f0e8; --ink-2: #cbc2b5; --ink-3: #a89e90; --ink-4: #8f8577;
  --line: #403a33; --line-soft: #35302a; --bg: #191613; --side: #201c18; --card: #26221d; --panel: #2c2721;
  --neutral: #302b24; --zebra: #2a251f; --th-bg: #2c2721;
  --sb-bg: #151210; --sb-bd: #0f0d0b; --sb-t1: #f5f0e8; --sb-t2: #a89e90; --sb-t3: #8f8577; --sb-item: #d6cdc0;
  --ok: #4ade80; --ok-soft: #153524; --warn: #fb923c; --warn-soft: #3d2610;
  --danger: #f87171; --danger-soft: #3b1e1e; --purple: #c084fc; --purple-soft: #2c1f3f;
  --surface: #26221d;
  --focus-ring: 0 0 0 3px rgba(245,158,11,.24);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.30);
  --shadow-md: 0 6px 18px rgba(0,0,0,.42);
  --shadow-lg: 0 18px 44px rgba(0,0,0,.55);
  --gain: #f87171; --loss: #4ade80;
  color-scheme: dark;
}
body[data-skin="dark"] .sched-head.today,
body[data-skin="dark"] .sched-cell.today,
body[data-skin="dark"] .les.editing,
body[data-skin="dark"] .les.missroll,
body[data-skin="dark"] .stat-bar,
body[data-skin="dark"] .dpc-now:hover,
body[data-skin="dark"] .dpc-d.dpc-m:hover { background: var(--panel) !important; }
/* JS 内联浅色底：只收白/浅白系（不影响 #f59e0b 等品牌橙按钮） */
body[data-skin="dark"] [style*="background:#fff"],
body[data-skin="dark"] [style*="background: #fff"] { background-color: var(--surface) !important; }
body[data-skin="dark"] .tag.warn { color: #fdba74; }
body[data-skin="dark"] .ai-go { color: var(--brand); }

.skin-dot[data-skin="dark"] .sk { border: 1px solid var(--ink-3); }
/* 暗夜皮肤：AI 助理的半透明白底需单独覆盖，避免消息区被叠成亮灰、浅字看不清 */
body[data-skin="dark"] .ai-msgs {
  background:
    radial-gradient(circle at 14% 8%, rgba(245,158,11,.10), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
}
body[data-skin="dark"] .ai-head { background: linear-gradient(90deg, var(--brand-soft), rgba(255,255,255,.02)); }
body[data-skin="dark"] .ai-head .btn.sm { background: var(--card); color: var(--ink-2); }
body[data-skin="dark"] .ai-inputrow { background: rgba(255,255,255,.045); }
body[data-skin="dark"] .ai-empty-chip { background: rgba(255,255,255,.08); color: var(--ink-2); }
body[data-skin="dark"] .ai-empty-chip:hover { background: rgba(245,158,11,.16); color: var(--brand); }
body[data-skin="dark"] .ai-foot { background: rgba(255,255,255,.045); }
body[data-skin="dark"] .top-more-pop { background: var(--card); }

/* 方案C 暗夜皮肤：柔和彩底再压深一档，白字依旧清晰；角标/圆勾保持亮底 */
body[data-skin="dark"] .les.tl-ev:not(.cancel) {
  background: color-mix(in srgb, var(--ev-soft, var(--brand)) 76%, #000) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 1px 2px rgba(0,0,0,.30);
}
body[data-skin="dark"] .tl-col.today { background-color: var(--card) !important; }
body[data-skin="dark"] .tl-ev.cancel {
  background: color-mix(in srgb, var(--ev-soft, #9ca3af) 60%, #000) !important;
}
/* ================= 手机端课次卡片：与桌面周历同款「柔和彩底 + 纯白字」（方案 C） =================
   views.js 的 scheduleM/teacherM 注入 --ev-c（原课程/状态色）与 --ev-soft（softCardColor 归一化底色）；
   左条保留亮课程色做识别，卡片主体为低饱和柔彩，文字全白。此块置于文件末尾以覆盖既有浅底深字规则。 */
.m-les {
  background: var(--ev-soft, var(--ev-c, var(--brand))) !important;
  border-left-color: var(--ev-c, var(--brand));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 3px 10px rgba(15,23,42,.10);
  color: #fff;
}
.m-les .row1 { color: #fff; }
.m-les .time, .m-les .nm, .m-les .sub { color: #fff; }
.m-les .nm { font-weight: 600; }
.m-les .sub { opacity: .88; }
/* 卡片内状态标签改浅底深字（沿用各自语义色），在柔彩底上清楚又不突兀 */
.m-les .tag { background: rgba(255,255,255,.94); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
/* 卡片内按钮反色：主按钮白底品牌深字，次按钮半透明白底白字 */
.m-les .m-btn.primary { background: #fff; color: var(--brand-dark); }
.m-les .m-btn.ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.55); }
.m-les.today { border-left-color: var(--ev-c, var(--warn)); }
.m-les.trial { border-left-style: dashed; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55), 0 3px 10px rgba(15,23,42,.10); }
/* 已取消：柔和灰底 + 白字删除线（覆盖旧 .m-les.canceled 的浅灰底深字） */
.m-les.canceled {
  background: var(--ev-soft, #9ca3af) !important;
  border-left-color: var(--ink-3);
}
.m-les.canceled .nm { color: #fff; opacity: .82; text-decoration: line-through; }
.m-les.canceled .sub, .m-les.canceled .time, .m-les.canceled .row1 { color: #fff; opacity: .78; }
/* 暗夜：柔彩底再压深一档，白字依旧清晰 */
body[data-skin="dark"] .m-les:not(.canceled) {
  background: color-mix(in srgb, var(--ev-soft, var(--brand)) 76%, #000) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 3px 10px rgba(0,0,0,.30);
}
body[data-skin="dark"] .m-les .m-btn.primary { color: var(--brand-dark); }
/* 暗夜皮肤：手机端两处硬编码浅底（页面奶油渐变 + 毛玻璃底栏）需单独覆盖，
   否则暗夜下页面仍是米白，日期等浅色文字几乎看不见 */
@media (max-width: 760px) {
  body[data-skin="dark"] { background: var(--bg); }
  body[data-skin="dark"] .m-tabbar {
    background: rgba(32,28,24,.94);
    border-top-color: var(--line);
    box-shadow: 0 -1px 6px rgba(0,0,0,.35);
  }
}

/* ================= 数据座舱 · 整屏沉浸式深色大屏（2026-11-06） =================
   桌面 .content padding 20px / 手机 10px 均由 .ck-screen 负 margin 抵消，去掉外层浅色留白；
   手机端 .ck-* 与 .m-* 视图隔离，@media 760px 单独降档适配。
   ⚠️ 深色大屏白字遵守课表方案 C 字体平滑铁律：保持全局 antialiased、字重 ≤600，
      绝不覆盖 -webkit-font-smoothing:auto（真机会出现红/青彩边「发晕」）。 */
.ck-screen {
  margin: -20px;
  padding: 22px 26px 26px;
  min-height: calc(100vh - 56px);
  box-sizing: border-box;
  color: #f5ead9;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; gap: 16px;
}
.ck-screen:fullscreen, .ck-screen:-webkit-full-screen {
  margin: 0; padding: 26px 30px; width: 100%; height: 100%; overflow: auto; border-radius: 0;
}
/* 顶部工具条：标题与辅助信息同行不折行，控件 flex-shrink:0 + 垂直居中 */
.ck-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ck-brand { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; min-width: 0; }
.ck-logo { flex-shrink: 0; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: #241426;
  background: linear-gradient(90deg, #f3b54a, #e8833a); border-radius: 6px; padding: 3px 8px; }
.ck-title { font-size: 26px; font-weight: 600; letter-spacing: 3px; color: #f5ead9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-sub { flex-shrink: 0; font-size: 12px; color: #b8a585; white-space: nowrap; }
.ck-gear { flex-shrink: 0; cursor: pointer; opacity: .75; font-size: 17px; line-height: 1; }
.ck-gear:hover { opacity: 1; }
.ck-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ck-btn { flex-shrink: 0; cursor: pointer; font-size: 13px; padding: 6px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.05); color: #f5ead9; white-space: nowrap; }
.ck-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }
.ck-seg { display: inline-flex; align-items: stretch; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.22); border-radius: 8px; overflow: hidden; }
.ck-seg-i { cursor: pointer; font-size: 13px; padding: 6px 14px; color: #d8c5a5; white-space: nowrap; }
.ck-seg-i.on { background: #e8833a; color: #fff; font-weight: 600; }
.ck-seg.sm .ck-seg-i { font-size: 12px; padding: 4px 10px; }
/* 筛选行 */
.ck-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ck-gran { flex-shrink: 0; cursor: pointer; font-size: 13px; padding: 6px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.22); color: #f5ead9; white-space: nowrap; }
.ck-gran:hover { background: rgba(255,255,255,.08); }
.ck-date { width: auto; flex-shrink: 0; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.22); border-radius: 8px; color: #f5ead9;
  padding: 5px 8px; font-size: 13px; color-scheme: dark; }
.ck-arrow { flex-shrink: 0; opacity: .6; }
.ck-quick { flex-shrink: 0; cursor: pointer; font-size: 13px; padding: 5px 11px; border-radius: 14px;
  color: #d8c5a5; border: 1px solid rgba(255,255,255,.18); white-space: nowrap; }
.ck-quick.on { background: #e8833a; color: #fff; border-color: #e8833a; font-weight: 600; }
/* 数据状态条 */
.ck-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: #d8c5a5; background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 8px 14px; }
.ck-status-empty { color: #f3b54a; background: rgba(243,181,74,.08); border-color: rgba(243,181,74,.25); }
.ck-dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #5ecb8f; }
.ck-status-empty .ck-dot { background: #f3b54a; }
/* 三列：等高对称 align-items:stretch */
.ck-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: stretch; flex: 1 1 auto; }
.ck-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ck-card { min-width: 0; background: rgba(20,16,24,.55); border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 16px 18px; color: #f5ead9; }
.ck-card-t { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; margin-bottom: 14px; }
.ck-ttl { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-k { font-size: 13px; color: #d8c5a5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-num { font-size: 30px; font-weight: 600; line-height: 1.25; margin-top: 2px;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-unit { font-size: 12px; font-weight: 400; margin-left: 3px; color: #d8c5a5; }
.ck-nil { color: #b8a585; opacity: .62; font-weight: 400; }
.ck-metrics { display: flex; gap: 16px 22px; flex-wrap: wrap; align-items: stretch; }
.ck-metric { flex: 1 1 96px; min-width: 96px; }
/* 梯形收窄漏斗：clip-path 上宽下窄，三层逐级收窄；层间转化率独立成行避免被裁切 */
.ck-funnel-wrap { display: flex; gap: 18px; align-items: stretch; flex-wrap: wrap; }
.ck-funnel { flex: 1 1 220px; min-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ck-trap { height: 54px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 12px; box-sizing: border-box; color: #fff; font-size: 12px; font-weight: 600;
  white-space: nowrap; clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%); }
.ck-trap-l { font-weight: 500; opacity: .95; }
.ck-trap-v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ck-trap-step { font-size: 11px; font-weight: 500; color: #b8a585; opacity: .85; }
.ck-funnel-side { flex: 1 1 130px; min-width: 120px; display: flex; flex-direction: column;
  justify-content: center; gap: 10px; }
.ck-rate { display: flex; align-items: baseline; gap: 8px; flex-wrap: nowrap; }
.ck-rate span { font-size: 12px; color: #d8c5a5; white-space: nowrap; }
.ck-rate b { font-size: 22px; font-weight: 600; color: #f3b54a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-funnel-note { font-size: 11px; color: #b8a585; opacity: .8; }
/* 排行榜：名次徽章 + 占比条，列宽固定保证对齐 */
.ck-rank-head, .ck-rank-row { display: flex; align-items: center; gap: 10px; }
.ck-rank-head { font-size: 12px; color: #d8c5a5; border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 8px; margin-bottom: 4px; }
.ck-rh-badge { flex: 0 0 22px; }
.ck-rh-name, .ck-rk-name { flex: 1; min-width: 0; }
.ck-rh-v, .ck-rk-v { flex: 0 0 62px; text-align: right; white-space: nowrap; }
.ck-rh-pct, .ck-rk-pct { flex: 0 0 96px; display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.ck-rank-row { font-size: 14px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.ck-rank-row:last-child { border-bottom: none; }
.ck-badge { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.15); display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: #fff; }
.ck-badge.top1 { background: #f3b54a; color: #241426; }
.ck-badge.top2 { background: #e8833a; }
.ck-badge.top3 { background: #d95f2b; }
.ck-rk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-bar-mini { display: inline-block; width: 44px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.12); overflow: hidden; }
.ck-bar-mini i { display: block; height: 100%; background: linear-gradient(90deg, #f3b54a, #e8833a); }
.ck-rk-pct em { font-style: normal; font-size: 12px; color: #d8c5a5; width: 32px;
  text-align: right; font-variant-numeric: tabular-nums; }
/* 空态：不铺 0.00 / 「-」，统一说明数据口径 */
.ck-empty { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 26px 12px; text-align: center; color: #b8a585; }
.ck-empty-ico { font-size: 26px; opacity: .55; line-height: 1; }
.ck-empty-t { font-size: 14px; font-weight: 600; color: #d8c5a5; }
.ck-empty-s { font-size: 11px; opacity: .8; line-height: 1.6; }
/* 收支大卡（白字字重 600，遵守方案 C） */
.ck-hero { background: linear-gradient(120deg, #f0703c, #e8833a 60%, #f3a04a);
  border-radius: 12px; padding: 16px 18px 20px; color: #fff; }
.ck-hero-top { display: flex; justify-content: flex-end; }
.ck-hero-vals { display: flex; gap: 18px 28px; flex-wrap: wrap; align-items: stretch; margin-top: 6px; }
.ck-hero-cell { flex: 1 1 110px; min-width: 110px; text-align: center; }
.ck-hero-num { font-size: 34px; font-weight: 600; line-height: 1.2;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-hero-k { font-size: 13px; font-weight: 500; color: #fff2e2; margin-top: 4px; white-space: nowrap; }
/* 收支趋势图：高度放大、图表撑满列宽 */
.ck-chart-card { display: flex; flex-direction: column; }
.ck-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #d8c5a5; margin-bottom: 6px; }
.ck-chart { width: 100%; min-height: 220px; flex: 1 1 auto; }
.ck-chart svg { width: 100%; height: auto; display: block; }
.ck-foot { font-size: 11px; color: #b8a585; opacity: .72; line-height: 1.7;
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
/* 手机端（@media 760px）：隔离于 .m-* 视图，单独降档适配 */
@media (max-width: 760px) {
  .ck-screen { margin: -10px; padding: 14px 12px 100px; min-height: 100vh; gap: 12px; }
  .ck-screen:fullscreen, .ck-screen:-webkit-full-screen { margin: 0; padding: 16px 12px 40px; }
  .ck-brand { flex-wrap: wrap; }
  .ck-title { font-size: 19px; letter-spacing: 1.5px; }
  .ck-sub { font-size: 11px; }
  .ck-bar { gap: 8px; }
  .ck-tools { gap: 6px; }
  .ck-btn, .ck-quick, .ck-gran, .ck-seg-i, .ck-date { font-size: 12px; }
  .ck-grid { grid-template-columns: 1fr; gap: 12px; }
  .ck-col { gap: 12px; }
  .ck-card { padding: 14px; }
  .ck-ttl { font-size: 15px; }
  .ck-num { font-size: 26px; }
  .ck-metrics { gap: 12px 16px; }
  .ck-metric { min-width: 88px; }
  .ck-hero-num { font-size: 28px; }
  .ck-hero-cell { min-width: 96px; }
  .ck-funnel-wrap { gap: 12px; }
  .ck-funnel-side { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 14px; }
  .ck-rate b { font-size: 19px; }
  .ck-rh-v, .ck-rk-v { flex-basis: 52px; }
  .ck-rh-pct, .ck-rk-pct { flex-basis: 78px; }
  .ck-bar-mini { width: 30px; }
  .ck-chart { min-height: 200px; }
}
