:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-d: #1d4ed8;
  --brand-50: #eff4ff;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --chip: #eef2ff;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --shadow-lg: 0 10px 30px rgba(16,24,40,.10);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px;
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶部导航条（Bootstrap navbar 风格，红/蓝品牌渐变） ===== */
.app-navbar {
  background: linear-gradient(90deg, var(--brand), var(--brand-d)) !important;
  --bs-navbar-color: rgba(255,255,255,.9);
  --bs-navbar-hover-color: #fff;
  padding: .6rem 1rem;
  box-shadow: 0 2px 10px rgba(16,24,40,.12);
  position: sticky; top: 0; z-index: 1030;
  min-height: 56px;
}
.app-brand {
  color: #fff !important; font-size: 1.05rem; font-weight: 700; letter-spacing: .5px;
  white-space: nowrap; display: inline-flex; align-items: baseline; gap: 6px;
}
.app-brand-sub { font-size: .72rem; font-weight: 400; opacity: .82; }
.app-toggler { border-color: rgba(255,255,255,.55); padding: .25rem .4rem; }
.app-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.app-navbar .spacer { flex: 1; }
.app-navbar .userbar { display: flex; align-items: center; gap: 14px; color: #fff; }
.app-navbar .userbar .who { font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.app-navbar .userbar .role {
  font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 600;
  background: rgba(255,255,255,.2); color: #fff;
}
.app-navbar .userbar .role.r-admin { background: #dc2626; }
.app-navbar .userbar .role.r-teacher { background: #0891b2; }
.app-navbar .userbar .role.r-student { background: #16a34a; }
.app-navbar .userbar .ub { color: rgba(255,255,255,.92); font-size: 13px; }
.app-navbar .userbar .ub:hover { color: #fff; text-decoration: underline; }
.app-navbar .term { font-size: 13px; background: rgba(255,255,255,.16); padding: 4px 12px; border-radius: 6px; color: #fff; }

/* ===== 主体外壳：侧栏 + 内容（固定侧栏 + 自适应主区） ===== */
.app-shell { display: flex; align-items: flex-start; min-height: calc(100vh - 56px); }
.app-sidebar {
  width: 220px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line);
  padding: 14px 0; overflow-y: auto;
  display: flex; flex-direction: column;
  position: sticky; top: 56px; height: calc(100vh - 56px); align-self: flex-start;
}
.app-sidebar .app-nav-group,
.app-sidebar .app-nav-link { display: block; width: 100%; }
.app-nav-group {
  font-size: 11px; color: var(--muted); padding: 14px 20px 6px; letter-spacing: 1px; font-weight: 600;
  text-transform: uppercase;
}
.app-nav-link {
  padding: 9px 20px; color: var(--ink); border-left: 3px solid transparent;
  font-size: 13.5px; transition: background .15s, color .15s;
}
.app-nav-link:hover { background: var(--brand-50); color: var(--brand-d); text-decoration: none; }
.app-nav-link.active {
  background: var(--brand-50); border-left-color: var(--brand); color: var(--brand-d); font-weight: 600;
}
/* 移动端 offcanvas 内的侧栏样式 */
.app-offcanvas { width: 260px; }
/* 桌面端强制隐藏 offcanvas（即使 Bootstrap CSS 未加载，也避免它占布局空间） */
@media (min-width: 992px) {
  .app-offcanvas { display: none !important; }
}
.app-offcanvas-header { background: linear-gradient(90deg, var(--brand), var(--brand-d)); color: #fff; }
.app-offcanvas-header .offcanvas-title { color: #fff; font-size: .95rem; }
.app-offcanvas-header .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.app-offcanvas-body { padding: 0; }
.app-offcanvas-body .app-nav-group:first-child { padding-top: 16px; }
.app-offcanvas-body .app-nav-link,
.app-offcanvas-body .app-nav-group { display: block; width: 100%; }
.app-main { flex: 1; min-width: 0; padding: 22px 26px; overflow-x: hidden; }
.page-title { font-size: 20px; font-weight: 700; color: #111827; margin: 0 0 16px; }
.app-footer {
  margin-left: 220px; padding: 16px 26px; color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line); background: var(--panel);
}
@media (max-width: 991.98px) {
  .app-sidebar { display: none !important; }
  .app-main { padding: 16px; }
  .app-footer { margin-left: 0; }
}
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 18px 0 10px; }
.subtle { color: var(--muted); font-size: 13px; }
.stu-hours { font-size: 15px; padding: 10px 12px; background: linear-gradient(135deg, rgba(59,130,246,.08), rgba(139,92,246,.06)); border: 1px solid rgba(99,102,241,.18); border-radius: 10px; }
.stu-hours b { font-size: 18px; color: #1d4ed8; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 26px; font-weight: 700; color: var(--brand); }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }
/* 表格：Bootstrap 风格（仅给裸 <table> 加 .table 观感，避免影响已用 .table 的页面） */
table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 13px; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: middle; }
th { background: #f8fafc; font-weight: 600; color: #374151; }
tr:nth-child(even) td { background: #fcfdff; }
.btn {
  display: inline-block; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; cursor: pointer; font-size: 13px; line-height: 1.4;
  transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--brand-d); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.sec { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn.sec:hover { background: var(--brand-50); }
.btn.danger { background: #fff; color: var(--red); border-color: #fca5a5; }
.btn.danger:hover { background: #fef2f2; }
.btn.lg { padding: 11px 22px; font-size: 15px; }
.btn.sm { padding: 2px 10px; font-size: 12px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
  font-family: inherit; background: #fff; transition: border-color .15s, box-shadow .15s;
}
/* 复选框 / 单选框不适用上面的「控件 100% 宽」：否则复选框被撑满容器、把同一行的标签文字挤成竖排
   （VOD 后台「课程管理 / 视频管理」表单里「设为免费课程 / 上架显示 / 外链课程」错位的根因） */
.field input[type=checkbox], .field input[type=radio] {
  width: auto; height: auto; padding: 0; margin: 0; flex: 0 0 auto; accent-color: var(--brand);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(37,99,235,.18);
}
.field textarea { height: 60px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; border-bottom: 2px solid transparent; color: var(--muted); }
.tabs a.active { color: var(--brand-d); border-bottom-color: var(--brand); font-weight: 600; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; background: var(--chip); color: var(--brand-d); }
.tag.green { background: #dcfce7; color: #15803d; }
.tag.red { background: #fee2e2; color: #b91c1c; }
.tag.amber { background: #fef3c7; color: #b45309; }
.tag.blue { background: #dbeafe; color: #1d4ed8; }
/* 课表网格 */
.tt-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.tt { border-collapse: separate; border-spacing: 0; min-width: 760px; width: 100%; }
.tt th, .tt td { border: 1px solid var(--line); border-width: 0 1px 1px 0; vertical-align: top; }
.tt th { padding: 10px 6px; text-align: center; background: #f8fafc; font-weight: 600; }
.tt th:last-child { border-right-width: 0; }
.tt td { padding: 6px; min-height: 76px; background: #fff; }
.tt td:last-child { border-right-width: 0; }
.tt tbody tr:last-child td { border-bottom-width: 0; }
.tt thead th { background: #f1f5f9; }
.tt thead th.today { background: #dbeafe; color: var(--brand-d); }
.tt th .th-day { font-size: 13px; }
.tt th .th-date { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.tt thead th.today .th-date { color: var(--brand-d); opacity: .85; }
.tt .period-col { background: #f8fafc; text-align: center; width: 82px; padding: 10px 6px; }
.tt .period-col .p-label { font-size: 13px; font-weight: 700; }
.tt .period-col .p-part { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tt .am-head { color: var(--brand-d); }
.tt .pm-head { color: var(--amber); }
.tt td.today-col { background: #f0f9ff; }
.cell {
  background: #f0f7ff; border-radius: 6px;
  box-shadow: 0 1px 2px rgba(37,99,235,.08);
  margin-bottom: 5px; font-size: 12px; line-height: 1.35;
  transition: box-shadow .12s, transform .12s;
}
.cell:last-child { margin-bottom: 0; }
.cell-inner { padding: 6px 10px; }
.cell .c-course { font-weight: 700; color: #1e3a8a; font-size: 13px; }
.cell .c-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.cell .c-meta .c-loc { display: inline-block; margin-left: 4px; padding: 0 4px; background: rgba(37,99,235,.08); border-radius: 3px; color: var(--brand-d); }
.cell.empty { background: transparent; border: none; box-shadow: none; }
.cell.clash { background: #fee2e2; outline: 2px solid var(--red); outline-offset: -2px; }
.cell .ops { margin-top: 5px; display: flex; gap: 6px; }

/* ===== 拖拽调整 ===== */
.cell[draggable="true"] { cursor: grab; }
.cell[draggable="true"]:hover { box-shadow: 0 3px 10px rgba(37,99,235,.22); transform: translateY(-1px); }
.cell[draggable="true"]:active { cursor: grabbing; }
.cell.dragging { opacity: .45; transform: scale(.97); }
td.droptarget { transition: background .12s; }
td.droptarget.over { background: #e0f2fe; outline: 2px dashed var(--brand); outline-offset: -3px; }
.toast {
  position: fixed; left: 50%; top: 22px; transform: translateX(-50%) translateY(-12px);
  background: #1f2937; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.2); opacity: 0; pointer-events: none; z-index: 999;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #dc2626; }
.muted { color: var(--muted); }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.alert.ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert.err { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert.warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.pager { margin-top: 10px; }
.right { text-align: right; }
.small { font-size: 12px; }
.kbd { font-family: monospace; background: #f1f5f9; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
/* 每节上课时间 */
.tt .pt-time { color: var(--brand); font-size: 11px; font-weight: 500; }
.pt { width: auto; min-width: 320px; }
.pt th, .pt td { padding: 6px 12px; text-align: left; }
.pt input[type=time] { width: 130px; }
h3.sub { font-size: 14px; margin: 16px 0 8px; color: #374151; }

/* ===== 登录身份徽章与用户条 ===== */
.userbar { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 13px; }
.userbar .who { opacity: .95; }
.userbar .ub { color: #fff; background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 6px; }
.userbar .ub:hover { background: rgba(255,255,255,.3); text-decoration: none; }
.role { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; margin-left: 4px; }
.role.r-admin { background: #fde68a; color: #92400e; }
.role.r-teacher { background: #dbeafe; color: #1e40af; }
.role.r-student { background: #d1fae5; color: #065f46; }
.role.r-ok { background: #dcfce7; color: #166534; }
.role.r-pending { background: #fee2e2; color: #991b1b; }
.radio { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; }
.btn.sm { padding: 2px 10px; font-size: 12px; }
.cell-slot { }

/* ===== 作业详情：纸质原貌布局 + 错题气泡浮层 ===== */
/* 纸张容器 */
.paper-view {
  background: #fff;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 12px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.02) inset;
  border-radius: 4px;
  padding: 48px 56px;
  max-width: 960px;
  margin: 0 auto;
  font-family: "PingFang SC","Microsoft YaHei","Noto Sans SC",sans-serif;
  line-height: 1.85;
  color: #1f2937;
  font-size: 14.5px;
}
.paper-view .paper-header {
  text-align: center;
  border-bottom: 2px solid #1f2937;
  padding-bottom: 14px;
  margin-bottom: 28px;
}
.paper-view .paper-header h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  margin: 0 0 6px;
}
.paper-view .paper-header .paper-meta {
  font-size: 12.5px;
  color: #6b7280;
}
/* 题目区域 —— 连续流式，不打断阅读 */
.paper-q {
  position: relative;
  margin-bottom: 22px;
  padding: 4px 0;
  page-break-inside: avoid;
}
.paper-q .q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
  font-size: 13px;
  margin-right: 6px;
  vertical-align: top;
  flex-shrink: 0;
}
.paper-q.is-right .q-num { background: #dcfce7; color: #166534; }
.paper-q.is-wrong .q-num { background: #fee2e2; color: #991b1b; }
.paper-q .q-body {
  display: inline;
}
.paper-q .q-text {
  display: inline;
  font-size: 14.5px;
  line-height: 1.85;
}
/* 选项（选择题） */
.paper-q .q-opts {
  margin: 8px 0 8px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
  font-size: 14px;
}
.paper-q .q-opt {
  padding: 3px 0;
  color: #374151;
}
.paper-q .q-opt.opt-correct {
  color: #166534;
  font-weight: 600;
}
.paper-q .q-opt.opt-wrong {
  color: #dc2626;
  text-decoration: line-through;
}
/* 作答区 & 答案区 —— 像试卷上的填空线 */
.paper-q .q-answer-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 10px 0 6px 32px;
  font-size: 14px;
  flex-wrap: wrap;
}
.paper-q .q-answer-label {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
  min-width: 64px;
}
.paper-q .q-answer-val {
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
  word-break: break-all;
}
.paper-q .q-student-ans {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #1f2937;
}
.paper-q.is-wrong .q-student-ans {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.paper-q .q-correct-ans {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
/* 正确标记 —— 微妙不干扰 */
.paper-q.is-right .q-right-badge {
  display: inline-block;
  margin-left: 6px;
  color: #22c55e;
  font-size: 15px;
  font-weight: 700;
  cursor: default;
}
/* ===== 错题气泡浮层 ===== */
.q-bubble-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #dc2626;
  font-size: 12.5px;
  font-weight: 600;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef2f2;
  border: 1px dashed #fca5a5;
  transition: all .2s;
  vertical-align: middle;
  user-select: none;
}
.q-bubble-trigger:hover { background: #fee2e2; border-color: #ef4444; }
.q-bubble-trigger::after { content: ' ▼'; font-size: 10px; transition: transform .2s; }
.q-bubble-trigger.open::after { transform: rotate(180deg); }

.q-bubble-panel {
  display: none;
  position: relative;
  margin: 10px 0 4px 32px;
  z-index: 10;
}
.q-bubble-panel.show { display: block; animation: bubbleIn .25s ease-out; }
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.q-bubble {
  background: linear-gradient(135deg,#fff 0%,#fefefe 100%);
  border: 1px solid #e5e7eb;
  border-left: 4px solid #ef4444;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 4px 20px rgba(220,38,38,.08), 0 1px 4px rgba(0,0,0,.04);
  font-size: 13.5px;
  line-height: 1.7;
}
.q-bubble .qb-section {
  margin-bottom: 10px;
}
.q-bubble .qb-section:last-child { margin-bottom: 0; }
.q-bubble .qb-title {
  font-size: 12px;
  font-weight: 700;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.q-bubble .qb-title.ic-reason::before { content: '⚠'; }
.q-bubble .qb-title.ic-analysis::before { content: '💡'; }
.q-bubble .qb-title.ic-solution::before { content: '📖'; }
.q-bubble .qb-content {
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
}
/* 气泡小三角 */
.q-bubble-panel::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 24px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
  transform: rotate(45deg);
}
/* 教师评语区 —— 纸张底部 */
.paper-footer-note {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px dashed #d1d5db;
  font-size: 13.5px;
}
.paper-grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
}
.paper-grade-badge.g-优 { background:#f0fdf4;color:#166534;border:2px solid #86efac; }
.paper-grade-badge.g-良 { background:#eff6ff;color:#1e40af;border:2px solid #93c5fd; }
.paper-grade-badge.g-中 { background:#fffbeb;color:#92400e;border:2px solid #fde68a; }
.paper-grade-badge.g-差 { background:#fef2f2;color:#991b1b;border:2px solid #fecaca; }

/* 教师编辑模式下的纸张 */
.paper-view.edit-mode { padding: 32px 40px; }
.paper-view.edit-mode .paper-q { margin-bottom: 28px; padding: 12px 0; border-bottom: 1px dotted #e5e7eb; }
.paper-view.edit-mode .paper-q:last-child { border-bottom: none; }
.edit-field {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: #fefefe;
  transition: border-color .2s, box-shadow .2s;
}
.edit-field:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.edit-field-sm {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 13.5px;
  font-family: inherit;
}

/* 响应式：窄屏缩小内边距 */
@media (max-width: 640px) {
  .paper-view { padding: 24px 20px; }
  .paper-q .q-opts { grid-template-columns: 1fr; margin-left: 16px; }
  .paper-q .q-answer-row { margin-left: 16px; }
  .q-bubble-panel { margin-left: 16px; }
}

/* ===== 错题申诉（学生提交 / 教师收件箱） ===== */
details.appeal { margin-top: 10px; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 6px 10px; background: #f8fafc; }
details.appeal > summary { cursor: pointer; color: #b45309; font-weight: 600; font-size: 13px; }
details.appeal > summary:hover { color: #92400e; }
details.appeal form { margin-top: 8px; }
.appeal-result { margin-top: 10px; border-left: 3px solid #1d4ed8; background: #f5f8ff; border-radius: 8px; padding: 8px 12px; }
.appeal-result .ana-h { color: #1d4ed8; }
.appeal-reply { margin-top: 6px; font-size: 13px; color: #16513a; background: #ecfdf5; border: 1px solid #bbf7d0; border-radius: 8px; padding: 8px 12px; }
.appeal-item { border-left: 4px solid #f59e0b; }
.appeal-q { margin: 8px 0; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 12px; background: #fff; }
.appeal-q .ana-h { color: #b91c1c; }
.appeal-reason { margin: 8px 0; border-radius: 8px; padding: 8px 12px; background: #fffbeb; border: 1px solid #fde68a; }
.appeal-reason .ana-h { color: #b45309; }
/* ===== 学情分析（去 AI 味，传统教务报表风格） ===== */
.ins-head { margin-bottom: 14px; }
.ins-head h1 { font-size: 20px; }
.ins-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.ins-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.ins-tile .n { font-size: 30px; font-weight: 700; color: var(--brand-d); line-height: 1.1; }
.ins-tile .l { font-size: 13px; color: #374151; font-weight: 600; }
.ins-tile .s { font-size: 12px; color: #9ca3af; }
.ins-report { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; line-height: 1.85; font-size: 14px; color: var(--ink); }
.ins-report p { margin: 8px 0; }
.ins-report h3.report-h { font-size: 16px; margin: 18px 0 8px; color: #111827; border-left: 3px solid var(--brand); padding-left: 10px; }
.ins-report h4.report-h { font-size: 14px; margin: 14px 0 6px; color: #1f2937; font-weight: 600; border-left: 3px solid #cbd5e1; padding-left: 10px; }
.ins-report ul { margin: 6px 0; padding-left: 22px; }
.ins-report li { margin: 5px 0; }
.ins-meta { margin-top: 14px; font-size: 12px; color: #9ca3af; border-top: 1px dashed var(--line); padding-top: 10px; }
.ins-table { margin-top: 4px; }
.ins-table td:first-child { font-weight: 600; }
.insight-summary { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.7; color: #14532d; white-space: pre-wrap; }
.profile-log { display: flex; flex-direction: column; gap: 10px; }
.logitem { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }
.paper-q { line-height: 1.9; font-size: 15px; padding-left: 22px; }
.paper-q li { margin-bottom: 14px; }
.pq-q { font-weight: 500; }
.pq-a { color: #047857; font-size: 14px; margin-top: 2px; }

/* ===== 作业多图缩略图 ===== */
.hw-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin: .6rem 0; }
.hw-imgs a { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: 140px; height: 140px; background: #f8fafc; }
.hw-imgs img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.hw-imgs a.hw-pdf { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--brand); font-size: 13px; padding: 8px; }

/* ===== AI 配置：模型列表表格 ===== */
.tbl-models { width: 100%; border-collapse: collapse; margin-top: 6px; }
.tbl-models th, .tbl-models td { border: 1px solid var(--line); padding: 6px 8px; font-size: 13px; vertical-align: middle; }
.tbl-models th { background: #f3f6fb; text-align: left; }
.tbl-models td.c { text-align: center; }
.tbl-models input { width: 100%; box-sizing: border-box; }
.tbl-models input[type=checkbox] { width: auto; }
.tbl-models .newrow td { background: #fafdff; }
/* 模型健康状态徽章（AI 配置页） */
.model-health { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; font-weight:600; line-height:1.6; white-space:nowrap; }
.model-health.ok { background:#dcfce7; color:#15803d; }
.model-health.fail { background:#fee2e2; color:#b91c1c; }
.model-health.unknown, .model-health.testing { background:#f1f5f9; color:#64748b; }
.model-health.failnet { background:#fef3c7; color:#b45309; }
.model-health.testing { animation: healthPulse 1.1s ease-in-out infinite; }
@keyframes healthPulse { 0%,100%{opacity:1} 50%{opacity:.4} }
button.model-test { font-size:12px; padding:2px 8px; margin-left:6px; border:1px solid var(--line); background:#fff; border-radius:6px; cursor:pointer; color:var(--ink); }
button.model-test:hover { background:#f1f5f9; }

/* ===== 智能组卷系统 ===== */
/* Tab 导航 */
.pg-tabs { display: flex; border-bottom: 2px solid var(--line); margin-bottom: 18px; gap: 0; }
.pg-tabs a { padding: 10px 20px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; text-decoration: none; }
.pg-tabs a:hover { color: var(--ink); background: #f8fafc; }
.pg-tabs a.active { color: var(--brand-d); border-bottom-color: var(--brand); font-weight: 600; }

/* 筛选面板 */
.pg-filter { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 16px; margin-bottom: 6px; }
.pg-filter .field { margin-bottom: 0; }
.pg-filter .field label { font-weight: 500; color: #374151; font-size: 13px; }

/* 试卷类型标签组 */
.et-group { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 12px; background: #f8fafc; border-radius: 8px; border: 1px solid var(--line); }
.et-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 20px; font-size: 13px; cursor: pointer; user-select: none;
    border: 1.5px solid var(--line); background: #fff; color: #4b5563; transition: all .15s; }
.et-chip:hover { border-color: var(--brand); background: #eef2ff; }
.et-chip input { display: none; }
.et-chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 高级选项行 */
.pg-opts { display: flex; align-items: center; gap: 18px; padding: 12px 14px; background: #fafbfc; border-radius: 8px; border: 1px solid var(--line); margin-top: 10px; flex-wrap: wrap; }
.pg-opts label { font-size: 13px; color: #4b5563; display: flex; align-items: center; gap: 5px; }
.pg-opts select, .pg-opts input[type=number] { padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; width: auto; min-width: 80px; }

/* 操作栏 */
.pg-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; gap: 10px; }
.pg-bar-right { display: flex; align-items: center; gap: 10px; }

/* 题库统计 */
.pool-stat { display: inline-flex; align-items: baseline; gap: 6px; font-size: 14px; color: #4b5563; }
.pool-stat .num { font-size: 24px; font-weight: 700; color: var(--brand-d); }

/* 题库预览列表 */
.qpick { display: flex; flex-direction: column; gap: 0; max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.qpick-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background .1s; }
.qpick-item:hover { background: #fafbff; }
.qpick-item:last-child { border-bottom: none; }
.qpick-item input[type=checkbox] { margin-top: 3px; accent-color: var(--brand); }
.qp-tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; white-space: nowrap; flex: 0 0 auto; background: #eff6ff; color: #1d4ed8; font-weight: 500; }
.qp-tag.wrong { background: #fef2f2; color: #dc2626; }
.qp-body { font-size: 13.5px; line-height: 1.55; color: #334155; }
.kp-mini { display: inline-flex; flex-wrap: wrap; gap: 4px; flex: 0 0 auto; max-width: 100%; }
.kp-mini { font-size: 11px; color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; padding: 1px 7px; border-radius: 9px; margin-right: 4px; }
.weak-panel { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); border: 1px solid #fde68a; border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.weak-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }

/* 导入试卷区域 */
.import-zone {
    border: 2px dashed #c7d2fe; border-radius: 12px; padding: 36px 24px; text-align: center;
    background: linear-gradient(135deg, #f8faff 0%, #eef3ff 100%); cursor: pointer; transition: all .2s;
}
.import-zone:hover { border-color: var(--brand); background: linear-gradient(135deg, #eef3ff 0%, #dbeafe 100%); }
.import-zone.dragover { border-color: var(--brand); background: #e0e7ff; transform: scale(1.005); }
.import-icon { font-size: 40px; margin-bottom: 8px; }
.import-text { font-size: 15px; color: #374151; font-weight: 500; margin-bottom: 4px; }
.import-hint { font-size: 12.5px; color: var(--muted); }
.import-formats { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.import-fmt { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 12px; background: #fff; border: 1px solid var(--line); color: #6b7280; }

/* 导入结果 */
.import-result { margin-top: 14px; padding: 14px 16px; border-radius: 8px; display: none; }
.import-result.show { display: block; }
.import-result.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.import-result.err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* 历史记录表格 */
.hist-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hist-table th { background: #f1f5f9; font-weight: 600; color: #374151; padding: 10px 12px; text-align: left; white-space: nowrap; }
.hist-table td { padding: 9px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.hist-table tr:hover td { background: #fafbff; }
.hist-title { font-weight: 600; color: #1e293b; }
.hist-filters { color: var(--muted); font-size: 12px; }
.hist-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hist-actions a { font-size: 12px; padding: 3px 10px; border-radius: 5px; border: 1px solid var(--line); color: var(--brand); background: #fff; }
.hist-actions a:hover { background: #eef2ff; text-decoration: none; }
.hist-actions .link-danger { font-size: 12px; padding: 3px 10px; border-radius: 5px; border: 1px solid #fecaca; color: #dc2626; background: #fff; cursor: pointer; font-family: inherit; }
.hist-actions .link-danger:hover { background: #fef2f2; border-color: #f87171; }

/* 试卷预览页 */
.paper-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.paper-title-area h2 { margin: 0 0 4px; font-size: 20px; }
.paper-meta { color: var(--muted); font-size: 13px; }
.paper-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pq-a { color: #047857; font-size: 14px; margin-top: 4px; padding: 8px 12px; background: #ecfdf5; border-radius: 6px; border-left: 3px solid #059669; }

/* 通用：section 标题 */
.sec-title { font-size: 15px; font-weight: 600; color: #1e293b; margin: 18px 0 12px; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 8px; }
.sec-title .badge { font-size: 11px; font-weight: 400; background: #eef2ff; color: var(--brand-d); padding: 2px 8px; border-radius: 10px; }

/* 按钮变体 */
.btn-primary { background: var(--brand); color: #fff; border: none; padding: 9px 22px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s; }
.btn-primary:hover { background: var(--brand-d); }
.btn-outline { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); padding: 8px 18px; border-radius: 8px; font-size: 13.5px; cursor: pointer; transition: all .15s; }
.btn-outline:hover { background: #eef2ff; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; border-radius: 6px; }

/* ===== 控制台 Dashboard（现代卡片风格） ===== */

/* 告警横幅：奶油底+橙色左边框 */
.alert.err { background: #FFFBEB; color: #92400E; border: none; border-left: 4px solid #F59E0B; border-radius: 10px; }
.alert.err a { color: #D97706; font-weight: 600; }

/* 页面头部：大标题 + 欢迎语 + 日期 */
.dash-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.dash-header h1 { font-size: 22px; font-weight: 700; color: #111827; margin: 0; }
.dash-header .dh-right { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.dash-welcome { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-top: 2px; }
.dash-welcome b { color: #111827; font-weight: 600; }
.dash-welcome .dw-link { color: var(--brand-d); text-decoration: none; font-weight: 500; }
.dash-welcome .dw-link:hover { text-decoration: underline; }

/* 数据概览：彩色渐变卡片 */
.sec-title { font-size: 15px; font-weight: 600; color: #1e293b; margin: 22px 0 12px; }
.sec-title .badge { font-size: 11px; font-weight: 400; background: #eef2ff; color: var(--brand-d); padding: 2px 8px; border-radius: 10px; }

.dash-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
@media (max-width: 900px) { .dash-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .dash-stats { grid-template-columns: repeat(2, 1fr); } }

.dash-stat { border-radius: 14px; padding: 20px 20px; color: #fff; position: relative; overflow: hidden; min-height: 100px; display: flex; align-items: center; gap: 16px; }
.dash-stat.ds-purple { background: linear-gradient(135deg, #7C3AED, #8B5CF6); }
.dash-stat.ds-green { background: linear-gradient(135deg, #059669, #10B981); }
.dash-stat.ds-orange { background: linear-gradient(135deg, #D97706, #F59E0B); }
.dash-stat.ds-violet { background: linear-gradient(135deg, #7C3AED, #A855F7); }
.dash-stat.ds-cyan { background: linear-gradient(135deg, #0891B2, #06B6D4); }
.dash-stat.ds-pink { background: linear-gradient(135deg, #DB2777, #EC4899); }

.dash-stat .ds-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.dash-stat .ds-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-stat .n { font-size: 28px; font-weight: 800; line-height: 1.15; }
.dash-stat .l { font-size: 12.5px; opacity: .8; }

/* 排课构成：浅色大卡片 + 装饰圆 */
.dash-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-mini { border-radius: 16px; padding: 24px 28px; position: relative; overflow: hidden; min-height: 120px; display: flex; align-items: center; gap: 18px; }
.dash-mini.dm-group { background: #F3E8FF; }
.dash-mini.dm-pri { background: #D1FAE5; }
.dash-mini .ds-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.dash-mini.dm-group .ds-icon { background: #A78BFA; color: #fff; }
.dash-mini.dm-pri .ds-icon { background: #34D399; color: #fff; }
.dash-mini .ds-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dash-mini .n { font-size: 30px; font-weight: 800; line-height: 1.15; }
.dash-mini.dm-group .n { color: #7C3AED; }
.dash-mini.dm-pri .n { color: #059669; }
.dash-mini .l { font-size: 13.5px; color: #6b7280; }
/* 装饰圆（右下角） */
.dash-mini::after { content: ""; position: absolute; right: -20px; bottom: -20px; width: 90px; height: 90px; border-radius: 50%; opacity: .15; }
.dash-mini.dm-group::after { background: #A78BFA; }
.dash-mini.dm-pri::after { background: #34D399; }

/* 快捷操作：响应式卡片网格 */
.dash-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 900px) { .dash-actions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dash-actions { grid-template-columns: 1fr; } }
.dash-actions form { margin: 0; width: 100%; }
.dash-act {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brand);
  border-radius: 14px; padding: 20px; color: var(--ink); text-decoration: none;
  transition: all .18s; width: 100%; box-sizing: border-box; min-height: 100%;
}
.dash-act:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(15,23,42,.08); text-decoration: none; transform: translateY(-2px); }
/* 主操作卡（蓝色高亮） */
.dash-act.da-primary { background: linear-gradient(135deg, #3B82F6, #2563EB); border: none; border-top-color: rgba(255,255,255,.4); color: #fff; }
.dash-act.da-primary:hover { box-shadow: 0 8px 24px rgba(59,130,246,.35); transform: translateY(-3px); }
.dash-act.da-primary .ic { background: rgba(255,255,255,.2); color: #fff; }
.dash-act.da-primary .t { color: #fff; }
.dash-act.da-primary .d { color: rgba(255,255,255,.8); }
/* 危险操作卡 */
.dash-act.danger { border-top-color: #EF4444; }
.dash-act.danger:hover { border-color: #FCA5A5; box-shadow: 0 8px 24px rgba(239,68,68,.1); }
.dash-act.danger .ic { background: #FEF2F2; color: #EF4444; }
.dash-act.danger .t { color: #EF4444; }
.dash-act.danger .d { color: #F87171; }

.dash-act .ic { width: 44px; height: 44px; border-radius: 12px; background: #EFF6FF; color: var(--brand-d); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.dash-act .at { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dash-act .t { font-size: 15px; font-weight: 700; color: #111827; }
.dash-act .d { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
/* 表单提交按钮外观与卡片一致 */
button.dash-act { cursor: pointer; font-family: inherit; border: 1px solid var(--line); border-top: 4px solid var(--brand); }
button.dash-act.da-primary { border: none; border-top: 4px solid rgba(255,255,255,.4); }
button.dash-act.danger { border: 1px solid var(--line); border-top: 4px solid #EF4444; }

.dash-note { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 16px 0 0; padding: 12px 16px; background: #fafbfc; border: 1px solid var(--line); border-radius: 10px; }

/* ===== 打印 / 导出 PDF：仅保留试卷正文 ===== */
@media print {
    .app-navbar, .app-sidebar, .app-offcanvas, .paper-actions, .btn, .nav { display: none !important; }
    body { background: #fff; height: auto; overflow: visible; margin: 0; padding: 0; }
    .app-shell { display: block; min-height: 0; margin: 0; padding: 0; }
    .app-main { margin: 0; padding: 8mm; max-width: 100%; overflow: visible; }
    .card { box-shadow: none; border: none; padding: 0; margin: 0; }
    .app-footer { display: none !important; margin-left: 0 !important; }
    .page-title { margin-bottom: 8px; }
    .paper-header { margin-bottom: 12px; page-break-after: avoid; }
    .paper-q { font-size: 14px; line-height: 1.8; page-break-inside: avoid; margin-top: 0; padding-left: 18px; }
    .paper-q li { page-break-inside: avoid; }
    /* 避免 sticky 侧栏在打印时产生空白页 */
    .app-sidebar { position: static !important; width: 0 !important; height: 0 !important; padding: 0 !important; border: none !important; }
    /* 勾选「打印含参考答案」关闭时，隐藏答案 */
    #pqWrap.noans .pq-a { display: none !important; }
    .noans .pq-a { display: none !important; }
}

/* ===== 作业上传：提交后的「处理中」反馈（避免 AI 批改期间看起来像卡死） ===== */
.hw-wait {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 14px; padding: 14px 16px;
  background: #eef2ff; border: 1px solid rgba(37,99,235,.25); border-radius: 10px;
  color: var(--ink); line-height: 1.6;
}
.hw-wait .spinner {
  width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px;
  border: 3px solid rgba(37,99,235,.25); border-top-color: var(--brand);
  border-radius: 50%; animation: hwspin .8s linear infinite;
}
@keyframes hwspin { to { transform: rotate(360deg); } }
.hw-wait b { color: var(--brand-d); }

/* ===== 选择题选项展示（题库预览 / 试卷 / 批改结果） ===== */
.q-opts { list-style: none; margin: 8px 0 2px; padding: 0; display: grid; gap: 4px; }
.q-opts li {
  padding: 5px 10px; background: #f8fafc; border: 1px solid var(--line);
  border-radius: 7px; font-size: 13.5px; color: var(--ink); line-height: 1.5;
}
.qp-body { line-height: 1.7; }
.qp-body .q-opts { margin-top: 6px; }

/* ===== 在线学习专区（VOD） ===== */
.vod-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.vod-cat { padding: 6px 14px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 13px; text-decoration: none; border: 1px solid transparent; }
.vod-cat:hover { background: #e2e8f0; }
.vod-cat.active { background: #10b981; color: #fff; }
.vod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.vod-card { text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: .15s; display: block; }
.vod-card:hover { box-shadow: 0 8px 22px rgba(16,185,129,.12); transform: translateY(-2px); }
.vod-cover { aspect-ratio: 16/9; background: #0f172a; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vod-cover img { width: 100%; height: 100%; object-fit: cover; }
.vod-cover-ph { color: #64748b; font-size: 14px; }
.vod-info { padding: 10px 12px; }
.vod-title { font-weight: 600; color: #0f172a; font-size: 14px; line-height: 1.4; min-height: 38px; }
.vod-meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.badge.free { background: #dcfce7; color: #15803d; }
.badge.pay { background: #fef3c7; color: #b45309; }
.badge.exp { background: #e0e7ff; color: #4338ca; }
.badge.own { background: #cffafe; color: #0e7490; }
.vod-detail-head { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.vod-detail-head .vod-cover { width: 220px; max-width: 40%; border-radius: 12px; }
.vod-desc { color: #475569; font-size: 13.5px; line-height: 1.7; margin: 10px 0 14px; white-space: pre-wrap; }
.vod-eps { display: grid; gap: 10px; margin-top: 10px; }
.vod-ep { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vod-ep.open { border-color: #bbf7d0; background: #f0fdf4; }
.ep-idx { width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0; color: #475569; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.vod-ep.open .ep-idx { background: #10b981; color: #fff; }
.ep-body { flex: 1; min-width: 0; }
.ep-title { font-weight: 600; color: #0f172a; font-size: 14px; }
.ep-sub { color: #64748b; font-size: 12px; margin-top: 2px; }
.ep-lock { color: #94a3b8; font-size: 13px; }
.vod-player { margin-top: 8px; background: #000; border-radius: 10px; overflow: hidden; }
.btn-success { background: #10b981; color: #fff; border: none; padding: 9px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-success:hover { background: #059669; }

/* ===== 在线学习·后台管理表格 / 徽章 / 工具栏（adm- 前缀，避免与前端 .badge/.vod-* 冲突） ===== */
.adm-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.adm-page-head h2 { margin: 0; font-size: 18px; color: #111827; }
.adm-page-head .subtle { margin: 5px 0 0; max-width: 640px; }
.adm-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-toolbar .grow { flex: 1; min-width: 160px; }
.adm-toolbar select { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; color: var(--ink); }
.adm-table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th { background: #f1f5f9; color: #334155; font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: var(--ink); }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover td { background: #fafbff; }
.adm-table .c-actions a { margin-right: 12px; white-space: nowrap; }
.adm-table .c-actions a:last-child { margin-right: 0; }
.adm-thumb { width: 56px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; background: #f1f5f9; }
.adm-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.adm-badge.ok { background: #dcfce7; color: #15803d; }
.adm-badge.warn { background: #fef3c7; color: #b45309; }
.adm-badge.err { background: #fee2e2; color: #b91c1c; }
.adm-badge.off { background: #f1f5f9; color: #64748b; }
.adm-badge.info { background: var(--brand-50); color: var(--brand-d); }
.adm-badge.free { background: #ede9fe; color: #6d28d9; }
.adm-badge.vip { background: #fae8ff; color: #a21caf; }
.adm-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; }
.adm-form-grid .span2 { grid-column: 1 / -1; }
.adm-form-grid .field { margin-bottom: 12px; }
.adm-check { display: flex; gap: 18px 22px; flex-wrap: wrap; align-items: center; }
.adm-check label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink); font-weight: 400; margin-bottom: 0; }
.adm-check label input[type=checkbox] { flex: 0 0 auto; margin: 0; }
.adm-empty { padding: 28px; text-align: center; color: var(--muted); font-size: 13px; background: #f8fafc; border: 1px dashed var(--line); border-radius: 10px; }
.adm-help { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.6; }

