:root {
  --primary: #1A5F4F;          /* 品牌深绿 · 大学生学习与发展中心子品牌色 */
  --primary-dark: #134539;
  --primary-50: #E0F2EC;       /* 极浅绿，hover/active 背景 */
  --primary-100: #B5DDC8;
  --gold: #FFB81C;             /* 辅强调色，呼应 Logo 弧形 */
  --bg: #f5f6f8;
  --sidebar: #1f2330;
  --sidebar-hover: #2b3040;
  --ok: #1aa260;
  --fail: #e8453c;
  --text: #222;
  --muted: #888;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===== 全站水印「天津新东方专升本」 ===== */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzNDAiIGhlaWdodD0iMjAwIiB2aWV3Qm94PSIwIDAgMzQwIDIwMCI+PHRleHQgeD0iMTcwIiB5PSIxMDUiIHRleHQtYW5jaG9yPSJtaWRkbGUiIHRyYW5zZm9ybT0icm90YXRlKC0yMiAxNzAgMTA1KSIgZm9udC1mYW1pbHk9IlBpbmdGYW5nIFNDLCBNaWNyb3NvZnQgWWFIZWksIHNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMjIiIGZvbnQtd2VpZ2h0PSI2MDAiIGZpbGw9IiMxQTVGNEYiIGZpbGwtb3BhY2l0eT0iMC4wNiI+5aSp5rSl5paw5Lic5pa55LiT5Y2H5pysPC90ZXh0Pjwvc3ZnPg==");
  background-repeat: repeat;
  background-size: 340px 200px;
}

/* ===== 登录页 ===== */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1A5F4F 0%, #0d3528 100%);
}
.login-card { background: #fff; border-radius: 16px; padding: 36px 32px; width: 360px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.login-card .lc-brand { text-align: center; margin-bottom: 24px; }
.login-card .lc-mark { width: 52px; height: 52px; background: var(--primary); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 26px; }
.login-card .lc-title { font-size: 18px; font-weight: 700; margin-top: 12px; }
.login-card .lc-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.login-card .lc-field { margin-bottom: 14px; }
.login-card label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.login-card input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
.login-card input:focus { outline: none; border-color: var(--primary); }
.login-card .lc-btn { width: 100%; padding: 13px; background: var(--primary); color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 6px; }
.login-card .lc-btn:disabled { background: #ccc; }
.login-card .lc-err { color: var(--fail); font-size: 13px; min-height: 18px; margin-bottom: 6px; text-align: center; }
.login-card .lc-tip { font-size: 12px; color: #aaa; text-align: center; margin-top: 14px; line-height: 1.6; }

/* ===== 系统布局：侧边导航 + 主区 ===== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  flex: 0 0 230px;
  background: var(--sidebar);
  color: #cfd3dc;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand .logo { display: flex; align-items: center; gap: 8px; }
.brand .logo .mark { width: 30px; height: 30px; background: var(--primary); border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 16px; }
.brand .name { font-size: 14px; font-weight: 700; color: #fff; letter-spacing: .5px; white-space: nowrap; }
.brand .sub { font-size: 11px; color: #8b92a3; margin-top: 6px; letter-spacing: .5px; }

.nav { flex: 1; overflow-y: auto; padding: 14px 0; }
.nav-group {
  padding: 16px 18px 8px;
  font-size: 11px;
  color: #8b92a3;
  letter-spacing: 1.4px;
  font-weight: 700;
  text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  margin: 0 10px 2px;
  padding: 12px 14px;
  cursor: pointer; font-size: 14px;
  border-left: 3px solid transparent;
  border-radius: 12px;
  transition: .12s;
  font-weight: 500; letter-spacing: .3px;
}
.nav-item:hover { background: var(--sidebar-hover); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(26,95,79,.24), rgba(26,95,79,.12));
  border-left-color: var(--gold);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.nav-item .ico { width: 20px; text-align: center; opacity: .95; font-size: 16px; }
.nav-item .label { flex: 1; }
.nav-item .badge-nav { font-size: 10px; padding: 2px 8px; border-radius: 8px; font-weight: 600; }
.badge-nav.live { background: var(--ok); color: #fff; }
.badge-nav.soon { background: rgba(255,255,255,.12); color: #9aa1b1; }

.sidebar .foot {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.04));
}
.sidebar .foot .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; flex: 0 0 30px; }
.sidebar .foot .who { flex: 1; min-width: 0; }
.sidebar .foot .who .role { font-size: 11px; color: #8b92a3; }
.sidebar .foot .logout { background: transparent; border: 1px solid rgba(255,255,255,.18); color: #cfd3dc; font-size: 12px; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.sidebar .foot .logout:hover { background: rgba(255,255,255,.1); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: #fff;
  border-bottom: 1px solid #eceef1;
  padding: 14px 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.topbar-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar h1 { font-size: 18px; font-weight: 700; }
.topbar .crumb { font-size: 13px; color: var(--muted); }
.main-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.main-tabs::-webkit-scrollbar { display: none; }
.main-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #dde4e1;
  border-radius: 999px;
  background: #f7f9f8;
  color: #44504c;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.main-tab .ico { font-size: 15px; }
.main-tab.active {
  background: linear-gradient(135deg, var(--primary), #2e7d6c);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(26,95,79,.18);
}
.content { padding: 24px 28px; flex: 1; }

.content:has(.dash-shell) { background: linear-gradient(180deg, #f7f9f8 0%, #f5f6f8 100%); }

/* ===== 通用卡片 ===== */
.panel { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 18px; }

/* ===== 工作台 ===== */
.welcome { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.welcome-sub { color: var(--muted); margin-bottom: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.feature-card {
  background: #fff; border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(15,42,34,.06); cursor: pointer; transition: .18s;
  border: 1px solid rgba(26,95,79,.06);
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--primary), #4ECDC4);
  opacity: .85;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,42,34,.12); border-color: var(--primary-100); }
.feature-card.disabled { cursor: not-allowed; opacity: .6; }
.feature-card.disabled:hover { transform: none; box-shadow: 0 2px 8px rgba(15,42,34,.06); border-color: rgba(26,95,79,.06); }
.feature-card.disabled::before { opacity: .3; filter: grayscale(1); }
.fc-head { display: flex; align-items: flex-start; gap: 12px; }
.fc-head .fc-ico { font-size: 34px; line-height: 1; flex-shrink: 0; }
.fc-head .fc-head-text { flex: 1; min-width: 0; }
.feature-card .fc-tagline {
  display: inline-block; margin-bottom: 4px;
  padding: 2px 10px; font-size: 11px; font-weight: 700;
  color: var(--primary); background: var(--primary-50);
  border-radius: 10px; letter-spacing: .3px;
}
.feature-card .fc-title { font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: .3px; }
.feature-card .fc-tag {
  align-self: flex-start; flex-shrink: 0;
  font-size: 10px; padding: 3px 8px; border-radius: 8px; font-weight: 700;
}
.fc-tag.live { background: #e6f7ee; color: var(--ok); }
.fc-tag.soon { background: #f0f1f3; color: var(--muted); }
.fc-bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.fc-bullets li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #555; line-height: 1.5;
  padding: 5px 10px; background: #fafbfc; border-radius: 6px;
  transition: all .12s;
}
.feature-card:hover .fc-bullets li { background: var(--primary-50); }
.fc-bullets .b-ico { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.fc-bullets .b-text { flex: 1; font-weight: 500; }

/* 欢迎栏角色徽章 */
.welcome-role {
  display: inline-block; margin: 0 6px;
  padding: 2px 10px; font-size: 12px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, var(--primary), #4ECDC4);
  border-radius: 12px; letter-spacing: .5px; vertical-align: middle;
}

/* 超级管理员标识 */
.avatar-super {
  background: linear-gradient(135deg, #FFB81C, #FF8C00) !important;
  box-shadow: 0 2px 8px rgba(255,184,28,.5);
  color: #fff;
}
.super-badge {
  color: #FFB81C; font-size: 12px; font-weight: 800;
  margin-left: 2px; text-shadow: 0 1px 2px rgba(0,0,0,.2);
}

/* ===== 占位模块 ===== */
.coming-soon { text-align: center; padding: 80px 20px; color: var(--muted); }
.coming-soon .cs-ico { font-size: 48px; opacity: .5; }
.coming-soon .cs-title { font-size: 18px; font-weight: 600; color: #444; margin: 16px 0 6px; }

/* ===== 课前测模块 ===== */
.precheck { display: flex; gap: 16px; align-items: flex-start; }
.pc-left { flex: 0 0 360px; }
.pc-right { flex: 1; min-width: 0; }
.courses { display: flex; gap: 8px; margin-bottom: 14px; }
.course-btn { flex: 1; padding: 10px; border: 1px solid #ddd; background: #fafafa; border-radius: 8px; cursor: pointer; font-size: 14px; transition: .15s; }
.course-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chapter-title { font-size: 13px; color: var(--muted); font-weight: 600; margin: 12px 0 6px; }
.section-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 6px; cursor: pointer; transition: .15s; }
.section-item:hover { border-color: var(--primary); background: var(--primary-50); }
.section-item.active { border-color: var(--primary); background: var(--primary-50); }
.section-item .qnum { font-size: 12px; color: #aaa; }
.placeholder { color: #aaa; text-align: center; padding: 60px 20px; }
.qr-box { text-align: center; }
.qr-box img { width: 240px; height: 240px; border: 1px solid #eee; border-radius: 8px; }
.qr-box .sec-name { font-size: 16px; font-weight: 600; margin: 10px 0 4px; }
.qr-box .breadcrumb { font-size: 13px; color: var(--muted); }
.qr-box .url { font-size: 12px; color: #aaa; word-break: break-all; margin-top: 8px; }
.hint { font-size: 13px; color: var(--primary); background: var(--primary-50); padding: 8px 12px; border-radius: 6px; margin-top: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.stat { background: #fafafa; border-radius: 8px; padding: 12px; text-align: center; }
.stat .num { font-size: 24px; font-weight: 700; }
.stat .label { font-size: 12px; color: var(--muted); margin-top: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 10px; color: #fff; }
.badge.ok { background: var(--ok); }
.badge.fail { background: var(--fail); }
.live-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ok); margin-left: auto; }
.live-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.section-head { display: flex; align-items: center; margin-bottom: 12px; }
.section-head h2 { font-size: 16px; }

/* ===== 课前测 v2：上传素材 → 5 题 → 二维码 → 实时诊断 ===== */
.pc-v2 { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
.pc-catalog, .pc-work { min-height: 650px; overflow: hidden; border: 1px solid rgba(26,95,79,.08); border-radius: 15px; box-shadow: 0 5px 20px rgba(24,78,64,.055); }
.pc-work .btn, .pc-dialog .btn, .pc-process-card .btn { appearance: none; border: 1px solid #dce6e1; border-radius: 9px; background: #fff; color: #405048; min-height: 38px; padding: 8px 14px; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s, background .15s; }
.pc-work .btn:hover, .pc-dialog .btn:hover, .pc-process-card .btn:hover { transform: translateY(-1px); border-color: rgba(26,95,79,.45); box-shadow: 0 6px 14px rgba(26,95,79,.1); }
.pc-work .btn.primary, .pc-dialog .btn.primary, .pc-process-card .btn.primary { border-color: var(--primary); background: linear-gradient(135deg, var(--primary), #287b68); color: #fff; box-shadow: 0 6px 14px rgba(26,95,79,.18); }
.pc-work .btn:disabled, .pc-dialog .btn:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }
.pc-card-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.pc-card-head h2 { font-size: 17px; margin: 0 0 4px; }
.pc-card-head p { font-size: 11px; color: var(--muted); margin: 0; }
.pc-kicker { color: var(--primary); font-size: 11px; font-weight: 800; margin-bottom: 6px; }
.pc-upload-entry { width: calc(100% - 32px); margin: 16px; padding: 15px; border: 1.5px dashed rgba(26,95,79,.4); background: linear-gradient(135deg,#f5fbf8,#eaf6f1); border-radius: 12px; color: var(--primary); text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.pc-upload-entry:hover { transform: translateY(-1px); border-color: var(--primary); box-shadow: 0 8px 18px rgba(26,95,79,.09); }
.pc-upload-entry b, .pc-upload-entry span { display: block; }
.pc-upload-entry span { margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 400; }
.pc-catalog .courses { padding: 0 16px; }
.pc-catalog #pc-chapters { padding: 0 16px 18px; }
.pc-catalog .section-item { width: 100%; background: #fff; text-align: left; }
.pc-catalog .section-item > span:first-child { min-width: 0; }
.pc-catalog .section-item b, .pc-catalog .section-item small { display: block; }
.pc-catalog .section-item b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-catalog .section-item small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.pc-plan-body, .pc-session-body { padding: 20px; }
.pc-plan-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border-radius: 12px; background: var(--primary-50); margin-bottom: 14px; }
.pc-plan-actions b, .pc-plan-actions span { display: block; }
.pc-plan-actions span { color: var(--muted); font-size: 10px; margin-top: 4px; }
.pc-question { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; padding: 13px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; }
.pc-qno { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-size: 11px; font-weight: 800; }
.pc-question b { font-size: 12px; }
.pc-question p { color: var(--muted); font-size: 9px; margin: 5px 0 0; }
.pc-modal[hidden] { display: none; }
.pc-modal { position: fixed; z-index: 1000; inset: 0; background: rgba(11,35,29,.56); display: grid; place-items: center; padding: 20px; }
.pc-dialog { width: min(660px, 96vw); max-height: 92vh; overflow: auto; background: #fff; border-radius: 16px; padding: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.pc-dialog-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.pc-dialog-head h2 { margin: 0 0 5px; font-size: 20px; }
.pc-dialog-head p { color: var(--muted); font-size: 11px; margin: 0; }
.pc-close { border: 0; background: #f1f4f2; width: 30px; height: 30px; border-radius: 8px; font-size: 20px; cursor: pointer; }
.pc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pc-dialog label { display: block; color: #53625b; font-size: 11px; font-weight: 700; margin-bottom: 12px; }
.pc-dialog input, .pc-dialog textarea { width: 100%; margin-top: 6px; padding: 10px 11px; border: 1px solid #dce5e1; border-radius: 9px; font: inherit; font-size: 12px; resize: vertical; }
.pc-file-tip { color: #705a28; background: #fff8e7; border: 1px solid #f1dfb7; border-radius: 9px; padding: 10px 12px; font-size: 10px; line-height: 1.6; }
.pc-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.pc-process-overlay[hidden] { display: none; }
.pc-process-overlay { position: fixed; z-index: 1100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(10,34,28,.68); backdrop-filter: blur(5px); }
.pc-process-card { width: min(520px, 94vw); background: #fff; border-radius: 20px; padding: 30px 34px; text-align: center; box-shadow: 0 28px 80px rgba(0,0,0,.3); }
.pc-progress-ring { --progress: 0deg; width: 94px; height: 94px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(var(--primary) var(--progress), #e9efec 0); transition: background .35s; }
.pc-progress-ring::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.pc-progress-ring strong { position: relative; z-index: 1; color: var(--primary); font-size: 21px; }
.pc-process-card h2 { margin: 0 0 8px; font-size: 20px; }
.pc-process-card > p { min-height: 20px; margin: 0; color: var(--muted); font-size: 12px; }
.pc-progress-track { height: 8px; border-radius: 999px; overflow: hidden; background: #e9efec; margin: 22px 0 18px; }
.pc-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--primary),#53a990); transition: width .35s ease; }
.pc-process-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.pc-process-steps span { position: relative; padding-top: 22px; color: #9aa6a1; font-size: 10px; }
.pc-process-steps span::before { content: ''; position: absolute; top: 4px; left: 50%; width: 9px; height: 9px; margin-left: -5px; border-radius: 50%; background: #dce4e0; box-shadow: 0 0 0 4px #f1f4f2; }
.pc-process-steps span.active { color: var(--primary); font-weight: 700; }
.pc-process-steps span.active::before { background: var(--primary); box-shadow: 0 0 0 4px rgba(26,95,79,.12); }
.pc-process-steps span.current::before { animation: pcPulse 1.2s infinite; }
.pc-process-note { margin: 20px 0 0; padding: 10px; border-radius: 9px; background: #f5f8f6; color: var(--muted); font-size: 10px; }
.pc-process-overlay.failed .pc-progress-ring { background: #f7e7e5; }
.pc-process-overlay.failed .pc-progress-ring::before { content: '!'; position: relative; z-index: 2; color: var(--fail); font-size: 30px; font-weight: 800; }
.pc-process-overlay.failed .pc-progress-ring strong { display: none; }
.pc-process-overlay.failed .pc-process-note { margin-bottom: 16px; }
@keyframes pcPulse { 50% { box-shadow: 0 0 0 8px rgba(26,95,79,.08); } }
.pc-session-tabs { display: flex; gap: 24px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.pc-session-tabs button { padding: 14px 2px 11px; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.pc-session-tabs button.active { color: var(--primary); border-bottom: 2px solid var(--primary); font-weight: 800; }
.pc-session-hero { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; }
.qr-box b, .qr-box p { display: block; }
.qr-box p { font-size: 9px; color: var(--muted); margin: 5px 0 0; word-break: break-all; }
.pc-session-note { color: var(--muted); font-size: 11px; margin: 8px 0 16px; }
.pc-live-head { display: flex; align-items: center; gap: 7px; color: var(--primary); background: var(--primary-50); padding: 10px 12px; border-radius: 9px; margin: 20px 0 12px; font-size: 10px; }
.pc-live-head i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--ok); }
.pc-live-head small { margin-left: auto; color: var(--muted); }
.pc-ok { color: var(--ok); }
.pc-fail { color: var(--fail); }
.pc-analysis-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; margin-top: 12px; }
.pc-analysis-grid section { border: 1px solid var(--border); border-radius: 12px; padding: 14px; overflow: auto; }
.pc-analysis-grid h3 { font-size: 12px; margin: 0 0 12px; }
.pc-weak-row { display: grid; grid-template-columns: 110px 1fr 34px; gap: 8px; align-items: center; margin: 11px 0; font-size: 9px; }
.pc-weak-row > div { height: 7px; border-radius: 7px; background: #edf1ef; overflow: hidden; }
.pc-weak-row i { display: block; height: 100%; background: var(--fail); border-radius: 7px; }
.pc-weak-row b { color: var(--fail); text-align: right; }
.pc-empty, .pc-empty-small { text-align: center; color: var(--muted); }
.pc-empty { padding: 130px 40px; }
.pc-empty > div { font-size: 42px; }
.pc-empty h2 { color: var(--text); margin: 15px 0 8px; }
.pc-empty p { max-width: 520px; margin: 0 auto 18px; line-height: 1.7; font-size: 12px; }
.pc-empty-small { padding: 28px 10px; font-size: 10px; }

@media (max-width: 900px) {
  .pc-v2 { grid-template-columns: 1fr; }
  .pc-catalog, .pc-work { min-height: 0; }
  .pc-session-hero, .pc-analysis-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pc-form-grid { grid-template-columns: 1fr; }
  .pc-plan-actions { align-items: flex-start; flex-direction: column; }
}

/* ===== 新首页 / 工作台 ===== */
.dash-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dash-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255,184,28,.16), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f7fbf9 100%);
  border: 1px solid rgba(26,95,79,.08);
  box-shadow: 0 10px 26px rgba(15,42,34,.08);
}
.dash-hero-copy { min-width: 0; }
.dash-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(26,95,79,.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  margin-bottom: 10px;
}
.dash-role {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #2d846f);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.dash-hero .welcome { margin-bottom: 8px; }
.dash-hero .welcome-sub { margin-bottom: 0; max-width: 700px; line-height: 1.75; }
.dash-hero-aside {
  min-width: 180px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(26,95,79,.05);
  border: 1px solid rgba(26,95,79,.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  text-align: right;
}
.dash-date-pill {
  display: inline-flex;
  align-self: flex-end;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15,42,34,.06);
}
.dash-date-main {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.dash-date-sub {
  font-size: 12px;
  color: var(--muted);
}
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dash-kpi {
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(26,95,79,.06);
  box-shadow: 0 8px 20px rgba(15,42,34,.06);
}
.dash-kpi-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  margin-bottom: 8px;
}
.dash-kpi-value {
  color: var(--text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}
.dash-feature-row {
  display: none;
}
.dash-flowstrip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.dash-flow-card {
  padding: 16px 18px;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15,42,34,.08);
}
.dash-flow-pre { background: linear-gradient(135deg, #165546, #216a58); }
.dash-flow-in { background: linear-gradient(135deg, #266c87, #3b8fae); }
.dash-flow-post { background: linear-gradient(135deg, #9a6421, #c08a3e); }
.dash-flow-hd { font-size: 15px; font-weight: 800; }
.dash-flow-desc { margin-top: 6px; font-size: 12px; opacity: .92; line-height: 1.55; }
.dash-flow-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dash-flow-card .dash-chip {
  background: rgba(255,255,255,.18);
  color: #fff;
  box-shadow: none;
}
.dash-todos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.todo-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eef2ef;
}
.todo-card:last-child { border-bottom: none; padding-bottom: 0; }
.todo-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26,95,79,.1), rgba(255,184,28,.16));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 42px;
}
.todo-body { flex: 1; min-width: 0; }
.todo-title { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.45; }
.todo-desc { margin-top: 4px; font-size: 12px; color: var(--muted); }
.todo-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.dash-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.dash-panel {
  background: #fff;
  border-radius: 18px;
  padding: 20px 20px 18px;
  border: 1px solid rgba(26,95,79,.06);
  box-shadow: 0 8px 20px rgba(15,42,34,.06);
  min-width: 0;
}
.dash-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dash-panel-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.dash-panel-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.dash-more {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.dash-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(26,95,79,.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
.dash-activity {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dash-activity-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eef2ef;
}
.dash-activity-row:last-child { border-bottom: none; padding-bottom: 0; }
.dash-activity-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26,95,79,.12), rgba(255,184,28,.16));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--primary);
  flex: 0 0 38px;
}
.dash-activity-body { min-width: 0; flex: 1; }
.dash-activity-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
}
.dash-activity-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.dash-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.dash-mini {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fbfa 0%, #f5f8f6 100%);
  border: 1px solid rgba(26,95,79,.06);
}
.dash-mini-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.dash-mini-value {
  color: var(--primary);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}
.dash-mini-sub {
  margin-top: 6px;
  color: #6e7783;
  font-size: 12px;
  line-height: 1.45;
}
.dash-table-wrap {
  overflow: auto;
}
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}
.dash-table th {
  text-align: left;
  padding: 10px 12px;
  color: #6c7481;
  font-weight: 700;
  font-size: 12px;
  border-bottom: 1px solid #eef1ef;
}
.dash-table td {
  padding: 12px 12px;
  border-bottom: 1px solid #f0f3f1;
}
.dash-table tbody tr:hover td { background: #fafcfb; }
.dash-empty {
  color: #9aa1ab;
  text-align: center;
  font-size: 13px;
  padding: 18px 12px;
}
.dash-skel {
  color: #98a0ab;
  font-size: 13px;
}
.dash-class-name {
  font-weight: 700;
  color: var(--text);
}

/* ===== 工具 iframe 容器（课堂总结生成器 / AI 测试题生成器） ===== */
.tool-frame {
  width: 100%;
  height: calc(100vh - 110px); /* 减去 topbar 高度 + content padding */
  border: none;
  background: #fff;
  border-radius: 8px;
  display: block;
}
.content:has(.tool-frame) { padding: 12px 16px; } /* iframe 模式下减少内边距，给工具更多空间 */

/* ============================================================
   移动端响应式（手机 / 钉钉内打开）
   桌面端零影响——以下规则仅在窄屏生效。
   核心改造：固定 230px 侧边栏 → 顶部横向滚动导航条。
   ============================================================ */
@media (max-width: 768px) {
  /* 布局主轴改为纵向：导航在上、内容在下 */
  .layout { flex-direction: column; }

  /* 侧边栏 → 顶部栏（取消固定宽度/100vh/sticky，避免挤占屏幕、避免与体验横幅重叠） */
  .sidebar {
    flex: none; width: 100%; height: auto;
    position: static;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
  }

  /* 品牌区：单行紧凑，副标题省略 */
  .brand { padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
  .brand .sub { display: none; }
  .brand .logo .mark { width: 26px; height: 26px; font-size: 14px; }
  .brand .name { font-size: 13px; }

  /* 导航：横向滚动的标签条（图标在上、文字在下） */
  .nav {
    flex: none;
    display: flex; flex-direction: row;
    overflow-x: auto; overflow-y: hidden;
    padding: 0 4px;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-group { display: none; } /* 横条里分组标题无意义 */
  .nav-item {
    flex-direction: column; gap: 3px;
    margin: 0;
    padding: 8px 12px; min-width: 60px;
    border-left: none; border-bottom: 3px solid transparent;
    font-size: 11px; white-space: nowrap; text-align: center; flex-shrink: 0;
    border-radius: 0;
  }
  .nav-item.active { border-left-color: transparent; border-bottom-color: var(--primary); }
  .nav-item .ico { font-size: 19px; width: auto; }
  .nav-item .label { flex: none; }
  .nav-item .badge-nav { display: none; } /* 横条省略状态徽章 */

  /* 用户/登出条：紧凑，隐藏次要文字 */
  .sidebar .foot { padding: 8px 14px; border-top: 1px solid rgba(255,255,255,.08); }
  .sidebar .foot .who .role { display: none; }

  /* 主区：内边距收紧 */
  .topbar { padding: 12px 14px; }
  .topbar h1 { font-size: 16px; }
  .main-tabs { gap: 6px; }
  .main-tab { padding: 7px 11px; font-size: 12px; }
  .content { padding: 14px 12px; }

  /* 登录卡：自适应不溢出 */
  .login-card { width: auto; max-width: 360px; margin: 0 16px; padding: 28px 22px; }

  /* 课前测左右栏 → 上下堆叠 */
  .precheck { flex-direction: column; }
  .pc-left { flex: none; width: 100%; }
  .courses { flex-wrap: wrap; }

  /* 工作台首页：卡片堆叠 */
  .dash-hero { flex-direction: column; }
  .dash-hero-aside { min-width: 0; text-align: left; align-items: flex-start; }
  .dash-date-pill { align-self: flex-start; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-flowstrip { grid-template-columns: 1fr; }
  .dash-lower { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: 1fr; }

  /* 统计四宫格 → 两列 */
  .stats { grid-template-columns: repeat(2, 1fr); }

  /* 宽表格：横向滚动而非撑破屏幕 */
  .content table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

  /* 二维码图按屏缩小 */
  .qr-box img { width: 200px; height: 200px; }

  /* iframe 工具：减去顶部导航后用满剩余高度 */
  .tool-frame { height: calc(100vh - 168px); }
}

@media (max-width: 480px) {
  .content { padding: 12px 10px; }
  .welcome { font-size: 18px; }
  .stats { gap: 8px; }
  .stat .num { font-size: 20px; }
  .nav-item { min-width: 54px; padding: 7px 9px; }
  .dash-kpis { grid-template-columns: 1fr; }
  .dash-kpi-value { font-size: 24px; }
  .dash-panel { padding: 16px 14px 14px; }
  .qr-box img { width: 180px; height: 180px; }
}
