/* 教师工作台（2026-11 改版）
   方向：深蓝主视觉 + 浅灰蓝工作区；数据优先、层级清晰、卡片克制。 */
:root {
  --td-ink: #0e1b33;
  --td-ink-2: #34425e;
  --td-muted: #6b7895;
  --td-faint: #98a3ba;
  --td-line: #e3e9f3;
  --td-bg: #f2f5fa;
  --td-card: #ffffff;
  --td-blue: #1f63e8;
  --td-blue-d: #0f3fa8;
  --td-blue-l: #eaf1ff;
  --td-teal: #0e9c8c;
  --td-teal-l: #e4f7f4;
  --td-violet: #6a4fe0;
  --td-violet-l: #efebff;
  --td-amber: #d97a06;
  --td-amber-l: #fff3df;
  --td-red: #d6455d;
  --td-red-l: #fdecef;
  --td-radius: 16px;
  --td-shadow: 0 1px 2px rgba(16, 35, 72, .04), 0 8px 24px rgba(16, 35, 72, .06);
  --td-font: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --td-num: "DIN Alternate", "Inter", "HarmonyOS Sans SC", sans-serif;
}

body.teacher-mode { background: var(--td-bg); }
.td-shell { min-height: 100vh; color: var(--td-ink); font-family: var(--td-font); }
.td-shell a { color: inherit; text-decoration: none; }
.td-shell svg { display: block; }

/* ---------- 主视觉 ---------- */
.td-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 340px at 88% -10%, rgba(96, 165, 255, .45), transparent 60%),
    radial-gradient(700px 300px at 8% 120%, rgba(56, 214, 196, .22), transparent 60%),
    linear-gradient(120deg, #0a2a6b 0%, #0f3fa8 46%, #1f63e8 100%);
}
.td-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(100deg, transparent 30%, #000 75%);
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 75%);
}
.td-hero::after {
  content: ""; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .03), 0 0 0 140px rgba(255, 255, 255, .025);
}
.td-hero-inner {
  position: relative; z-index: 1; width: min(1380px, calc(100% - 48px)); margin: 0 auto;
  padding: 40px 0 92px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.td-hero-date { display: inline-block; font-size: 13px; color: rgba(255, 255, 255, .72); letter-spacing: .02em; }
.td-hero h1 { margin: 10px 0 0; font-size: clamp(28px, 2.6vw, 38px); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.td-hero-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.td-hero-meta span { padding: 4px 11px; border-radius: 999px; font-size: 12.5px; color: rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16); }
.td-hero-insight { margin-top: 18px; max-width: 640px; display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, .88); }
.td-pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 4px rgba(94, 234, 212, .2); }
.td-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.td-hero-btn {
  min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 9px; border-radius: 12px;
  font-size: 14px; font-weight: 650; color: #fff !important; white-space: nowrap;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .26);
  transition: background .18s, transform .18s, box-shadow .18s;
}
.td-hero-btn span { width: 18px; height: 18px; display: inline-flex; }
.td-hero-btn span svg { width: 100%; height: 100%; }
.td-hero-btn:hover { background: rgba(255, 255, 255, .18); transform: translateY(-1px); }
.td-hero-btn.primary { color: var(--td-blue-d) !important; background: #fff; border-color: #fff; box-shadow: 0 10px 26px rgba(4, 22, 70, .28); }
.td-hero-btn.primary:hover { background: #f3f7ff; }

/* ---------- 主区 ---------- */
.td-main { position: relative; z-index: 2; width: min(1380px, calc(100% - 48px)); margin: -60px auto 0; padding-bottom: 56px; }

.td-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.td-kpi {
  min-height: 118px; padding: 20px; display: flex; align-items: flex-start; gap: 14px;
  background: var(--td-card); border: 1px solid var(--td-line); border-radius: var(--td-radius); box-shadow: var(--td-shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
a.td-kpi:hover { transform: translateY(-2px); border-color: #cddaf4; box-shadow: 0 14px 30px rgba(16, 35, 72, .1); }
.td-kpi > div { min-width: 0; flex: 1; }
.td-kpi-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.td-kpi-ico svg { width: 21px; height: 21px; }
.td-kpi.blue .td-kpi-ico { color: var(--td-blue); background: var(--td-blue-l); }
.td-kpi.teal .td-kpi-ico { color: var(--td-teal); background: var(--td-teal-l); }
.td-kpi.amber .td-kpi-ico { color: var(--td-amber); background: var(--td-amber-l); }
.td-kpi.slate .td-kpi-ico { color: #42577f; background: #edf1f8; }
.td-kpi-label { display: block; font-size: 13px; color: var(--td-muted); }
.td-kpi-value { margin-top: 6px; display: flex; align-items: baseline; gap: 4px; }
.td-kpi-value b { font: 700 30px/1 var(--td-num); color: var(--td-ink); letter-spacing: -.01em; }
.td-kpi-value em { font-style: normal; font-size: 13px; color: var(--td-muted); }
.td-kpi small { display: block; margin-top: 8px; font-size: 12px; color: var(--td-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-ring { flex: none; width: 56px; height: 56px; transform: rotate(-90deg); }
.td-ring circle { fill: none; stroke-width: 8; }
.td-ring-bg { stroke: var(--td-violet-l); }
.td-ring-fg { stroke: var(--td-violet); stroke-linecap: round; }
.td-meter { display: block; height: 6px; margin-top: 10px; border-radius: 6px; background: #edf1f8; overflow: hidden; }
.td-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3f86ff, var(--td-blue)); }

.td-grid { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 20px; align-items: start; }
.td-col { display: grid; gap: 20px; min-width: 0; }
.td-card { background: var(--td-card); border: 1px solid var(--td-line); border-radius: var(--td-radius); box-shadow: var(--td-shadow); overflow: hidden; }
.td-card-head { min-height: 60px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--td-line); }
.td-card-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 750; }
.td-card-head h2::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--td-blue); }
.td-card-head h2 small { padding: 1px 8px; border-radius: 999px; font: 650 12px/18px var(--td-num); color: var(--td-blue); background: var(--td-blue-l); }
.td-card-head a { font-size: 13px; color: var(--td-muted); white-space: nowrap; }
.td-card-head a:hover { color: var(--td-blue); }
.td-head-tools { display: flex; align-items: center; gap: 14px; }
.td-ghost { height: 32px; padding: 0 12px; border: 1px solid var(--td-line); border-radius: 9px; background: #fff; color: var(--td-ink-2); font: 600 12.5px var(--td-font); cursor: pointer; }
.td-ghost:hover { border-color: #c6d4ef; color: var(--td-blue); }
.td-empty { padding: 28px 22px; text-align: center; color: var(--td-faint); font-size: 13px; }

/* 课程卡片 */
.td-courses { padding: 20px 22px 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.td-course { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--td-line); border-radius: 14px; overflow: hidden; background: #fff; transition: transform .18s, box-shadow .18s, border-color .18s; }
.td-course:hover { transform: translateY(-3px); border-color: #cddaf4; box-shadow: 0 16px 32px rgba(16, 35, 72, .1); }
.td-course-media { position: relative; display: block; aspect-ratio: 16 / 9; }
.td-cover { position: absolute; inset: 0; background: #dfe7f5 center / cover no-repeat; }
.td-cover-gen { display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 16px; color: #fff; overflow: hidden;
  background: radial-gradient(160px 120px at 92% 8%, rgba(255, 255, 255, .28), transparent 70%), linear-gradient(135deg, var(--c1), var(--c2)); }
.td-cover-gen::before { content: ""; position: absolute; right: -30px; bottom: -40px; width: 150px; height: 150px; border-radius: 34px; transform: rotate(24deg); border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); }
.td-cover-ico { position: absolute; right: 16px; bottom: 16px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28); }
.td-cover-ico svg { width: 20px; height: 20px; }
.td-cover-cat { position: relative; padding-right: 48px; font-size: 17px; font-weight: 750; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-cover-major { position: relative; margin-top: 4px; font-size: 12px; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-badge, .td-scope { position: absolute; top: 10px; padding: 3px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 650; line-height: 18px; }
.td-badge { left: 10px; color: #fff; background: rgba(14, 27, 51, .55); backdrop-filter: blur(6px); }
.td-badge.live { background: rgba(14, 156, 140, .92); }
.td-badge.review { background: rgba(217, 122, 6, .92); }
.td-badge.reject { background: rgba(214, 69, 93, .92); }
.td-scope { right: 10px; color: var(--td-ink-2); background: rgba(255, 255, 255, .92); }
.td-course-body { flex: 1; display: flex; flex-direction: column; padding: 14px 16px 16px; }
.td-course-body h3 { font-size: 15px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 43px; }
.td-course-body h3 a:hover { color: var(--td-blue); }
.td-course-body p { margin-top: 6px; font-size: 12px; color: var(--td-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-course-stats { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--td-line); display: grid; grid-template-columns: repeat(3, 1fr); }
.td-course-stats span { font-size: 11.5px; color: var(--td-faint); text-align: center; }
.td-course-stats span + span { border-left: 1px solid var(--td-line); }
.td-course-stats b { display: block; font: 700 17px/1.3 var(--td-num); color: var(--td-ink); }
.td-course-actions { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.td-btn { height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; font-size: 13px; font-weight: 650; color: var(--td-ink-2) !important; border: 1px solid var(--td-line); background: #fff; transition: all .15s; }
.td-btn:hover { border-color: #c6d4ef; color: var(--td-blue) !important; }
.td-btn.primary { color: #fff !important; border-color: var(--td-blue); background: var(--td-blue); }
.td-btn.primary:hover { background: var(--td-blue-d); border-color: var(--td-blue-d); }
.td-course-new { align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 260px; padding: 24px; border: 1.5px dashed #c5d3ee; background: linear-gradient(180deg, #f8faff, #f2f6ff); color: var(--td-blue); }
.td-course-new:hover { border-color: var(--td-blue); background: #eef4ff; }
.td-plus { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; font-weight: 300; color: #fff; background: var(--td-blue); box-shadow: 0 10px 22px rgba(31, 99, 232, .28); }
.td-course-new b { margin-top: 6px; font-size: 15px; }
.td-course-new small { max-width: 190px; font-size: 12px; line-height: 1.6; color: var(--td-muted); }

/* 趋势图 */
.td-trend-wrap { padding: 18px 22px 16px; }
.td-trend-head { display: flex; align-items: flex-end; justify-content: space-between; }
.td-trend-head b { font: 700 28px/1 var(--td-num); }
.td-trend-head span { margin-left: 8px; font-size: 13px; color: var(--td-muted); }
.td-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px !important; }
.td-legend i { width: 14px; height: 3px; border-radius: 3px; background: var(--td-blue); }
.td-trend { width: 100%; height: auto; margin-top: 8px; }
.td-grid-line { stroke: #eef2f8; stroke-width: 1; }
.td-line { fill: none; stroke: var(--td-blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.td-dot { fill: #fff; stroke: var(--td-blue); stroke-width: 2; }
.td-dot.last { fill: var(--td-blue); }
.td-axis { font-size: 11px; fill: var(--td-faint); font-family: var(--td-num); }
.td-trend-empty { margin-top: -4px; text-align: center; font-size: 12.5px; color: var(--td-faint); }

/* 今日安排 */
.td-schedule { padding: 6px 22px; }
.td-lesson { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: 72px; border-bottom: 1px solid var(--td-line); }
.td-lesson:last-child { border-bottom: 0; }
.td-lesson-time b { display: block; font: 700 16px/1.2 var(--td-num); }
.td-lesson-time small, .td-lesson-main small { font-size: 12px; color: var(--td-faint); }
.td-lesson-main { padding-left: 16px; border-left: 3px solid #c9d7f6; }
.td-lesson-main b { display: block; font-size: 14.5px; }
.td-lesson.live .td-lesson-main { border-color: var(--td-teal); }
.td-lesson-state { font-size: 12.5px; color: var(--td-muted); }
.td-lesson.live .td-lesson-state { color: var(--td-teal); font-weight: 700; }

/* 右栏 */
.td-todos { padding: 6px 12px; }
.td-todo { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 10px; border-radius: 12px; }
.td-todo:hover { background: #f6f8fc; }
.td-todo-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.td-todo-ico svg { width: 19px; height: 19px; }
.td-todo-ico.blue { color: var(--td-blue); background: var(--td-blue-l); }
.td-todo-ico.violet { color: var(--td-violet); background: var(--td-violet-l); }
.td-todo-ico.teal { color: var(--td-teal); background: var(--td-teal-l); }
.td-todo-text b { display: block; font-size: 14px; }
.td-todo-text small { font-size: 12px; color: var(--td-faint); }
.td-todo-count { min-width: 34px; height: 26px; padding: 0 9px; border-radius: 999px; display: grid; place-items: center; font: 700 14px var(--td-num); color: #fff; background: var(--td-red); }
.td-todo.is-clear .td-todo-count { color: var(--td-faint); background: #eef1f6; }

.td-priority { list-style: none; margin: 0; padding: 14px 16px 16px; display: grid; gap: 10px; }
.td-priority a { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--td-line); background: #fbfcfe; transition: all .15s; }
.td-priority a:hover { border-color: #c6d4ef; background: #f5f8ff; }
.td-priority i { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font: 700 13px var(--td-num); font-style: normal; color: #fff; background: var(--td-blue); }
.td-priority li:nth-child(2) i { background: var(--td-violet); }
.td-priority li:nth-child(3) i { background: var(--td-teal); }
.td-priority b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-priority small { display: block; margin-top: 2px; font-size: 12px; color: var(--td-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-priority em { font-style: normal; font-size: 12.5px; font-weight: 650; color: var(--td-blue); white-space: nowrap; }

.td-students { padding: 6px 12px 10px; }
.td-student { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; }
.td-student:hover { background: #f6f8fc; }
.td-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--td-blue); background: var(--td-blue-l); }
.td-student-text b { display: block; font-size: 13.5px; }
.td-student-text small { display: block; font-size: 12px; color: var(--td-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-mini-bar { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: #eef1f6; overflow: hidden; }
.td-mini-bar i { display: block; height: 100%; background: var(--td-amber); }
.td-risk { font: 700 14px var(--td-num); color: var(--td-amber); }
.td-risk.high { color: var(--td-red); }

/* 教学工具 */
.td-tools-wrap { margin-top: 28px; }
.td-section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.td-section-head h2 { font-size: 18px; font-weight: 750; }
.td-section-head span { font-size: 13px; color: var(--td-faint); }
.td-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.td-tool { display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 18px; border-radius: var(--td-radius); background: var(--td-card); border: 1px solid var(--td-line); box-shadow: var(--td-shadow); transition: transform .18s, box-shadow .18s, border-color .18s; }
.td-tool:hover { transform: translateY(-2px); border-color: #cddaf4; box-shadow: 0 14px 30px rgba(16, 35, 72, .1); }
.td-tool-ico { grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.td-tool-ico svg { width: 22px; height: 22px; }
.td-tool-ico.blue { background: linear-gradient(135deg, #3f86ff, #1f63e8); }
.td-tool-ico.teal { background: linear-gradient(135deg, #2cc5b2, #0e9c8c); }
.td-tool-ico.violet { background: linear-gradient(135deg, #8b74ff, #6a4fe0); }
.td-tool-ico.amber { background: linear-gradient(135deg, #f8b13c, #d97a06); }
.td-tool b { font-size: 14.5px; }
.td-tool small { font-size: 12px; color: var(--td-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .td-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .td-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1180px) {
  .td-courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .td-grid { grid-template-columns: 1fr; }
  .td-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-hero-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 680px) {
  .td-hero-inner, .td-main { width: calc(100% - 32px); }
  .td-hero-inner { padding: 28px 0 84px; }
  .td-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .td-kpi { min-height: 0; padding: 14px; flex-direction: column; gap: 10px; }
  .td-kpi-value b { font-size: 24px; }
  .td-kpi-storage { grid-column: 1 / -1; }
  .td-hero-btn { flex: 1 1 auto; justify-content: center; }
  .td-card-head { padding: 0 16px; }
  .td-courses { padding: 16px; grid-template-columns: 1fr; }
  .td-course-new { min-height: 160px; }
  .td-tools { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .td-shell * { transition: none !important; }
}
