/* HomeworkOS · 板块B 布置作业页样式（与编辑器同设计语言） */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  background: #171a22; color: #e8ecf4; display: flex; flex-direction: column;
}
.bc-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #e9eef7; }
.bc-link:hover { opacity: 0.85; }
.bc-brand { font-size: 14px; font-weight: 700; color: #e9eef7; }
.bc-version { font-size: 10px; color: #8a97ad; margin-left: 4px; font-weight: 400; }
.bc-sep { color: #5a6478; font-size: 14px; margin: 0 2px; }
.bc-current { font-size: 14px; font-weight: 600; color: #dce4f3; }
.back-from-students {
  margin-left: 10px;
  font-size: 12px !important;
  padding: 4px 10px !important;
  color: #c5d6ff !important;
  border-color: rgba(var(--accent-rgb, 91,140,255), 0.35) !important;
  background: rgba(var(--accent-rgb, 91,140,255), 0.12) !important;
}
.back-from-students:hover {
  background: rgba(var(--accent-rgb, 91,140,255), 0.22) !important;
}
/* 单行顶栏：品牌 | 翻页+Tab | 预览工具+导出 — 不另起第二行 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  min-height: 56px;
  padding: 8px 14px;
  background: #1f2430;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  z-index: 20;
  position: relative;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  flex: 0 1 auto; min-width: 0;
}
.brand-logo {
  width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.brand-title { font-size: 14px; font-weight: 700; }
.brand-sub { font-size: 11px; color: #95a0b5; }
.bc-current {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 7.5em;
}
/* 中间：仅三 Tab */
.topbar-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.top-actions {
  display: flex; align-items: center; gap: 6px;
  flex: 0 1 auto; flex-wrap: nowrap;
  justify-content: flex-end; min-width: 0;
}
/* 预览工具：翻页（模板左侧）| 模板 | 题目答案 — 同一行右侧 */
.preview-inline-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.preview-inline-tools.hidden { display: none !important; }
/* 翻页：共 N 页 + ◀ 第 M 页 ▶，放在模板左侧，正常尺寸好点 */
.page-nav-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 3px 8px 3px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
}
.page-nav-inline .page-nav-total {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-2);
  white-space: nowrap;
  padding-right: 4px;
  border-right: 1px solid rgba(255,255,255,0.1);
  margin-right: 2px;
}
.page-nav-inline .page-nav-btn {
  padding: 5px 10px;
  font-size: 12px;
  min-width: 32px;
}
.page-nav-inline .page-ind {
  min-width: 4.2em;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #e8ecf4;
  white-space: nowrap;
}
.preview-inline-tools .select-box-compact {
  min-width: 100px; max-width: 150px;
  padding: 5px 8px; font-size: 12px;
}
.preview-inline-tools .seg-group {
  display: inline-flex; gap: 2px;
  padding: 2px; background: #252b38;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
}
.preview-inline-tools .seg-group .tab-btn {
  padding: 5px 9px; font-size: 12px; border-radius: 6px;
  border: none; background: transparent; color: #a9b4c8; cursor: pointer;
}
.preview-inline-tools .seg-group .tab-btn:hover {
  color: #e8ecf4; background: rgba(255,255,255,0.06);
}
.preview-inline-tools .seg-group .tab-btn.active {
  background: var(--accent); color: #fff;
}
.preview-inline-tools .preview-sep {
  margin: 0 2px;
}
.sep { width: 1px; height: 20px; background: rgba(255,255,255,0.1); }
.tb-btn, .link-like {
  border: 1px solid rgba(255,255,255,0.12); background: #252b38; color: #dce4f3; border-radius: 8px;
  padding: 7px 10px; cursor: pointer; font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; flex-shrink: 0;
}
.tb-btn:hover, .link-like:hover { background: #2b3241; }
.tb-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.save-badge {
  font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap; font-weight: 600; flex-shrink: 0;
}
.save-badge[data-state="empty"] { color: #ff6b6b; background: rgba(255,107,107,0.15); border-color: rgba(255,107,107,0.35); }
.save-badge[data-state="saved"] { color: #5dd39e; background: rgba(93,211,158,0.15); border-color: rgba(93,211,158,0.35); }
.save-badge[data-state="exists"] { color: #ffb86b; background: rgba(255,184,107,0.12); border-color: rgba(255,184,107,0.35); }
.sidebar-save-area {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.sidebar-save-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.3); background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-2); border-radius: 8px; padding: 10px 14px; cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all 0.15s;
}
.sidebar-save-btn:hover { background: rgba(var(--accent-rgb), 0.2); color: #fff; }
.main { flex: 1; display: flex; min-height: 0; }
.sidebar { width: 260px; background: #1d222d; padding: 14px; overflow: auto; display: flex; flex-direction: column; }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
.left-sidebar { border-right: 1px solid rgba(255,255,255,0.08); }
.right-sidebar { border-left: 1px solid rgba(255,255,255,0.08); }
.sidebar-title { font-size: 12px; color: #97a5bc; margin-bottom: 12px; font-weight: 700; letter-spacing: .04em; }
.sidebar-section { margin-top: 18px; }
.sidebar-hint { color: #7f8aa0; font-size: 12px; line-height: 1.8; }
.sidebar-hint code { background: #252b38; padding: 1px 5px; border-radius: 4px; color: var(--accent-2); font-size: 11px; }
.sidebar-scroll { flex: 1; overflow-y: auto; }
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
.sidebar-footer { flex-shrink: 0; border-top: 1px solid rgba(255,255,255,0.06); padding: 8px 0 0; margin-top: 8px; }
.sidebar-footer-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 11px; color: #92a0b7; }
.sidebar-footer-row:last-child { margin-bottom: 0; }
.toolbar-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
/* 当前布置次数信息 */
.nth-info {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; margin-bottom: 12px;
  background: rgba(var(--accent-rgb), 0.08); border: 1px solid rgba(var(--accent-rgb), 0.15);
  border-radius: 8px; font-size: 12px;
}
.nth-label { color: #95a0b5; }
.nth-value { color: var(--accent-2); font-weight: 600; }
.nth-value b { color: var(--accent); font-size: 14px; }
.select-box {
  flex: 1; min-width: 120px; background: #161a22; color: #edf2fb;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 8px 10px; font-size: 12px;
}
.props-group { margin-bottom: 12px; }
.props-group label { display: block; font-size: 11px; color: #9aa6bc; margin-bottom: 6px; }
.props-group input, .props-group select {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);
  background: #141922; color: #edf2fb; font-size: 12px;
}
.props-group select { cursor: pointer; }
.props-group select option { background: #141922; color: #edf2fb; }
.bar-label { font-size: 12px; color: #a9b4c8; }
.bar-label b { color: var(--accent-2); }
.workspace { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.canvas-area {
  flex: 1; overflow: hidden; padding: 0; background: #12151c; position: relative;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 20px 20px;
}
.canvas-area.pan-ready { cursor: grab; }
.canvas-area.pan-ready:active { cursor: grabbing; }
.canvas-area.panning { cursor: grabbing !important; }
.canvas-area.hidden { display: none; }
/* 分段切换控件 */
.segment-toggle {
  display: inline-flex; position: relative;
  background: #252b38; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  padding: 2px; gap: 2px;
}
.segment-indicator {
  position: absolute; top: 2px; bottom: 2px; left: 2px;
  border-radius: 6px; background: var(--accent);
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), width 0.25s cubic-bezier(.4,0,.2,1);
  pointer-events: none; z-index: 0;
}
.segment-btn {
  position: relative; z-index: 1;
  border: none; background: transparent; color: #95a0b5;
  border-radius: 6px; padding: 6px 14px; cursor: pointer; font-size: 12px;
  transition: color 0.2s;
}
.segment-btn:hover { color: #dce4f3; }
.segment-btn.active { color: #fff; }
/* 保留 tab-btn 给右侧栏答案/题目切换用 */
.tab-btn {
  border: 1px solid rgba(255,255,255,0.1); background: #252b38; color: #95a0b5;
  border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 13px;
}
.tab-btn:hover { background: #2b3241; color: #dce4f3; }
.tab-btn.active { background: var(--accent); border-color: var(--accent); color: white; }
.tab-btn:disabled { opacity: 0.4; cursor: not-allowed; }
/* 作业库表格面板 */
.assign-table-wrap {
  flex: 1; overflow: auto; background: #12151c;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 20px 20px;
  padding-top: 16px;
}
.assign-table-wrap::-webkit-scrollbar { width: 6px; }
.assign-table-wrap::-webkit-scrollbar-track { background: transparent; }
.assign-table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
.assign-table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }
.assign-table-wrap { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }
.assign-table-wrap.hidden { display: none; }
/* 作业库工具栏 */
.assign-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px 12px;
}
.assign-toolbar-left { flex: 1; }
.assign-toolbar-right {
  margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.page-size-toolbar {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #9aa6bc; white-space: nowrap;
}
.page-size-toolbar .page-size-select {
  margin-left: 0; min-width: 64px;
}
.search-input {
  width: 100%; max-width: 320px;
  background: #1a1f2b; color: #edf2fb;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  padding: 10px 14px; font-size: 13px;
  transition: border-color 0.2s;
}
.search-input:focus {
  outline: none; border-color: rgba(var(--accent-rgb), 0.5);
  background: #1e2330;
}
.search-input::placeholder { color: #5a6580; }
.assign-search-wrap {
  flex: 1; display: flex; align-items: center; gap: 0;
  background: #1a1f2b; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  max-width: 360px; transition: border-color 0.2s;
}
.assign-search-wrap:focus-within {
  border-color: rgba(var(--accent-rgb), 0.5); background: #1e2330;
}
.assign-search-wrap .search-input {
  flex: 1; border: none; background: transparent; padding: 10px 14px;
  max-width: none; border-radius: 8px 0 0 8px;
}
.assign-search-wrap .search-input:focus { outline: none; background: transparent; border: none; box-shadow: none; }
.search-refresh-btn {
  border: none; background: transparent; color: #7a8599; cursor: pointer;
  padding: 8px 12px; font-size: 15px; border-radius: 0 8px 8px 0;
  transition: color 0.2s, background 0.2s; flex-shrink: 0;
}
.search-refresh-btn:hover { color: var(--accent-2); background: rgba(var(--accent-rgb), 0.08); }
.table-scroll { padding: 0 20px 24px; overflow-x: auto; }
.table-scroll::-webkit-scrollbar { height: 4px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
/* 作业库表格：表头/单元格统一字号与字重；纯文本略大，按钮保持原字号以免再显胖 */
.assign-table {
  width: 100%; border-collapse: collapse;
  font-size: 15px;
  font-weight: 400;
  color: #c4ccd9;
}
.assign-table th {
  text-align: left; padding: 12px 14px;
  color: #8b95a8;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.02);
}
.assign-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #c4ccd9;
  font-size: 15px;
  font-weight: 400;
  vertical-align: middle;
}
.assign-table tbody tr { transition: background 0.15s, box-shadow 0.15s; }
.assign-table tbody tr:hover { background: rgba(var(--accent-rgb), 0.08); }
/* 当前选中作业（预览后回列表仍保持）：框选 + 左侧色条，比纯底色更醒目 */
.assign-table tbody tr.row-current {
  background: rgba(var(--accent-rgb), 0.12);
  box-shadow:
    inset 3px 0 0 0 var(--accent, #5b8def),
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.45);
}
.assign-table tbody tr.row-current:hover {
  background: rgba(var(--accent-rgb), 0.16);
}
.row-current-mark {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  vertical-align: middle;
  color: #b8ccee;
  background: rgba(var(--accent-rgb), 0.22);
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  white-space: nowrap;
}
.assign-table .col-check {
  width: 40px; text-align: center; padding: 14px 8px;
}
.assign-table .col-check input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent, #5b8def);
}
.assign-table .col-id {
  color: #b0bacd;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.assign-table .col-title {
  max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 400; color: #d0d7e4; /* 略亮于正文，非纯白 */
}
.assign-table .col-domain {
  max-width: 120px; white-space: nowrap;
}
.assign-table .col-diff {
  white-space: nowrap; width: 72px;
}
.meta-inline-select {
  max-width: 100%;
  background: #1a1f2b;
  color: #c4ccd9;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
}
.meta-inline-select:hover,
.meta-inline-select:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
  outline: none;
}
.col-domain .meta-inline-select { color: #a8bdd9; min-width: 88px; }
.col-diff .meta-inline-select { min-width: 72px; color: #c4ccd9; }
.col-diff .meta-inline-select.diff-basic {
  color: #8fbfa0;
  border-color: rgba(120, 170, 140, 0.35);
  background: rgba(110, 160, 130, 0.08);
}
.col-diff .meta-inline-select.diff-mid {
  color: #c4a882;
  border-color: rgba(190, 150, 100, 0.35);
  background: rgba(190, 150, 100, 0.08);
}
.col-diff .meta-inline-select.diff-up {
  color: #c49090;
  border-color: rgba(180, 120, 120, 0.35);
  background: rgba(180, 120, 120, 0.08);
}
.assign-table .col-date {
  color: #7a8498; /* 次要信息：更暗，字号与表一致 */
  font-size: 15px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.assign-table .col-count {
  color: #c4ccd9; font-size: 15px; font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.assign-table .col-actions { white-space: nowrap; }
.assign-table .row-more {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  margin-left: 2px;
}
.assign-table .row-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 112px;
  background: #1f2430;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  z-index: 40;
  padding: 4px;
}
.assign-table .row-more-menu.hidden { display: none; }
.assign-table .row-more-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #dce4f3;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.assign-table .row-more-item:hover { background: rgba(255,255,255,0.06); }
.assign-table .row-more-item.danger { color: #ff8a8a; }
.assign-table .row-more-item.danger:hover { background: rgba(255,138,138,0.12); }
.assign-table .archive-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.4;
  color: #9aa6bd;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  vertical-align: middle;
}
.assign-table tr.row-archived .col-title { opacity: 0.92; }
a.sidebar-action-btn {
  text-decoration: none;
  text-align: center;
}
.student-status-toggle {
  display: flex;
  gap: 6px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}
.student-status-toggle .filter-chip {
  font-size: 11px;
  padding: 3px 10px;
}
.filter-label-archive { margin-left: 4px; }
.sidebar-save-btn.is-disabled-archive,
.sidebar-save-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.assign-table .row-btn {
  border: 1px solid rgba(255,255,255,0.1); background: #252b38; color: #c4ccd9;
  border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 13px;
  font-weight: 400;
  transition: all 0.15s; margin-right: 6px; text-decoration: none;
}
.assign-table .row-btn:last-child { margin-right: 0; }
.assign-table .row-btn:hover { background: #2b3241; transform: translateY(-1px); }
.assign-table .row-btn.edit,
.assign-table .row-btn.preview,
.assign-table .row-btn.answer,
.assign-table .row-btn.annotate,
.assign-table .row-btn.share,
.assign-table .row-btn.video.has-video,
.assign-table .row-btn.fix,
.assign-table .row-btn.retry,
.assign-table .row-btn.secondary {
  background: #252b38;
  border-color: rgba(255,255,255,0.1);
  color: #c4ccd9;
  font-weight: 400;
}
.assign-table .row-btn.edit:hover,
.assign-table .row-btn.preview:hover,
.assign-table .row-btn.answer:hover:not(:disabled),
.assign-table .row-btn.annotate:hover,
.assign-table .row-btn.share:hover,
.assign-table .row-btn.video.has-video:hover,
.assign-table .row-btn.fix:hover,
.assign-table .row-btn.retry:hover,
.assign-table .row-btn.secondary:hover {
  background: #2b3241;
  border-color: rgba(255,255,255,0.16);
  color: #d8deea;
}
.assign-table .row-btn.delete { color: #ff8a8a; border-color: rgba(255,138,138,0.2); }
.assign-table .row-btn.delete:hover { background: rgba(255,138,138,0.12); }

/* 作业筛选条：知识点 + 难度 同一行，少占纵向空间 */
.assign-filter-bar {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.12);
}
.filter-row-main {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.filter-label {
  font-size: 12px; color: #9aa6bc; font-weight: 700; flex-shrink: 0;
  white-space: nowrap;
}
.filter-label-diff { margin-left: 4px; }
.filter-chips {
  display: flex; flex-wrap: nowrap; gap: 6px; flex-shrink: 0;
}
.filter-chip {
  border: 1px solid rgba(255,255,255,0.14);
  background: #252b38; color: #d0d8e8;
  border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s;
}
.filter-chip:hover { background: #2b3241; }
.filter-chip.active {
  background: rgba(var(--accent-rgb), 0.28);
  border-color: rgba(var(--accent-rgb), 0.65);
  color: #fff;
}
/* 难度：低饱和区分（基础绿 / 中等橙 / 提升红） */
.filter-chip-diff-basic {
  color: #8fbfa0;
  border-color: rgba(120, 170, 140, 0.35);
}
.filter-chip-diff-basic.active {
  background: rgba(110, 160, 130, 0.22);
  border-color: rgba(110, 160, 130, 0.55);
  color: #b8dcc4;
}
.filter-chip-diff-mid {
  color: #c4a882;
  border-color: rgba(190, 150, 100, 0.35);
}
.filter-chip-diff-mid.active {
  background: rgba(190, 150, 100, 0.2);
  border-color: rgba(190, 150, 100, 0.55);
  color: #e0c9a4;
}
.filter-chip-diff-up {
  color: #c49090;
  border-color: rgba(180, 120, 120, 0.35);
}
.filter-chip-diff-up.active {
  background: rgba(180, 120, 120, 0.2);
  border-color: rgba(180, 120, 120, 0.55);
  color: #e0b0b0;
}
.filter-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #b0bacd; cursor: pointer; white-space: nowrap;
  flex-shrink: 0; margin-left: 4px;
}
.filter-check input { accent-color: var(--accent); width: 15px; height: 15px; }
#btnClearFilters {
  padding: 6px 12px; font-size: 12px; flex-shrink: 0; margin-left: auto;
}
.col-assign {
  width: 56px; text-align: center;
  font-size: 15px;
  color: #a0aabc;
  white-space: nowrap;
}
/* 布置人数：可点击查看名单 */
.assign-cell {
  display: inline-block;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 400;
  color: #a0aabc;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  padding: 2px 4px;
  border-radius: 4px;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}
.assign-cell:hover {
  background: rgba(255,255,255,0.06);
  color: #d0d8e8;
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* 该生已布置此作业：人数标红，点击查看名单 */
.assign-cell.is-assigned {
  color: #e07070;
  cursor: pointer;
}
.assign-cell.is-assigned:hover {
  color: #f09090;
  background: rgba(224,112,112,0.1);
}

/* 布置名单 popover */
.assign-students-pop {
  position: fixed;
  z-index: 1400;
  min-width: 200px;
  max-width: 280px;
  max-height: min(360px, 50vh);
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #1a2030;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  overflow: hidden;
}
.assign-students-pop .asp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.assign-students-pop .asp-title {
  font-size: 12px;
  font-weight: 700;
  color: #e0e6f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.assign-students-pop .asp-close {
  border: none;
  background: transparent;
  color: #8a97ad;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}
.assign-students-pop .asp-close:hover { color: #e0e6f0; background: rgba(255,255,255,0.06); }
.assign-students-pop .asp-body {
  overflow-y: auto;
  padding: 6px;
  min-height: 40px;
}
.assign-students-pop .asp-loading,
.assign-students-pop .asp-empty {
  font-size: 12px;
  color: #8a97ad;
  padding: 12px 8px;
  text-align: center;
}
.assign-students-pop .asp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.assign-students-pop .asp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.assign-students-pop .asp-item:hover { background: rgba(255,255,255,0.04); }
.assign-students-pop .asp-item.is-current {
  background: rgba(91,141,239,0.12);
  border: 1px solid rgba(91,141,239,0.25);
}
.assign-students-pop .asp-name {
  color: #e0e6f0;
  font-weight: 600;
  min-width: 0;
}
.assign-students-pop .asp-name em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  color: #7eb0ff;
  background: rgba(91,141,239,0.18);
  padding: 1px 5px;
  border-radius: 4px;
}
.assign-students-pop .asp-date {
  color: #7a8599;
  font-size: 11px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
/* 旧「已/未」胶囊已弃用，保留类名避免缓存样式报错 */
.student-assign-badge { display: none; }
.overlap-banner {
  margin-top: 8px; padding: 8px 12px; border-radius: 8px;
  font-size: 12px; line-height: 1.5;
  background: rgba(255,184,107,0.1); border: 1px solid rgba(255,184,107,0.35); color: #ffd19a;
}
.overlap-banner.danger {
  background: rgba(255,107,107,0.12); border-color: rgba(255,107,107,0.4); color: #ffb4b4;
}
.overlap-banner.ok {
  background: rgba(93,211,158,0.1); border-color: rgba(93,211,158,0.3); color: #9eecc8;
}
.overlap-banner.hidden { display: none; }
.overlap-banner b { font-weight: 700; }

/* 合并选中按钮 */
#btnMergeAssignments {
  white-space: nowrap; flex-shrink: 0;
  border-color: rgba(91,141,239,0.3); color: #5b8def;
}
#btnMergeAssignments:disabled {
  opacity: 0.4; cursor: not-allowed; color: #5a6580; border-color: rgba(255,255,255,0.06);
}
#btnMergeAssignments:not(:disabled):hover {
  background: rgba(91,141,239,0.12); border-color: rgba(91,141,239,0.5);
}

/* 合并模态框 */
.merge-list { list-style: none; padding: 0; margin: 8px 0; }
.merge-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px; background: #1a1f2b; margin-bottom: 6px;
  font-size: 14px; color: #e0e6f0;
}
.merge-list .merge-order { color: #5b8def; font-weight: 700; min-width: 20px; text-align: center; }
.merge-list .merge-info { flex: 1; }
.merge-list .merge-title { font-weight: 600; }
.merge-list .merge-count { color: #7a8599; font-size: 12px; margin-left: 8px; }
.merge-list .merge-arrow-btn {
  border: none; background: #252b38; color: #b8c4d9; border-radius: 6px;
  width: 28px; height: 28px; cursor: pointer; font-size: 14px; display: flex;
  align-items: center; justify-content: center; transition: background 0.15s;
}
.merge-list .merge-arrow-btn:hover { background: #2b3241; }
.merge-list .merge-arrow-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.merge-hint { color: #7a8599; font-size: 12px; margin-top: 8px; line-height: 1.6; }
.assign-table .row-btn.answer:disabled,
.assign-table .row-btn.video.no-video,
.assign-table .row-btn:disabled,
.assign-table .row-btn[aria-disabled="true"] {
  background: rgba(255,255,255,0.035);
  border-color: rgba(255,255,255,0.07);
  color: #6b7280;
  cursor: not-allowed;
  opacity: 1;
}
.assign-table .row-btn.video.no-video { cursor: pointer; }
.assign-table .row-btn.answer:disabled:hover,
.assign-table .row-btn.video.no-video:hover,
.assign-table .row-btn:disabled:hover,
.assign-table .row-btn[aria-disabled="true"]:hover {
  background: rgba(255,255,255,0.08);
  color: #95a0b5;
  transform: none;
}
#historyTable .row-btn.preview {
  background: rgba(93,211,158,0.08); border-color: rgba(93,211,158,0.25); color: #5dd39e;
}
#historyTable .row-btn.preview:hover { background: rgba(93,211,158,0.15); color: #7ee2b4; }
#historyTable .row-btn.annotate {
  background: rgba(192,132,252,0.08); border-color: rgba(192,132,252,0.25); color: #c084fc;
}
#historyTable .row-btn.annotate:hover { background: rgba(192,132,252,0.15); color: #d8b4fe; }

/* ── 视频存储管理 ── */
.storage-toolbar {
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.storage-title-wrap { flex: 1; min-width: 280px; }
.storage-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.storage-subtitle { font-size: 12px; color: #7a8599; line-height: 1.6; }
.storage-subtitle code { color: #ffb86b; background: rgba(255,184,107,0.08); padding: 1px 5px; border-radius: 4px; }
.storage-toolbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.storage-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  padding: 0 20px 18px;
}
.storage-card {
  background: rgba(26,31,43,0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}
.storage-card.warning { border-color: rgba(255,184,107,0.35); background: rgba(255,184,107,0.08); }
.storage-card-label { font-size: 12px; color: #8a96b0; margin-bottom: 8px; }
.storage-card-value { font-size: 24px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.storage-card-hint { font-size: 12px; color: #6b7280; margin-top: 6px; }
.storage-section {
  margin: 0 20px 22px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  background: rgba(18,21,28,0.72);
  overflow: hidden;
}
.storage-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.storage-section-title { font-size: 15px; font-weight: 800; color: #fff; margin-right: 10px; }
.storage-muted { font-size: 12px; color: #7a8599; }
.storage-key {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'SF Mono', 'Consolas', monospace;
  color: #b8c4d9;
  font-size: 12px;
}
.storage-badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}
.storage-badge.ok { color: #5dd39e; background: rgba(93,211,158,0.08); border-color: rgba(93,211,158,0.22); }
.storage-badge.orphan { color: #ffb86b; background: rgba(255,184,107,0.08); border-color: rgba(255,184,107,0.22); }
.storage-badge.missing { color: #ff8a8a; background: rgba(255,138,138,0.08); border-color: rgba(255,138,138,0.22); }
.storage-table th, .storage-table td { font-size: 13px; }
.storage-table .col-actions { min-width: 280px; }
.storage-cloud-status {
  margin: 0 20px 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(26,31,43,0.72);
  color: #dce4f3;
  line-height: 1.6;
}
.storage-cloud-status.ok { border-color: rgba(93,211,158,0.28); background: rgba(93,211,158,0.07); }
.storage-cloud-status.error { border-color: rgba(255,138,138,0.28); background: rgba(255,138,138,0.07); }
.storage-badge.cloud { color: #7dd3fc; background: rgba(125,211,252,0.08); border-color: rgba(125,211,252,0.22); }
.storage-migration-result { max-height: 220px; overflow:auto; font-size:12px; }
.storage-threshold-label { display:inline-flex; align-items:center; gap:6px; color:#95a0b5; font-size:12px; }
.storage-threshold-label select { background:#141922; border:1px solid rgba(255,255,255,0.1); color:#edf2fb; border-radius:6px; padding:6px 8px; font-size:12px; cursor:pointer; }
@media (max-width: 1100px) { .storage-summary-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); } }
.storage-backend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
  padding: 0 20px 18px;
}
.storage-cloud-status[hidden] { display: none; }
.storage-backend-card {
  position: relative;
  overflow: hidden;
  background: rgba(26,31,43,0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.14);
}
.storage-backend-card::before {
  content: none;
}
.storage-backend-card.ok { border-color: rgba(93,211,158,0.22); }
.storage-backend-card.warning { border-color: rgba(255,184,107,0.34); background: rgba(36,31,24,0.9); }
.storage-backend-card.error { border-color: rgba(255,138,138,0.34); background: rgba(38,25,29,0.9); }
.storage-backend-card-top { display:flex; align-items:center; gap:12px; margin-bottom:14px; position:relative; }
.storage-backend-logo {
  width:44px; height:44px;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.storage-backend-logo.local { color:#7dd3fc; }
.storage-backend-logo.cos { background: transparent; }
.storage-backend-logo-img { width:34px; height:34px; object-fit:contain; display:block; }
.storage-backend-logo-svg { width:34px; height:34px; display:block; }
.storage-status-icon { width:14px; height:14px; display:inline-block; vertical-align:-2px; margin-right:4px; }
.storage-backend-title-block { flex:1; min-width:0; }
.storage-backend-name { font-size:17px; font-weight:850; color:#fff; display:flex; align-items:center; gap:8px; }
.storage-default-pill {
  display:inline-flex; align-items:center; padding:2px 7px; border-radius:999px;
  font-size:11px; font-weight:700; color:#7dd3fc;
  background:rgba(125,211,252,0.1); border:1px solid rgba(125,211,252,0.22);
}
.storage-backend-meta { font-size:12px; color:#8a96b0; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.storage-backend-main { display:grid; grid-template-columns:88px 1fr; gap:12px; align-items:center; position:relative; }
.storage-backend-metrics { min-width:0; }
.storage-capacity-ring {
  --pct: 0;
  width:86px; height:86px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: conic-gradient(#5dd39e calc(var(--pct) * 1%), rgba(255,255,255,0.08) 0);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.storage-capacity-ring.warning { background: conic-gradient(#ffb86b calc(var(--pct) * 1%), rgba(255,255,255,0.08) 0); }
.storage-capacity-ring.error { background: conic-gradient(#ff6b6b calc(var(--pct) * 1%), rgba(255,255,255,0.08) 0); }
.storage-capacity-ring.neutral { background: conic-gradient(rgba(125,211,252,0.35) 12%, rgba(255,255,255,0.08) 0); }
.storage-capacity-ring-inner {
  width:64px; height:64px; border-radius:50%;
  background:#171b25;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; border:1px solid rgba(255,255,255,0.08);
}
.storage-capacity-ring-inner b { color:#fff; font-size:16px; line-height:1; }
.storage-capacity-ring-inner span { color:#8a96b0; font-size:9px; margin-top:4px; max-width:56px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.storage-stat-row { display:grid; grid-template-columns:72px minmax(0,1fr); align-items:center; gap:8px; font-size:11px; color:#95a0b5; margin:4px 0; }
.storage-stat-row b { color:#e8ecf4; font-size:12px; text-align:left; font-variant-numeric: tabular-nums; }
.storage-quota-bar { height:8px; background:rgba(255,255,255,0.08); border-radius:999px; overflow:hidden; margin-top:10px; }
.storage-quota-fill { height:100%; border-radius:999px; transition:width .2s ease; }
.storage-quota-fill.ok { background:#5dd39e; }
.storage-quota-fill.warning { background:#ffb86b; }
.storage-quota-fill.error { background:#ff6b6b; }
.storage-quota-text { margin-top:6px; font-size:12px; color:#7a8599; }
.storage-badge.warning { color:#ffb86b; background:rgba(255,184,107,0.08); border-color:rgba(255,184,107,0.22); }
.storage-badge.error { color:#ff8a8a; background:rgba(255,138,138,0.08); border-color:rgba(255,138,138,0.22); }
.storage-badge.running { color:#7dd3fc; background:rgba(125,211,252,0.08); border-color:rgba(125,211,252,0.22); }
.storage-badge.skipped { color:#a8b3c7; background:rgba(255,255,255,0.05); }
.storage-exception-actions { display:flex; gap:6px; flex-wrap:wrap; }
@media (max-width: 1280px) { .storage-backend-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); } }
@media (max-width: 720px) { .storage-backend-grid { grid-template-columns: 1fr; } }

.quota-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(560px, calc(90vw - 64px));
  max-width: 100%;
}
.quota-field { min-width:0; }
.quota-field label { display:block; font-size:11px; color:#9aa6bc; margin-bottom:6px; }
.quota-field-head { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.quota-field-head .storage-backend-logo-img,
.quota-field-head .storage-backend-logo-svg { width:20px; height:20px; }
.quota-field-head .storage-backend-logo { width:22px; height:22px; }
.quota-form-grid input { width: 100%; box-sizing: border-box; background:#141922; color:#edf2fb; border:1px solid rgba(255,255,255,0.1); border-radius:8px; padding:8px 10px; font-size:12px; }
@media (max-width: 640px) { .quota-form-grid { grid-template-columns: 1fr; width: min(420px, calc(90vw - 48px)); } }

/* 分页控件 */
.pagination-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap; gap: 12px;
}
.pagination-info { font-size: 13px; color: #8a96b0; }
.pagination-controls { display: flex; align-items: center; gap: 6px; }
.page-btn {
  min-width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.1); background: #252b38; color: #dce4f3;
  border-radius: 6px; cursor: pointer; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.page-btn:hover:not(:disabled) { background: #2b3241; border-color: rgba(255,255,255,0.2); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-ellipsis { color: #8a96b0; font-size: 14px; padding: 0 4px; }
.page-size-select {
  background: #252b38; color: #dce4f3; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 6px 10px; font-size: 12px; cursor: pointer;
  margin-left: 8px;
}
.page-size-select:focus { outline: none; border-color: rgba(var(--accent-rgb), 0.5); }
.canvas-wrap {
  width: 794px; height: 1123px; position: absolute; top: 0; left: 0;
  transform-origin: 0 0;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45); background: white;
}
#bgCanvas { display: block; border-radius: 4px; }
/* 答案视图：叠在画布上的菁优原题链（随 canvas-wrap 缩放/平移） */
.jyeoo-links-layer {
  position: absolute;
  left: 0; top: 0;
  width: 794px; height: 1123px;
  pointer-events: none;
  z-index: 8;
  display: none;
}
.assign-jyeoo-link {
  position: absolute;
  pointer-events: auto;
  z-index: 9;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: #0369a1;
  background: rgba(224, 242, 254, 0.95);
  border: 1px solid rgba(14, 165, 233, 0.55);
  border-radius: 6px;
  padding: 2px 8px;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.assign-jyeoo-link:hover {
  background: #bae6fd;
  border-color: #0284c7;
  color: #0c4a6e;
  transform: translateY(-1px);
}
.statusbar {
  min-height: 34px; display: flex; align-items: center; gap: 18px; padding: 0 16px;
  background: #1f2430; border-top: 1px solid rgba(255,255,255,0.08); color: #92a0b7; font-size: 12px;
}
/* 后端状态指示灯 */
.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; background: #95a0b5; vertical-align: middle;
  transition: background 0.2s, box-shadow 0.2s;
}
.status-dot.ok { background: #5dd39e; box-shadow: 0 0 6px rgba(93,211,158,0.5); }
.status-dot.err { background: #ff6b6b; box-shadow: 0 0 6px rgba(255,107,107,0.5); }
.toast-wrap { position: absolute; left: 18px; top: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 999; pointer-events: none; }
.toast {
  border-radius: 10px; padding: 10px 14px; max-width: 360px;
  font-size: 13px; font-weight: 500; pointer-events: auto; animation: toastIn 0.25s ease;
  background: linear-gradient(135deg, #252a20 0%, #1e2218 100%); border: 1px solid rgba(93,211,158,0.35); color: #a8f0c8;
  box-shadow: 0 4px 16px rgba(93,211,158,0.12);
}
.toast.toast-error {
  background: linear-gradient(135deg, #2a2020 0%, #221818 100%); border: 1px solid rgba(255,107,107,0.4); color: #ffb4b4;
  box-shadow: 0 4px 16px rgba(255,107,107,0.12);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
/* .measure-div 已统一迁移到 public/common/fonts.css */
.list-panel { border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; background: #181d27; padding: 10px; min-height: 80px; }
.list-item { padding: 10px; border-radius: 8px; background: #222938; border: 1px solid rgba(255,255,255,0.06); margin-bottom: 8px; font-size: 12px; }
.list-item:last-child { margin-bottom: 0; }
.empty-text { color: #7f8aa0; font-size: 12px; line-height: 1.7; }
.var-panel { font-size: 12px; line-height: 1.9; }
.var-panel .var-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px dashed rgba(255,255,255,0.06); }
.var-panel .var-label { color: #7f8aa0; font-size: 11px; flex-shrink: 0; width: 72px; }
.var-panel .var-key { color: var(--accent-2); font-family: var(--font-mono); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.var-panel .var-val { color: #e8edf8; font-weight: 600; flex-shrink: 0; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.hidden { display: none !important; }
/* 窄屏：压缩文案，仍保持单行 */
@media (max-width: 1180px) {
  .bc-brand, .bc-version, .bc-sep, .bc-current { display: none; }
  .top-actions .tb-btn { padding: 6px 8px; font-size: 11px; }
  .preview-inline-tools .seg-group .tab-btn { padding: 4px 7px; font-size: 11px; }
  .segment-btn { padding: 6px 10px; font-size: 11px; }
}
@media (max-width: 900px) {
  .btnOpenStorage,
  #btnOpenStorage { display: none; }
}
.tb-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tb-btn.danger { color: #ffb4b4; border-color: rgba(255,180,180,0.3); }
.tb-btn.danger:hover:not(:disabled) { background: rgba(255,180,180,0.12); }
/* DPI 选择器 */
.dpi-group { display: inline-flex; gap: 2px; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; overflow: hidden; }
.dpi-btn {
  border: none; background: transparent; color: #95a0b5; cursor: pointer; font-size: 11px;
  padding: 5px 10px; font-family: var(--font-mono);
}
.dpi-btn:hover { background: #252b38; color: #dce4f3; }
.dpi-btn.active { background: var(--accent); color: #fff; }
/* ── Zoom controls ── */
.zoom-controls {
  display: flex; align-items: center; gap: 2px;
  background: #252b38; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 1px;
}
.zoom-btn {
  width: 22px; height: 20px;
  border: none; background: transparent;
  color: #dce4f3; cursor: pointer;
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
}
.zoom-btn:hover { background: rgba(255,255,255,0.08); }
.zoom-pct {
  font-size: 11px; color: #b8c4d9;
  min-width: 36px; text-align: center;
  user-select: none; cursor: pointer;
}
/* 可折叠区域 */
.collapse-toggle {
  border: 1px dashed rgba(255,255,255,0.1); background: transparent; color: #7f8aa0;
  border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 12px; text-align: left;
}
.collapse-toggle:hover { background: #252b38; color: #dce4f3; }
.collapse-toggle.expanded { border-style: solid; border-color: rgba(var(--accent-rgb), 0.25); color: var(--accent-2); }
.collapse-body { margin-top: 10px; }
.collapse-body.hidden { display: none; }
/* 可点击的历史记录项 */
.history-item { cursor: pointer; }
.history-item:hover { background: rgba(var(--accent-rgb), 0.08); }
/* 自定义模态弹窗 */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: #1f2430; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
  padding: 24px; max-width: 440px; width: 90%; box-shadow: 0 18px 50px rgba(0,0,0,0.45);
}
.modal-title { font-size: 15px; font-weight: 700; color: #e8ecf4; margin-bottom: 16px; }
.modal-body { font-size: 13px; color: #bcc5d6; line-height: 1.7; margin-bottom: 20px; }
.modal-body textarea, .modal-body input {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12);
  background: #141922; color: #edf2fb; font-size: 13px; margin-top: 8px; resize: vertical;
}
.modal-body textarea { min-height: 100px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-actions .modal-btn {
  border: 1px solid rgba(255,255,255,0.12); background: #252b38; color: #dce4f3; border-radius: 8px;
  padding: 8px 16px; cursor: pointer; font-size: 12px;
}
.modal-actions .modal-btn:hover { background: #2b3241; }
.modal-actions .modal-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.modal-actions .modal-btn.primary:hover { background: var(--accent-dark); }
.modal-actions .modal-btn.danger { color: #ffb4b4; border-color: rgba(255,180,180,0.3); }
.modal-actions .modal-btn.danger:hover { background: rgba(255,180,180,0.12); }

.share-qr-modal .modal-box { max-width: 380px; }
.share-qr-body {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin: 2px 0 18px; text-align: center;
}
.share-qr-img {
  width: 200px; height: 200px; border-radius: 12px;
  background: #fff; padding: 10px; box-shadow: 0 10px 28px rgba(0,0,0,0.24);
}
.share-qr-url {
  width: 100%; color: #9aa6bc; font-size: 12px; line-height: 1.5;
  word-break: break-all; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 8px 10px;
}

.share-bubble {
  position: fixed; z-index: 1200;
  min-width: 124px; max-width: min(260px, calc(100vw - 16px));
  padding: 9px 12px; border-radius: 12px;
  background: rgba(23, 28, 38, 0.96); color: #edf2fb;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 14px 34px rgba(0,0,0,0.36);
  text-align: center; font-size: 12px; line-height: 1.45;
  pointer-events: none; animation: shareBubbleIn 0.18s ease-out;
}
.share-bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -6px;
  width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg);
  background: rgba(23, 28, 38, 0.96);
  border-right: 1px solid rgba(255,255,255,0.14);
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.share-bubble.has-qr { width: 188px; padding: 12px; }
.share-bubble-qr {
  width: 148px; height: 148px; border-radius: 10px;
  background: #fff; padding: 8px; margin-bottom: 8px;
}
.share-bubble-text { color: #dce4f3; font-weight: 600; }
.share-bubble-url {
  margin-top: 6px; color: #8d98ad; font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.share-bubble.is-leaving { opacity: 0; transform: translateY(4px); transition: opacity 0.22s ease, transform 0.22s ease; }
@keyframes shareBubbleIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* 视频播放弹窗（大尺寸 modal） */
.video-player-overlay.hidden { display: none; }
.video-player-box {
  min-width: min(720px, 90vw);
  max-width: min(900px, 92vw);
}
.modal-btn.primary {
  text-decoration: none; display: inline-flex; align-items: center;
}
/* 导出 loading 遮罩 */
.export-loading-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.3s;
}
.export-loading-overlay.closing { opacity: 0; pointer-events: none; }
.export-loading-box {
  background: #1f2430; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
  padding: 32px 40px; min-width: 260px; text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
}
.export-loading-box .spinner {
  width: 36px; height: 36px; border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent); border-radius: 50%;
  animation: export-spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes export-spin { to { transform: rotate(360deg); } }
.export-loading-box .export-loading-text {
  font-size: 14px; color: #e8ecf4; margin-bottom: 12px;
}
.export-loading-box .export-progress-bar {
  height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); overflow: hidden;
}
.export-loading-box .export-progress-fill {
  height: 100%; border-radius: 2px; background: var(--accent);
  width: 0%; transition: width 0.3s;
}
/* ── 左侧栏：最近历史列表 ── */
.sidebar-history-section { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sidebar-history-list {
  flex: 1; overflow-y: auto; min-height: 60px;
}
.sidebar-history-list::-webkit-scrollbar { width: 3px; }
.sidebar-history-list::-webkit-scrollbar-track { background: transparent; }
.sidebar-history-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.sidebar-history-item {
  padding: 10px 12px; border-radius: 8px; margin-bottom: 6px;
  background: #222938; border: 1px solid rgba(255,255,255,0.04);
  cursor: pointer; transition: all 0.15s; font-size: 12px;
  display: flex; align-items: center; gap: 8px;
}
.sidebar-history-item:hover { background: rgba(var(--accent-rgb), 0.1); border-color: rgba(var(--accent-rgb), 0.15); }
.sidebar-history-item .sh-main {
  flex: 1; min-width: 0;
}
.sidebar-history-item .sh-title {
  color: #e0e6f0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-history-item .sh-meta {
  color: #7a8599; font-size: 11px; margin-top: 3px;
}
/* 最近布置：默认批注 + 下拉快捷跳转（答案/视频/编辑） */
.sidebar-history-item .sh-jump-wrap {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: stretch;
  border-radius: 6px;
  border: 1px solid rgba(192,132,252,0.25);
  background: rgba(192,132,252,0.08);
  overflow: visible;
}
.sidebar-history-item .sh-jump-main,
.sidebar-history-item .sh-jump-toggle {
  border: none;
  background: transparent;
  color: #c084fc;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.2;
  transition: background 0.15s, color 0.15s;
  padding: 4px 6px;
}
.sidebar-history-item .sh-jump-main {
  padding-left: 8px;
  padding-right: 6px;
  border-radius: 5px 0 0 5px;
  white-space: nowrap;
}
.sidebar-history-item .sh-jump-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-left: 1px solid rgba(192,132,252,0.2);
  border-radius: 0 5px 5px 0;
  color: #b894e8;
  min-width: 22px;
}
/* 小三角：提示可展开，悬停即出菜单 */
.sh-jump-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.85;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.sh-jump-wrap.open .sh-jump-caret {
  transform: rotate(180deg);
  opacity: 1;
}
.sidebar-history-item .sh-jump-main:hover,
.sidebar-history-item .sh-jump-toggle:hover,
.sidebar-history-item .sh-jump-wrap.open .sh-jump-toggle {
  background: rgba(192,132,252,0.18);
  color: #d8b4fe;
}
.sidebar-history-item .sh-jump-wrap:hover,
.sidebar-history-item .sh-jump-wrap.open {
  border-color: rgba(192,132,252,0.4);
  background: rgba(192,132,252,0.12);
}
/* 菜单用 JS fixed 定位，避免被侧栏 overflow / 上方区块裁切 */
.sidebar-history-item .sh-jump-menu,
.history-actions .sh-jump-menu {
  display: none;
  position: fixed;
  z-index: 1300;
  min-width: 120px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #1a2030;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  overflow-y: auto;
  /* 上方透明桥接，悬停从按钮移到菜单不易闪断 */
  margin-top: 0;
}
.sidebar-history-item .sh-jump-wrap.open .sh-jump-menu,
.history-actions .sh-jump-wrap.open .sh-jump-menu {
  display: block;
}
.sidebar-history-item .sh-jump-item,
.history-actions .sh-jump-item {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  color: #c8d0e0;
  text-align: left;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.sidebar-history-item .sh-jump-item:hover:not(:disabled),
.history-actions .sh-jump-item:hover:not(:disabled) {
  background: rgba(192,132,252,0.14);
  color: #e9d5ff;
}
.sidebar-history-item .sh-jump-item.is-disabled,
.sidebar-history-item .sh-jump-item:disabled,
.history-actions .sh-jump-item.is-disabled,
.history-actions .sh-jump-item:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  color: #7a8599;
}
/* 资产状态点：有答 / 有视频（有=点亮，无=灰；不再用黄标「过期」） */
.sh-asset-dots {
  display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle;
}
.sh-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 3px; border-radius: 4px;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.sh-dot-answer { background: rgba(96,165,250,0.18); color: #93c5fd; }
.sh-dot-video  { background: rgba(52,211,153,0.16); color: #6ee7b7; }
.sh-dot-muted  { background: rgba(255,255,255,0.05); color: #5a6478; }
/* 完整历史表内联 jump 菜单 */
.history-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  justify-content: flex-end;
}
.history-actions .sh-jump-wrap.sh-jump-inline {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid rgba(192,132,252,0.25);
  background: rgba(192,132,252,0.08);
  overflow: visible;
}
.history-actions .sh-jump-main,
.history-actions .sh-jump-toggle {
  border: none;
  background: transparent;
  color: #c084fc;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.2;
  padding: 4px 8px;
  white-space: nowrap;
}
.history-actions .sh-jump-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(192,132,252,0.2);
  color: #b894e8;
  min-width: 22px;
  padding: 4px 7px;
}
.history-actions .sh-jump-main:hover,
.history-actions .sh-jump-toggle:hover,
.history-actions .sh-jump-wrap.open .sh-jump-toggle {
  background: rgba(192,132,252,0.18);
  color: #d8b4fe;
}
.sidebar-more-btn {
  width: 100%; border: 1px solid rgba(var(--accent-rgb), 0.2); background: rgba(var(--accent-rgb), 0.06);
  color: var(--accent-2); border-radius: 8px; padding: 8px; cursor: pointer; font-size: 12px;
  margin-top: 8px; transition: all 0.15s;
}
.sidebar-more-btn:hover { background: rgba(var(--accent-rgb), 0.12); }
.sidebar-action-row { display: flex; gap: 8px; margin-bottom: 12px; }
.sidebar-action-btn {
  flex: 1; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04);
  color: #95a0b5; border-radius: 8px; padding: 8px 10px; cursor: pointer;
  font-size: 12px; transition: all 0.15s; text-align: center;
}
.sidebar-action-btn:hover { background: rgba(var(--accent-rgb), 0.1); color: #b8c4d9; border-color: rgba(var(--accent-rgb), 0.2); }
.sidebar-action-btn.active { background: rgba(var(--accent-rgb), 0.15); color: var(--accent-2); border-color: rgba(var(--accent-rgb), 0.3); font-weight: 600; }
.sidebar-bottom {
  margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06);
}
/* ── 学生面板 ── */
.student-form-wrap {
  padding: 16px 20px; margin: 0 20px; background: rgba(255,255,255,0.02);
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);
}
.edit-avatar-row {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.edit-avatar-actions { display: flex; gap: 6px; }
.props-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.props-grid .props-group { margin-bottom: 0; }
/* 学生历史表格（与作业库表格同一套字号/颜色） */
#historyTable .col-h-assign { min-width: 200px; }
#historyTable .col-h-nth { text-align: center; width: 60px; }
#historyTable td { padding: 14px 14px; font-size: 15px; color: #c4ccd9; }
#historyTable th { padding: 12px 14px; font-size: 15px; font-weight: 500; color: #8b95a8; }
