/* ===== theme-bundle source: style.css (cascade order preserved) ===== */
/* ============================================
   排课管理系统 - 全局样式
   ============================================ */

/* =============================================================================
   ⚠️ 本文件不再定义任何 CSS 令牌（#1172）
   -----------------------------------------------------------------------------
   全站 :root 令牌的唯一权威是 css/design-system.css，它排在本文件之后加载，
   因此同名变量本来就由它说了算 —— 这里再写一份纯属第二个真相来源。

   历史问题：两套 :root 并存，15 个变量取值冲突（--radius 12 vs 14、
   --accent #06b6d4 vs #0891b2、--shadow-glow 两种完全不同的实现……）。
   改一处忘一处，风格必然分裂。现已全部收敛。

   为什么这里一个都不留：
     design-system.css 是旧令牌的**完备超集** —— 本文件原有 33 个令牌
     全部已在其中，包括 3 个本文件独有的 --sidebar-width / --sidebar-collapsed
     / --font-family，都已迁入。留「旧备份」只会制造新的分叉。

   防塌兜底：
     本文件对 3 个**布局级**令牌的使用点全部写成 var(--x, 兜底值)。
     万一 design-system.css 加载失败（404 / 漏进部署白名单），侧边栏宽度
     与字体仍成立，不会退化成 width:auto 或浏览器默认字体。
     纯颜色 / 阴影 / 圆角类令牌不兜底 —— 那种情况下裸底色是可接受的降级。

   判据工具：python _audit_tokens.py → 期望 TOKEN_AUDIT_OK
   ============================================================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    /* #1172：令牌迁至 design-system.css，此处保留兜底值防加载失败 */
    font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif);
    background: var(--bg-page);
    color: var(--text);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    font-feature-settings: 'cv11', 'ss01';
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ===== 侧边栏（精致深色 + 线性图标） ===== */
.sidebar {
    width: var(--sidebar-width, 244px);   /* #1172 兜底：令牌加载失败时仍是 244px */
    background: var(--bg-sidebar-grad);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    transition: width 0.28s var(--transition);
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 1px 0 0 rgba(255,255,255,0.04), 8px 0 30px rgba(15,23,42,0.18);
}

.sidebar.collapsed { width: var(--sidebar-collapsed, 72px); }   /* #1172 兜底 */

.sidebar.collapsed .nav-item > span,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-footer > span:not(.status-indicator) { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 13px; gap: 0; }

/* 品牌区 */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-mark {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    color: #fff;
    font-size: 20px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(99,102,241,0.45);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.brand-name { font-size: 15px; font-weight: 700; color: #f8fafc; white-space: nowrap; letter-spacing: 0.3px; }
.brand-sub { font-size: 11px; color: var(--text-sidebar-dim); white-space: nowrap; }

.sidebar-nav {
    flex: 1;
    padding: 14px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: var(--radius-xs); }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-sidebar-dim);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}
.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #f1f5f9;
}
.nav-item.active {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 6px 16px rgba(99,102,241,0.32);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 56%;
    background: #fff;
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;   /* #1174 */
}
.nav-item.active .nav-icon { filter: drop-shadow(0 0 6px rgba(255,255,255,0.5)); }

.nav-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
    transition: filter var(--transition);
}

/* 侧边栏底部：任务选择 + 状态 */
.sidebar-footer {
    padding: 14px 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.task-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.task-select-icon { position: absolute; left: 10px; color: var(--text-sidebar-dim); pointer-events: none; }
#task-selector {
    width: 100%;
    padding: 9px 10px 9px 32px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all var(--transition);
}
#task-selector:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.1); }
#task-selector:focus { outline: none; border-color: var(--primary-light); }
#task-selector option { background: #1e293b; color: #e2e8f0; }

/* #1335-B 多校区：顶栏校区切换器（样式对齐任务选择器） */
.school-switcher-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.school-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-light); margin-right: 7px; flex: none; }
.school-select {
    padding: 8px 10px 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all var(--transition);
}
.school-select:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.1); }
.school-select:focus { outline: none; border-color: var(--primary-light); }
.school-select option { background: #1e293b; color: #e2e8f0; }

.status-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-sidebar-dim);
    padding-left: 2px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px rgba(16,185,129,0.6); flex-shrink: 0; }
.status-ok { color: var(--success); }
.status-busy { color: var(--warning); }
.status-busy .status-dot { background: var(--warning); box-shadow: 0 0 8px rgba(245,158,11,0.6); }
.status-error { color: var(--danger); }
.status-error .status-dot { background: var(--danger); box-shadow: 0 0 8px rgba(239,68,68,0.6); }

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    background: var(--bg-page);
    position: relative;
}
.main-content::before {
    content: '';
    position: fixed;
    top: -80px; right: -80px;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.main-content > * { position: relative; z-index: 1; }

/* ===== 页面通用 ===== */
.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    margin-bottom: 4px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.2px;
}

.page-header p {
    color: var(--text-light);
    font-size: 14px;
}

/* ===== 卡片 ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ===== 统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--border-light);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.6;
    transition: opacity var(--transition);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-card:hover::before { opacity: 1; }

.stat-card .stat-value {
    font-size: 34px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.stat-card .stat-label {
    color: var(--text-light);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

/* ===== 按钮（渐变+阴影） ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-success { background: var(--success); color: white; box-shadow: 0 4px 12px rgba(16,185,129,0.25); }
.btn-success:hover { transform: translateY(-1px); opacity: 0.95; }

.btn-warning { background: var(--warning); color: white; box-shadow: 0 4px 12px rgba(245,158,11,0.25); }
.btn-warning:hover { transform: translateY(-1px); opacity: 0.95; }

.btn-danger { background: var(--danger); color: white; box-shadow: 0 4px 12px rgba(239,68,68,0.25); }
.btn-danger:hover { transform: translateY(-1px); opacity: 0.95; }

.btn-outline {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { background: white; border-color: var(--primary-light); color: var(--primary); }
/* 方案 A 视图增强：课表查看页开关按钮的「激活」态（按班级色块 / 特殊课程标签） */
.btn.active { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; box-shadow: 0 1px 3px rgba(79,70,229,0.35); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 28px; font-size: 16px; border-radius: var(--radius-md); }

/* #849 一键修复 · 走班模式长耗时状态 */
/* 走班任务由标准引擎自动进入走班模式深度优化，主 SA 66s + 多轮收尾链，进度常长时间停在前期百分比；
   加紫色脉冲边框提示「仍在跑」，避免用户误判卡死而重复点击。 */
#rb-autofix-btn.autofix-v5 {
  background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
  color: #fff !important;
  border: none !important;
}
#rb-autofix-btn.autofix-stuck {
  animation: autofixStuckPulse 1.2s ease-in-out infinite;
}
@keyframes autofixStuckPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(124, 58, 237, 0); }
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== 表格 ===== */
.table-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0.3px;
}

tr { transition: background var(--transition); }
tbody tr:hover { background: rgba(99,102,241,0.04); }

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-light);
}

.form-control {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: rgba(255,255,255,0.8);
    transition: all var(--transition);
    font-family: inherit;
}
.form-control:hover { border-color: var(--primary-light); }

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: white;
}

select.form-control {
    cursor: pointer;
}

/* ===== #1586（2026-10-25）补历史别名类：此前 CSS 里完全没有定义 ===== */
/* `.input` / `.input-sm` 被 34 处表单控件使用（考试编排、值日、个人资料改密、
   AI 诊断反馈、看图关注点…），但只有 `.form-control` / `.form-input` 有样式
   ⇒ 这些控件一直渲染成浏览器原生 input/select，与全站视觉割裂、高度参差。
   按 .form-control 规格补齐；width 保持 auto，由内联样式或父容器负责铺满。 */
.input {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    color: inherit;
    background: rgba(255, 255, 255, 0.8);
    transition: all var(--transition);
}
.input:hover { border-color: var(--primary-light); }
.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
}
.input[disabled], .input:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
select.input { cursor: pointer; }
/* 小尺寸（表格内联编辑、编排行、值日行）——必须排在上面之后才能覆盖 padding/font */
.input-sm { padding: 5px 10px; font-size: 13px; border-radius: var(--radius-sm); }

/* 只读展示框（系统「运行时配置」弹窗）：此前无样式，只剩一行「—」没有框 */
.rt-readonly {
    padding: 8px 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    word-break: break-all;
}
/* label 包 checkbox 的横向对齐 */
.checkbox { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
/* 宽表兜底横向滚动（11 处使用，部分靠内联 overflow，这里统一兜住） */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 未指定 class 的原生 select（如教师课表筛选 #ttv-grade / #ttv-class）也统一外观，
   避免出现浏览器默认灰色立体控件 */
select:not([class]) {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-row-inline { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.form-row-inline label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.form-row-inline input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

/* ===== 标签页 ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab:hover { color: var(--text); }
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* ===== 课表样式 ===== */

/* 手动调课课表区域：微深背景让科目色更突出 */
#adjust-grid {
    background: #1e1e2e;
    border-color: #2a2a3c;
}
#adjust-grid .timetable-cell.header {
    background: linear-gradient(135deg, #3b3b5c, #2d2d44);
    color: #e0e0ff;
    font-size: 13px;
}
#adjust-grid .timetable-cell.period-header {
    background: #252538;
    color: #9ca3af;
}
#adjust-grid .timetable-cell.empty {
    background: #1a1a28;
    color: #4b5563;
}
.timetable-grid {
    display: grid;
    grid-template-columns: 70px repeat(5, 1fr);
    gap: 2px;
    background: var(--border);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.timetable-cell {
    background: var(--bg-card);
    padding: 8px 4px;
    text-align: center;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.timetable-cell:hover {
    filter: brightness(0.95);
    transform: scale(1.02);
    z-index: 1;
}

.timetable-cell.header {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 14px;
    min-height: 40px;
}

.timetable-cell.period-header {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-light);
}

.timetable-cell.empty {
    color: var(--text-light);
}

/* 按教师调课用白底黑字（不显示科目色） */
#ta-grid .timetable-cell.has-course {
    background: #ffffff !important;
    color: #1e293b !important;
    font-weight: 500;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-shadow: none;
}

/* 手动调课：选中槽位高亮（白边+放大+发光环） */
.timetable-cell.slot-selected {
    outline: 3px solid #fff !important;
    outline-offset: -3px;
    transform: scale(1.06) !important;
    z-index: 5 !important;
    box-shadow: 0 0 16px rgba(255,255,255,0.7), 0 4px 12px rgba(0,0,0,0.25) !important;
    animation: slot-pulse 1.4s ease-in-out infinite alternate;
}
@keyframes slot-pulse {
    from { box-shadow: 0 0 12px rgba(255,255,255,0.5), 0 4px 12px rgba(0,0,0,0.25); }
    to   { box-shadow: 0 0 20px rgba(255,255,255,0.85), 0 4px 16px rgba(0,0,0,0.3); }
}

/* 手动调课：选中一个后，其他可交换的槽位显示虚线边框提示 */
#adjust-grid .timetable-cell.slot-swap-target:not(.slot-selected):not(.locked) {
    outline: 2px dashed rgba(255,255,255,0.75);
    outline-offset: -2px;
}
#adjust-grid .timetable-cell.slot-swap-target.has-course:not(.slot-selected):not(.locked) {
    filter: brightness(1.08);
}
#adjust-grid .timetable-cell.slot-swap-target.empty:not(.slot-selected) {
    background: rgba(59,130,246,0.12);
    border: 2px dashed #3b82f6;
}

/* 手动调课：已锁定/不可交换的目标降低亮度 */
#adjust-grid .timetable-cell.locked.slot-swap-target,
#adjust-grid .timetable-cell.combined.slot-swap-target {
    opacity: 0.55;
    filter: grayscale(0.4);
    cursor: not-allowed;
}

.timetable-cell.locked::after {
    content: '🔒';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

/* 教师调课状态徽章 */
.timetable-cell .slot-badge {
    font-size: 10px;
    line-height: 1.2;
    margin-top: 2px;
    padding: 1px 4px;
    border-radius: var(--radius-xs);
    font-weight: 600;
}
.slot-badge.badge-locked { background: rgba(0,0,0,0.5); color: #ddd; }
.slot-badge.badge-hard { background: rgba(231,76,60,0.85); color: #fff; }
.slot-badge.badge-soft { background: rgba(243,156,18,0.85); color: #fff; }
.slot-badge.badge-movable { background: rgba(46,204,113,0.85); color: #fff; }
.slot-badge.badge-other { background: rgba(148,163,184,0.7); color: #fff; }
.slot-badge.badge-free { background: rgba(203,213,225,0.5); color: #94a3b8; }

/* 教师课表各状态格子 hover */
.ta-slot { cursor: pointer; position: relative; transition: all 0.15s; }
.ta-locked { cursor: not-allowed; opacity: 0.85; }
.ta-hard_conflict { opacity: 0.9; }
.ta-free { cursor: pointer; }
.ta-free:hover { background: #e8f5e9 !important; }
.ta-other { cursor: pointer; }
.ta-other:hover { opacity: 0.8; filter: saturate(0.6); }

/* 教师调课：选中某课后，空白格显示该班课表的幽灵预览 */
#ta-grid .timetable-cell.ta-class-ghost {
    border: 1px dashed rgba(255, 255, 255, 0.55) !important;
    opacity: 0.82;
    font-size: 11px;
    line-height: 1.25;
    box-shadow: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
#ta-grid .timetable-cell.ta-class-ghost .cg-name { font-weight: 700; }
#ta-grid .timetable-cell.ta-class-ghost .cg-hint { font-size: 9px; opacity: 0.9; }
/* 该班此格也空闲：淡绿勾，提示移动至此不会与本班冲突 */
#ta-grid .timetable-cell.ta-class-ghost-free {
    background: rgba(34, 197, 94, 0.10) !important;
    border: 1px dashed rgba(34, 197, 94, 0.5) !important;
}

/* 任教班级快捷切换 chips */
.ta-chip {
    padding: 3px 10px;
    font-size: 12px;
    border-radius: var(--radius-md);
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}
.ta-chip:hover { border-color: #6366f1; color: #4338ca; }
.ta-chip.active { background: #6366f1; color: #fff; border-color: #6366f1; }

.timetable-cell .course-name {
    font-weight: 600;
    font-size: 13px;
}

.timetable-cell .teacher-name {
    font-size: 11px;
    opacity: 0.9;
}

/* ===== 进度条 ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-xs);
    overflow: hidden;
    margin: 12px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-xs);
    transition: width 0.3s;
}

/* ===== 模态框（通用样式统一在文件后半段，此处仅保留标题规则） ===== */
.modal h3 {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 700;
}

/* ===== 模态表单字段（标签在上、控件在下） ===== */
.dm-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.dm-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.readonly-val {
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: var(--radius-md);
    color: #111827;
    font-weight: 600;
    font-size: 14px;
}
.readonly-val.empty {
    color: #9ca3af;
    font-weight: 400;
}

/* ===== Toast（高可读性：大字、加粗、深色文字、长显示） ===== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 24px;
    border-radius: var(--radius-md);
    color: #1a1a2e;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.15);
    animation: toastSlideIn 0.35s cubic-bezier(0.22,1,0.36,1);
    max-width: 420px;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
}

/* 注意：Utils.toast() 生成的类名是 `toast toast-<type>`（连字符），
   历史上此处写成 `.toast.success` 点连写法从不命中，导致全站提示透明底。
   两种写法都保留，避免个别遗留代码直接加 .success 类时失效。 */
.toast-success, .toast.success { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.toast-error, .toast.error { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.toast-warning, .toast-warn, .toast.warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1a2e; }
.toast-info, .toast.info { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
/* 未指定类型时的兜底底色，防止无 background 造成透明浮层 */
.toast:not([class*="toast-"]) { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== 导入区域 ===== */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.drop-zone .drop-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.drop-zone .drop-text {
    color: var(--text-light);
    font-size: 14px;
}

/* ===== 排课结果 ===== */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.result-item {
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
}

.result-item .result-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.result-item .result-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ===== 冲突列表 ===== */
.conflict-list {
    list-style: none;
}

.conflict-item {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.conflict-item.hard {
    background: #fef2f2;
    border-left: 3px solid var(--danger);
}

.conflict-item.soft {
    background: #fffbeb;
    border-left: 3px solid var(--warning);
}

/* ===== 筛选栏 ===== */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-bar select, .filter-bar input {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
}

/* ===== 颜色选择器 ===== */
.color-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.1);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed, 72px);   /* #1172 兜底 */
    }
    .sidebar .nav-item span:not(.nav-icon),
    .sidebar .sidebar-header h1,
    .sidebar .sidebar-footer span { display: none; }
    .main-content { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .timetable-grid { grid-template-columns: 50px repeat(5, 1fr); }

    /* ===== 手动调课移动端适配 ===== */
    .filter-bar { flex-wrap: wrap; }
    .filter-bar select, .filter-bar input { flex: 1 1 auto; min-width: 120px; }
    .ta-grid-scroll, .ps-grid-scroll {
        overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px;
    }
    .timetable-grid { grid-template-columns: 52px repeat(5, minmax(64px, 1fr)); min-width: 430px; }
    .timetable-cell { font-size: 11px; padding: 3px 2px; }
    .timetable-cell .course-name { font-size: 12px; font-weight: 600; }
    .timetable-cell .teacher-name { font-size: 10px; }
    /* 悬浮卡在手机上固定底部居中，避免溢出 */
    .ta-popover {
        width: auto; max-width: 92vw;
        left: 50% !important; right: auto !important;
        transform: translateX(-50%);
        top: auto !important; bottom: 12px !important;
    }
    .ps-drag-item { font-size: 12px; }
    .ps-drag-item.draggable { cursor: pointer; }
    .ps-picked { outline: 3px solid var(--primary); outline-offset: -2px;
        background: rgba(79,70,229,0.10) !important; }

    /* 双栏/三栏 → 单栏 */
    .rule-two-col { grid-template-columns: 1fr !important; min-height: auto; }
    .rule-left-col, .rule-right-col { min-height: auto; }
    .combined-3col { grid-template-columns: 1fr !important; min-height: auto; }
    .combined-col { min-height: auto; }
    .wizard-steps { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
}

/* ===== 总课表视图 ===== */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 4px;
}

.overview-item {
    background: var(--bg-card);
    border-radius: var(--radius-xs);
    padding: 8px;
    text-align: center;
    font-size: 11px;
    border: 1px solid var(--border);
}

.overview-item .class-name {
    font-weight: 600;
    font-size: 11px;
    margin-bottom: 2px;
}

.overview-item .course-info {
    color: var(--text-light);
}

/* ===== 标签 ===== */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 500;
}

.tag-primary { background: #e0e7ff; color: var(--primary); }
.tag-success { background: #d1fae5; color: #065f46; }
.tag-warning { background: #fef3c7; color: #92400e; }
.tag-danger { background: #fee2e2; color: #991b1b; }

/* 按科目教研时间表格 */
.table {
    border-collapse: collapse;
}
.table th, .table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 13px;
}
.table td select.form-control {
    padding: 4px 6px;
    font-size: 13px;
}
#rc-tbody .rc-period {
    width: 16px;
    height: 16px;
    margin-right: 2px;
    cursor: pointer;
}
#rc-tbody tr:hover {
    background: #f8fafc;
}

/* ===== 排课规则 6 步向导 ===== */
.wizard-steps {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.wizard-step {
    flex: 1;
    text-align: center;
    padding: 14px 10px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    border: none;
    background: transparent;
    font-family: inherit;
}
.wizard-step::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: var(--border);
}
.wizard-step:last-child::after { display: none; }
.wizard-step:hover { background: #f8fafc; }
.wizard-step.active { background: #eef2ff; }
.wizard-step.done { background: #f0fdf4; }
.wizard-step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
    transition: all 0.2s;
}
.wizard-step.active .step-num {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(79,70,229,0.15);
}
.wizard-step.done .step-num {
    background: #10b981;
    color: #fff;
}
.wizard-step .step-title {
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    margin: 0;
}
.wizard-step.active .step-title { color: var(--primary); }
.wizard-step.done .step-title { color: #065f46; }
.wizard-step .step-desc {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}
.wizard-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 16px 0 0;
    border-top: 1px solid var(--border);
}
.wizard-actions .btn { min-width: 100px; justify-content: center; }

/* ===== 科目时间偏好矩阵（Step 3） ===== */
.spf-matrix { border-collapse:collapse; width:100%; table-layout:fixed; font-size:12px; }
.spf-matrix th, .spf-matrix td { border:1px solid #e2e8f0; text-align:center; }
.spf-head-corner { background:#f1f5f9; font-weight:600; color:#475569; padding:6px 4px; font-size:11px; }
.spf-head-day { background:#6366f1; color:#fff; padding:5px 2px; font-weight:600; font-size:11px; width:14.28%; }
.spf-head-period { background:#f1f5f9; font-weight:600; color:#475569; padding:6px 4px; font-size:11px; width:36px; }
.spf-cell { cursor:pointer; padding:8px 2px; min-height:32px; transition:all .15s; user-select:none; position:relative; }
.spf-cell:hover { transform:scale(1.1); z-index:2; box-shadow:0 2px 8px rgba(0,0,0,.12); }
.spf-neutral { background:#f8fafc; color:#94a3b8; }
.spf-neutral:hover { background:#f1f5f9; }
.spf-pref { background:#dcfce7; color:#16a34a; border-color:#86efac; font-weight:700; }
.spf-pref:hover { background:#bbf7d0; }
.spf-avoid { background:#fee2e2; color:#dc2626; border-color:#fca5a5; font-weight:700; }
.spf-avoid:hover { background:#fecaca; }

/* 步骤内容面板 */
.wizard-panel {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 24px;
    min-height: 420px;
}
.wizard-panel .panel-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}
.wizard-panel .panel-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* 左右两栏布局 */
.rule-two-col {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    min-height: 380px;
}
.rule-left-col {
    display: flex;
    flex-direction: column;
}
.rule-right-col {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    overflow: auto;
}
.rule-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

/* ===== sub-tabs ===== */
.tab-sub-bar {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 3px;
    border: 1px solid var(--border);
}
.tab-sub {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    white-space: nowrap;
}
.tab-sub:hover { color: #1e293b; }
.tab-sub.active {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ===== 不排课时间网格 ===== */
.unavail-grid-wrap {
    overflow-x: auto;
}
.unavail-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.unavail-grid th, .unavail-grid td {
    padding: 4px 6px;
    border: 1px solid #e8ecf1;
    text-align: center;
    background: #fff;
}
.unavail-grid th {
    background: #f1f5f9;
    font-weight: 600;
    color: #475569;
    font-size: 12px;
}
.unavail-cell {
    width: 44px;
    height: 34px;
    text-align: center;
    vertical-align: middle;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.unavail-cell:hover { background:#f3f4f6; }
.unavail-cell.free {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.unavail-cell.free:hover { background: #bbf7d0; transform: scale(1.08); }
.unavail-cell.blocked {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.unavail-cell.blocked:hover { background: #fecaca; transform: scale(1.08); }
.unavail-row-label {
    white-space: nowrap;
    width: 1px;
    vertical-align: middle;
    text-align: left;
}

/* 选择器列表 */
.selector-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}
.selector-item {
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    transition: all 0.1s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.selector-item:hover { background: #f8fafc; }
.selector-item.active {
    background: #eef2ff;
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}
.selector-item .sel-badge {
    font-size: 10px;
    background: #e2e8f0;
    color: #64748b;
    padding: 1px 6px;
    border-radius: var(--radius-md);
    margin-left: auto;
}

/* ===== 排课规则 6 步向导 3 栏布局 ===== */
.combined-3col {
    display: grid;
    grid-template-columns: 240px 260px 1fr;
    gap: 16px;
    min-height: 400px;
}
.combined-col {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
}
.combined-col h4 {
    margin: 0 0 10px;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.combined-col .col-scroll {
    flex: 1;
    overflow-y: auto;
    max-height: 340px;
}
.cb-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 13px;
    transition: all 0.15s;
}
.cb-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.cb-item .cb-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cb-item .cb-item-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}
.cb-item .cb-item-classes {
    font-size: 11px;
    color: #475569;
    margin-top: 3px;
    background: #f1f5f9;
    padding: 3px 6px;
    border-radius: var(--radius-xs);
}

/* 合班班级复选框列表 */
.cb-class-cb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    cursor: pointer;
}
.cb-class-cb-item:hover { background: #f8fafc; }
.cb-class-cb-item input[type="checkbox"] { cursor: pointer; }

/* ===== 预排表格 ===== */
.ps-cell {
    min-height: 48px;
    padding: 3px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: stretch;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.ps-cell.empty {
    background: #f8fafc;
    color: #cbd5e1;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    border: 1px dashed #e2e8f0;
}
.ps-cell.empty:hover {
    background: #dbeafe;
    color: #3b82f6;
    border-color: #93c5fd;
    border-style: solid;
}
.ps-cell.filled {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    padding: 2px;
}
.ps-tag {
    background: #fff;
    color: #1e40af;
    padding: 2px 5px;
    border-radius: var(--radius-xs);
    line-height: 1.3;
    border: 1px solid #c7d2fe;
    cursor: pointer;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ps-tag:hover { background: #fef3c7; border-color: #fbbf24; }

/* ===== 调课页颜色图例 ===== */
.adjust-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    padding: 8px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-xs);
}

/* ===== 排课规则附加样式 ===== */
/* Step 4 配置卡片 */
.config-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 12px;
}
.config-card h4 {
    font-size: 15px;
    margin-bottom: 4px;
}
.config-card .config-card-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 14px;
}
.config-card .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.config-card .form-group {
    margin-bottom: 0;
}
.config-card .form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}
.config-card .form-control {
    font-size: 14px;
    padding: 8px 12px;
}

/* ============================================
   导入页面
   ============================================ */
.import-card {
    margin-bottom: 16px;
}

.import-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.import-card-head > div:first-child {
    flex: 1;
    min-width: 0;
}

.import-card-head h3 {
    font-size: 17px;
    margin-bottom: 4px;
}

.import-card-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.import-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 38px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
}

.import-dropzone:hover,
.import-dropzone.drag-over {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.import-dropzone .drop-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.import-dropzone .drop-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.import-dropzone .drop-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* 强调型拖拽区（学校原始格式） */
.import-dropzone-accent {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.04);
}

.import-dropzone-accent:hover,
.import-dropzone-accent.drag-over {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
}

.import-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.import-preview-head h4 {
    font-size: 15px;
}

.import-progress-text {
    font-size: 13px;
    color: var(--text-light);
    margin: 6px 0 0;
}

/* 危险操作区 */
.import-danger-zone {
    border: 1px solid #fecaca;
    background: #fff8f8;
}

.import-danger-zone .import-card-head {
    border-bottom-color: #fecaca;
}

.import-danger-actions {
    display: flex;
    flex-direction: column;
}

.import-danger-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}

.import-danger-item:first-child {
    padding-top: 4px;
}

.import-danger-item strong {
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.import-danger-item .import-card-desc {
    margin: 0;
}

.import-danger-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

/* ============================================
   任务管理页面
   ============================================ */
.task-new-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.task-new-form .form-control {
    flex: 1;
    min-width: 160px;
}

.task-new-form .btn {
    flex-shrink: 0;
}

.task-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.task-actions .form-control {
    width: 130px;
    font-size: 12px;
    padding: 5px 8px;
}

.current-task-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: #eef2ff;
    border-radius: var(--radius-md);
}

.preset-config {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-light);
    word-break: break-all;
}

/* 教研时间表格 */
.research-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.research-table th {
    background: #f8fafc;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid var(--border);
}
.research-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.research-table tr:hover td { background: #f8fafc; }
.research-table select.form-control {
    width: auto;
    min-width: 90px;
    padding: 5px 8px;
    font-size: 13px;
}
.rc-period-btn {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 0 1px;
    border-radius: var(--radius-xs);
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 9px;
    line-height: 18px;
    text-align: center;
    color: #94a3b8;
    transition: all 0.15s;
}
.rc-period-btn:hover { background: #e2e8f0; }
.rc-period-btn.active {
    background: #ef4444;
    color: #fff;
    border-color: #dc2626;
}

/* 教案平齐表格 */
.sync-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.sync-table th {
    background: #f8fafc;
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid var(--border);
    font-size: 12px;
}
.sync-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.sync-table tr:hover td { background: #fafafa; }
.sync-table td:first-child { text-align: left; }
.sync-table input[type="radio"] { cursor: pointer; width: 16px; height: 16px; }

/* Step 6 排课结果 */
.schedule-result {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 2px solid #86efac;
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 16px;
}
.schedule-result h3 { margin-bottom: 16px; }
.schedule-result .result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

/* 提示横幅 */
.rule-tip {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 12px;
    color: #92400e;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.rule-tip .tip-icon { font-size: 16px; flex-shrink: 0; }

/* ============================================
   教师调整 - 悬浮详情卡 / 迷你课表 / 预览弹窗
   ============================================ */
.ta-popover {
    position: fixed;
    z-index: 1200;
    width: 300px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 14px;
    font-size: 13px;
    display: none;
}
.ta-popover.show { display: block; }

.ta-pop-head { margin-bottom: 8px; }
.ta-pop-course { font-size: 15px; font-weight: 700; color: var(--text); }
.ta-pop-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.ta-pop-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}
.ta-pop-status.badge-locked { background: #e5e7eb; color: #374151; }
.ta-pop-status.badge-hard { background: #fee2e2; color: #991b1b; }
.ta-pop-status.badge-soft { background: #fef3c7; color: #92400e; }
.ta-pop-status.badge-movable { background: #d1fae5; color: #065f46; }

.ta-pop-conflict {
    font-size: 12px;
    color: var(--danger);
    background: #fef2f2;
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.ta-pop-actions { display: flex; gap: 6px; margin-bottom: 10px; }

.ta-pop-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-bottom: 6px;
}

.ta-mini-grid {
    display: grid;
    grid-template-columns: 22px repeat(5, 1fr);
    gap: 2px;
    font-size: 10px;
}
.ta-mini-corner { background: transparent; }
.ta-mini-h { text-align: center; color: var(--text-light); font-weight: 600; padding: 2px 0; }
.ta-mini-p { display: flex; align-items: center; justify-content: center; color: var(--text-light); }
.ta-mini-cell {
    border-radius: var(--radius-xs);
    padding: 3px 2px;
    text-align: center;
    line-height: 1.15;
    color: #fff;
    min-height: 26px;
    overflow: hidden;
}
.ta-mini-cell.empty { background: #f1f5f9; min-height: 26px; }

/* 移动预览弹窗 — 用 .modal--narrow 限定窄宽，不再覆盖通用 .modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-overlay.hidden { display: none; }
.modal {
    background: var(--bg-card, #fff);
    border-radius: var(--radius-md);
    padding: 24px;
    /* #1585（2026-10-25）：原 `width: 520px` 一刀切，把各弹窗自己设计的版心
       （560 / 640 / 760 / 780 / 880）全部夹在 520 内 ⇒ 表格与长句被切碎、
       右侧只剩一条缝（用户截图：「方案会让按午集中略散」提示弹窗）。
       改为「跟内容版心自适应」：
         · 无版心的表单弹窗 → min-width 520，保持原手感不缩水；
         · 有版心的弹窗 → 按自身 max-width 展开，上限 800（足够容纳 780 版心，
           880 的对比表也比原 520 宽 55%）；
         · 窄屏统一 92~94vw 收缩，不会溢出。 */
    width: fit-content;
    min-width: min(520px, 92vw);
    max-width: min(800px, 94vw);
    max-height: 85vh;
    overflow-y: auto;
    /* #1586：原来是 hidden —— 弹窗里的宽表（app.js 内 116 处 <table>）超出就被
       无声裁掉，右侧一截数据直接看不见。改为 auto：能滚就滚，绝不丢内容。 */
    overflow-x: auto;
    /* 滚到尽头不把背后页面一起带着滚 */
    overscroll-behavior: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
/* #1586：弹窗打开时锁住背景页面滚动（原先背景会跟着滚，移动端尤其明显） */
body.modal-open { overflow: hidden; }
/* 窄版弹窗（移动预览等） */
.modal--narrow {
    width: 400px;
    min-width: min(400px, 92vw);
}
/* #1585：弹窗内自带版心的限宽容器（如 <div style="max-width:440px">）在加宽后的
   卡片里会贴左、右侧留白不均；统一居中，视觉上仍是单栏版心。 */
#modal-overlay #modal-content > div[style*="max-width"] {
    margin-left: auto;
    margin-right: auto;
}
/* #1585 兜底：若某个弹窗把 <div class="modal"> 又嵌进 #modal-content（本体已是 .modal），
   会出现「双层 24px padding + 双层宽度上限」把正文挤窄。内层一律降级为纯交付容器，
   始终只有一层卡片。用双 id 提权，确保盖过 content-premium 的 #modal-overlay .modal。 */
#modal-overlay #modal-content > .modal {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    animation: none;
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; line-height: 1.45; }
.modal-summary { font-size: 14px; color: var(--text); margin-bottom: 12px; line-height: 1.5; }
.modal-body { font-size: 14px; line-height: 1.75; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border, #e2e8f0); flex-wrap: wrap; }
/* #1586：窄屏下弹窗更贴边、按钮组允许换行并均分（原来固定一行右对齐，
   320~400px 宽时两个长按钮会把「取消」挤出可视区） */
@media (max-width: 560px) {
    .modal { padding: 18px 16px; max-height: 88vh; }
    .modal-title { font-size: 16px; }
    .modal-body { font-size: 13.5px; }
    .modal-actions { gap: 10px; }
    .modal-actions .btn { flex: 1 1 auto; justify-content: center; }
}
.conflict-ok {
    background: #ecfdf5;
    color: #065f46;
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
}
.conflict-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.conflict-item {
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.4;
}
.conflict-item.hard { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.conflict-item.soft { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ============================================
   通用表单 / 布局工具类（统一替代内联 style）
   ============================================ */
.field-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}
.field-group { margin-bottom: 8px; }
.field-group:last-child { margin-bottom: 0; }

.inline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.hint-text {
    font-size: 12px;
    color: var(--text-light);
}
.section-gap { margin-top: 12px; }
.divider-top { border-top: 1px solid var(--border); padding-top: 12px; }

/* 添加表单高亮面板（预排等） */
.add-form-panel {
    margin-top: 16px;
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md);
}

/* 空状态提示 */
.empty-hint {
    text-align: center;
    color: #94a3b8;
    padding: 60px 0;
}
.empty-hint-sm {
    text-align: center;
    color: #94a3b8;
    padding: 20px;
}

/* 紧凑选项说明（教研/配置中的小字） */
.cfg-note {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}
.text-right { text-align: right; }
.mb-12 { margin-bottom: 12px; }
.inline-label { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }

/* 教案平齐表头对齐 */
.sync-table th { text-align: left; }
.sync-table th:nth-child(1), .sync-table th:nth-child(2) { width: 100px; }

/* 配置卡内的等宽文本输入（JSON 等） */
.config-card textarea.form-control { font-family: monospace; font-size: 13px; }

/* ============================================
   预排页面 —— 拖拽教师列表 + 时段网格
   ============================================ */
.ps-teacher-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}
.ps-teacher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    background: #f8fafc;
    font-weight: 600;
    font-size: 13px;
    user-select: none;
}
.ps-teacher-header:hover { background: #f1f5f9; }
.ps-teacher-name { color: var(--text); }
.ps-teacher-count {
    font-size: 11px; color: var(--text-light); white-space: nowrap;
}
.ps-assign-list { padding: 6px 8px 8px; }

.ps-drag-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    margin-bottom: 4px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: grab;
    transition: all 0.15s;
    user-select: none;
}
.ps-drag-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow); }
.ps-drag-item.scheduled { opacity: 0.55; border-style: solid; border-color: #d1fae5; background: #f0fdf4; cursor: default; }
.ps-drag-item.dragging { opacity: 0.3; transform: scale(0.96); }
.ps-drag-dot {
    width: 8px; height: 28px; border-radius: var(--radius-xs); flex-shrink: 0;
}
.ps-drag-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ps-drag-course { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.25; }
.ps-drag-meta { font-size: 11px; color: var(--text-light); line-height: 1.2; }
.ps-drag-badge {
    font-size: 12px; font-weight: 700; color: #065f46; flex-shrink: 0;
}

/* 网格格子拖放目标 */
.ps-drop-target { position: relative; transition: all 0.15s; }
.ps-cell-over { outline: 3px solid var(--primary); outline-offset: -2px; background: rgba(79,70,229,0.06) !important; z-index: 2; }

/* 预排标签（可删除） */
.ps-tag-del {
    float:right; width:16px; height:16px; line-height:14px; text-align:center;
    border-radius:50%; background:#fecaca;color:#991b1b;font-size:11px;cursor:pointer;margin-left:4px;
    border:none;padding:0;font-weight:bold;
}
.ps-tag-del:hover { background:#ef4444; color:#fff; }

/* ===== 预排页面：筛选栏与优化 ===== */
.ps-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.ps-select {
    flex: 1;
    font-size: 12px !important;
    padding: 5px 8px !important;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    min-width: 0;
}
.ps-select:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79,70,229,0.12);
}
.ps-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.ps-search-input {
    flex: 1;
    font-size: 12px !important;
    padding: 5px 10px !important;
}
.ps-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ps-filter-toggle input { display: none; }
.ps-filter-toggle:hover { border-color: var(--primary-light); }
.ps-filter-toggle.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.ps-un-count { color: #e74c4c; font-weight: 700; }
.ps-drag-hint {
    font-size: 10px;
    color: #94a3b8;
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
}
/* 可拖拽态（区别于已排） */
.ps-drag-item.draggable { cursor: grab; }
.ps-drag-item.draggable:hover { 
    border-color: var(--primary); 
    box-shadow: 0 2px 8px rgba(79,70,229,0.15);
    transform: translateY(-1px);
}
.ps-drag-item.draggable:active { cursor: grabbing; }
.btn-danger { 
    color: #dc2626; 
    border-color: #fca5a5; 
    background: #fef2f2; 
}
.btn-danger:hover { 
    background: #fee2e2; 
    border-color: #ef4444; 
}

/* 左侧列表容器固定高度可滚动 */
#ps-teacher-list {
    max-height: calc(100vh - 320px);
    overflow-y: auto;
    padding-right: 4px;
}
#ps-teacher-list::-webkit-scrollbar { width: 5px; }
#ps-teacher-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: var(--radius-xs); }
#ps-teacher-list::-webkit-scrollbar-track { background: transparent; }

/* 右侧网格容器也限制高度 */
#ps-grid-wrap {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

/* ============================================
   富文本课表（课表查看 / 手动调整 共用）
   ★ 统一 .tt-table 定义（原 2049+2503 两套合并为 2503 一套）
   ============================================ */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

/* ★ 统一 .tt-table —— 唯一定义，避免两套共存导致的渲染不一致 */
.tt-table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    table-layout: fixed;
    font-size: 13px;
    border: 1px solid var(--border);
    /* ★ 关键修复：阻止 flex shrink 压缩表格行高。
       当 .man-main 内容超出容器高度时，flex 默认会压缩子项，导致空行塌陷。 */
    flex-shrink: 0;
}
.tt-table th, .tt-table td {
    border: 1px solid #eef2f7;
    padding: 0;
    text-align: center;
    font-size: 13px;
    min-width: 64px;
}
/* 提高特异性，让 .tt-cell 的 padding 不被 .tt-table td 覆盖 */
.tt-table td.tt-cell { padding: 2px; }
/* 表头 */
.tt-table th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    padding: 10px 6px;
}
/* 行号列（左侧第一列）—— 用 td 不是 th，所以用 .tt-rowhead 匹配 */
.tt-rowhead {
    height: 46px;
    line-height: 46px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    font-weight: 600;
    color: #475569;
    font-size: 12px;
    width: 32px;
    text-align: center;
    white-space: nowrap;
}
/* ★ 强制每行高度 —— 用 height 而非 min-height（td/tr 的 min-height 在表格中不被浏览器遵守） */
.tt-table tbody tr { height: 46px; }
/* 单元格 */
.tt-cell {
    vertical-align: top;
    height: 46px;
    overflow: hidden;
    position: relative;
    border: 1px solid #eef2f7;
    padding: 4px 2px;
    font-size: 12px;
    transition: background-color 0.15s, box-shadow 0.15s;
}
.tt-cell.empty { background: #f1f5f9; height: 46px; overflow: hidden; border: 1px solid #e2e8f0; }
/* ★ 班级不排课时间标记：明确显示为「不排课」，区别于普通灰空格 */
.tt-cell.class-unavail { background: #fef2f2; height: 46px; overflow: hidden; border: 1px dashed #fca5a5; color: #dc2626; text-align: center; vertical-align: middle; font-weight: 700; font-size: 13px; line-height: 1.1; cursor: not-allowed; }
/* 选中课后：每个格子按「换过去是否冲突」着色（占用格也参与，支持交换） */
.tt-cell.tt-movable { background: #ecfdf5 !important; border: 1px solid #a7f3d0; cursor: pointer; position: relative; }
.tt-cell.tt-movable:hover { background: #d1fae5 !important; border-color: #34d399; }
.tt-cell.tt-blocked { background: #fef2f2 !important; border: 1px solid #fecaca; cursor: not-allowed; position: relative; }
.tt-cell.tt-blocked .tt-course { opacity: 0.6; }
.tt-cell.tt-sel-cell { outline: 3px solid #f59e0b; outline-offset: -2px; }
/* #886 批量模式多选高亮 */
.tt-cell.tt-multi { outline: 3px solid #2563eb; outline-offset: -2px; background: #eff6ff !important; box-shadow: inset 0 0 0 1px #93c5fd; z-index: 2; }
.tt-cell.tt-multi::after { content: '☑'; position: absolute; top: 1px; right: 3px; font-size: 11px; color: #2563eb; opacity: 0.8; pointer-events: none; }
/* #907 目标格高亮（源课=橙实框 tt-selected，目标=绿虚框 tt-target，区分更清晰） */
.tt-cell.tt-target { outline: 3px dashed #059669; outline-offset: -2px; background: #ecfdf5 !important; box-shadow: inset 0 0 0 1px #6ee7b7; z-index: 2; }
/* #909-C 源课选中高亮：橙实框 + 浅橙底（先前缺失 .tt-cell.tt-selected 规则导致选不中无反馈，已补） */
.tt-cell.tt-selected { outline: 3px solid #f59e0b; outline-offset: -2px; background: #fffbeb !important; box-shadow: inset 0 0 0 1px #fcd34d; z-index: 2; }
/* #909-C 拖拽经过目标格的实时预览高亮（蓝点框，区别于已选定/目标绿框） */
.tt-cell.tt-dragover { outline: 3px dashed #2563eb; outline-offset: -2px; background: #eff6ff !important; box-shadow: inset 0 0 0 1px #93c5fd; z-index: 3; }
/* #909 键盘光标高亮（浅灰描边，区别于源课橙框/目标绿框） */
.tt-cell.tt-cursor { outline: 2px solid #94a3b8; outline-offset: -1px; box-shadow: 0 0 0 2px rgba(148,163,184,.25); }
/* #886 批量操作栏 + 请假栏 */
.studio-batchbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; padding: 8px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: var(--radius-sm); font-size: 13px; }
.studio-batch-preview { font-size: 12px; color: #334155; margin-left: 4px; }
.studio-candidates { margin-top: 8px; }
.studio-candidates .studio-cand:hover { background: #f1f5f9 !important; border-color: #93c5fd !important; }
/* #961 批量/整块平移方案B：目标天/节为主，前/后1天降级为小图标微调 */
.studio-nudge { padding: 2px 8px !important; font-weight: 700; line-height: 1.2; }
/* #1278 批量工具行：折叠「更多」改为常显分组行——分组标签 + 按钮 + 一句话说明，一眼看懂 */
.studio-tools-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.studio-tool-label { font-size: 12px; font-weight: 700; color: #334155; background: #f1f5f9;
                     border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.studio-tool-tip { font-size: 11px; color: #94a3b8; }
/* #913 智能推荐·多目标分项预览卡片（#871-C Pareto 维度：硬冲突/软分/节律并列） */
.studio-cand-obj { display: flex; gap: 6px; margin-left: auto; align-items: stretch; }
.obj-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 48px; padding: 3px 7px; border-radius: var(--radius-sm); background: #f8fafc; border: 1px solid #e2e8f0; line-height: 1.15; }
.obj-tile .obj-k { font-size: 10px; color: #64748b; }
.obj-tile .obj-v { font-size: 13px; font-weight: 700; color: #0f172a; }
.obj-tile .obj-d { font-size: 10px; font-weight: 600; }
.obj-good .obj-v, .obj-good .obj-d { color: #059669; }
.obj-bad .obj-v, .obj-bad .obj-d { color: #dc2626; }
.obj-warn .obj-v, .obj-warn .obj-d { color: #d97706; }
.obj-best .obj-v { color: #0ea5e9; }
.obj-neutral .obj-v { color: #0f172a; }
/* #915 触屏拖拽幽灵提示 */
.studio-touch-ghost { position: fixed; z-index: 9999; transform: translate(-50%, -50%); pointer-events: none; background: #f59e0b; color: #fff; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,.3); opacity: .95; max-width: 60vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .studio-cand-obj { width: 100%; margin-left: 0; justify-content: flex-start; } }
/* 空位格子：仅用背景色+伪元素显示✓/×，不显示文字 */
.tt-cell.tt-movable::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #059669; opacity: 0.25; pointer-events: none; z-index: 1; }
.tt-cell.tt-movable:hover::after { opacity: 0.55; }
.tt-cell.tt-blocked::after { content: '×'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #ef4444; opacity: 0.3; pointer-events: none; }
/* 选中后高亮同班同师的其他课格 */
.tt-cell.tt-same-teacher { box-shadow: inset 0 0 0 2px #818cf8 !important; background: #eef2ff !important; }
.tt-cell.tt-same-teacher .tt-course { background: #c7d2fe; border-color: #a5b4fc; }
/* #924 A-1 拖前冲突预判：悬停目标位实时预警。
   硬冲突=红框+⚠红点（不可落库），软冲突=黄框+⚠黄点（可落库但质量下降）。
   层级低于选中橙框(tt-selected)，避免遮住源课；仅作目标位风险提示。 */
.tt-cell.tt-conflict-pending { outline: 3px solid #dc2626 !important; outline-offset: -2px; background: #fef2f2 !important; box-shadow: inset 0 0 0 1px #fca5a5 !important; }
.tt-cell.tt-conflict-soft { outline: 3px solid #f59e0b !important; outline-offset: -2px; background: #fffbeb !important; box-shadow: inset 0 0 0 1px #fcd34d !important; }
/* #962 选中目标经后端预览确认产生硬冲突：把绿底绿勾改成红底冲突态，避免用户误以为可落库 */
.tt-cell.tt-target-invalid { outline: 3px solid #dc2626 !important; outline-offset: -2px; background: #fef2f2 !important; box-shadow: inset 0 0 0 1px #fca5a5 !important; }
/* ⚠ 冲突红点/黄点：挂在格右上角，hover 显示冲突链 tooltip */
.studio-preview-dot { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; font-size: 11px; line-height: 16px; text-align: center; color: #fff; font-weight: 700; z-index: 4; pointer-events: auto; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.studio-preview-dot.hard { background: #dc2626; }
.studio-preview-dot.soft { background: #f59e0b; }
.studio-preview-dot::after { content: '⚠'; }
.tt-cell { position: relative; }
.tt-cell .tt-course { font-weight: 600; line-height: 1.2; display: block; width: 100%; min-height: 36px; cursor: pointer; box-sizing: border-box; }
/* 颜色区分各科模式：高饱和亮色圆角药丸 + 加粗白字（参考截图风格） */
.tt-cell .tt-course[style*="background"] { border-radius: var(--radius-md); padding: 4px 6px; min-height: 44px; border: none; color: #fff !important; font-weight: 700; font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.25); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 2px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.12); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; position: relative; overflow: hidden; }
.tt-cell .tt-course[style*="background"]::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 45%; background: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.05) 100%); border-radius: var(--radius-sm) var(--radius-sm) 50% 50%; pointer-events: none; }   /* #1174 */
.tt-cell .tt-course[style*="background"] .tt-teacher { color: #1a1a1a !important; text-shadow: 0 1px 1px rgba(255,255,255,.6); opacity: 1; font-size: 10.5px; font-weight: 600; }
.tt-cell .tt-course[style*="background"] .tt-class { color: #1a1a1a !important; text-shadow: 0 1px 1px rgba(255,255,255,.6); opacity: .9; font-size: 10px; }
.tt-cell .tt-course.tt-selected { outline: 3px solid #f59e0b; outline-offset: -2px; z-index: 2; box-shadow: 0 0 0 3px rgba(245,158,11,.3); cursor: pointer; }
.tt-cell .tt-teacher { font-size: 11px; opacity: 0.9; }
.tt-cell .tt-class { font-size: 10px; opacity: 0.7; margin-top: 1px; }
.tt-cell .tt-lock { position: absolute; top: 2px; right: 3px; font-size: 10px; }
/* 合班/走班课标记：醒目橙边 + 🔗 角标，提示"必须所有班级一起调整" */
.tt-course.tt-combined { box-shadow: inset 0 0 0 2px #f59e0b; border-radius: var(--radius-xs); position: relative; }
.tt-course.tt-combined::before { content: '\01F517'; font-size: 10px; margin-right: 2px; vertical-align: middle; }
/* 彩色模式下：橙边叠加在色块内阴影之上，保证合班标记仍可见 */
.tt-cell .tt-course.tt-combined[style*="background"] { box-shadow: inset 0 0 0 3px #fbbf24, inset 0 1px 3px rgba(0,0,0,.22); }
.mant-tt-course.tt-combined { box-shadow: inset 0 0 0 2px #f59e0b; position: relative; }
.mant-tt-course.tt-combined[style*="background"] { box-shadow: inset 0 0 0 3px #fbbf24, inset 0 1px 3px rgba(0,0,0,.18); }
.mant-tt-course.tt-combined::before { content: '\01F517'; font-size: 9px; margin-right: 1px; }
/* 预排锁定槽位：主网格高亮 + 🔒 角标（与合班 🔗 用 ::after 区分，避免冲突）。
   关闭「显示预排锁定」时（body.man-hide-locked）隐藏视觉，等同普通课格。 */
.tt-course.tt-locked { box-shadow: inset 0 0 0 2px #f59e0b; border-radius: var(--radius-xs); position: relative; }
.tt-course.tt-locked::after { content: '\01F512'; position: absolute; top: 1px; right: 2px; font-size: 9px; line-height: 1; }
.tt-cell .tt-course.tt-locked[style*="background"] { box-shadow: inset 0 0 0 2px #f59e0b, inset 0 1px 3px rgba(0,0,0,.22); }
body.man-hide-locked .tt-course.tt-locked { box-shadow: none; }
body.man-hide-locked .tt-course.tt-locked::after { content: none; }
body.man-hide-locked .mant-tt-course.tt-locked::after { content: none; }
.tt-cell .tt-badge {
    display: inline-block;
    margin-top: 2px;
    padding: 0 5px;
    border-radius: var(--radius-sm);
    font-size: 9px;
    font-weight: 700;
    color: #fff;
}
.tt-badge.badge-danger { background: #ef4444; }
.tt-badge.badge-warn { background: #f59e0b; }
.tt-cell.conflict-hard { box-shadow: inset 0 0 0 2px #ef4444; }
.tt-cell.conflict-soft { box-shadow: inset 0 0 0 2px #f59e0b; }
/* 教室临时预约占用叠加（#621）：斜纹红底，优先级高于课表内容，始终显示 */
.tt-cell.room-booked { background: repeating-linear-gradient(45deg, #fff7ed, #fff7ed 6px, #fed7aa 6px, #fed7aa 12px) !important; border: 1px solid #fdba74 !important; }
.tt-cell.room-booked .tt-booked { display: flex; align-items: center; justify-content: center; min-height: 40px; text-align: center; font-size: 11px; font-weight: 700; color: #9a3412; line-height: 1.2; }
/* 冲突面板 → 网格 高亮定位（P0-1）：由 highlightConflicts 叠加，把冲突单元格显著标红框 */
.tt-cell.tt-conflict-cell-hard { box-shadow: inset 0 0 0 3px #ef4444 !important; background: #fef2f2 !important; }
.tt-cell.tt-conflict-cell-soft { box-shadow: inset 0 0 0 3px #f59e0b !important; background: #fffbeb !important; }
.tt-cell.conflict-flash { animation: conflictFlash 0.9s ease-in-out 0s 3; z-index: 3; }
@keyframes conflictFlash {
  0%, 100% { box-shadow: inset 0 0 0 3px #ef4444; background: #fef2f2; }
  50% { box-shadow: inset 0 0 0 7px #ef4444; background: #fee2e2; }
}
.tt-cell.locked {
    background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0 6px, transparent 6px 12px);
}
.tt-cell.editable { cursor: pointer; }
.tt-cell.editable:hover { transform: scale(1.02); z-index: 1; box-shadow: var(--shadow-md); }
.tt-cell.selected { outline: 3px solid var(--primary); outline-offset: -3px; z-index: 2; }

/* 全校总表分块 */
.tt-block { margin-bottom: 22px; }
.tt-block-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 3px solid var(--primary);
}
.tt-block-grid { overflow-x: auto; }

/* ============================================
   按教师调整 — 工具栏 + 两栏布局 + 颜色态
   ============================================ */
.ta-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}
.ta-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.ta-toolbar input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.ta-toolbar .ta-tb-spacer { flex: 1; }

.ta-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
    align-items: start;
}
.ta-right-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ta-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}
.ta-mini-grid-wrap {
    overflow: auto;
    max-height: 360px;
    background: #fff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.ta-mini-grid-wrap .timetable-cell {
    font-size: 10px;
    padding: 3px 2px;
    min-height: 30px;
}
.ta-mini-grid-wrap .course-name { font-size: 10px; }
.ta-mini-grid-wrap .teacher-name { font-size: 9px; }
@media (max-width: 768px) {
    .ta-two-col { grid-template-columns: 1fr; }
}

/* 教师调课三栏布局（hover 预览 + 校验着色） */
.ta-three-col {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 12px;
    align-items: start;
}
.ta-three-col .ta-left-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}
.ta-three-col .ta-right-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ta-preview-box {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(6px);
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    padding: 10px 8px;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ta-preview-box h5 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.ta-preview-grid .timetable-cell {
    font-size: 10px;
    padding: 3px 2px;
    min-height: 30px;
    cursor: default;
    font-weight: 500;
}
.ta-preview-grid .timetable-cell.empty { min-height: 30px; }
.ta-preview-grid .course-name { font-size: 10px; }
.ta-preview-grid .teacher-name { font-size: 9px; }

/* 校验着色 */
.ta-valid-conflict-free {
    background: #22c55e !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(34,197,94,0.4);
    border: 2px solid #16a34a !important;
}
.ta-valid-conflict-free .slot-badge { display: none; }
.ta-valid-locked {
    opacity: 0.35;
    pointer-events: none !important;
    filter: grayscale(0.7);
    cursor: not-allowed !important;
}
.ta-inline-buffer {
    margin-top: 4px;
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px;
}
.ta-inline-buffer .ta-buffer-drop {
    min-height: 40px;
    gap: 4px;
    padding: 6px;
}

/* 校验ON态覆盖（父类开关 + 黑白色调，避免亮色扎眼） */
#ta-grid.ta-validation-on .ta-target-valid {
    background: rgba(15, 23, 42, 0.05) !important;
    color: inherit !important;
    border: 2px solid #1e293b !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15) !important;
    position: relative;
}
#ta-grid.ta-validation-on .ta-target-valid::after {
    content: '✓';
    position: absolute;
    top: 1px; right: 3px;
    font-size: 9px;
    color: #1e293b;
    font-weight: 700;
    line-height: 1;
}
#ta-grid.ta-validation-on .ta-target-valid .slot-badge { display: none; }
#ta-grid.ta-validation-on .ta-slot.ta-owner:not(.ta-target-valid):not(.ta-selected) {
    opacity: 0.30;
    pointer-events: none !important;
    filter: grayscale(0.7);
    cursor: not-allowed !important;
}
#ta-grid.ta-validation-on .ta-slot.ta-owner:not(.ta-target-valid):not(.ta-selected) .slot-badge { display: none; }
#ta-grid.ta-validation-on .ta-slot.ta-owner:not(.ta-target-valid):not(.ta-selected) .course-name,
#ta-grid.ta-validation-on .ta-slot.ta-owner:not(.ta-target-valid):not(.ta-selected) .teacher-name {
    opacity: 0.5;
}
/* TA 三栏响应式 */
@media (max-width: 1024px) {
    .ta-three-col { grid-template-columns: 1fr; }
}

/* 格子状态颜色 */
.ta-slot.ta-owner {
    border: 2px solid #10b981 !important;
    background: #ffffff !important;
    color: #1e293b !important;
}
.ta-slot.ta-owner.ta-selected {
    background: #fb923c !important;
    color: #ffffff !important;
    text-shadow: none;
    border: 2px solid #ea580c !important;
    box-shadow: 0 0 0 3px rgba(251,146,60,0.3);
}
.ta-slot.ta-locked {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    cursor: not-allowed;
    opacity: 0.6;
}
.ta-slot.ta-locked.ta-selected {
    background: #fb923c !important;
    color: #ffffff !important;
    border: 2px solid #ea580c !important;
    opacity: 1;
}
.ta-slot.ta-other {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1;
    cursor: pointer;
}
.ta-slot.ta-other:hover {
    background: #f8fafc !important;
}
.ta-slot.ta-target-valid {
    background: #d1fae5 !important;
    color: #064e3b !important;
    border: 2px solid #10b981 !important;
    font-weight: 600;
}
.ta-slot.ta-other {
    opacity: 0.55;
    filter: saturate(0.3);
    border: 1px solid rgba(0,0,0,0.18) !important;
}
.ta-slot.ta-free {
    background: #fafafa;
    color: #cbd5e1;
    border: 1px dashed #e2e8f0 !important;
}
.ta-slot.ta-target-preview {
    outline: 3px dashed var(--primary) !important;
    outline-offset: -2px;
    background: rgba(79, 70, 229, 0.08) !important;
}

.ta-slot { cursor: pointer; }
.ta-slot.ta-locked { cursor: not-allowed; }

/* 可移且不冲突的目标格：红色标识（按用户要求用红色表示） */
.ta-slot.ta-target-valid {
    border: 3px solid #e74c3c !important;
    background: rgba(231, 76, 60, 0.15) !important;
    cursor: pointer;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.35);
}
/* 选中班级高亮 */
.ta-slot.ta-hl {
    box-shadow: 0 0 0 3px #f59e0b inset;
}

/* 右侧信息面板 */
.ta-info-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    min-height: 160px;
}
.ta-info-empty { color: #94a3b8; font-size: 13px; text-align: center; padding: 30px 10px; }
.ta-info-head { font-size: 18px; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.ta-info-row { font-size: 13px; color: #475569; margin: 4px 0; }
.ta-info-note { color: #94a3b8; }
.ta-info-status { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: var(--radius-md); font-size: 12px; font-weight: 600; }
.ta-info-status.badge-locked { background: #f1f5f9; color: #64748b; }
.ta-info-status.badge-hard { background: rgba(231,76,60,0.85); color: #fff; }
.ta-info-status.badge-soft { background: rgba(243,156,18,0.85); color: #fff; }
.ta-info-status.badge-movable { background: rgba(46,204,113,0.85); color: #fff; }
.ta-info-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* 底部缓冲区 */
.ta-buffer-zone {
    margin-top: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    background: #f8fafc;
}
.ta-buffer-title { font-size: 13px; color: #475569; margin-bottom: 8px; font-weight: 600; }
.ta-buffer-drop {
    min-height: 56px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border: 2px dashed #94a3b8;
    border-radius: var(--radius-sm);
    padding: 8px;
    background: #fff;
    cursor: pointer;
}
.ta-buffer-drop:hover { border-color: #6366f1; background: #f5f3ff; }
.ta-buffer-hint { color: #94a3b8; font-size: 13px; }
.ta-buffer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.ta-buffer-card .bc-cls { font-size: 10px; opacity: 0.9; font-weight: 400; }
.ta-buffer-card:hover { outline: 2px solid #1e293b; }




/* ====== 新增：多用户登录/注册/顶栏/表格等 ====== */
.auth-tab { background:#f1f5f9; color:#64748b; }
.auth-tab.active { background:linear-gradient(135deg,#6366f1,#8b5cf6); color:#fff; }

.topbar { position:sticky; top:0; z-index:50; display:flex; align-items:center; justify-content:space-between;
  padding:0 24px; height:60px; background:rgba(255,255,255,0.92); backdrop-filter:saturate(180%) blur(12px);
  -webkit-backdrop-filter:saturate(180%) blur(12px); border-bottom:1px solid var(--border); color:var(--text); flex-shrink:0; }
.topbar-left { display:flex; align-items:center; gap:14px; flex-shrink:0; }
.topbar-divider { width:1px; height:22px; background:var(--border); }
.topbar-title { font-weight:700; font-size:17px; white-space:nowrap; color:var(--text); letter-spacing:0.2px; }
.topbar-right { display:flex; align-items:center; gap:14px; margin-left:auto; }
.topbar-user { font-size:13px; font-weight:600; white-space:nowrap; color:var(--text-light); }
.topbar-avatar { width:34px; height:34px; border-radius:50%; background:var(--primary-gradient); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700; flex-shrink:0;
  box-shadow:0 2px 8px rgba(99,102,241,0.32); }
.btn-logout { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border-radius: var(--radius-sm);
  border:1px solid var(--border); background:#fff; color:var(--text-light); font-size:13px; font-weight:600; cursor:pointer;
  transition:all var(--transition); }
.btn-logout:hover { color:var(--danger); border-color:#fca5a5; background:#fef2f2; }
.topbar .sidebar-toggle { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px;
  background:transparent; color:var(--text-light); border:none; cursor:pointer; border-radius: var(--radius-sm); transition:all var(--transition); }
.topbar .sidebar-toggle:hover { background:#f1f5f9; color:var(--text); }

.app-body { display:flex; min-height:calc(100vh - 60px); }
.main-content { flex:1; padding:28px 32px; overflow:auto; }
.page-title { font-size:24px; font-weight:700; margin:0 0 18px; color:var(--text); letter-spacing:0.2px; }

/* ===== 仪表盘统计卡片（紧凑一行小图标） ===== */
.stat-cards { display:grid; gap:10px; }
.stat-cards.stat-row-compact { grid-template-columns: repeat(9, 1fr); }
.stat-row-gap { height: 8px; }
@media (max-width: 960px) {
  .stat-cards.stat-row-compact { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 640px) {
  .stat-cards.stat-row-compact { grid-template-columns: repeat(3, 1fr); }
}
/* 小图标统计芯片（替代旧 stat-card） */
.stat-chip {
  background:#fff; border-radius: var(--radius-md); padding:10px 6px;
  text-align:center; box-shadow:0 1px 2px rgba(15,23,42,.04),0 3px 10px rgba(15,23,42,.05);
  border:1px solid var(--border-light); display:flex; flex-direction:column; align-items:center;
  gap:2px; transition:transform .12s,box-shadow .12s;
}
.stat-chip:hover { transform:translateY(-1.5px); box-shadow:0 4px 14px rgba(15,23,42,.08); }
.stat-chip-ico { font-size:18px; line-height:1; }
.stat-chip-val { font-size:17px; font-weight:800; color:var(--primary); letter-spacing:-0.3px; line-height:1; }
.stat-chip-lbl { font-size:10.5px; color:var(--text-light); line-height:1; }

/* 保留旧 stat-card 样式（其他页面可能引用），但仪表盘不再使用 */

.sub-tabs { display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
.sub-tab { padding:8px 16px; border:none; border-radius: var(--radius-sm); background:#eef2ff; color:#6366f1; cursor:pointer; font-weight:600; }
.sub-tab.active { background:#6366f1; color:#fff; }

.toolbar { display:flex; gap:10px; align-items:center; margin-bottom:14px; flex-wrap:wrap; }
.toolbar label { font-size:13px; color:var(--text-light); }
.card { background:#fff; border-radius: var(--radius-lg); padding:22px; box-shadow:0 1px 3px rgba(15,23,42,.05),0 6px 18px rgba(15,23,42,.06); border:1px solid var(--border-light); }
.muted { color:var(--text-light); font-size:13px; }
.error { color:#ef4444; }

.data-table { width:100%; border-collapse:collapse; background:#fff; border-radius: var(--radius-md); overflow:hidden; box-shadow:0 2px 10px rgba(0,0,0,.05); }
.data-table th, .data-table td { padding:10px 12px; text-align:left; border-bottom:1px solid #f1f5f9; font-size:14px; }
.data-table th { background:#f8fafc; color:#475569; font-weight:600; }
.data-table tr:hover { background:#f8faff; }
.data-table .row-actions { white-space: nowrap; }
.data-table .row-actions .btn { margin-right: 6px; }
.data-table .row-actions .btn:last-child { margin-right: 0; }

.progress-bar { width:100%; height:14px; background:#eef2ff; border-radius: var(--radius-sm); overflow:hidden; }
.progress-fill { height:100%; width:0%; background:linear-gradient(90deg,#6366f1,#8b5cf6); transition:width .4s; }
.alert { padding:12px 16px; border-radius: var(--radius-md); margin-top:10px; font-size:14px; }
.alert.success { background:#ecfdf5; color:#047857; border:1px solid #a7f3d0; }
.alert.info { background:#eef2ff; color:#3730a3; border:1px solid #c7d2fe; }
.alert.error { background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; }
.alert.warn { background:#fffbeb; color:#92400e; border:1px solid #fde68a; }

/* ★ 以下为 .tt-cell 状态变体（可移动/冲突/选中/同师等）—— 统一 .tt-table 已在上方定义 */
.tt-cell.conflict { outline:2px solid #ef4444; }

/* 左侧网格悬停联动高亮 */
.tt-cell.tt-hover-active { background-color:#fef08a !important; box-shadow:inset 0 0 0 2px #eab308; z-index:2; transition:background-color .15s, box-shadow .15s; }

/* ===== 混合视图：教师格子固定 vs 班级参考格 ===== */
.tt-cell.tt-teacher-pinned {
  background:#f8fafc;
  border-color:#e2e8f0;
}
.tt-cell.tt-teacher-pinned.tt-movable { background:#ecfdf5 !important; border:1px solid #a7f3d0; }
.tt-cell.tt-teacher-pinned.tt-blocked { background:#fef2f2 !important; border:1px solid #fecaca; }
.tt-cell.tt-class-ref {
  background:#fffbeb;
  border-color:#fde68a;
}
/* ★ 班级参考格 + 冲突状态：覆盖基础色，与右侧面板一致 */
.tt-cell.tt-class-ref.tt-movable { background:#ecfdf5 !important; border:1px solid #a7f3d0; cursor:pointer; position:relative; }
.tt-cell.tt-class-ref.tt-movable:hover { background:#d1fae5 !important; border-color:#34d399; }
.tt-cell.tt-class-ref.tt-blocked { background:#fef2f2 !important; border:1px solid #fecaca; cursor:not-allowed; position:relative; }
.tt-cell.tt-class-ref.tt-blocked .tt-ref-course { opacity:0.55; }
/* ★ 班级参考格的 ✓/× 角标（右下角，不遮挡内容）*/
.tt-cell.tt-class-ref.tt-movable .tt-ref-move-icon,
.tt-cell.tt-teacher-pinned.tt-movable .tt-ref-move-icon { position:absolute; bottom:1px; right:2px; font-size:11px; color:#059669; font-weight:700; pointer-events:none; z-index:3; }
.tt-cell.tt-class-ref.tt-blocked .tt-ref-move-icon,
.tt-cell.tt-teacher-pinned.tt-blocked .tt-ref-move-icon { position:absolute; bottom:1px; right:2px; font-size:11px; color:#ef4444; font-weight:700; pointer-events:none; z-index:3; }
.tt-cell.tt-class-ref .tt-ref-course {
  opacity:.82;
  font-size:12.5px;
}
.tt-cell.tt-class-ref .tt-ref-course .tt-teacher {
  color:#b45309;
  font-weight:600;
}
.tt-cell.tt-class-ref .tt-ref-course .tt-class {
  color:#92400e;
  font-size:10px;
}
.tt-course { font-weight:700; color:#1e293b; display:block; width:100%; cursor:pointer; box-sizing:border-box; }
.tt-teacher { font-size:11px; color:#64748b; }

.task-row, .user-row { display:flex; align-items:center; justify-content:space-between; background:#fff; padding:14px 16px;
  border-radius: var(--radius-md); margin-bottom:10px; box-shadow:0 2px 8px rgba(99,102,241,.06); gap:12px; flex-wrap:wrap; }
.task-actions { display:flex; gap:8px; align-items:center; }
.badge { display:inline-block; padding:2px 8px; border-radius: var(--radius-full); font-size:11px; margin-left:6px; }
.badge-admin { background:#ede9fe; color:#7c3aed; }
.badge-user { background:#e0f2fe; color:#0369a1; }
.badge-trial { background:#fef3c7; color:#b45309; }
.badge-off { background:#fee2e2; color:#b91c1c; }
.badge-hl { background:#fef3c7; color:#b45309; }
.badge-walk { background:#fef3c7; color:#92400e; }
.badge-conc { background:#dbeafe; color:#1d4ed8; }
.form-input { width:100%; padding:10px 12px; border:1px solid #e2e8f0; border-radius: var(--radius-sm); font-size:14px; margin:6px 0 12px; box-sizing:border-box; }
.pay-cfg-form textarea.form-input { font-family: 'SFMono-Regular', Consolas, monospace; font-size:12px; line-height:1.5; }
#pay-cfg-status .badge { margin-left:2px; font-size:12px; }
.mini-select { padding:4px 8px; border-radius: var(--radius-sm); border:1px solid #ddd; font-size:12px; }
.btn-lg { padding:14px 28px; font-size:16px; }

/* ===== 自动排课页（布局整改） ===== */
.sched-page { max-width:800px; }

/* ===== 排课模式选择（独立卡片） ===== */
.sched-mode-card {
  background:#fff; border:1px solid #e2e8f0; border-radius: var(--radius-lg);
  padding:16px 20px; margin-top:14px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.sched-mode-card-title {
  font-size:13px; font-weight:700; color:#334155; margin:0 0 10px 0;
  letter-spacing:.02em;
}
.sched-mode-bar {
  display:flex; align-items:center; gap:8px;
}
.sched-mode-label {
  font-size:13px; font-weight:600; color:#475569; white-space:nowrap;
  margin-right:2px;
}
.sched-mode-pill {
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 18px; border:1.5px solid #e2e8f0; border-radius: var(--radius-full);
  cursor:pointer; background:#fafbfc; transition:all .15s;
  user-select:none;
}
.sched-mode-pill:hover { border-color:#c7d2fe; background:#fbfaff; }
.sched-mode-pill input { display:none; }
.sched-mode-pill.active { border-color:#6366f1; background:#f5f3ff; box-shadow:0 0 0 3px rgba(99,102,241,.12); }
.sched-mode-pill .pill-text { font-size:13px; font-weight:600; color:#334155; }
.sched-mode-pill.active .pill-text { color:#4f46e5; }
.sched-mode-pill .pill-hint { font-size:11px; color:#94a3b8; }
.sched-mode-pill.active .pill-hint { color:#818cf8; }
/* 引擎档位锁定（V4 专业版 / V5 企业版不足时置灰🔒） */
.sched-mode-pill.is-locked { opacity:.55; cursor:not-allowed; filter:grayscale(.4); }
.sched-mode-pill.is-locked:hover { border-color:#e2e8f0; background:#fafbfc; }
.sched-mode-pill .lock-badge {
  font-size:10px; color:#f59e0b; font-weight:600; margin-left:2px;
  cursor:pointer; white-space:nowrap;
}
.sched-mode-pill .lock-badge:hover { text-decoration:underline; }

/* ===== 操作按钮区（独立卡片） ===== */
.sched-action-card {
  background:#fff; border:1px solid #e2e8f0; border-radius: var(--radius-lg);
  padding:18px 20px; margin-top:14px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.sched-btn-group { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.sched-btn-group .btn { min-width:150px; justify-content:center; font-size:15px; padding:12px 28px; border-radius: var(--radius-md); }
.sched-btn-group .btn-icon { font-size:13px; margin-right:5px; }

/* ===== 优化指令区（独立卡片） ===== */
.sched-instr-block {
  background:#fff; border:1px solid #e2e8f0; border-radius: var(--radius-lg);
  padding:16px 20px; margin-top:14px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.sched-instr-header { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.sched-instr-title { font-size:14px; font-weight:600; color:#334155; margin:0; }
.sched-instr-box { width:100%; min-height:100px; max-height:180px; padding:12px 14px; border:1px solid #d1d5db; border-radius: var(--radius-md); font-size:14px; font-family:inherit; line-height:1.65; resize:vertical; box-sizing:border-box; transition:border-color .15s,box-shadow .15s; background:#fafbff; }
.sched-instr-box:focus { outline:none; border-color:#6366f1; box-shadow:0 0 0 3px rgba(99,102,241,.15); background:#fff; }
.sched-instr-help { font-size:12px; color:#94a3b8; margin:8px 0 0; line-height:1.55; }
.sched-instr-help b { color:#64748b; font-weight:600; }

/* ===== 指令解析对话预览面板 ===== */
.instr-chat-panel {
  border:1px solid #e2e8f0; border-radius: var(--radius-md); background:#fafbff;
  padding:16px 18px; overflow:hidden;
}
.instr-chat-bubble { display:flex; gap:10px; margin-bottom:12px; }
.instr-chat-bubble-ai .instr-chat-avatar {
  width:32px; height:32px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(135deg,#7F77DD,#A78BFA);
  color:#fff; font-size:12px; font-weight:600;
  display:flex; align-items:center; justify-content:center;
}
.instr-chat-bubble-ai .instr-chat-body {
  flex:1; min-width:0;
  background:#fff; border:1px solid #e5e7eb; border-radius: var(--radius-md);
  padding:12px 14px; font-size:13px; line-height:1.6; color:#334155;
}
.instr-chat-bubble-error .instr-chat-body {
  background:#fef2f2; border-color:#fecaca; color:#b91c1c;
}
/* 分组卡片 */
.instr-preview-group {
  margin:8px 0 4px; padding:8px 10px 4px;
  background:#f8faff; border:1px solid #ede9fe; border-radius: var(--radius-sm);
}
.instr-preview-group .instr-group-icon { font-size:14px; margin-right:4px; }
.instr-preview-group .instr-group-label {
  font-size:12px; font-weight:600; color:#5B21B6; margin-right:6px;
}
.instr-preview-group ul {
  margin:4px 0 0; padding-left:18px; list-style:none;
}
.instr-preview-group li {
  font-size:13px; color:#374151; line-height:1.55; padding:2px 0;
  position:relative; padding-left:12px;
}
.instr-preview-group li::before {
  content:''; position:absolute; left:0; top:10px;
  width:5px; height:5px; border-radius:50%; background:#A78BFA;
}
/* 可勾选的解析项（用户可取消勾选以排除误解析的指令） */
.instr-preview-item { display:block; }
.instr-keep-label {
  display:flex; align-items:flex-start; gap:6px;
  cursor:pointer; user-select:none; padding:1px 0;
}
.instr-keep-label input.instr-keep { margin-top:4px; flex:0 0 auto; accent-color:#7C3AED; }
.instr-keep-label span { flex:1 1 auto; }
.instr-keep-label:hover { color:#5B21B6; }
/* 取消勾选后：灰显并加删除线，提示该项将不被应用 */
.instr-keep-label input.instr-keep:not(:checked) + span { color:#9CA3AF; text-decoration:line-through; }
/* 编辑提示条 */
.instr-preview-hint {
  margin:10px 0 4px; padding:8px 12px;
  background:#eff6ff; border:1px solid #bfdbfe; border-radius: var(--radius-sm);
  font-size:12px; color:#1e40af; line-height:1.5;
}
.instr-preview-actions { margin-top:12px; display:flex; gap:10px; flex-wrap:wrap; }
/* 未识别警告组 */
.instr-preview-warn { background:#fffbeb; border-color:#fde68a; }
.instr-preview-warn .instr-group-label { color:#92400E; }
.instr-preview-warn li::before { background:#f59e0b; }
.instr-unrecognized { color:#92400E !important; font-style:italic; }
/* 统计摘要 */
.instr-preview-summary {
  margin-top:10px; padding:8px 12px;
  background:#f0fdf4; border:1px solid #bbf7d0; border-radius: var(--radius-sm);
  font-size:12px; color:#166534; text-align:center;
}
/* 操作按钮栏 */
.instr-preview-actions {
  display:flex; gap:8px; justify-content:flex-end; margin-top:12px; padding-top:10px;
  border-top:1px solid #f1f5f9;
}

/* ===== 进度与结果区 ===== */
.sched-progress-wrap { margin-top:16px; }
.sched-result-wrap { margin-top:12px; }

/* ===== 导入数据页 ===== */
.import-tabs { display:flex; gap:4px; margin-bottom:16px; border-bottom:2px solid #e5e7eb; padding-bottom:0; }
.import-tab { padding:10px 20px; border:none; background:none; cursor:pointer; font-size:14px; font-weight:600; color:#6b7280; border-bottom:3px solid transparent; margin-bottom:-2px; transition:all .2s; }
.import-tab:hover { color:#374151; }
.import-tab.active { color:var(--primary); border-bottom-color:var(--primary); }
.upload-zone { border:2px dashed #d1d5db; border-radius: var(--radius-md); padding:40px 20px; text-align:center; background:#fafbff; cursor:pointer; transition:border-color .2s,background .2s; min-height:120px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.upload-zone:hover { border-color:var(--primary); background:#f0f0ff; }
.upload-icon { font-size:40px; margin-bottom:8px; color:#9ca3af; }

/* ===== 不排课时间 ===== */
.unavail-toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.unavail-layout { display:flex; gap:16px; }
.unavail-sidebar { width:200px; flex-shrink:0; }
.unavail-sidebar input[type="text"] { width:100%; padding:7px 10px; border:1px solid #e2e8f0; border-radius: var(--radius-sm); font-size:13px; box-sizing:border-box; margin-bottom:8px; }
.unavail-class-list { max-height:400px; overflow-y:auto; border:1px solid #e5e7eb; border-radius: var(--radius-sm); }
.unavail-class-item { padding:8px 12px; cursor:pointer; font-size:13px; border-bottom:1px solid #f3f4f6; transition:background .15s; width:100%; box-sizing:border-box; user-select:none; }
.unavail-class-item:hover { background:#f9fafb; }
.unavail-class-item.active { background:#ede9fe; color:#6366f1; font-weight:600; }
.unavail-grid-wrap { flex:1; overflow-x:auto; }
.unavail-grid { border-collapse:collapse; width:100%; font-size:13px; }
.unavail-grid th { background:#f9fafb; padding:8px 6px; text-align:center; font-weight:600; color:#374151; border:1px solid #e5e7eb; white-space:nowrap; }
.unavail-grid td { padding:4px; text-align:center; border:1px solid #e5e7eb; }
.unavail-check { width:22px; height:22px; appearance:none; -webkit-appearance:none; border:2px solid #d1d5db; border-radius: var(--radius-xs); cursor:pointer; position:relative; transition:all .15s; }
.unavail-check:checked { background:#10b981; border-color:#10b981; }
.unavail-check:checked::after { content:''; position:absolute; top:2px;left:6px;width:5px;height:10px;border:solid white; border-width:0 2px 2px 0; transform:rotate(45deg); }
.unavail-check.unavail-checked { background:#ef4444; border-color:#ef4444; }

/* 不排课网格：表头上午/下午按钮 + 行全选按钮 */
.unavail-half-btns { display:flex; gap:2px; justify-content:center; margin-top:3px; }
.unavail-grid .btn-xs { font-size:10px; padding:1px 5px; border:1px solid #d1d5db; border-radius: var(--radius-xs); background:#fff; cursor:pointer; color:#6b7280; line-height:1.4; white-space:nowrap; }
.unavail-grid .btn-xs:hover { background:#f3f4f6; color:#374151; border-color:#9ca3af; }

/* ===== 任务管理表格 ===== */
.task-toolbar { display:flex; gap:10px; align-items:center; margin-bottom:14px; flex-wrap:wrap; }
.task-table { width:100%; border-collapse:collapse; font-size:13px; }
.task-table th { background:#f9fafb; padding:10px 12px; text-align:left; font-weight:600; color:#374151; border-bottom:2px solid #e5e7eb; white-space:nowrap; }
.task-table td { padding:10px 12px; border-bottom:1px solid #f3f4f6; vertical-align:middle; }
.task-table tr:hover { background:#fafbff; }
.status-tag { display:inline-block; padding:3px 10px; border-radius: var(--radius-full); font-size:11px; font-weight:600; }
.status-conflict { background:#fef2f2; color:#dc2626; }
.status-done { background:#ecfdf5; color:#059669; }
.status-normal { background:#eff6ff; color:#2563eb; }
.action-btns { display:flex; gap:4px; }
.action-btns button { padding:4px 8px; font-size:11px; border-radius: var(--radius-sm); border:1px solid #e5e7eb; background:white; cursor:pointer; transition:all .15s; }
.action-btns button:hover { border-color:var(--primary); color:var(--primary); }

/* ===== 合班配置 ===== */
.combine-layout { display:flex; gap:16px; }
.combine-col { flex:1; border:1px solid #e5e7eb; border-radius: var(--radius-md); overflow:hidden; }
.combine-col-header { background:#f9fafb; padding:10px 14px; font-weight:600; font-size:13px; border-bottom:1px solid #e5e7eb; }
.combine-list { max-height:360px; overflow-y:auto; padding:6px; }
.combine-item { padding:8px 10px; border-radius: var(--radius-sm); cursor:pointer; font-size:13px; margin-bottom:2px; transition:background .15s; }
.combine-item:hover { background:#f3f4f6; }
.combine-item.selected { background:#ede9fe; color:#6366f1; font-weight:600; }
.combine-actions { display:flex; flex-direction:column; justify-content:center; gap:8px; padding:0 8px; }
.combine-result { flex:1.2; border:1px solid #e5e7eb; border-radius: var(--radius-md); overflow:hidden; }
.combine-result-header { background:#f9fafb; padding:10px 14px; font-weight:600; font-size:13px; border-bottom:1px solid #e5e7eb; display:flex; justify-content:space-between; align-items:center; }
.combine-entry { padding:8px 14px; border-bottom:1px solid #f3f4f6; font-size:13px; display:flex; justify-content:space-between; align-items:center; }

/* ===== 预排 ===== */
.presched-layout { display:flex; gap:16px; max-height: calc(100vh - 300px); }

/* ============================================================
   品牌升级：Logo / 登录双栏 / 旗舰 Hero / 功能卡
   ============================================================ */

/* ===== 登录页（双栏品牌布局） ===== */
.login-page {
  position: fixed; inset: 0; z-index: 9999;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  background: var(--bg-page);
}

.login-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #8b5cf6 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
}
.login-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.6;
}
.login-hero-glow {
  position: absolute;
  width: 640px; height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,0.35) 0%, transparent 65%);
  top: -200px; right: -180px;
  pointer-events: none;
  filter: blur(6px);
}
.login-hero-inner { position: relative; z-index: 1; max-width: 460px; }
.login-logo {
  width: 88px; height: 88px;
  border-radius: var(--radius-2xl);
  box-shadow: 0 16px 38px rgba(0,0,0,0.30);
  margin-bottom: 24px;
}
.login-brand {
  font-size: 40px; font-weight: 800; letter-spacing: 1px;
  margin: 0 0 8px; line-height: 1.1;
}
.login-tagline {
  font-size: 16px; font-weight: 600; color: #e9d5ff;
  margin: 0 0 30px;
}
.login-feats { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.login-feats li { display: flex; align-items: center; gap: 12px; font-size: 15px; opacity: 0.96; }
.lf-ico {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--radius-md); background: rgba(255,255,255,0.16);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.login-hero-foot {
  font-size: 13px; opacity: 0.75; letter-spacing: 0.5px;
  padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.18);
}

.login-form-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; position: relative; }
/* #UI-POLISH-B2 登录表单侧氛围底：极淡品牌色径向光晕，平衡左侧大色块的视觉重量 */
.login-form-side::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(720px 460px at 88% 6%, rgba(99,102,241,.07), transparent 70%),
    radial-gradient(560px 420px at 4% 94%, rgba(139,92,246,.06), transparent 72%);
}
/* ICP 备案信息（登录页底部） */
.icp-footer { margin-top: 18px; text-align: center; font-size: 12px; }
.icp-footer a { color: var(--text-light); text-decoration: none; opacity: 0.85; }
.icp-footer a:hover { opacity: 1; text-decoration: underline; }
/* ICP 备案信息（侧边栏底部） */
.icp-side { display: block; margin-top: 6px; font-size: 11px; text-align: center; }
.icp-side a { color: var(--text-light); text-decoration: none; opacity: 0.75; }
.icp-side a:hover { opacity: 1; }
.sidebar.collapsed .icp-side { display: none; }
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 430px; background: #fff;
  border-radius: var(--radius-2xl); padding: 46px 44px;
  box-shadow: 0 24px 70px rgba(79,70,229,0.16);
  border: 1px solid rgba(99,102,241,0.08);
}
.login-card-logo {
  width: 54px; height: 54px; border-radius: var(--radius-lg);
  box-shadow: 0 8px 20px rgba(99,102,241,0.28);
  margin-bottom: 16px;
}
.login-card-title { font-size: 24px; font-weight: 700; margin: 0 0 4px; color: var(--text); }
.login-card-sub { font-size: 14px; color: var(--text-light); margin: 0 0 22px; }

.auth-tabs {
  display: flex; gap: 6px; background: #f1f5f9;
  padding: 5px; border-radius: var(--radius-md); margin-bottom: 22px;
}
.auth-tab {
  flex: 1; padding: 11px; border: none; background: transparent;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 15px; font-weight: 600;
  color: #64748b; transition: all 0.2s; font-family: inherit;
}
.auth-tab.active {
  background: #fff; color: var(--primary);
  box-shadow: 0 2px 8px rgba(15,23,42,0.10);
}

#login-form input, #register-form input {
  width: 100%; padding: 13px 16px; margin-bottom: 12px;
  border: 1px solid #e2e8f0; border-radius: var(--radius-md); font-size: 15px;
  box-sizing: border-box; transition: all 0.2s; font-family: inherit;
  background: #fbfcfe; color: var(--text);
}
#login-form input:focus, #register-form input:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}
#login-form .btn-lg, #register-form .btn-lg { width: 100%; margin-top: 4px; }
#login-error, #register-error {
  display: none; color: var(--danger); font-size: 13px;
  margin: 12px 0 0; line-height: 1.5;
}

/* ===== 侧边栏 Logo + 旗舰徽章 ===== */
.sidebar-logo {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 16px rgba(99,102,241,0.45);
}
.brand-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  font-size: 10px; font-weight: 700; color: #fde68a;
  background: rgba(251,191,36,0.16); border: 1px solid rgba(251,191,36,0.40);
  border-radius: var(--radius-sm); vertical-align: middle; letter-spacing: 0.5px;
}

/* ===== 顶栏 Logo ===== */
.topbar-logo {
  width: 26px; height: 26px; border-radius: var(--radius-sm); flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(99,102,241,0.30);
}

/* ===== 概览页 旗舰 Hero（紧凑版） ===== */
.dash-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #8b5cf6 100%);
  color: #fff; border-radius: var(--radius-lg);
  padding: 18px 24px; margin-bottom: 16px; position: relative; overflow: hidden;
  box-shadow: 0 10px 28px rgba(99,102,241,0.18);
}
.dash-hero::after {
  content: ''; position: absolute; right: -50px; top: -50px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,0.25) 0%, transparent 65%);
  pointer-events: none;
}
.dash-hero-left { position: relative; z-index: 1; }
.dash-hero-badge {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-lg);
  font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.18);
  margin-bottom: 8px; letter-spacing: 0.5px;
}
.dash-hero-title { font-size: 21px; font-weight: 800; margin: 0 0 4px; letter-spacing: 0.5px; }
.dash-hero-sub { font-size: 13px; opacity: 0.9; margin: 0; color: #ede9fe; }
.dash-hero-logo {
  width: 56px; height: 56px; border-radius: var(--radius-lg);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2); flex-shrink: 0;
}

/* ===== 概览页 核心能力卡（紧凑版） ===== */
.feat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px; margin-top: 14px;
}
.feat-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); padding: 14px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--primary-gradient); opacity: 0.8;
}
.feat-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: rgba(99,102,241,0.2);
}
.feat-ico {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
  margin-bottom: 10px;
}
.feat-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.feat-desc { font-size: 12px; color: var(--text-light); line-height: 1.45; }

/* ===== 概览页 帮助入口栏（使用手册 / 使用视频） ===== */
.dash-help-bar {
  display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap;
}
/* hero 内联帮助按钮：白底半透明，紧凑 */
.dash-help-bar.dash-help-inline {
  gap: 8px; margin-top: 10px;
}
.dash-help-bar.dash-help-inline .dash-help-btn {
  padding: 6px 14px; border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.35);
  color: #fff; font-size: 12px; font-weight: 600;
}
.dash-help-bar.dash-help-inline .dash-help-btn:hover {
  background: rgba(255,255,255,0.35); border-color: rgba(255,255,255,0.55);
  color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.dash-help-bar.dash-help-inline .dash-help-ico { font-size: 14px; }
.dash-help-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-md);
  background: #f8fafc; border: 1px solid #e2e8f0;
  color: #334155; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s; text-decoration: none;
}
.dash-help-btn:hover {
  background: #eef2ff; border-color: #a5b4fc; color: #4f46e5;
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.1);
}
.dash-help-btn .dash-help-ico {
  font-size: 18px; flex-shrink: 0;
}

/* ===== 仪表盘：可折叠清空数据区 ===== */
.dash-clear-accordion {
  background: #fff; border-radius: var(--radius-lg); border: 1px solid #fecaca;
  box-shadow: 0 1px 3px rgba(15,23,42,.05), 0 6px 18px rgba(15,23,42,.06);
  overflow: hidden;
}
.dash-clear-accordion summary {
  padding: 14px 20px; cursor: pointer; font-weight: 700; font-size: 14px;
  color: #991b1b; background: #fef2f2; user-select: none;
  display: flex; align-items: center; gap: 8px;
}
.dash-clear-accordion summary:hover { background: #fee2e2; }
.dash-clear-accordion summary::-webkit-details-marker { display: none; }
.dash-clear-accordion summary::after { content: '▶'; margin-left: auto; font-size: 11px; transition: transform .2s; color: #b91c1b; }
.dash-clear-accordion[open] summary::after { transform: rotate(90deg); }
.dash-clear-body { padding: 16px 20px 8px; }
.dash-clear-group {
  padding: 12px 14px; border-radius: var(--radius-md); margin-bottom: 10px;
  border: 1px solid #e5e7eb; background: #fafafa;
}
.dash-clear-group:last-child { margin-bottom: 0; }
.dash-clear-danger { border-color: #fed7aa; background: #fffbeb; }
.dash-clear-destructive { border-color: #fecaca; background: #fef2f2; }
.dash-clear-label {
  font-weight: 700; font-size: 13px; margin-bottom: 4px;
}

/* ===== 响应式：登录与概览 ===== */
@media (max-width: 860px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-card { box-shadow: none; border: none; padding: 28px 18px; }
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .dash-hero-logo { display: none; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .dash-help-bar { flex-direction: column; }
  .dash-help-btn { justify-content: center; }
}
@media (max-width: 520px) {
  .feat-grid { grid-template-columns: 1fr; }
}
.presched-left { width:280px; flex-shrink:0; max-height:100%; overflow:auto; }
.presched-filter { display:flex; gap:6px; margin-bottom:10px; }
.presched-filter select { flex:1; padding:6px 8px; border:1px solid #e2e8f0; border-radius: var(--radius-sm); font-size:12px; }
.presched-course-list { border:1px solid #e5e7eb; border-radius: var(--radius-sm); max-height:500px; overflow-y:auto; }
.presched-group-title { padding:8px 12px; background:#f9fafb; font-size:12px; font-weight:700; color:#6b7280; border-bottom:1px solid #e5e7eb; position:sticky;top:0; }
.presched-course-item { padding:8px 12px; display:flex; justify-content:space-between; align-items:center; cursor:grab; font-size:13px; border-bottom:1px solid #f3f4f6; transition:background .15s; }
.presched-course-item:hover { background:#fafbff; }
.presched-course-item .drag-handle { color:#9ca3af; cursor:grab; font-size:16px; }
.presched-right { flex:1; min-width:0; max-height:100%; overflow:auto; }
.presched-grid { border-collapse:collapse; width:100%; font-size:13px; }
.presched-grid th { background:#f9fafb; padding:8px 10px; text-align:center; border:1px solid #e5e7eb; font-weight:600; position:sticky; top:0; z-index:2; }
.presched-info-table thead th { position:sticky; top:0; z-index:2; background:#f9fafb; }
.presched-grid td { padding:14px 10px; text-align:center; border:1px solid #e5e7eb; min-height:58px; vertical-align:middle; position:relative; }
.ps-pick-item:hover { background:#fafbff; }
.presched-cell-empty { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius: var(--radius-sm); color:#c4cdd5; cursor:pointer; font-size:20px; font-weight:300; transition:all .15s; user-select:none; }
.presched-cell-empty:hover { background:#eef2ff; color:#6366f1; transform:scale(1.1); }
.presched-cell-selected { background:#eef2ff !important; box-shadow:inset 0 0 0 2px #6366f1; }
.presched-cell-selected .presched-cell-empty { background:#c7d2fe; color:#4338ca; }
.presched-slot { display:inline-block; padding:2px 6px; border-radius: var(--radius-xs); font-size:11px; margin:1px; background:#ede9fe; color:#6366f1; cursor:pointer; position:relative; }
.presched-slot.conflict { background:#fee2e2; color:#dc2626; }
.presched-slot .remove-slot { position:absolute;top:-4px;right:-4px;width:14px;height:14px;border-radius:50%; background:#ef4444;color:white;font-size:10px;line-height:14px;text-align:center;cursor:pointer;display:none; }
.presched-slot:hover .remove-slot { display:block; }

/* ===== 其他规则多Tab ===== */
.rule-other-tabs { display:flex; gap:4px; margin-bottom:14px; border-bottom:1px solid #e5e7eb; flex-wrap:wrap; }
.rule-other-tab { padding:8px 16px; border:none; background:none; cursor:pointer; font-size:13px; font-weight:600; color:#6b7280; border-bottom:2px solid transparent; margin-bottom:-1px; }
.rule-other-tab.active { color:var(--primary); border-bottom-color:var(--primary); }
.json-editor { width:100%; min-height:120px; padding:10px; border:1px solid #e2e8f0; border-radius: var(--radius-sm); font-family:monospace; font-size:12px; resize:vertical; box-sizing:border-box; }
.research-table { width:100%; border-collapse:collapse; font-size:13px; }
.research-table th { background:#f9fafb; padding:8px 12px; text-align:left; font-weight:600; border:1px solid #e5e7eb; }
.research-table td { padding:8px 12px; border:1px solid #f3f4f6; }

/* ===== 会员中心 / 等级 / 微信登录 ===== */
.tier-badge { display:inline-block; padding:1px 8px; border-radius: var(--radius-md); font-size:11px; font-weight:700; margin-left:4px; vertical-align:middle; }
.tier-trial { background:#f1f5f9; color:#64748b; }
.tier-personal { background:#dbeafe; color:#1d4ed8; }
.tier-professional { background:#ede9fe; color:#7c3aed; }
.tier-enterprise { background:#fef3c7; color:#b45309; }

.btn-upgrade { padding:6px 14px; border-radius: var(--radius-sm); border:1px solid transparent; background:linear-gradient(90deg,#6366f1,#8b5cf6); color:#fff; font-size:13px; font-weight:600; cursor:pointer; transition:filter .15s; }
.btn-upgrade:hover { filter:brightness(1.08); }

.btn-wechat { background:#07c160; border-color:#07c160; color:#fff; display:flex; align-items:center; justify-content:center; gap:8px; }
.btn-wechat:hover { background:#06ad56; }
.auth-divider { display:flex; align-items:center; gap:10px; margin:14px 0 4px; color:#94a3b8; font-size:12px; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background:#e2e8f0; }

/* 会员中心布局 */
.mem-current { margin-bottom:18px; }
.mem-card { background:#fff; border-radius: var(--radius-lg); padding:18px 20px; box-shadow:0 1px 3px rgba(15,23,42,.05),0 6px 18px rgba(15,23,42,.06); border:1px solid var(--border-light); }
.mem-card.tier-trial { border-left:4px solid #94a3b8; }
.mem-card.tier-personal { border-left:4px solid #1d4ed8; }
.mem-card.tier-professional { border-left:4px solid #7c3aed; }
.mem-card.tier-enterprise { border-left:4px solid #b45309; }
.mem-card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.mem-plan-name { font-size:18px; font-weight:700; color:var(--text); }
.mem-exp { font-size:12px; color:#94a3b8; }
.mem-usage { display:flex; flex-direction:column; gap:10px; }
.mu-row { display:grid; grid-template-columns: 72px 1fr 84px; align-items:center; gap:10px; }
.mu-label { font-size:13px; color:#475569; }
.mu-bar { height:8px; background:#eef2f7; border-radius: var(--radius-sm); overflow:hidden; }
.mu-fill { height:100%; background:linear-gradient(90deg,#6366f1,#8b5cf6); border-radius: var(--radius-sm); }
.mu-fill.over { background:linear-gradient(90deg,#ef4444,#f97316); }
.mu-num { font-size:12px; color:#64748b; text-align:right; }
.mem-tip { margin:14px 0 0; font-size:13px; color:#b45309; background:#fffbeb; border:1px solid #fde68a; padding:8px 12px; border-radius: var(--radius-sm); }

.mem-plans-head { display:flex; align-items:center; justify-content:space-between; margin:8px 0 14px; flex-wrap:wrap; gap:10px; }
.mem-plans-head h3 { margin:0; font-size:16px; }
.period-toggle { display:inline-flex; background:#f1f5f9; border-radius: var(--radius-md); padding:3px; }
.pt-btn { border:none; background:transparent; padding:7px 14px; border-radius: var(--radius-sm); font-size:13px; cursor:pointer; color:#64748b; font-weight:600; }
.pt-btn.active { background:#fff; color:var(--primary); box-shadow:0 1px 2px rgba(15,23,42,.1); }
.mem-plan-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.plan-card { background:#fff; border:1px solid #e2e8f0; border-radius: var(--radius-lg); padding:18px; display:flex; flex-direction:column; gap:8px; position:relative; transition:box-shadow .15s,transform .15s; }
.plan-card:hover { box-shadow:0 8px 24px rgba(99,102,241,.12); transform:translateY(-2px); }
.plan-card.highlight { border-color:#8b5cf6; box-shadow:0 4px 16px rgba(139,92,246,.18); }
.plan-badge { position:absolute; top:-10px; right:14px; background:linear-gradient(90deg,#6366f1,#8b5cf6); color:#fff; font-size:11px; font-weight:700; padding:2px 10px; border-radius: var(--radius-md); }
.plan-name { font-size:16px; font-weight:700; color:var(--text); }
.plan-price { font-size:26px; font-weight:800; color:#4338ca; }
.plan-per { font-size:13px; font-weight:500; color:#94a3b8; margin-left:2px; }
.plan-desc { font-size:12px; color:#94a3b8; margin:0; min-height:32px; }
.plan-feats { list-style:none; padding:0; margin:4px 0 8px; display:flex; flex-direction:column; gap:6px; font-size:13px; color:#334155; }
.plan-feats li { padding-left:16px; position:relative; }
.plan-feats li::before { content:'•'; color:#6366f1; position:absolute; left:2px; }
.plan-feats li.ft { color:#059669; }
.plan-feats li.ft::before { content:'✓'; color:#059669; }
.plan-buy { width:100%; margin-top:auto; }

.mem-orders { margin-top:22px; }
.mem-orders-title { font-size:15px; margin:0 0 10px; }
.mem-order-list { display:flex; flex-direction:column; gap:8px; }
.mem-order-row { display:grid; grid-template-columns: 1fr auto auto; gap:14px; align-items:center; background:#fff; border:1px solid #e2e8f0; border-radius: var(--radius-md); padding:10px 14px; font-size:13px; }
.pay-qr { width:220px; height:220px; display:block; margin:10px auto; border:1px solid #e2e8f0; border-radius: var(--radius-md); padding:8px; background:#fff; }
.pay-mode { font-size:13px; color:#475569; text-align:center; margin:6px 0 4px; }

/* 待审核订单（个人收款码人工审核） */
.pending-list { display:flex; flex-direction:column; gap:12px; margin-top:12px; }
.pending-row { display:flex; justify-content:space-between; align-items:center; gap:16px; background:#fff; border:1px solid #e2e8f0; border-radius: var(--radius-md); padding:12px 16px; }
.pending-info { font-size:13px; line-height:1.6; }
.proof-thumb { width:96px; height:96px; object-fit:cover; border:1px solid #e2e8f0; border-radius: var(--radius-sm); margin-top:6px; display:inline-block; }
.proof-thumb:hover { box-shadow:0 0 0 2px #2563eb; }

/* ===== 手动调课（增强版）===== */
.manual-tabs { display:flex; gap:4px; margin-bottom:14px; border-bottom:2px solid #e5e7eb; flex-wrap:wrap; }
.manual-tab { padding:8px 16px; border:none; background:none; cursor:pointer; font-size:13px; font-weight:600; color:#6b7280; border-bottom:3px solid transparent; margin-bottom:-2px; }
.manual-tab.active { color:var(--primary); border-bottom-color:var(--primary); }
.manual-tab.has-conflict { color:#dc2626; }
.manual-toolbar { display:flex; gap:10px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
.manual-main { display:flex; gap:16px; }
.manual-tt-panel { flex:1; min-width:0; }
.manual-side { width:340px; flex-shrink:0; display:flex; flex-direction:column; gap:10px; max-height:720px; }
.manual-card { border:1px solid #e5e7eb; border-radius: var(--radius-md); overflow:hidden; margin-bottom:0; display:flex; flex-direction:column; }
.manual-card-header { background:#f9fafb; padding:8px 12px; font-weight:600; font-size:12px; border-bottom:1px solid #e5e7eb; display:flex; justify-content:space-between; align-items:center; flex-shrink:0; }
.manual-card-body { padding:8px; overflow:auto; flex:1; min-height:0; }
.color-legend { display:flex; gap:12px; font-size:11px; flex-wrap:wrap; margin-top:8px; }
.legend-item { display:flex; align-items:center; gap:4px; }
.legend-swatch { width:14px; height:14px; border-radius: var(--radius-xs); border:1px solid #d1d5db; }
.buffer-zone { border:1px dashed #f59e0b; border-radius: var(--radius-sm); padding:10px; min-height:60px; background:#fffbeb; margin-top:10px; }
.buffer-zone-title { font-size:12px; font-weight:700; color:#d97706; margin-bottom:6px; }

/* ===== #1215/#1216 调课工作台·约束开关（与工具栏按钮同排，避免挤到下一行） ===== */
.studio-check { display:inline-flex; align-items:center; gap:4px; font-size:12px;
                color:var(--text-light, #64748b); cursor:pointer; white-space:nowrap; user-select:none; }
.studio-check input[type="checkbox"] { margin:0; cursor:pointer; }

/* ===== #1214 调课工作台·缓冲区双栏面板 =====
   上栏「待补排」= 还没排的课（/api/unfilled，橙）；下栏「已释放」= 移出网格的课（蓝）。
   两栏共用 .buffer-zone 基样式，仅换边框/底色区分语义；.is-picked 为点选落位态。 */
.studio-buffer-panel { display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
.studio-buffer-panel .buffer-zone { flex:1 1 320px; margin-top:0; }
.studio-buffer-panel .studio-zone-released { border-color:#93c5fd; background:#eff6ff; }
.studio-buffer-panel .studio-zone-released .buffer-zone-title { color:#1d4ed8; }
.studio-buf-item { display:inline-flex; align-items:center; gap:6px; border:1px solid; border-radius:8px;
                   padding:6px 10px; margin:4px; font-size:12px; cursor:grab; }
.studio-buf-item.is-picked { outline:2px solid #2563eb; outline-offset:1px; }
.studio-buf-unfilled { background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
.studio-buf-released { background:#eff6ff; border-color:#93c5fd; color:#1e40af; }
.studio-buf-badge { background:#fde68a; color:#92400e; padding:1px 7px; border-radius:10px; font-weight:700; }
.studio-buf-released .studio-buf-badge { background:#bfdbfe; color:#1e3a8a; }
/* #1276 已释放栏：按班级/教师分组 + 勾选批量回填 */
.studio-buf-group { margin:4px 0 8px; }
.studio-buf-group-title { font-size:11px; font-weight:700; color:#1e3a8a; margin:2px 0 2px 4px; }
.studio-buf-count { font-weight:400; color:#64748b; background:#e0e7ff; border-radius:8px; padding:0 6px; margin-left:4px; }
.studio-buf-check { cursor:pointer; font-size:13px; line-height:1; padding:0 2px; user-select:none; }
.studio-buf-item.is-checked { outline:2px solid #2563eb; outline-offset:1px; background:#dbeafe; }
/* #1274 拖曳悬停态：网格里的课节拖到「已释放」栏时的投放提示 */
.studio-buffer-panel .studio-zone-released.is-dragover { border-color:#2563eb; border-style:solid;
                                                         background:#dbeafe; box-shadow:inset 0 0 0 2px #60a5fa; }
/* #1276 同格多节（教师视图/合班/数据异常）：逐节堆叠，各节可独立选中、拖拽、右键 */
.tt-cell-stack { position:relative; display:flex; flex-direction:column; gap:2px; }
.tt-cell-stack.tt-multi-cell { border-left:2px solid #93c5fd; padding-left:2px; }
.tt-cell-stack .tt-course { border-radius:4px; padding:1px 2px; }
.tt-stack-badge { position:absolute; top:-1px; right:-1px; font-size:9px; line-height:1.4;
                  background:#1d4ed8; color:#fff; border-radius:6px; padding:0 3px; }
.tt-course.tt-sub-selected { outline:2px solid #2563eb; outline-offset:0; }
.tt-course.tt-sub-multi { box-shadow:inset 0 0 0 2px #f59e0b; }
/* #1275 合班/走班角标（调课工作台网格：让人一眼看出这节是整组课） */
.tt-comb-badge { display:inline-block; font-size:9px; line-height:1.4; background:#ede9fe; color:#5b21b6;
                 border:1px solid #ddd6fe; border-radius:6px; padding:0 3px; margin-left:2px; vertical-align:middle; }

/* ===== #1217 教师时间盒·多选禁排时段 chips ===== */
.studio-avoid-chip { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:#fff;
                     background:#dc2626; border-radius:14px; padding:2px 10px; white-space:nowrap; }
.studio-avoid-chip a { color:#fff; opacity:.85; }
.studio-avoid-chip a:hover { opacity:1; }

/* ===== 手动调课：新布局 ===== */
/* #1289 align-items 由 flex-start 改回默认 stretch：flex-start 下 .man-main/.man-side 不被容器高度约束，
   两者退化为「按内容撑高」，于是 style.css 里给它们写的 overflow:auto 完全失效、整页滚动，
   底部内容（缓冲区、预览卡）落到首屏之外。stretch 后两列真正被 100vh-220px 约束，网格列内部滚动，
   图例/缓冲区/预览条常驻可见——这正是原作者注释里描述的预期行为。 */
/* 2026-09-13 还原 #1289 泄漏：stretch+height 收窄到 .man-layout--studio（调课工作台专用），
   基础 .man-layout 恢复 flex-start，使按班级/按教师视图底部「暂存区」回到网格正下方。 */
.man-layout { display:flex; gap:16px; align-items:flex-start; }
.man-layout--studio { align-items:stretch; height: calc(100vh - 220px); min-height:400px; }
.man-main { flex:0 0 60%; display:flex; flex-direction:column; min-width:0; overflow:auto; }
/* ★ 关键修复：让 .man-main 的所有直接子项都不被 flex shrink 压缩。
   否则当内容超出容器高度时，#mant-main-grid（含表格）会被压扁成 2-3 行。 */
.man-main > * { flex-shrink: 0; }
.man-side { flex:1; display:flex; flex-direction:column; gap:10px; min-width:280px; max-width:40%; overflow:auto; padding-right:4px; }
.man-section-title { font-weight:700; font-size:14px; margin-bottom:8px; color:#1e293b; }
.man-grid-wrap { overflow:auto; flex:1; min-height:200px; }
.man-grid-wrap .tt-table { margin-bottom: 0; }

/* #1289 调课预览卡（硬Δ / 软Δ / 确认落库 / 冲突链）：原为主列最后一个子项，被屏底裁掉，
   现移到主列顶部并吸顶常驻，永不随滚动消失。ID 必须保留（app.js 内 8 处写入此挂载点）。 */
.studio-preview { position: sticky; top: 0; z-index: 8; background: #fff; padding-top: 2px; }
.studio-preview:empty { display: none; }                       /* 空态不占位、不挡网格 */
.studio-preview > .card { margin-bottom: 0; box-shadow: 0 2px 10px rgba(15,23,42,.08); }
#studio-grid { scroll-margin-top: 76px; }                      /* 吸顶条高约 52-60px，滚动定位留位 */
/* 冲突链折叠：常驻只占一行摘要；硬冲突时后端渲染 details[open] 自动展开说明原因 */
.studio-chain { margin-top: 6px; border-top: 1px dashed #e2e8f0; padding-top: 6px; }
.studio-chain > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: #991b1b; list-style: none; }
.studio-chain > summary::-webkit-details-marker { display: none; }
.studio-chain > summary::before { content: '\25B8 '; }
.studio-chain[open] > summary::before { content: '\25BE '; }
.studio-chain-list { max-height: 72px; overflow: auto; margin-top: 4px; font-size: 12px; }
/* #1289 硬冲突时主按钮被 disabled，.btn:disabled{opacity:.5} 会让白字压白底 ⇒ 只剩一个空框看不出是「确认落库」。
   作用域限定在预览条内改成灰字灰底的可读禁用态，不影响全局其它按钮。 */
.studio-preview .btn-primary:disabled,
.studio-preview .btn-primary[disabled] { opacity: 1; background: #e2e8f0; color: #64748b; border-color: #cbd5e1; box-shadow: none; }
@media (max-width: 768px) { .studio-preview { position: static; padding-top: 0; } }   /* 移动端两列堆叠，吸顶会挡内容 */
.man-info-card { flex:1; min-height:0; display:flex; flex-direction:column; }
.man-info-card .manual-card-body { overflow-y:auto; }

/* #909 移动端响应式：工作室布局纵向堆叠 + 课格放大便于触摸点击 */
@media (max-width: 768px) {
  .man-layout { flex-direction: column; height: auto; min-height: 0; }
  .man-main { flex: 1 1 auto; width: 100%; overflow: visible; }
  .man-side { flex: 1 1 auto; width: 100%; max-width: 100%; min-width: 0; }
  .man-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tt-cell { min-height: 52px; }            /* 触摸目标加大 */
  .tt-cell .tt-course { min-height: 44px; font-size: 14px; }
  .manual-toolbar { flex-wrap: wrap; gap: 6px; }
  .manual-toolbar select, .manual-toolbar button { font-size: 13px; padding: 6px 8px; }
}

/* 选中高亮：底色填充 */
.tt-cell .tt-course.tt-selected {
  background:#fef3c7 !important;
  outline:3px solid #f59e0b;
  outline-offset:-2px;
  border-radius: var(--radius-sm);
  z-index:2;
  position:relative;
  box-shadow:0 0 0 3px rgba(245,158,11,.3);
}
/* 可交换提示色（同课程其他格）—— 更醒目 */
.tt-cell .tt-course.tt-swap-hint {
  background:#d1fae5 !important;
  border-radius: var(--radius-sm);
  cursor:pointer;
  outline:2px solid #10b981;
  outline-offset:-1px;
}
.tt-cell .tt-course.tt-swap-hint:hover {
  background:#a7f3d0 !important;
  box-shadow:0 0 0 2px #10b981;
  transform:scale(1.03);
}
/* 单元格内班级名（教师视图） */
.tt-class {
  font-size:10px;
  opacity:.75;
  display:block;
  margin-top:1px;
  padding-top:2px;
  border-top:1px dotted #d1d5db;
}

/* ===== 教师视图：右侧课程详情面板 ===== */
.man-info-header { padding:10px 12px; background:#f8fafc; border-radius: var(--radius-sm); margin-bottom:10px; }
.man-info-course { font-size:16px; font-weight:700; color:#1e293b; }
.man-info-meta { font-size:11px; color:#64748b; margin-top:2px; }
.man-info-body { overflow-y:auto; flex:1; }
.man-info-section { margin-bottom:12px; }
.man-info-section-title { font-size:12px; font-weight:700; color:#475569; margin-bottom:6px; padding-bottom:4px; border-bottom:1px solid #e5e7eb; }
.man-info-table { width:100%; border-collapse:collapse; font-size:11px; }
.man-info-table th { background:#f1f5f9; padding:5px 8px; text-align:left; font-weight:600; color:#475569; border:1px solid #e2e8f0; }
.man-info-table td { padding:5px 8px; border:1px solid #f1f5f9; color:#374151; }
.man-info-table tr:hover { background:#f8fafc; }
.man-info-class-group { display:flex; flex-wrap:wrap; gap:6px; padding:6px 0; align-items:center; }
.man-info-class-name { font-size:12px; font-weight:700; color:#2563eb; min-width:60px; }
.man-info-asg { font-size:11px; background:#eff6ff; color:#1d4ed8; padding:3px 8px; border-radius: var(--radius-md); white-space:nowrap; }
.man-info-empty-list { display:flex; flex-wrap:wrap; gap:4px; }
.man-info-empty-slot { font-size:11px; background:#ecfdf5; color:#059669; padding:3px 8px; border-radius: var(--radius-xs); cursor:pointer; border:1px solid #a7f3d0; }
.man-info-empty-slot:hover { background:#d1fae5; }
.tag-hard { background:#fef2f2; color:#dc2626; padding:1px 6px; border-radius: var(--radius-sm); font-size:10px; }
.tag-soft { background:#fffbeb; color:#d97706; padding:1px 6px; border-radius: var(--radius-sm); font-size:10px; }

/* ===== 右侧面板：教师所有班级课表网格 ===== */
.mant-tt-header { margin-bottom:8px; }
.mant-tt-title { font-size:13px; font-weight:700; color:#1e293b; }
.mant-tt-stats { font-size:11px; color:#64748b; margin-top:2px; }
.mant-tt-table { width:100%; border-collapse:collapse; font-size:11px; table-layout:fixed; }
.mant-tt-table thead th { background:#6366f1; color:#fff; padding:5px 3px; font-size:11px; font-weight:600; text-align:center; border:1px solid #4f46e5; }
.mant-tt-table tbody td { border:1px solid #e2e8f0; padding:0; vertical-align:middle; height:46px; overflow:hidden; position:relative; }
.mant-tt-rowhead { background:#f1f5f9; text-align:center; font-weight:600; color:#64748b; font-size:11px; width:28px; border:1px solid #e2e8f0; height:46px; line-height:46px; }
.mant-tt-cell.empty { background:#fafbff; height:46px; }
.mant-tt-cell.tt-movable { background:#ecfdf5 !important; box-shadow:inset 0 0 0 1px #a7f3d0; cursor:pointer; }
.mant-tt-cell.tt-blocked { background:#fef2f2 !important; box-shadow:inset 0 0 0 1px #fecaca; cursor:not-allowed; }
.mant-tt-cell.tt-blocked .mant-tt-course { opacity:0.55; }
.mant-tt-cell.tt-sel-cell { background:#fef3c7 !important; box-shadow:inset 0 0 0 2px #f59e0b; }
.mant-tt-cell.tt-sel-cell .mant-tt-course { background:#fde68a; border-color:#f59e0b; color:#92400e; }
/* 右侧空位：仅背景色+伪元素✓/× */
.mant-tt-cell.tt-movable::after { content:'✓'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:12px; color:#059669; opacity:.25; pointer-events:none; }
.mant-tt-cell.tt-blocked::after { content:'×'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:11px; color:#ef4444; opacity:.3; pointer-events:none; }
/* 右侧课格：紧凑三行显示（科目/教师/班级）—— 固定高度不变形 */
.mant-tt-course { display:block; padding:2px 3px; cursor:pointer; border-radius: var(--radius-xs); text-align:center; line-height:1.25; transition:background-color .15s, box-shadow .15s; min-height:38px; max-height:42px; overflow:hidden; box-sizing:border-box; background:#ede9fe; color:#4c1d95; border:1px solid #c4b5fd; font-size:10px; }
/* 颜色区分各科模式：覆盖默认紫色，整块实心+加粗白字 */
.mant-tt-course[style*="background"] { color: #fff !important; font-weight: 700; border: none; text-shadow: 0 1px 2px rgba(0,0,0,.25); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 2px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.1); border-radius: var(--radius-sm); }
.mant-tt-course[style*="background"] .tt-teacher { color: #1a1a1a !important; text-shadow: 0 1px 1px rgba(255,255,255,.6); }
.mant-tt-course[style*="background"] .tt-class { color: #1a1a1a !important; text-shadow: 0 1px 1px rgba(255,255,255,.6); }
.mant-tt-course:hover { background:#ddd6fe; z-index:2; position:relative; box-shadow:0 2px 6px rgba(99,102,241,.25); }
/* ★ 关键修复：父级为 movable/blocked/sel-cell 时，课程标签背景必须透明/跟随，
   否则 mant-tt-course 的 #ede9fe 会覆盖父级 td 的绿/粉色，导致右面板看不出可移动/冲突状态 */
.mant-tt-cell.tt-movable > .mant-tt-course { background:#dcfce7; border-color:#86efac; color:#166534; }
.mant-tt-cell.tt-blocked > .mant-tt-course { background:#fee2e2; border-color:#fca5a5; color:#991b1b; opacity:0.7; }
.mant-tt-cell.tt-sel-cell > .mant-tt-course { background:#fef3c7; border-color:#fcd34d; color:#92400e; }
/* 右侧联动悬停高亮（与左侧同色）—— 必须覆盖内层 mant-tt-course 背景 */
.mant-tt-cell.mant-tt-hover-active { background-color:#fef08a !important; box-shadow:inset 0 0 0 2px #eab308; z-index:2; transition:background-color .15s, box-shadow .15s; }
.mant-tt-cell.mant-tt-hover-active > .mant-tt-course { background:#fef9c3; border-color:#fcd34d; color:#854d0e; }
.mant-tt-subj { display:block; font-weight:700; font-size:11px; color:#4c1d95; }
.mant-tt-tname { display:block; font-size:9px; opacity:.75; color:#6d28d9; }
.mant-tt-cname { display:block; font-size:9px; opacity:.65; color:#7c3aed; }
/* 选中/交换高亮：继承左侧风格但适配右侧 */
.mant-tt-course.tt-selected { outline:2px solid #f59e0b; outline-offset:-1px; box-shadow:0 0 0 3px rgba(245,158,11,.35); background:#fef3c7; z-index:3; position:relative; }
.mant-tt-course.tt-swap-hint { outline:1px dashed #22c55e; outline-offset:-1px; }
.mant-tt-course.tt-swap-hint:hover { background:#dcfce7; }
/* 冲突/锁定标记 */
.mant-tt-cell .conflict-hard { box-shadow:inset 0 0 0 2px #ef4444; }
.mant-tt-cell .conflict-soft { box-shadow:inset 0 0 0 2px #f59e0b; }
.mant-tt-course.tt-locked::after { content:'🔒'; position:absolute; top:1px; right:2px; font-size:8px; }

/* ===== 课表查看（增强版）===== */
.tt-view-steps { display:flex; gap:4px; margin-bottom:14px; border-bottom:2px solid #e5e7eb; }
.tt-view-step { padding:10px 18px; border:none; background:none; cursor:pointer; font-size:14px; font-weight:600; color:#6b7280; border-bottom:3px solid transparent; margin-bottom:-2px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }   /* #1174 */
.tt-view-step.active { color:var(--primary); border-bottom-color:var(--primary); background:#fafbff; }
.tt-subtabs { display:flex; gap:4px; margin-bottom:12px; flex-wrap:wrap; }
.tt-subtab { padding:6px 14px; border:1px solid #e5e7eb; border-radius: var(--radius-xl); background:white; cursor:pointer; font-size:12px; font-weight:600; color:#6b7280; transition:all .15s; }
.tt-subtab:hover { border-color:var(--primary-light); color:var(--primary); }
.tt-subtab.active { background:var(--primary); color:white; border-color:var(--primary); }
.tt-options { display:flex; gap:12px; align-items:center; margin-bottom:12px; flex-wrap:wrap; font-size:12px; }
.tt-option { display:flex; align-items:center; gap:4px; cursor:pointer; }
.tt-option input[type="checkbox"] { accent-color:var(--primary); }
.tt-detail-table { width:100%; border-collapse:collapse; font-size:13px; }
.tt-detail-table th { background:#f9fafb; padding:10px 12px; text-align:left; font-weight:600; border:1px solid #e5e7eb; white-space:nowrap; }
.tt-detail-table td { padding:10px 12px; border:1px solid #f3f4f6; vertical-align:middle; }
.tt-detail-table tr:nth-child(even) { background:#fafbff; }

/* ===== 单双周视图切换（课表查看） ===== */
.tt-parity-switch { display:inline-flex; align-items:center; gap:2px; padding:2px; background:#f1f5f9; border-radius: var(--radius-sm); }
.tt-parity-label { font-size:12px; color:#64748b; margin-right:4px; margin-left:6px; }
.tt-parity-btn { border:none; background:none; padding:5px 12px; border-radius: var(--radius-sm); cursor:pointer; font-size:12px; font-weight:600; color:#64748b; transition:all .15s; }
.tt-parity-btn:hover { color:var(--primary); }
.tt-parity-btn.active { background:white; color:var(--primary); box-shadow:0 1px 3px rgba(0,0,0,.12); }
/* 单元格单/双周徽标 */
.tt-parity-badge { display:inline-block; min-width:16px; text-align:center; font-size:10px; font-weight:700; line-height:1.5; padding:0 4px; border-radius: var(--radius-sm); vertical-align:middle; margin-left:2px; }
.tt-parity-badge.tt-p1 { background:#fef3c7; color:#b45309; }   /* 单周=琥珀 */
.tt-parity-badge.tt-p2 { background:#dbeafe; color:#1d4ed8; }   /* 双周=蓝 */
.tt-detail-table tr:hover { background:#f0f0ff; }
.tt-cell-course { font-weight:600; color:#1e293b; }
.tt-cell-teacher { color:#64748b; font-size:12px; }

/* 交换成功：两格强烈闪烁 + 方向箭头覆盖层，确保用户感知到「已交换」 */
@keyframes manSwapFlash {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0); transform: scale(1); }
  15%  { box-shadow: 0 0 0 5px rgba(34,197,94,1), 0 0 20px rgba(34,197,94,.6); background:#bbf7d0 !important; transform: scale(1.03); }
  35%  { box-shadow: 0 0 0 4px rgba(34,197,94,.8), 0 0 14px rgba(34,197,94,.4); background:#86efac !important; transform: scale(1.01); }
  60%  { box-shadow: 0 0 0 3px rgba(34,197,94,.5), 0 0 10px rgba(34,197,94,.2); background:#dcfce7 !important; transform: scale(1); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); transform: scale(1); }
}
.man-swap-flash {
  animation: manSwapFlash 2.2s ease-out 1;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 10;
}
/* 闪烁时在格子中心显示交换箭头 */
.man-swap-flash::after {
  content: '⇄';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  color: #166534;
  font-weight: 900;
  z-index: 11;
  opacity: 0;
  animation: swapArrowShow 2.2s ease-out 1 forwards;
  text-shadow: 0 0 6px rgba(255,255,255,.9);
  pointer-events: none;
}
@keyframes swapArrowShow {
  0%, 10% { opacity: 0; transform: translate(-50%,-50%) scale(0.3); }
  25% { opacity: 1; transform: translate(-50%,-50%) scale(1.2); }
  55% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  75%, 100% { opacity: 0; transform: translate(-50%,-50%) scale(0.8); }
}
.tt-stat-row { display:flex; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.tt-stat-card { background:white; border:1px solid #e5e7eb; border-radius: var(--radius-md); padding:12px 16px; min-width:120px; }
.tt-stat-num { font-size:24px; font-weight:700; color:var(--primary); }
.tt-stat-label { font-size:11px; color:#6b7280; }

/* ===== 规则引擎（齐全可配置）===== */
.rule-mode-tabs { display:flex; gap:8px; margin-bottom:4px; }
.rule-mode-tab { padding:9px 16px; border:1px solid #e5e7eb; background:white; border-radius: var(--radius-md); cursor:pointer; font-size:14px; font-weight:600; color:#475569; }
.rule-mode-tab.active { background:linear-gradient(135deg,#6366f1,#8b5cf6); color:white; border-color:transparent; }
.rule-engine-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; background:white; border:1px solid #e5e7eb; border-radius: var(--radius-md); padding:12px 16px; margin-bottom:14px; }
.rule-summary { font-size:13px; color:#475569; }
.rule-summary b { color:#1e293b; }
.rule-group { margin-bottom:18px; }
.rule-group-title { font-size:14px; font-weight:700; color:#334155; margin:0 0 10px; padding-left:10px; border-left:4px solid #6366f1; }
.rule-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:14px; }
.rule-card { background:white; border:1px solid #e5e7eb; border-radius: var(--radius-md); padding:14px 16px; transition:opacity .15s, box-shadow .15s; }
.rule-card.disabled { opacity:.55; }
.rule-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.rule-card-title { font-size:14px; font-weight:700; color:#1e293b; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.rule-badge { font-size:11px; padding:2px 8px; border-radius: var(--radius-full); font-weight:600; }
.rule-badge.hard { background:#fee2e2; color:#dc2626; }
.rule-badge.soft { background:#dbeafe; color:#2563eb; }
.rule-desc { font-size:12px; color:#64748b; margin:8px 0 10px; line-height:1.5; }
.rule-field { margin-top:8px; }
.rule-label { font-size:11px; color:#94a3b8; display:block; margin-bottom:4px; font-weight:600; }
.rule-weight-row { display:flex; align-items:center; gap:8px; }
.rule-weight { flex:1; }
.rule-weight-num { width:78px; padding:4px 6px; border:1px solid #e2e8f0; border-radius: var(--radius-sm); font-size:12px; }
.rule-param-row { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:6px; }
.rule-param-row label { font-size:12px; color:#475569; }
.rule-param { width:120px; padding:4px 6px; border:1px solid #e2e8f0; border-radius: var(--radius-sm); font-size:12px; }
.switch { position:relative; display:inline-block; width:40px; height:22px; flex:none; }
.switch input { opacity:0; width:0; height:0; }
.switch .slider { position:absolute; cursor:pointer; inset:0; background:#cbd5e1; border-radius: var(--radius-2xl); transition:.2s; }
.switch .slider:before { content:""; position:absolute; height:16px; width:16px; left:3px; bottom:3px; background:white; border-radius:50%; transition:.2s; }
.switch input:checked + .slider { background:#6366f1; }
.switch input:checked + .slider:before { transform:translateX(18px); }
.switch.small { width:34px; height:18px; }
.switch.small .slider:before { height:12px; width:12px; left:3px; bottom:3px; }
.switch.small input:checked + .slider:before { transform:translateX(16px); }

/* 步骤1：排课设置（分组卡片式布局） */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; }
.settings-group { background:#fff; border:1px solid #e2e8f0; border-radius: var(--radius-sm); overflow:hidden; }
.settings-group-title { background:#f8fafc; border-bottom:1px solid #e2e8f0; padding:10px 14px; font-size:13px; font-weight:700; color:#475569; letter-spacing:0.5px; }
.settings-group-body { padding:10px 14px 14px; }
.settings-row { display:grid; grid-template-columns: 130px 1fr; gap:10px; align-items:start; padding:8px 0; border-bottom:1px dashed #f1f5f9; }
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size:13px; color:#1e293b; font-weight:500; padding-top:6px; line-height:1.4; }
.settings-control { display:flex; flex-direction:column; gap:4px; }
.settings-input { padding:6px 10px; border:1px solid #cbd5e1; border-radius: var(--radius-sm); font-size:13px; width:auto; min-width:140px; max-width:240px; background:#fff; }
.settings-help { font-size:11px; color:#94a3b8; line-height:1.4; margin-top:2px; }

/* 步骤2：不排课时间 - 三下拉 */
.unavail-mode-bar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.unavail-mode-bar select { padding:6px 10px; border:1px solid #cbd5e1; border-radius: var(--radius-sm); font-size:13px; background:#fff; }
.unavail-mode-bar .badge-tag { padding:3px 10px; background:#eef2ff; color:#4338ca; border-radius: var(--radius-md); font-size:11px; font-weight:600; }

/* 步骤3：连堂约束 - 不连堂节次 */
.no-consec-section { background:#fef3c7; border:1px solid #fbbf24; border-radius: var(--radius-sm); padding:12px 16px; margin-top:14px; }
.no-consec-title { font-size:13px; font-weight:700; color:#92400e; margin-bottom:6px; }
.no-consec-pair-list { display:flex; flex-wrap:wrap; gap:10px; margin-top:8px; }
.no-consec-pair { display:inline-flex; align-items:center; gap:4px; padding:5px 10px; background:#fff; border:1px solid #f59e0b; border-radius: var(--radius-sm); cursor:pointer; font-size:13px; user-select:none; }
.no-consec-pair input { cursor:pointer; }
.no-consec-pair.checked { background:#fef3c7; }

/* 步骤4：合班/走班 拆分 */
.combine-split-tabs { display:flex; gap:8px; margin-bottom:14px; border-bottom:1px solid #e2e8f0; padding-bottom:6px; }
.combine-split-tab { padding:8px 16px; font-size:13px; font-weight:600; color:#64748b; border:none; background:transparent; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-7px; }
.combine-split-tab.active { color:#4338ca; border-bottom-color:#6366f1; }
.walk-class-tag { display:inline-block; background:#dbeafe; color:#1d4ed8; padding:1px 6px; border-radius: var(--radius-xs); font-size:11px; margin-left:6px; }

/* 步骤6：预排 - 表格式左侧 */
.presched-info-table { width:100%; border-collapse:collapse; font-size:12px; }
.presched-info-table th { background:#f8fafc; padding:8px 10px; text-align:left; border-bottom:1px solid #e2e8f0; color:#475569; font-weight:600; }
.presched-info-table td { padding:8px 10px; border-bottom:1px solid #f1f5f9; }
.presched-info-table tr:hover td { background:#f8fafc; }
.presched-progress { display:inline-block; padding:2px 8px; border-radius: var(--radius-md); font-size:11px; font-weight:600; }
.presched-progress.full { background:#dcfce7; color:#166534; }
.presched-progress.partial { background:#fef3c7; color:#92400e; }
.presched-progress.empty { background:#fee2e2; color:#991b1b; }
.ps-drag-handle { display:inline-block; width:18px; height:18px; line-height:16px; text-align:center; background:#e2e8f0; border-radius: var(--radius-xs); color:#64748b; font-weight:bold; cursor:grab; font-size:12px; user-select:none; }
.ps-drag-handle:hover { background:#cbd5e1; color:#334155; }
.ps-drag-handle:active { cursor:grabbing; }
.ps-drag-full { background:#fef3c7; color:#d97706; }
.research-grid-table { border-collapse:collapse; font-size:12px; }
.research-grid-table th { background:#f8fafc; padding:6px 10px; font-weight:600; }
.research-grid-table td { padding:4px; }
.mini-grid { border-collapse:collapse; font-size:11px; }
.mini-grid th { background:#f8fafc; padding:3px 6px; font-weight:500; color:#64748b; }
.mini-grid td { padding:2px; }
.mini-grid .period-label { background:#f8fafc; padding:3px 6px; color:#64748b; font-weight:500; }
.presched-cell-slots { display:flex; flex-direction:column; gap:2px; min-height:20px; }
.presched-slot-chip { padding:2px 4px; background:#dbeafe; border-radius: var(--radius-xs); cursor:pointer; color:#1e40af; line-height:1.15; display:flex; flex-direction:column; gap:0px; }
.presched-slot-chip:hover { background:#bfdbfe; }
.presched-slot-chip .chip-course { font-size:11px; font-weight:600; white-space:normal; word-break:break-word; }
.presched-slot-chip .chip-meta { font-size:10px; color:#1e3a8a; white-space:normal; word-break:break-word; }
.presched-slot-chip.is-preset { background:#dcfce7; color:#15803d; border:1px solid #86efac; }
.presched-slot-chip.is-preset .chip-meta { color:#166534; }
/* 主课表锁定（lock_source=manual）：与主课表联动的预排，蓝色区分 */
.presched-slot-chip.is-manual { background:#e0f2fe; color:#0369a1; border:1px solid #7dd3fc; }
.presched-slot-chip.is-manual .chip-meta { color:#075985; }
.presched-slot-chip .chip-src { align-self:flex-end; font-size:8px; line-height:1; background:#f59e0b; color:#fff; border-radius: var(--radius-xs); padding:0 2px; margin-top:1px; }
.chip-info { display:block; white-space:nowrap; }

/* ===== 排课策略档位预设按钮 ===== */
.sp-preset-btn {
  padding:7px 16px;
  font-size:13px;
  font-weight:600;
  color:#475569;
  background:#fff;
  border:1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  cursor:pointer;
  transition:all .15s ease;
}
.sp-preset-btn:hover { border-color:#6366f1; color:#4f46e5; background:#eef2ff; }
.sp-preset-btn.sp-preset-active {
  border-color:#4f46e5;
  background:#4f46e5;
  color:#fff;
  box-shadow:0 2px 8px rgba(79,70,229,.28);
}
.sp-preset-btn.sp-preset-active:hover { background:#4338ca; color:#fff; }

/* #936 上午/下午分隔带：双细线小间隔（最小厚度，上下各 1px 实线） */
/* 必须用更高特异性覆盖 .tt-table tbody tr { height:46px }，否则分隔行仍被撑到 46px */
.tt-table tbody tr.tt-ampm-divider {
  height: 2px;
}
.tt-table .tt-ampm-divider td {
  height: 2px;
  line-height: 0;
  padding: 0;
  border: none;
  background: transparent;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
}

/* ===================================================================
   #953 C级：调课工作台可视化增强（对标 Untis / ASIMUT）
   根因：四项功能后端均已算出 from→to 精确坐标，但前端只在灰色工具条
   以文字 chip 呈现，网格本身零可视化 → 「看不清楚」。此处集中补齐：
   工具栏分组+激活态 / 模式横幅 / 常驻图例 / 序号徽标 / 搬迁源目标格 /
   禁排区红斜纹 / 撤离标记 / SVG 箭头叠层 / 迷你甘特 / 侧边抽屉 / 新手引导。
   =================================================================== */
/* 网格容器须作为 SVG 箭头叠层锚点（position:relative） */
.man-grid-wrap { position: relative; }

/* 工具栏分组 */
.studio-toolbar-groups { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.studio-tgroup { display:flex; align-items:center; gap:6px; padding:4px 8px; background:#f8fafc; border:1px solid #e2e8f0; border-radius: var(--radius-md); }
.studio-tgroup-label { font-size:11px; font-weight:700; color:#94a3b8; margin-right:3px; letter-spacing:.5px; }
.studio-toolbar-groups .btn { margin:0; }

/* 激活态按钮（进入某模式时变色发光，一眼可辨当前所处功能） */
.btn.studio-active { background: linear-gradient(180deg,#6366f1,#4f46e5); color:#fff; border-color:#4f46e5; box-shadow:0 2px 8px rgba(79,70,229,.35); }
.btn.studio-active:hover { background:#4338ca; color:#fff; }
.studio-multi-toggle.studio-active { background: linear-gradient(180deg,#3b82f6,#2563eb); border-color:#2563eb; box-shadow:0 2px 8px rgba(37,99,235,.35); color:#fff; }
#studio-timebox-btn.studio-active { background: linear-gradient(180deg,#f59e0b,#ea580c); border-color:#ea580c; box-shadow:0 2px 8px rgba(234,88,12,.35); color:#fff; }
#studio-pack-halfday.studio-active, #studio-pack-align.studio-active { background: linear-gradient(180deg,#10b981,#047857); border-color:#047857; box-shadow:0 2px 8px rgba(4,120,87,.35); color:#fff; }

/* 模式横幅（顶部，随当前功能切换配色） */
#studio-mode-banner { display:flex; align-items:center; gap:10px; padding:8px 14px; border-radius: var(--radius-md); font-size:13px; font-weight:600; margin-bottom:8px; border:1px solid transparent; animation: studioBannerIn .25s ease; }
@keyframes studioBannerIn { from { opacity:0; transform:translateY(-4px);} to {opacity:1; transform:none;} }
#studio-mode-banner .mb-icon { font-size:16px; }
#studio-mode-banner .mb-close { margin-left:auto; cursor:pointer; opacity:.6; font-size:13px; padding:2px 6px; border-radius: var(--radius-sm); }
#studio-mode-banner .mb-close:hover { opacity:1; background:rgba(0,0,0,.06); }
#studio-mode-banner.mode-view { background:#f1f5f9; color:#475569; border-color:#e2e8f0; }
#studio-mode-banner.mode-batch { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
#studio-mode-banner.mode-timebox { background:#fff7ed; color:#c2410c; border-color:#fed7aa; }
#studio-mode-banner.mode-pack { background:#ecfdf5; color:#047857; border-color:#a7f3d0; }
#studio-mode-banner.mode-smart { background:#faf5ff; color:#7e22ce; border-color:#e9d5ff; }

/* 常驻图例 */
.studio-legend { display:flex; gap:14px; flex-wrap:wrap; font-size:11px; color:#64748b; margin-top:10px; padding:8px 10px; background:#f8fafc; border:1px solid #e2e8f0; border-radius: var(--radius-sm); }
.studio-legend .lg { display:flex; align-items:center; gap:5px; }
.studio-legend .sw { width:14px; height:14px; border-radius: var(--radius-xs); border:1px solid #cbd5e1; flex-shrink:0; }
.sw-sel { background:#fffbeb; border:2px solid #f59e0b; }
.sw-tgt { background:#ecfdf5; border:2px dashed #059669; }
.sw-move { background:#eff6ff; border:2px solid #2563eb; }
.sw-batch { background:#eff6ff; border:2px solid #2563eb; }
.sw-timebox { background: repeating-linear-gradient(45deg,#fee2e2,#fee2e2 4px,#fecaca 4px,#fecaca 8px); border:1px solid #dc2626; }
.sw-forbid { background: repeating-linear-gradient(45deg,#fee2e2,#fee2e2 4px,#fecaca 4px,#fecaca 8px); }
.sw-evac { background:#fff7ed; border:2px solid #f59e0b; }
.sw-gantt { background: linear-gradient(90deg,#dbeafe,#bfdbfe); }

/* 网格内装饰：批量序号徽标 / 搬迁源·目标 / 禁排区 / 撤离 */
.tt-cell.tt-seq { }
.tt-cell.tt-seq .tt-seq-badge { position:absolute; top:1px; left:2px; min-width:15px; height:15px; line-height:15px; text-align:center; font-size:10px; font-weight:700; color:#fff; background:#2563eb; border-radius: var(--radius-sm); padding:0 3px; z-index:5; pointer-events:none; }
.tt-cell.tt-move-src { outline:3px solid #2563eb !important; outline-offset:-2px; background:#eff6ff !important; box-shadow: inset 0 0 0 1px #93c5fd; z-index:2; }
.tt-cell.tt-move-src::before { content:'迁出'; position:absolute; bottom:1px; left:2px; font-size:9px; font-weight:700; color:#1d4ed8; background:rgba(239,246,255,.92); padding:0 3px; border-radius: var(--radius-xs); z-index:5; pointer-events:none; }
.tt-cell.tt-move-tgt { outline:3px dashed #059669 !important; outline-offset:-2px; background:#ecfdf5 !important; box-shadow: inset 0 0 0 1px #6ee7b7; z-index:2; }
.tt-cell.tt-move-tgt::before { content:'迁入'; position:absolute; bottom:1px; left:2px; font-size:9px; font-weight:700; color:#047857; background:rgba(236,253,245,.92); padding:0 3px; border-radius: var(--radius-xs); z-index:5; pointer-events:none; }
.tt-cell.tt-forbidden { background: repeating-linear-gradient(45deg,#fee2e2,#fee2e2 5px,#fecaca 5px,#fecaca 10px) !important; }
.tt-cell.tt-forbidden::after { content:'禁排'; position:absolute; top:1px; right:2px; font-size:9px; font-weight:700; color:#b91c1c; background:rgba(254,226,226,.92); padding:0 3px; border-radius: var(--radius-xs); z-index:5; pointer-events:none; }
.tt-cell.tt-evac { outline:3px solid #f59e0b !important; outline-offset:-2px; background:#fff7ed !important; box-shadow: inset 0 0 0 1px #fcd34d; z-index:2; }
.tt-cell.tt-evac::before { content:'撤离'; position:absolute; top:1px; left:2px; font-size:9px; font-weight:700; color:#c2410c; background:rgba(255,247,237,.92); padding:0 3px; border-radius: var(--radius-xs); z-index:5; pointer-events:none; }

/* SVG 箭头叠层（搬迁/疏散走向一目了然） */
.studio-overlay { position:absolute; top:0; left:0; pointer-events:none; z-index:6; overflow:visible; }

/* 迷你甘特（嵌入网格上方：当前视图每日课时密度条） */
.studio-gantt { display:flex; gap:6px; margin:6px 0 2px; align-items:flex-end; height:44px; }
.studio-gantt .gg-day { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; font-size:10px; color:#64748b; }
.studio-gantt .gg-bar-wrap { width:100%; display:flex; align-items:flex-end; justify-content:center; flex:1; }
.studio-gantt .gg-bar { width:100%; max-width:48px; background:linear-gradient(180deg,#bfdbfe,#60a5fa); border-radius: var(--radius-xs) var(--radius-xs) 0 0; min-height:3px; transition:height .25s ease; }   /* #1174 */
.studio-gantt .gg-num { font-weight:700; color:#1e3a8a; margin-bottom:1px; }
.studio-gantt .gg-name { margin-top:2px; }

/* 侧边抽屉式智能操作盘 */
.studio-drawer-mask { position:fixed; inset:0; background:rgba(15,23,42,.35); z-index:1040; display:none; }
.studio-drawer-mask.open { display:block; }
.studio-drawer { position:fixed; top:0; right:0; height:100%; width:340px; max-width:86vw; background:#fff; box-shadow:-8px 0 30px rgba(0,0,0,.18); z-index:1041; transform:translateX(100%); transition:transform .25s ease; display:flex; flex-direction:column; }
.studio-drawer.open { transform:translateX(0); }
.studio-drawer-head { padding:12px 14px; border-bottom:1px solid #e5e7eb; display:flex; align-items:center; gap:8px; flex-shrink:0; }
.studio-drawer-head b { font-size:14px; flex:1; }
.studio-drawer-body { padding:12px 14px; overflow:auto; flex:1; }
.studio-drawer-foot { padding:10px 14px; border-top:1px solid #e5e7eb; display:flex; gap:8px; flex-shrink:0; }
.drawer-feat { border:1px solid #e5e7eb; border-radius: var(--radius-md); padding:10px; margin-bottom:10px; }
.drawer-feat .df-title { font-weight:700; font-size:13px; display:flex; align-items:center; gap:6px; }
.drawer-feat .df-status { font-size:11px; margin:5px 0 9px; line-height:1.5; }
.df-on { color:#059669; font-weight:600; }
.df-off { color:#94a3b8; }
.df-warn { color:#d97706; font-weight:600; }
.drawer-feat .df-actions { display:flex; gap:6px; flex-wrap:wrap; }
.drawer-feat .df-actions .btn { flex:1; min-width:84px; }

/* 新手引导 */
.studio-tour-mask { position:fixed; inset:0; background:rgba(15,23,42,.55); z-index:1050; display:none; align-items:center; justify-content:center; }
.studio-tour-mask.open { display:flex; }
.studio-tour-card { background:#fff; border-radius: var(--radius-lg); padding:20px 22px; max-width:380px; box-shadow:0 12px 40px rgba(0,0,0,.3); animation: studioTourIn .25s ease; }
@keyframes studioTourIn { from { opacity:0; transform:scale(.95);} to {opacity:1; transform:none;} }
.studio-tour-card h3 { margin:0 0 8px; font-size:16px; }
.studio-tour-card p { font-size:13px; color:#475569; line-height:1.6; margin:0 0 14px; }
.studio-tour-steps { display:flex; gap:6px; margin-bottom:12px; }
.studio-tour-dot { width:8px; height:8px; border-radius:50%; background:#cbd5e1; transition:background .2s; }
.studio-tour-dot.active { background:#4f46e5; }
.studio-tour-actions { display:flex; gap:8px; justify-content:flex-end; }
.tour-spot { position:relative; z-index:1051; box-shadow:0 0 0 3px #4f46e5, 0 0 0 9999px rgba(15,23,42,.55); border-radius: var(--radius-sm); }
@media (max-width:768px){ .studio-drawer { width:90vw; } .studio-toolbar-groups { gap:6px; } }

/* ===== #1282 任课班级「年级班级索引」（教师列表）===== */
.gc-idx { display:inline-flex; flex-wrap:wrap; align-items:center; gap:2px 0; line-height:1.7; }
.gc-cross { display:inline-block; margin-right:6px; padding:1px 7px; border-radius:999px;
            font-size:11px; font-weight:600; color:#b45309; background:#fef3c7; white-space:nowrap; }
.gc-gr { font-weight:600; color:#334155; white-space:nowrap; }
.gc-cls { white-space:normal; }
.gc-sep { color:#cbd5e1; margin:0 6px; }

/* ===== #1287 班级视角「年段 → 班级」分组索引 ===== */
.gc-group { margin-bottom:18px; }
.gc-group-head { display:flex; align-items:center; gap:8px; margin:0 0 8px; padding:7px 12px;
                 border-radius:8px; background:#eef2ff; font-size:13px; font-weight:600; color:#3730a3; }
.gc-group-head::before { content:''; width:8px; height:8px; border-radius:2px; background:#4f46e5; flex:0 0 auto; }

/* ===== #1302-C 手动调课「扫描中」中性态：首屏不乐观显绿 ===== */
/* 选中源课到服务端权威扫描返回前(~1s)，可达域退化为中性灰，避免本地启发式假绿。
   扫描成功/失败后再按真实结果着色(绿/红)或保守红。 */
body.scan-pending .tt-movable,
body.scan-pending .tt-blocked {
  background: #f2f3f5 !important;
  border-color: #e3e5e8 !important;
  color: #9aa0a6 !important;
}
/* ★ 2026-10-24 修复（真浏览器实测：中性态下 10/10 红格红底未被覆盖）：
   上面这条特异性只有 (0,2,1)，被 `.tt-cell.tt-class-ref.tt-blocked` /
   `.tt-cell.tt-teacher-pinned.tt-blocked`（(0,3,0)）这类复合选择器盖过 ——
   边框/文字/✗ 都中性化了，**唯独红底 rgb(254,242,242) 保留** ⇒
   「冲突扫描中 / 课表已更新待重检 / 扫描失败」时用户看到的仍是整片全红
   （反馈：有时可以、有时全红、也没提示）。
   补一条特异性更高的规则（class+attr=3、元素=2 ⇒ (0,3,2)），覆盖所有 td 变体
   与课名胶囊，确保中性态**绝不出现红底**（红色只留给定论「会冲突」）。 */
body.scan-pending td.tt-blocked[data-day],
body.scan-pending td.tt-movable[data-day] {
  background: #f2f3f5 !important;
  border-color: #e3e5e8 !important;
  color: #9aa0a6 !important;
}
body.scan-pending td.tt-blocked[data-day] .tt-course,
body.scan-pending td.tt-blocked[data-day] .mant-tt-course,
body.scan-pending td.tt-movable[data-day] .tt-course,
body.scan-pending td.tt-movable[data-day] .mant-tt-course {
  background: #eceef1 !important;
  color: #6b7280 !important;
  opacity: 0.55 !important;
}
body.scan-pending .tt-movable > .tt-course,
body.scan-pending .tt-blocked > .tt-course,
body.scan-pending .mant-tt-cell.tt-movable > .mant-tt-course,
body.scan-pending .mant-tt-cell.tt-blocked > .mant-tt-course { opacity: 0.55 !important; }
body.scan-pending .tt-cell.tt-movable::after,
body.scan-pending .tt-cell.tt-blocked::after,
body.scan-pending .mant-tt-cell.tt-movable::after,
body.scan-pending .mant-tt-cell.tt-blocked::after { content: none !important; }
body.scan-pending .tt-ref-move-icon { display: none !important; }
.scan-pending-badge {
  position: fixed; right: 16px; bottom: 16px; z-index: 9999;
  background: #fff; border: 1px solid #dadce0; border-radius: 8px;
  padding: 6px 12px; font-size: 13px; color: #1a73e8;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ===== 考务·监考员分组派场（投屏/分布图/A4） ===== */
.invig-screen { display: flex; flex-direction: column; gap: 22px; padding: 16px; background: #fff; }
.invig-sub h2 { font-size: 22px; margin: 0 0 12px; color: #0f172a; font-weight: 700; }
.invig-room {
  display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 12px;
  align-items: center; padding: 12px 18px; margin: 8px 0;
  border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc;
}
.invig-room .rn { font-weight: 700; color: #334155; font-size: 15px; }
.invig-room .m { font-size: 20px; font-weight: 600; }
.invig-room .m.a { color: #2563eb; }
.invig-room .m.b { color: #16a34a; }
.invig-room .m.c { color: #db2777; }
.dist-wall { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0; }
.dist-cell {
  width: 124px; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 10px; text-align: center; background: #fff;
}
.dist-cell .dc-no { font-size: 18px; font-weight: 700; color: #0f172a; }
.dist-cell .dc-g { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.dist-cell .dc-a { font-size: 14px; color: #334155; margin-top: 4px; }
.ac2-a4 { max-width: 760px; margin: 0 auto; background: #fff; padding: 20px; }
.ac2-a4 .a4-row { padding: 7px 0; border-bottom: 1px dashed #e2e8f0; font-size: 15px; color: #1e293b; }

/* ═══════════════════════════════════════════════════════════════════
   #1586-C1 全局兜底：.app-body 是 display:flex，.main-content 作为 flex 项
   默认 min-width:auto，一旦内部有宽表（116 处）或宽网格（.timetable-grid
   最小列宽 516px），它会把整页撑宽 ⇒ 顶栏/卡片右侧被裁，而不是自己内部滚动。
   显式 min-width:0 让它能收缩到剩余空间，配合 overflow:auto 内部滚动。
   ═══════════════════════════════════════════════════════════════════ */
.main-content { min-width: 0; }

/* ═══════════════════════════════════════════════════════════════════
   #1586-C 移动端专项（≤768px / ≤480px）
   ⚠️ 本段必须留在文件末尾：.main-content 的基础规则在 L2726（padding:28px 32px），
      而 L960 那段 @media(max-width:768px){.main-content{padding:16px}} 写在它之前，
      同特异性下被后者覆盖 ⇒ 窄屏 16px 从未生效（375px 机型白吃 64px 横向留白）。
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* 1. 内容区留白 */
    .main-content { padding: 16px 14px; }
    .page-title { font-size: 20px; margin: 0 0 14px; }

    /* 2. 侧栏折叠按钮在移动端原本是「死的」：≤768px 的 L955 把 .sidebar 强制 72px，
          而 toggleSidebar() 只切 .collapsed ⇒ 让 .collapsed 在小屏真正收起为 0 宽 */
    .sidebar { width: 72px; }
    .sidebar.collapsed { width: 0; overflow: hidden; box-shadow: none; }
    .sidebar.collapsed > * { visibility: hidden; }

    /* 2b. 72px 图标条里品牌文字（.brand-name 是 nowrap）会横向溢出被裁，
           导航分组标题同理 ⇒ 与 .collapsed 态保持一致，只留 logo 与图标 */
    .sidebar .brand-text { display: none; }
    .sidebar-brand { justify-content: center; padding: 18px 0; gap: 0; }
    .sidebar .nav-group-title { display: none; }

    /* 3. 课表网格：5 列被挤到 ~50px，学科名/教师名溢出
          （原 overflow:hidden 会直接裁掉右侧，且无横滚兜底） */
    .timetable-grid {
        grid-template-columns: 56px repeat(5, minmax(92px, 1fr));
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .timetable-cell { padding: 6px 3px; font-size: 12px; min-height: 52px; }

    /* 4. 卡片内边距 */
    .card { padding: 16px; }
    .toolbar { gap: 8px; margin-bottom: 12px; }
}

@media (max-width: 480px) {
    .main-content { padding: 14px 12px; }
    .page-title { font-size: 18px; }

    /* 顶栏：60px 高 + 左右 24px 内边距，在 375px 上挤压选中器 */
    .topbar { padding: 0 12px; }
    .topbar .topbar-divider,
    .topbar-logo,
    .topbar-user { display: none; }
    .topbar-left { gap: 8px; }

    /* 统计芯片：9 个挤 3 列，收一收字号与留白 */
    .stat-cards.stat-row-compact { gap: 8px; }
    .stat-chip { padding: 8px 4px; }
    .stat-chip .stat-num,
    .stat-chip .stat-value { font-size: 16px; }

    .card { padding: 14px; }
    .toolbar .btn { padding: 8px 12px; font-size: 13px; }
}

/* ===== theme-bundle source: design-system.css (cascade order preserved) ===== */
/* =============================================================================
   排课系统 · 设计系统层（design-system.css）
   -----------------------------------------------------------------------------
   定位：**叠加层**，必须排在 style.css 之后加载（index.html 中已保证顺序）。
   语言：现代精致企业风 —— 语义化令牌 + 玻璃拟态 + 微动效。
        日常教务 / 课表保持「亮色专业」观感（阳光分班大屏另走深色旗舰，见 P3）。

   改本文件前必读的铁律
   -----------------------------------------------------------------------------
   1. **只改「表现」，绝不改「布局」**：禁止修改 display / position / width /
      height / padding / margin / flex / grid / overflow 等影响盒子模型的属性。
      课表网格、手动调课表、合班面板的布局是历史踩坑冻结过的，动一个像素就可能
      越界或压栏。
      允许：background / color / border / border-radius / box-shadow /
            backdrop-filter / transition / transform(仅 hover 微交互) /
            font-weight / letter-spacing / gradient / filter。
   2. **令牌优先**：改整体观感优先改 :root 令牌，所有引用 var() 的规则自动跟随，
      避免逐条覆盖导致的风格分裂。
   3. **ac2-* 覆盖必须提权**：教务域样式由 academic.js **运行时注入** <style
      id="acad2-style">，加载晚于本文件、同特异性下会赢。故覆盖统一使用
      `body .ac2-xxx`（0,1,1）压过 `.ac2-xxx`（0,1,0）。
   4. **令牌单权威**：全站 `:root` 令牌**只在本文件定义**。style.css 的
      `:root` 已于 #1172 清空（仅留指针注释 + 使用点兜底值）。新增令牌一律
      写这里，禁止在 style.css / 内联 style / JS 里再定义 `--*`。
      判据工具：`python _audit_tokens.py` → 期望 `TOKEN_AUDIT_OK`。
   5. **零依赖**：不引入三方库、不依赖构建；原生 CSS 变量，可平滑演进数十年。

   -----------------------------------------------------------------------------
   变更记录
   -----------------------------------------------------------------------------
   #1172 合并两套 :root —— style.css 的 33 个变量并入本文件（15 个冲突取本文件
         值、3 个独有变量 --sidebar-width/--sidebar-collapsed/--font-family 迁入）。
   #1173 补齐间距 10 档 / 字号+行高 9 对 / 字重 4 档 / 层级 12 级。
   #1174 圆角七档制（xs4 / sm8 / md12 / lg16 / xl20 / 2xl24 / full999）。
   #1175 新增第 11 节「基础组件层（.ds-*）」—— 卡片 / 表格 / 空态 / 页头 /
         步骤条 / 按钮 / 徽章 / 指标卡，全部走令牌、0 硬编码。
         配套 JS：frontend/js/ds-components.js（window.DS，纯字符串零依赖）。
   ============================================================================= */

/* ═══════════════════════════════════════════════════════════════════════
   1. 令牌层（语义化 · 升级既有 + 新增未来令牌）
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    /* ── 品牌色（保留 indigo 品牌资产，提升纯度与层次） ── */
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3f37c9;
    --primary-gradient: linear-gradient(135deg, #5b6ef5 0%, #8b5cf6 100%);
    --primary-gradient-soft: linear-gradient(135deg, rgba(91, 110, 245, .10) 0%, rgba(139, 92, 246, .10) 100%);

    /* ── 语义色 ── */
    --accent: #0891b2;
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --success: #10b981;
    --success-deep: #059669;
    --warning: #f59e0b;
    --warning-deep: #d97706;
    --danger: #ef4444;
    --danger-deep: #dc2626;
    --info: #3b82f6;
    /* 考试 / 监考状态色（考务域统一令牌；academic.js 经 .ac2-st[data-st]/[data-ist] 引用，去除内联色值） */
    --st-draft: #64748b; --st-draft-bg: #64748b14;
    --st-arranged: #2563eb; --st-arranged-bg: #2563eb14;
    --st-published: #16a34a; --st-published-bg: #16a34a14;
    --st-ongoing: #d97706; --st-ongoing-bg: #d9770614;
    --st-archived: #0d9488; --st-archived-bg: #0d948814;
    --ist-assigned: #2563eb; --ist-confirmed: #16a34a; --ist-declined: #dc2626; --ist-replaced: #d97706;

    /* ── 中性面（更冷、更柔的现代企业底） ── */
    --bg: #eef1f7;
    --bg-page: #f4f6fb;
    --bg-card: #ffffff;
    --bg-card-solid: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-sidebar: #0f172a;
    --bg-sidebar-grad: linear-gradient(180deg, #101a31 0%, #0b1220 100%);

    /* ── 文字 ── */
    --text: #0f172a;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --text-sidebar: #cbd5e1;
    --text-sidebar-dim: #94a3b8;

    /* ── 描边 ── */
    --border: #e4e8f0;
    --border-light: #eef1f6;
    --border-strong: #d7dde8;

    /* ── 阴影（多层柔光，取代单层硬阴影） ── */
    --shadow: 0 1px 2px -1px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .05);
    --shadow-md: 0 4px 6px -2px rgba(15, 23, 42, .05), 0 10px 24px -6px rgba(15, 23, 42, .10);
    --shadow-lg: 0 10px 20px -6px rgba(15, 23, 42, .10), 0 24px 48px -12px rgba(15, 23, 42, .16);
    --shadow-glow: 0 0 0 1px rgba(99, 102, 241, .14), 0 8px 24px -4px rgba(99, 102, 241, .28);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, .6);

    /* ── 布局 / 字体（#1172 自 style.css 迁入 —— 本文件为唯一权威） ──
       ⚠️ 这三个令牌历史上定义在 style.css，而引用方也在 style.css，导致
          「新体系反向依赖旧文件」。迁到此处后 style.css 侧改用带兜底的
          var(--x, 兜底值)，即使本文件加载失败布局也不会塌。            */
    --sidebar-width: 244px;
    --sidebar-collapsed: 72px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

    /* ── 圆角（#1174 · 七档制 · 全站唯一权威）──────────────────────
       取值依据：style.css 历史硬编码分布（8px×46 / 10px×34 / 6px×27 /
       12px×24 / 4px×18 / 11px×11 …），按「就近归并、单点跳变 ≤2px」定档。
       ⚠️ 旧值 --radius 14 / --radius-sm 10 / --radius-lg 18 各归到临近档
          位（12 / 8 / 16），最大跳变 2px，肉眼不可辨；--radius-xl 的 3 处
          引用（modal / login-card / pk-hero）已显式改指 --radius-2xl，
          保持 24px 不变。旧别名 --radius 的 13 处引用已全部直连 --radius-md
          并删除别名 —— 全站零死令牌。                                 */
    --radius-xs:   4px;    /* 微元素：dot / 角标 / 进度条 / 小标签 */
    --radius-sm:   8px;    /* 控件：button / input / chip / tag / 单元格 */
    --radius-md:  12px;    /* 小容器：列表项 / 卡片内块 / 分段控件 */
    --radius-lg:  16px;    /* 容器：card / panel / dropzone */
    --radius-xl:  20px;    /* 大容器：section / side-panel */
    --radius-2xl: 24px;    /* 旗舰：modal / login / hero */
    --radius-full: 999px;  /* 胶囊（正圆请直接写 50%，勿用本档）*/

    /* ── 间距（#1173 · 4px 基准 · 10 档）────────────────────────────
       只声明不使用：现存 2278 处硬编码 px 本轮不动（改 padding/margin
       = 改布局，违反本文件铁律 1）。新写的组件一律走这组令牌。        */
    --space-0:  0;
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-8:  32px;
    --space-10: 40px;
    --space-12: 48px;

    /* ── 字号 / 行高（#1173 · 成对使用，避免行高漂移）──────────────
       ⚠️ 命名易混警告：--text / --text-light / --text-muted /
          --text-sidebar* 是「颜色」令牌；本组是「字号」令牌，不是一回事。 */
    --font-size-3xs: 10px;   --leading-3xs: 1.5;
    --font-size-2xs: 11px;   --leading-2xs: 1.5;
    --font-size-xs:  12px;   --leading-xs:  1.6;
    --font-size-sm:  13px;   --leading-sm:  1.6;
    --font-size-md:  14px;   --leading-md:  1.6;
    --font-size-lg:  16px;   --leading-lg:  1.5;
    --font-size-xl:  20px;   --leading-xl:  1.4;
    --font-size-2xl: 26px;   --leading-2xl: 1.3;
    --font-size-3xl: 32px;   --leading-3xl: 1.25;

    /* ── 字重（#1173）── */
    --weight-regular:  400;
    --weight-medium:   500;
    --weight-semibold: 600;
    --weight-bold:     700;

    /* ── 动效 ── */
    --transition: .22s cubic-bezier(.22, 1, .36, 1);
    --ease-quint: cubic-bezier(.22, 1, .36, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

    /* ── 玻璃拟态 ── */
    --glass-bg: rgba(255, 255, 255, .72);
    --glass-bg-strong: rgba(255, 255, 255, .86);
    --glass-blur: 16px;
    --glass-border: rgba(255, 255, 255, .55);

    /* ── 焦点环（无障碍） ── */
    --ring-focus: 0 0 0 3px rgba(99, 102, 241, .16);
    --ring-focus-danger: 0 0 0 3px rgba(239, 68, 68, .16);

    /* ── 层级阶梯（#1173）──────────────────────────────────────────
       ⚠️ 现存 18 种硬编码 z-index（9999×3 / 1200 / 1051 / 1050 / 1041 /
          1040 / 2000 / 100 / 50 / 11 / 10 / 6∕5∕4∕3∕2∕1∕0 …）。
          本轮**只建阶梯、不做批量替换** —— z-index 改错会直接压坏弹窗
          与下拉，属于「行为级」而非「表现级」改动，留待 #1175 组件层
          按组件逐个收口，届时逐项验证层叠效果。                        */
    --z-base:       0;
    --z-raised:     1;
    --z-sticky:     50;
    --z-sidebar:    100;
    --z-topbar:     200;
    --z-dropdown:   400;
    --z-popover:    600;
    --z-tooltip:    700;
    --z-modal:      1000;
    --z-modal-mask: 1040;
    --z-toast:      2000;
    --z-max:        9999;

    /* ── 组件尺寸（#1175 · 供 .ds-* 内部推导，杜绝魔法数字）────────
       为什么不放成组件上的局部变量：_audit_tokens.py / _check_css_struct.py
       只认 `:root` 里的定义（令牌单权威，见铁律 4），写在 .ds-steps 上的
       --x 会被判成「悬空引用」。故统一登记在此。                     */
    --ds-dot:  28px;   /* 步骤条圆点直径 */
    --ds-line: 2px;    /* 步骤条连接线粗细（垂直居中偏移由此推导）*/
}

/* ═══════════════════════════════════════════════════════════════════════
   2. 基础层（滚动条 / 焦点环 / 选中态 / 降低动效）
   全部为纯表现增强，不改变任何布局。
   ═══════════════════════════════════════════════════════════════════════ */

/* 现代细滚动条 */
.main-content,
.sidebar-nav,
.modal,
.table-container,
[style*="overflow"] {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.main-content::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.table-container::-webkit-scrollbar { width: 8px; height: 8px; }
.main-content::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    background-clip: content-box;
}
.main-content::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: content-box; }
.main-content::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track { background: transparent; }

/* 统一焦点环：键盘可达性显著提升，鼠标点击不显示 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: none;
    box-shadow: var(--ring-focus);
    border-radius: var(--radius-sm);
}

/* 文本选中态 */
::selection {
    background: rgba(99, 102, 241, .18);
    color: var(--text);
}

/* 尊重系统「减少动效」偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   3. 框架层（侧边栏 / 顶栏 / 导航）
   ═══════════════════════════════════════════════════════════════════════ */

.sidebar {
    background: var(--bg-sidebar-grad);
    box-shadow: 1px 0 0 rgba(255, 255, 255, .05), 16px 0 48px -12px rgba(15, 23, 42, .28);
}

.sidebar-nav { padding: 8px 10px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); background-clip: content-box; }

/* 导航项：更细腻的悬停与激活态 */
.nav-item {
    border-radius: var(--radius-md);
    font-weight: 500;
    letter-spacing: .2px;
}
.nav-item:hover {
    background: rgba(255, 255, 255, .075);
    color: #f8fafc;
}
.nav-item.active {
    background: var(--primary-gradient);
    box-shadow: 0 6px 18px -4px rgba(99, 102, 241, .48), inset 0 1px 0 rgba(255, 255, 255, .18);
    font-weight: 600;
}
.nav-item.active::before { border-radius: 0 var(--radius-xs) var(--radius-xs) 0; opacity: .95; }   /* #1174 */

/* 侧边栏品牌徽标 */
.brand-badge {
    background: var(--primary-gradient);
    box-shadow: 0 2px 8px rgba(99, 102, 241, .4);
}

/* 任务选择器：玻璃质感 */
#task-selector {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#task-selector:hover { background: rgba(255, 255, 255, .11); }

/* 顶栏：玻璃模糊 + 底部细描边 */
.topbar {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .03);
}

/* 顶栏按钮 */
.btn-logout {
    border-radius: var(--radius-md);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.btn-logout:hover {
    background: rgba(239, 68, 68, .08);
    color: var(--danger);
    box-shadow: var(--ring-focus-danger);
}
.btn-upgrade {
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px -2px rgba(99, 102, 241, .42);
    transition: transform var(--transition), box-shadow var(--transition);
}
.btn-upgrade:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(99, 102, 241, .52);
}
.topbar-avatar, .avatar-circle {
    box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(15, 23, 42, .14);
    transition: transform var(--transition), box-shadow var(--transition);
}
.topbar-avatar:hover { transform: scale(1.06); }

/* ═══════════════════════════════════════════════════════════════════════
   4. 卡片与统计卡（玻璃拟态 · 微动效）
   ═══════════════════════════════════════════════════════════════════════ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.card-header {
    border-bottom: 1px solid var(--border-light);
}
.card-header h3 {
    font-weight: 650;
    letter-spacing: .3px;
}

.stat-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.stat-card::before {
    background: var(--primary-gradient);
    opacity: .75;
    height: 3px;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, .22);
}
.stat-card .stat-value {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: -.5px;
}

/* ═══════════════════════════════════════════════════════════════════════
   5. 按钮与表单（微交互 · 按压反馈）
   ═══════════════════════════════════════════════════════════════════════ */

.btn {
    border-radius: var(--radius-md);
    font-weight: 550;
    letter-spacing: .2px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px -2px rgba(99, 102, 241, .38), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover {
    box-shadow: 0 8px 20px -4px rgba(99, 102, 241, .48), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-success { box-shadow: 0 4px 12px -2px rgba(16, 185, 129, .34); }
.btn-warning { box-shadow: 0 4px 12px -2px rgba(245, 158, 11, .34); }
.btn-danger  { box-shadow: 0 4px 12px -2px rgba(239, 68, 68, .34); }

.btn-outline {
    background: #fff;
    border: 1px solid var(--border-strong);
    color: var(--text);
}
.btn-outline:hover {
    background: var(--bg-subtle);
    border-color: var(--primary-light);
    color: var(--primary);
    box-shadow: var(--ring-focus);
}
.btn:disabled {
    box-shadow: none;
    transform: none;
    filter: saturate(.5);
}

/* 表单控件：更清晰的聚焦态 */
.form-control,
.form-input,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-control:focus,
.form-input:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-light);
    box-shadow: var(--ring-focus);
    outline: none;
}
.form-control:hover,
.form-input:hover,
select:hover,
textarea:hover { border-color: #c3cbdb; }

/* ═══════════════════════════════════════════════════════════════════════
   6. 表格（现代轻量化）
   ═══════════════════════════════════════════════════════════════════════ */

.table {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}
.table th {
    background: var(--bg-subtle);
    color: var(--text-light);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .4px;
    text-transform: none;
}
.table td {
    border-bottom: 1px solid var(--border-light);
}
.table tbody tr:hover {
    background: rgba(99, 102, 241, .035);
}
.table-container {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: #fff;
    box-shadow: var(--shadow);
}

/* 标签 / 徽章 */
.tag,
.badge {
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: .2px;
}
.tag-primary { background: rgba(99, 102, 241, .10); color: var(--primary-dark); }
.tag-success { background: rgba(16, 185, 129, .12); color: var(--success-deep); }
.tag-warning { background: rgba(245, 158, 11, .14); color: var(--warning-deep); }
.tag-danger  { background: rgba(239, 68, 68, .12);  color: var(--danger-deep); }

/* ═══════════════════════════════════════════════════════════════════════
   7. 模态框与 Toast（玻璃 + 入场动效）
   ═══════════════════════════════════════════════════════════════════════ */

.modal-overlay {
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.modal {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);   /* #1174：大容器锁 24px，不随 xl 档降到 20px */
    box-shadow: 0 24px 64px -12px rgba(15, 23, 42, .32);
    animation: pk-modal-in .28s var(--ease-quint);
}
@keyframes pk-modal-in {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast {
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .34);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 550;
    letter-spacing: .2px;
}

/* ═══════════════════════════════════════════════════════════════════════
   8. 登录页（第一印象 · 品牌质感升级）
   ═══════════════════════════════════════════════════════════════════════ */

.login-hero {
    position: relative;
    overflow: hidden;
}
/* 极光渐变光晕，取代原先单一 glow，营造「先进」观感 */
.login-hero::after {
    content: '';
    position: absolute;
    inset: -30% -10% auto -10%;
    height: 70%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(99, 102, 241, .28), transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, .22), transparent 60%),
        radial-gradient(ellipse at 50% 10%, rgba(6, 182, 212, .16), transparent 60%);
    filter: blur(38px);
    pointer-events: none;
    z-index: 0;
}
.login-hero-inner { position: relative; z-index: 1; }
.login-hero-glow { z-index: 0; }

.login-card {
    border-radius: var(--radius-2xl);   /* #1174：锁 24px */
    box-shadow: 0 24px 64px -16px rgba(15, 23, 42, .22);
    border: 1px solid var(--border-light);
}
.login-feats .lf-ico {
    background: var(--primary-gradient-soft);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .16);
}
.auth-tab {
    border-radius: var(--radius-md);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.auth-tab.active {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px -2px rgba(99, 102, 241, .4);
}

/* ═══════════════════════════════════════════════════════════════════════
   9. 教务域 ac2-* 现代化
   ⚠️ academic.js 运行时注入 <style id="acad2-style">，晚于本文件加载，
      故一律以 `body .ac2-xxx`（0,1,1）提权覆盖 `.ac2-xxx`（0,1,0）。
   ═══════════════════════════════════════════════════════════════════════ */

body .ac2-btn {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: #fff;
    color: #334155;
    font-weight: 550;
    letter-spacing: .2px;
    transition: transform var(--transition), box-shadow var(--transition),
                background var(--transition), border-color var(--transition);
}
body .ac2-btn:hover {
    transform: translateY(-1px);
    border-color: var(--primary-light);
    color: var(--primary);
    box-shadow: var(--ring-focus);
}
body .ac2-btn:active { transform: translateY(0); }

body .ac2-btn.pri {
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    box-shadow: 0 4px 12px -2px rgba(14, 165, 233, .38), inset 0 1px 0 rgba(255, 255, 255, .2);
    border-color: transparent;
    font-weight: 600;
}
body .ac2-btn.pri:hover {
    box-shadow: 0 8px 20px -4px rgba(14, 165, 233, .46);
    color: #fff;
    border-color: transparent;
}

/* 侧栏 PRO 角标：原 index.html 内联渐变统一为令牌 */
.ac2-pro {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    border-radius: 8px;
    padding: 1px 6px;
    vertical-align: middle;
    background: var(--accent-gradient);
}
body .ac2-btn.dgr {
    color: var(--danger-deep);
    border-color: rgba(239, 68, 68, .28);
}
body .ac2-btn.dgr:hover {
    background: rgba(239, 68, 68, .07);
    border-color: rgba(239, 68, 68, .45);
    color: var(--danger-deep);
    box-shadow: var(--ring-focus-danger);
}

body .ac2-tbl {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    font-size: 13px;
}
body .ac2-tbl th {
    background: var(--bg-subtle);
    color: var(--text-light);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .4px;
    border-bottom: 1px solid var(--border);
}
body .ac2-tbl td {
    border-bottom: 1px solid var(--border-light);
    color: #334155;
}
body .ac2-tbl tbody tr:hover {
    background: rgba(99, 102, 241, .035);
}

/* 教务域输入框 / 下拉 / 链接 */
body .ac2-inp,
body .ac2-sel {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    transition: border-color var(--transition), box-shadow var(--transition);
}
body .ac2-inp:focus,
body .ac2-sel:focus {
    border-color: var(--primary-light);
    box-shadow: var(--ring-focus);
    outline: none;
}
body .ac2-link {
    color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}
body .ac2-link:hover {
    background: rgba(99, 102, 241, .08);
    color: var(--primary-dark);
}
/* #1176：body .ac2-empty 已随 .ac2-empty 退役一并删除。
   academic.js 的 60 处空态全部收口到 DS.empty() / DS.loading()，
   样式见第 11.3 节（空态）与第 11.3b 节（加载占位）。 */

/* ═══════════════════════════════════════════════════════════════════════
   10. 未来组件层（.pk-*，供 P2 一体化门户使用，纯新增不冲突）
   ═══════════════════════════════════════════════════════════════════════ */

/* 页面级 Hero 头图 */
.pk-hero {
    position: relative;
    background: var(--primary-gradient-soft);
    border: 1px solid rgba(99, 102, 241, .14);
    border-radius: var(--radius-2xl);   /* #1174：hero 锁 24px */
    box-shadow: var(--shadow);
    overflow: hidden;
}
.pk-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 85% -20%, rgba(139, 92, 246, .16), transparent 60%);
    pointer-events: none;
}

/* 玻璃卡片 */
.pk-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* KPI 指标块 */
.pk-kpi {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.pk-kpi:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, .2);
}
.pk-kpi-v {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 750;
    letter-spacing: -.5px;
}

/* 分区标题 */
.pk-section {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
}
.pk-section-hd {
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, #fff, var(--bg-subtle));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* 状态点 */
.pk-dot {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .14);
}
.pk-dot.warn { box-shadow: 0 0 0 3px rgba(245, 158, 11, .16); }
.pk-dot.err  { box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); }

/* 骨架屏（数据加载态，替代空白） */
.pk-skeleton {
    background: linear-gradient(90deg, #eef1f6 25%, #f6f8fc 50%, #eef1f6 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-sm);
    animation: pk-shimmer 1.4s ease-in-out infinite;
}
@keyframes pk-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   11. 一体化门户（#1169 教务 ↔ 课表）· 班级 360° / 教师 360° / 一致性体检
   ───────────────────────────────────────────────────────────────────────
   纯新增命名空间（.pk-portal* / .pk-side* / .pk-tt* / .pk-check*），
   与既有 style.css、academic.js 运行时注入的 .ac2-* 三方完全隔离。
   布局全部走 CSS Grid / Table，不依赖任何既有布局类，可安全独立演进。
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 骨架：左列表 + 右详情 ── */
.pk-portal {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
@media (max-width: 1100px) {
    .pk-portal { grid-template-columns: 1fr; }
}

/* ── 头部 ── */
.pk-portal-hero { padding: 17px 20px; margin-bottom: 14px; }
.pk-portal-hero h3 {
    margin: 0 0 5px; font-size: 18px; font-weight: 750;
    letter-spacing: -.3px; color: var(--text);
}
.pk-portal-hero p {
    margin: 0; font-size: 12.5px; color: var(--text-muted);
    line-height: 1.65; max-width: 780px;
}

.pk-portal-bar {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-bottom: 14px;
}

/* ── 分段控件（模式切换）── */
.pk-seg {
    display: inline-flex; padding: 4px; gap: 2px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}
.pk-seg button {
    border: 0; background: transparent; color: var(--text-light);
    font-size: 13px; font-weight: 600; padding: 7px 15px;
    /* #1174：--radius 是待废弃别名，此处直连 md 档（12-3=9px，原 14-3=11px，Δ2px）*/
    border-radius: calc(var(--radius-md) - 3px); cursor: pointer;
    transition: var(--transition); font-family: inherit;
}
.pk-seg button:hover { color: var(--text); }
.pk-seg button.on {
    background: #fff; color: var(--primary);
    box-shadow: var(--shadow); font-weight: 700;
}

/* ── 搜索框 ── */
.pk-search { position: relative; flex: 1; min-width: 170px; max-width: 300px; }
.pk-search input {
    width: 100%; padding: 8px 12px 8px 32px;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    font-size: 13px; background: var(--bg-card); color: var(--text);
    transition: var(--transition); font-family: inherit;
}
.pk-search input:focus {
    outline: 0; border-color: var(--primary); box-shadow: var(--ring-focus);
}
.pk-search::before {
    content: '🔍'; position: absolute; left: 10px; top: 50%;
    transform: translateY(-50%); font-size: 11px; opacity: .45;
    pointer-events: none;
}

/* ── 左栏：列表 ── */
.pk-side {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 130px);
    display: flex; flex-direction: column;
}
@media (max-width: 1100px) {
    .pk-side { position: static; max-height: 320px; }
}
.pk-side-hd {
    padding: 11px 14px; border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, #fff, var(--bg-subtle));
    font-size: 11.5px; font-weight: 700; color: var(--text-muted);
    letter-spacing: .6px; display: flex; align-items: center; gap: 8px;
}
.pk-side-hd .n {
    margin-left: auto; font-size: 11px; font-weight: 600;
    color: var(--text-light); background: var(--bg-subtle);
    border-radius: var(--radius-xl); padding: 2px 8px;
}
.pk-side-list { overflow: auto; flex: 1; padding: 6px; }
.pk-side-grp {
    font-size: 11px; font-weight: 700; color: var(--text-light);
    padding: 10px 10px 4px; letter-spacing: .5px;
}
.pk-side-item {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 13px; color: var(--text);
    transition: var(--transition); border: 1px solid transparent;
}
.pk-side-item:hover { background: var(--bg-subtle); }
.pk-side-item.on {
    background: var(--primary-gradient-soft);
    border-color: rgba(99, 102, 241, .22);
    color: var(--primary-dark); font-weight: 650;
}
.pk-side-item .sb {
    margin-left: auto; font-size: 11px; color: var(--text-light);
    font-weight: 600;
}
.pk-side-item .av {
    width: 26px; height: 26px; border-radius: var(--radius-sm);
    display: grid; place-items: center;
    font-size: 11px; font-weight: 700; color: #fff; flex: none;
}

/* ── 右栏：详情 ── */
.pk-detail { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pk-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}
.pk-kpi { padding: 14px 15px; }
.pk-kpi-v { font-size: 24px; line-height: 1.1; }
.pk-kpi-l { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.pk-panel {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.pk-panel-hd {
    padding: 11px 15px; border-bottom: 1px solid var(--border-light);
    font-size: 13.5px; font-weight: 700; color: var(--text);
    background: linear-gradient(180deg, #fff, var(--bg-subtle));
    display: flex; align-items: center; gap: 8px;
}
.pk-panel-hd .r {
    margin-left: auto; font-size: 11.5px; font-weight: 600;
    color: var(--text-muted);
}
.pk-panel-bd { padding: 14px 15px; }

/* ── 课表网格（门户核心视觉）── */
.pk-tt-wrap { overflow-x: auto; }
.pk-tt {
    width: 100%; border-collapse: separate; border-spacing: 5px;
    table-layout: fixed; min-width: 560px;
}
.pk-tt th {
    font-size: 11.5px; font-weight: 700; color: var(--text-muted);
    padding: 5px 4px; text-align: center; letter-spacing: .5px;
}
.pk-tt th.pk-tt-per { width: 60px; color: var(--text-light); font-weight: 600; }
.pk-tt-cell {
    position: relative; border-radius: var(--radius-sm);
    padding: 7px 8px; min-height: 54px; vertical-align: top;
    border: 1px solid var(--border-light); background: var(--bg-card);
    transition: var(--transition);
}
.pk-tt-cell.has { border-left: 3px solid var(--primary); }
.pk-tt-cell.has:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.pk-tt-cell.empty {
    background: repeating-linear-gradient(135deg, transparent,
        transparent 6px, rgba(148, 163, 184, .05) 6px,
        rgba(148, 163, 184, .05) 7px);
    border-style: dashed;
}
.pk-tt-course {
    font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--text);
}
.pk-tt-meta {
    font-size: 11px; color: var(--text-muted); margin-top: 3px; line-height: 1.35;
}
.pk-tt-flags {
    position: absolute; top: 5px; right: 5px;
    display: flex; gap: 3px;
}
.pk-tt-flag {
    font-size: 9px; font-weight: 700; border-radius: var(--radius-xs);
    padding: 1px 4px; line-height: 1.5;
}
.pk-tt-flag.lock { background: rgba(245, 158, 11, .15); color: var(--warning-deep); }
.pk-tt-flag.comb { background: rgba(99, 102, 241, .15); color: var(--primary-dark); }
.pk-tt-idx {
    font-size: 11.5px; font-weight: 700; color: var(--text-muted);
    text-align: center; white-space: nowrap;
}

/* ── 进度条（工作量）── */
.pk-bar {
    height: 7px; border-radius: var(--radius-xl);
    background: var(--bg-subtle); overflow: hidden;
}
.pk-bar-fill {
    height: 100%; border-radius: var(--radius-xl);
    background: var(--primary-gradient);
    transition: width .6s var(--ease-quint);
}
.pk-bar-fill.warn { background: linear-gradient(90deg, #f59e0b, #f97316); }
.pk-bar-fill.err  { background: linear-gradient(90deg, var(--danger), var(--danger-deep)); }

/* ── 标签 ── */
.pk-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: var(--radius-xl); font-size: 11.5px;
    font-weight: 600; background: var(--bg-subtle);
    color: var(--text-light); border: 1px solid var(--border-light);
}
.pk-chip.pri  { background: var(--primary-gradient-soft); color: var(--primary-dark); border-color: rgba(99, 102, 241, .2); }
.pk-chip.warn { background: rgba(245, 158, 11, .12); color: var(--warning-deep); border-color: rgba(245, 158, 11, .22); }
.pk-chip.err  { background: rgba(239, 68, 68, .1);  color: var(--danger-deep);  border-color: rgba(239, 68, 68, .2); }
.pk-chip.ok   { background: rgba(16, 185, 129, .12); color: var(--success-deep); border-color: rgba(16, 185, 129, .22); }

/* ── 数据表格 ── */
.pk-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.pk-tbl th {
    font-size: 11.5px; font-weight: 700; color: var(--text-muted);
    text-align: left; padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap; letter-spacing: .4px;
}
.pk-tbl td {
    padding: 9px 10px; border-bottom: 1px solid var(--border-light);
    color: var(--text);
}
.pk-tbl tbody tr { transition: background var(--transition); }
.pk-tbl tbody tr:hover { background: var(--bg-subtle); }
.pk-tbl tbody tr:last-child td { border-bottom: 0; }

/* ── 一致性体检项 ── */
.pk-check {
    display: flex; align-items: flex-start; gap: 11px;
    padding: 12px 14px; border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-card); margin-bottom: 9px;
    transition: var(--transition);
}
.pk-check:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.pk-check .ic {
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    display: grid; place-items: center; font-size: 14px; flex: none;
}
.pk-check.ok   .ic { background: rgba(16, 185, 129, .12); }
.pk-check.warn .ic { background: rgba(245, 158, 11, .13); }
.pk-check.err  .ic { background: rgba(239, 68, 68, .12); }
.pk-check .tx { min-width: 0; }
.pk-check .tx b {
    display: block; font-size: 13.5px; font-weight: 700;
    color: var(--text); margin-bottom: 3px;
}
.pk-check .tx span { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }

/* ── 空态 ── */
.pk-empty { padding: 52px 20px; text-align: center; color: var(--text-muted); }
.pk-empty .ico { font-size: 34px; opacity: .5; margin-bottom: 10px; }
.pk-empty .t {
    font-size: 14.5px; font-weight: 700;
    color: var(--text-light); margin-bottom: 5px;
}
.pk-empty .d {
    font-size: 12.5px; line-height: 1.7; max-width: 430px; margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════
   11. 基础组件层（.ds-*, #1175 新增 · 全站通用基础件）
   -------------------------------------------------------------------------
   与第 10 节（.pk-*）的分工
     .pk-* = 一体化门户**专用**视觉（样式较重、偏展示、门户内嵌）
     .ds-* = **全站通用**基础件（卡片 / 表格 / 空态 / 页头 / 步骤条 /
             按钮 / 徽章 / 指标卡），任何页面都能用。
             .ds-empty 是 #1176 收口 98 处空态的**唯一目标形态**。
   JS 侧对应 `frontend/js/ds-components.js`（window.DS，纯字符串、零依赖）。

   ⚠️ 铁律 1 的适用边界（必读，否则会误以为本节违规）
     铁律 1「只改表现、绝不改布局」约束的是**覆盖既有选择器** —— 既有盒模型
     是历史踩坑冻结过的（课表网格 / 手动调课表 / 合班面板），动一像素就可能
     越界或压栏。
     本节 .ds-* 是**纯新增组件**，历史上不存在任何 .ds-* 元素，写
     padding / flex / gap 不会破坏任何既有布局。因此这里**允许且应当**写
     布局属性 —— 也只有这样，第 1 节的 --space-* / --font-size-* +
     --leading-* / --weight-* / --radius-* / --z-* 才被真正消费
     （#1173 建了阶梯、#1174 建了圆角档位，本节是它们的落地出口）。
     所有取值一律走令牌，本文件内 0 硬编码颜色 / 0 硬编码间距 / 0 硬编码圆角。
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 11.1 按钮 ───────────────────────────────────────────────────────── */
.ds-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--space-2);
    height: 34px; padding: 0 var(--space-4);
    border: 1px solid transparent; border-radius: var(--radius-sm);
    background: var(--bg-card); color: var(--text);
    font-family: inherit;
    font-size: var(--font-size-sm); line-height: 1;
    font-weight: var(--weight-semibold);
    text-decoration: none; white-space: nowrap; cursor: pointer;
    user-select: none;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition),
                transform var(--transition);
}
.ds-btn:hover { transform: translateY(-1px); }
.ds-btn:active { transform: translateY(0); }
.ds-btn:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.ds-btn[disabled], .ds-btn[disabled]:hover {
    opacity: .5; cursor: not-allowed; transform: none;
    box-shadow: none;
}
.ds-btn .ds-ico { flex: none; }

.ds-btn-primary {
    background: var(--primary-gradient); color: #fff;
    box-shadow: var(--shadow);
}
.ds-btn-primary:hover { box-shadow: var(--shadow-glow); }

.ds-btn-default {
    background: var(--bg-card); color: var(--text);
    border-color: var(--border-strong); box-shadow: var(--shadow);
}
.ds-btn-default:hover {
    border-color: var(--primary-light); color: var(--primary-dark);
}

.ds-btn-soft {
    background: var(--primary-gradient-soft); color: var(--primary-dark);
    border-color: rgba(99, 102, 241, .2);
}
.ds-btn-soft:hover { border-color: var(--primary); }

.ds-btn-ghost {
    background: transparent; color: var(--text-light);
    border-color: transparent;
}
.ds-btn-ghost:hover { background: var(--bg-subtle); color: var(--text); }

.ds-btn-danger {
    background: var(--danger); color: #fff; box-shadow: var(--shadow);
}
.ds-btn-danger:hover { background: var(--danger-deep); }

.ds-btn-link {
    background: transparent; color: var(--primary);
    height: auto; padding: 0; border-color: transparent;
}
.ds-btn-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* md 与 .ds-btn 基准同值，显式写出以保证「JS 产出的每个 ds-btn-* 类都有规则」 */
.ds-btn-md { height: 34px; padding: 0 var(--space-4); font-size: var(--font-size-sm); }
.ds-btn-sm { height: 28px; padding: 0 var(--space-3); font-size: var(--font-size-xs); }
.ds-btn-lg { height: 40px; padding: 0 var(--space-5); font-size: var(--font-size-md); }

/* ── 11.2 徽章 ───────────────────────────────────────────────────────── */
.ds-badge {
    display: inline-flex; align-items: center;
    height: 20px; padding: 0 var(--space-2);
    border-radius: var(--radius-xs);
    font-size: var(--font-size-3xs); line-height: 1;
    font-weight: var(--weight-semibold); letter-spacing: .3px;
    white-space: nowrap; vertical-align: middle;
}
.ds-badge-neutral { background: var(--bg-subtle);  color: var(--text-light); }
.ds-badge-primary { background: var(--primary-gradient-soft); color: var(--primary-dark); }
.ds-badge-success { background: rgba(16, 185, 129, .12); color: var(--success-deep); }
.ds-badge-warning { background: rgba(245, 158, 11, .13); color: var(--warning-deep); }
.ds-badge-danger  { background: rgba(239, 68, 68, .1);   color: var(--danger-deep); }
.ds-badge-info    { background: rgba(59, 130, 246, .1);  color: var(--info); }

/* ── 11.3 空态（#1176 唯一目标形态）───────────────────────────────────── */
.ds-empty {
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    padding: var(--space-10) var(--space-5);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--bg-subtle);
}
.ds-empty.is-plain {
    border: 0; background: transparent; padding: var(--space-6) var(--space-4);
}
.ds-empty-md { padding: var(--space-10) var(--space-5); }  /* 显式声明，便于状态自测 */
.ds-empty-sm { padding: var(--space-6) var(--space-4); }
.ds-empty-lg { padding: var(--space-12) var(--space-6); }

.ds-empty-ico {
    display: grid; place-items: center;
    width: 56px; height: 56px; margin-bottom: var(--space-3);
    border-radius: var(--radius-full);
    background: var(--primary-gradient-soft); color: var(--primary);
}
.ds-empty-sm .ds-empty-ico { width: 40px; height: 40px; margin-bottom: var(--space-2); }
.ds-empty-lg .ds-empty-ico { width: 76px; height: 76px; margin-bottom: var(--space-4); }

.ds-empty-t {
    font-size: var(--font-size-md); line-height: var(--leading-md);
    font-weight: var(--weight-semibold); color: var(--text-light);
}
.ds-empty-sm .ds-empty-t { font-size: var(--font-size-sm); }
.ds-empty-lg .ds-empty-t { font-size: var(--font-size-lg); color: var(--text); }

.ds-empty-d {
    margin-top: var(--space-2);
    font-size: var(--font-size-xs); line-height: var(--leading-xs);
    color: var(--text-muted); max-width: 460px;
}
.ds-empty-x { margin-top: var(--space-3); width: 100%; }

.ds-empty-a {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: var(--space-2); margin-top: var(--space-4);
}

/* 色调（只换图标圈配色，边框/底色保持中性，避免整块刺眼）
   ⚠️ neutral 走 .ds-empty-ico 的默认配色，此处显式再写一遍，保证
      「JS 产出的每个 ds-tone-* 类都有对应规则」（由 _test_ds_components.js
      第 13 项强校验，组件与样式不允许脱节）。                        */
.ds-tone-neutral .ds-empty-ico { background: var(--primary-gradient-soft); color: var(--primary); }
.ds-tone-muted   .ds-empty-ico { background: var(--bg-subtle);        color: var(--text-muted); }
.ds-tone-primary .ds-empty-ico { background: var(--primary-gradient-soft); color: var(--primary); }
.ds-tone-success .ds-empty-ico { background: rgba(16, 185, 129, .12); color: var(--success-deep); }
.ds-tone-warning .ds-empty-ico { background: rgba(245, 158, 11, .13); color: var(--warning-deep); }
.ds-tone-danger  .ds-empty-ico { background: rgba(239, 68, 68, .1);   color: var(--danger-deep); }
.ds-tone-info    .ds-empty-ico { background: rgba(59, 130, 246, .1);  color: var(--info); }

/* ── 11.3b 加载占位（#1176：与空态分开 —— 两者语义相反）──────────────────
   差别不在观感而在意图：空态 = 数据已到、确实为空，该给用户 CTA；
   加载 = 数据未到，此时给任何 CTA 都是误导。故独立成一个组件。      */
.ds-loading {
    display: flex; align-items: center; justify-content: center;
    gap: var(--space-3);
    padding: var(--space-10) var(--space-5);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--bg-subtle);
}
.ds-loading.is-plain {
    border: 0; background: transparent; padding: var(--space-6) var(--space-4);
}
.ds-loading-sm { padding: var(--space-6) var(--space-4); }
.ds-loading-md { padding: var(--space-10) var(--space-5); }
.ds-loading-lg { padding: var(--space-12) var(--space-6); }

.ds-loading-t {
    font-size: var(--font-size-sm); line-height: var(--leading-sm);
    font-weight: var(--weight-medium); color: var(--text-muted);
}
.ds-loading-sm .ds-loading-t { font-size: var(--font-size-xs); }
.ds-loading-lg .ds-loading-t { font-size: var(--font-size-md); }

/* 旋转指示器：三段式边框 + 顶部主色 = 缺口感。尺寸按档位跟随，与
   .ds-empty-ico 同样在组件内定死（避免 .ds-* 之间互相依赖令牌）。  */
.ds-spinner {
    flex: none;
    width: 18px; height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: ds-spin .7s linear infinite;
}
.ds-loading-sm .ds-spinner { width: 14px; height: 14px; }
.ds-loading-lg .ds-spinner { width: 24px; height: 24px; }

@keyframes ds-spin { to { transform: rotate(360deg); } }

/* 无障碍：系统开启「减少动态效果」时放慢而不是停掉 —— 完全静止会让用户
   误判为卡死，放慢到 2.4s 仍能传达「进行中」又不会引起不适。        */
@media (prefers-reduced-motion: reduce) {
    .ds-spinner { animation-duration: 2.4s; }
}

/* ── 11.4 页头 ───────────────────────────────────────────────────────── */
.ds-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap; gap: var(--space-4);
    margin-bottom: var(--space-5);
}
.ds-head-main { min-width: 0; }

.ds-crumb {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: var(--space-2); margin-bottom: var(--space-2);
    font-size: var(--font-size-xs); line-height: var(--leading-xs);
    color: var(--text-muted);
}
.ds-crumb a {
    color: var(--text-muted); text-decoration: none;
    transition: color var(--transition);
}
.ds-crumb a:hover { color: var(--primary); }
.ds-crumb-sep { color: var(--border-strong); }
.ds-crumb-cur { color: var(--text-light); font-weight: var(--weight-medium); }

.ds-head-t {
    margin: 0;
    font-size: var(--font-size-2xl); line-height: var(--leading-2xl);
    font-weight: var(--weight-bold); color: var(--text);
    letter-spacing: -.4px;
}
.ds-head-d {
    margin-top: var(--space-2);
    font-size: var(--font-size-sm); line-height: var(--leading-sm);
    color: var(--text-light); max-width: 720px;
}
.ds-head-a {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: var(--space-2);
}

/* ── 11.5 步骤条 ─────────────────────────────────────────────────────── */
.ds-steps { display: flex; align-items: flex-start; }
.ds-step { display: flex; align-items: center; gap: var(--space-3); }
.ds-step-dot {
    display: grid; place-items: center; flex: none;
    width: var(--ds-dot); height: var(--ds-dot); border-radius: var(--radius-full);
    border: 1.5px solid var(--border-strong);
    background: var(--bg-card); color: var(--text-muted);
    font-size: var(--font-size-2xs); font-weight: var(--weight-bold);
    transition: background var(--transition), border-color var(--transition),
                color var(--transition), box-shadow var(--transition);
}
.ds-step-tx b {
    display: block;
    font-size: var(--font-size-sm); line-height: var(--leading-sm);
    font-weight: var(--weight-semibold); color: var(--text-muted);
}
.ds-step-tx span {
    display: block; margin-top: 2px;
    font-size: var(--font-size-xs); line-height: var(--leading-xs);
    color: var(--text-muted);
}
.ds-step-line {
    flex: 1; height: var(--ds-line); min-width: 24px;
    /* 垂直居中于圆点：(圆点直径 - 线粗) / 2。由令牌推导，圆点改尺寸自动跟随 */
    margin: calc((var(--ds-dot) - var(--ds-line)) / 2) var(--space-3) 0;
    background: var(--border); border-radius: var(--radius-xs);
    transition: background var(--transition);
}

.ds-step.is-done .ds-step-dot {
    background: var(--success); border-color: var(--success); color: #fff;
}
.ds-step.is-done .ds-step-tx b { color: var(--text-light); }
.ds-step.is-current .ds-step-dot {
    background: var(--primary); border-color: var(--primary); color: #fff;
    box-shadow: var(--shadow-glow);
}
.ds-step.is-current .ds-step-tx b { color: var(--text); }
/* 未开始的步骤弱化（is-todo 是默认态，显式写出以保证「类↔样式」一一对应）*/
.ds-step.is-todo .ds-step-dot { opacity: .7; }
.ds-step.is-todo .ds-step-tx b { font-weight: var(--weight-regular); }
.ds-step-line.is-done { background: var(--success); }

.ds-steps.is-vertical { flex-direction: column; align-items: stretch; }
.ds-steps.is-vertical .ds-step { align-items: flex-start; }
.ds-steps.is-vertical .ds-step-line {
    width: var(--ds-line); height: 18px; min-width: 0; flex: none;
    margin: var(--space-2) 0 var(--space-2) calc((var(--ds-dot) - var(--ds-line)) / 2);
}

/* ── 11.6 卡片 ───────────────────────────────────────────────────────── */
.ds-card {
    display: flex; flex-direction: column;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--bg-card); box-shadow: var(--shadow);
    overflow: hidden;
}
.ds-card.is-hover { transition: box-shadow var(--transition), transform var(--transition); }
.ds-card.is-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.ds-card-hd {
    display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, #fff, var(--bg-subtle));
}
.ds-card-tx { min-width: 0; }
.ds-card-t {
    margin: 0;
    font-size: var(--font-size-md); line-height: var(--leading-md);
    font-weight: var(--weight-bold); color: var(--text);
}
.ds-card-d {
    margin-top: 2px;
    font-size: var(--font-size-xs); line-height: var(--leading-xs);
    color: var(--text-muted);
}
.ds-card-a {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: var(--space-2); margin-left: auto;
}

.ds-card-bd { padding: var(--space-5); }
.ds-card.is-flush .ds-card-bd { padding: 0; }

.ds-card-ft {
    padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--border-light);
    background: var(--bg-subtle);
    font-size: var(--font-size-xs); line-height: var(--leading-xs);
    color: var(--text-light);
}

/* ── 11.7 表格 ───────────────────────────────────────────────────────── */
.ds-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-light); border-radius: var(--radius-md);
    background: var(--bg-card);
}
.ds-table {
    width: 100%; border-collapse: collapse;
    font-size: var(--font-size-sm); line-height: var(--leading-sm);
}
.ds-table thead th {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    font-size: var(--font-size-2xs); line-height: var(--leading-2xs);
    font-weight: var(--weight-semibold);
    color: var(--text-light); letter-spacing: .4px;
    text-align: left; white-space: nowrap;
}
.ds-table.is-sticky thead th {
    position: sticky; top: 0; z-index: var(--z-sticky);
}
.ds-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-light);
    color: var(--text); vertical-align: middle;
}
.ds-table tbody tr { transition: background var(--transition); }
.ds-table.is-hover tbody tr:hover { background: var(--bg-subtle); }
.ds-table.is-zebra tbody tr:nth-child(even) { background: var(--bg-subtle); }
.ds-table.is-zebra.is-hover tbody tr:nth-child(even):hover { background: var(--border-light); }
.ds-table tbody tr:last-child td { border-bottom: 0; }
.ds-table.is-compact thead th { padding: var(--space-2) var(--space-3); }
.ds-table.is-compact td       { padding: var(--space-2) var(--space-3); }

.ds-table .ta-left   { text-align: left; }
.ds-table .ta-center { text-align: center; }
.ds-table .ta-right  { text-align: right; }

/* ── 11.8 指标卡 ─────────────────────────────────────────────────────── */
.ds-stat {
    position: relative;
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--bg-card); box-shadow: var(--shadow);
}
.ds-stat-ico {
    display: grid; place-items: center;
    width: 32px; height: 32px; margin-bottom: var(--space-3);
    border-radius: var(--radius-sm);
    background: var(--primary-gradient-soft); color: var(--primary);
}
.ds-stat-l {
    font-size: var(--font-size-xs); line-height: var(--leading-xs);
    color: var(--text-muted);
}
.ds-stat-v {
    margin-top: var(--space-1);
    font-size: var(--font-size-2xl); line-height: var(--leading-2xl);
    font-weight: var(--weight-bold); color: var(--text);
    letter-spacing: -.5px;
}
.ds-stat-v i {
    margin-left: 3px;
    font-size: var(--font-size-xs); font-style: normal;
    font-weight: var(--weight-medium); color: var(--text-muted);
}
.ds-stat-d {
    margin-top: var(--space-1);
    font-size: var(--font-size-xs); line-height: var(--leading-xs);
    font-weight: var(--weight-semibold);
}
.ds-stat-d.is-up   { color: var(--success-deep); }
.ds-stat-d.is-down { color: var(--danger-deep); }
.ds-stat-d.is-flat { color: var(--text-muted); }
.ds-stat-hint {
    margin-top: var(--space-1);
    font-size: var(--font-size-3xs); line-height: var(--leading-3xs);
    color: var(--text-muted);
}
.ds-stat.ds-tone-primary .ds-stat-ico { background: var(--primary-gradient-soft); color: var(--primary); }
.ds-stat.ds-tone-muted   .ds-stat-ico { background: var(--bg-subtle);        color: var(--text-muted); }
.ds-stat.ds-tone-success .ds-stat-ico { background: rgba(16, 185, 129, .12); color: var(--success-deep); }
.ds-stat.ds-tone-warning .ds-stat-ico { background: rgba(245, 158, 11, .13); color: var(--warning-deep); }
.ds-stat.ds-tone-danger  .ds-stat-ico { background: rgba(239, 68, 68, .1);   color: var(--danger-deep); }
.ds-stat.ds-tone-info    .ds-stat-ico { background: rgba(59, 130, 246, .1);  color: var(--info); }

/* ── 11.9 新手指引 onboarding（#1177）─────────────────────────────────────
   用于「需要先完成前置步骤才能进入」的页签 —— 典型场景是无排课任务。
   由 app.js 的 guardNoTask() 渲染，结构 = 头部（图标+标题+说明）
   + DS.steps({vertical:true}) 三步进度 + 底部行动区。
   纯新增类名，与既有布局零交集，故可直接写布局属性（见本节首铁律说明）。
   ────────────────────────────────────────────────────────────────────── */
.ds-onb {
    max-width: 620px;
    margin: var(--space-8) auto;
    padding: var(--space-6) var(--space-6) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.ds-onb-hd { display: flex; align-items: flex-start; gap: var(--space-4); }
.ds-onb-ico {
    display: grid; place-items: center; flex: none;
    width: 48px; height: 48px; border-radius: var(--radius-full);
    background: var(--primary-gradient-soft); color: var(--primary);
}
.ds-onb-tx h3 {
    margin: 0;
    font-size: var(--font-size-lg); line-height: var(--leading-lg);
    font-weight: var(--weight-semibold); color: var(--text);
}
.ds-onb-tx p {
    margin: var(--space-2) 0 0;
    font-size: var(--font-size-sm); line-height: var(--leading-sm);
    color: var(--text-muted);
}
.ds-onb-steps { margin-top: var(--space-6); padding-left: var(--space-1); }
.ds-onb-acts {
    display: flex; flex-wrap: wrap; gap: var(--space-3);
    margin-top: var(--space-6); padding-top: var(--space-5);
    border-top: 1px solid var(--border);
}

/* ── 11.10 响应式 / 无障碍 ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .ds-head { flex-direction: column; align-items: stretch; }
    .ds-head-a { margin-top: var(--space-2); }
    .ds-steps:not(.is-vertical) { flex-direction: column; align-items: stretch; }
    .ds-steps:not(.is-vertical) .ds-step-line {
        width: var(--ds-line); height: 14px; min-width: 0; flex: none;
        margin: var(--space-2) 0 var(--space-2) calc((var(--ds-dot) - var(--ds-line)) / 2);
    }
    .ds-card-hd { flex-wrap: wrap; }
    .ds-card-a { margin-left: 0; width: 100%; }
}

/* ── 工具页标题统一提档（#1281 · 工具页视觉统一）──────────────────────────
   所有 render* 页面用 <h2 class="page-title"> 作页头，统一字号/字重/字距/间距，
   左侧一道品牌竖条，使课表查看 / 手动调整 / 排课工作台等工具页头部一致高级。
   纯表现（字体 + 间距），不触碰任何功能网格布局。                       */
.page-title {
    position: relative;
    font-size: var(--font-size-2xl); line-height: var(--leading-2xl);
    font-weight: var(--weight-bold); color: var(--text);
    letter-spacing: -.4px; margin: 0 0 var(--space-5);
    padding-left: var(--space-3);
}
.page-title::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 1.1em; border-radius: var(--radius-full);
    background: var(--primary-gradient);
    box-shadow: 0 0 10px rgba(99, 102, 241, .4);
}

/* ── 11.11 概览仪表盘（#1280 核心概览页现代化 · 纯新增命名空间 .db-*）
   复刻阳光分班大屏「玻璃质感 + 矢量图标 + 微光晕」视觉语言，全部走令牌、
   0 硬编码颜色/间距/圆角。.db-* 历史上无既有盒模型，写 grid/flex/padding
   不会破坏任何既有布局（同 .ds-*/.pk-* 第 11 节首铁律口径）。        ── */
.db-hero {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-6); flex-wrap: wrap;
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: none;
}
.db-hero::before { display: none; }
.db-hero-main { position: relative; z-index: 1; min-width: 0; }
.db-hero-badge {
    display: inline-flex; align-items: center; gap: var(--space-2);
    padding: 5px 12px; border-radius: var(--radius-full);
    background: var(--primary-gradient-soft); color: var(--primary-dark);
    font-size: var(--font-size-xs); font-weight: var(--weight-bold); letter-spacing: .4px;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .18);
}
.db-hero-badge .ds-ico { color: var(--primary); }
.db-hero-title {
    margin: 0; font-size: var(--font-size-3xl); line-height: var(--leading-3xl);
    font-weight: var(--weight-bold); letter-spacing: -.6px;
    color: var(--text);
}
.db-hero-sub {
    margin: var(--space-2) 0 0; font-size: var(--font-size-md); color: var(--text-light);
    max-width: 560px; line-height: var(--leading-md);
}
.db-help-bar { display: flex; gap: var(--space-2); margin-top: var(--space-5); flex-wrap: wrap; }
.db-help-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 13px; border-radius: var(--radius-md);
    border: 1px solid var(--border); background: var(--bg-card);
    color: var(--text); font-size: var(--font-size-sm); font-weight: var(--weight-semibold);
    text-decoration: none; transition: var(--transition);
}
.db-help-btn:hover { border-color: var(--primary-light); color: var(--primary); box-shadow: var(--ring-focus); transform: translateY(-1px); }
.db-help-btn .ds-ico { color: var(--primary); }
.db-hero-head {
    display: flex; align-items: center; gap: var(--space-3);
    margin-top: var(--space-3);
}
.db-hero-logo {
    position: relative; z-index: 1; width: 46px; height: 46px; flex: none;
    filter: drop-shadow(0 6px 16px rgba(99, 102, 241, .30));
}

/* 分区标题 */
.db-sec {
    display: flex; align-items: center; gap: var(--space-3);
    margin: var(--space-8) 0 var(--space-3);
}
.db-sec-ico {
    display: grid; place-items: center; width: 34px; height: 34px; flex: none;
    border-radius: var(--radius-md); background: var(--primary-gradient-soft); color: var(--primary);
}
.db-sec-t { margin: 0; font-size: var(--font-size-xl); line-height: var(--leading-xl); font-weight: var(--weight-bold); letter-spacing: -.3px; color: var(--text); }
.db-sec-d { margin: 2px 0 0; font-size: var(--font-size-xs); color: var(--text-muted); }

/* #fix-36 指标卡网格：默认 6 列（一行 6 个，更紧凑）；9 张 = 6+3；
   宽屏定列数避免 auto-fit 在奇数张时排出悬空尾行；窄屏逐级降列保可读 */
.db-stats {
    display: grid; gap: var(--space-3); margin-top: var(--space-3);
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
/* 6 列下数值/图标略缩，避免挤压溢出 */
.db-stats .db-stat-v { font-size: 20px; letter-spacing: -.3px; }
.db-stats .db-stat-ico { width: 22px; height: 22px; }
.db-stats .db-stat-ico .ds-ico { width: 13px; height: 13px; }
@media (max-width: 1100px) {
    .db-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .db-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .db-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
    .db-stats { grid-template-columns: 1fr; }
}
.db-stat {
    position: relative; overflow: hidden; padding: var(--space-4);
    display: flex; align-items: center; gap: var(--space-3);
    border-radius: var(--radius-lg); background: var(--bg-card);
    border: 1px solid var(--border-light); box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.db-stat::before { display: none; }
.db-stat:hover { transform: none; box-shadow: var(--shadow-md); border-color: var(--border); }
.db-stat-ico {
    display: grid; place-items: center; width: 24px; height: 24px; flex: none;
    border-radius: var(--radius-md); background: var(--primary-gradient-soft); color: var(--primary);
}
/* #1610 图标改小：CSS 覆盖 svg 的 width/height 表现属性 */
.db-stat-ico .ds-ico { width: 14px; height: 14px; }
.db-stat-meta { min-width: 0; }
.db-stat-v { font-size: var(--font-size-2xl); line-height: 1; font-weight: var(--weight-bold); color: var(--text); letter-spacing: -.4px; }
.db-stat-l { margin-top: 2px; font-size: var(--font-size-sm); color: var(--text-muted); font-weight: var(--weight-semibold); }

/* ===== 数据管理顶部统计看板（包③）—— 玻璃质感指标卡，与 .db-stat 同令牌体系 ===== */
.dm-stats-row {
    display: grid; gap: var(--space-3); margin: 12px 0 4px;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}
.dm-stat {
    position: relative; display: flex; flex-direction: column; gap: 12px;
    padding: var(--space-4); border-radius: var(--radius-lg);
    background: var(--bg-card); border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.dm-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border); }
.dm-stat-top { display: flex; align-items: center; gap: 8px; }
.dm-stat-ico {
    display: grid; place-items: center; width: 30px; height: 30px; flex: none;
    border-radius: var(--radius-md); background: var(--primary-gradient-soft); color: var(--primary);
}
/* #1610 图标改小：CSS 覆盖 svg 的 width/height 表现属性 */
.dm-stat-ico .ds-ico { width: 15px; height: 15px; }
.dm-stat-l { font-size: var(--font-size-sm); color: var(--text-muted); font-weight: var(--weight-semibold); white-space: nowrap; }
.dm-stat-v { font-size: var(--font-size-2xl); line-height: 1; font-weight: var(--weight-bold); color: var(--text); letter-spacing: -.5px; }
.dm-stat-s { min-height: 16px; font-size: 12px; color: var(--text-muted); }
.dm-stat-s--ph { visibility: hidden; }
/* 语义色调：异常/零任课 用图标芯片着色，整体观感一致 */
.dm-stat--ok  .dm-stat-ico { background: rgba(22,163,74,.10);  color: #16a34a; }
.dm-stat--warn .dm-stat-ico { background: rgba(234,92,12,.10); color: #ea580c; }
.dm-stat--err .dm-stat-ico { background: rgba(220,38,38,.10);  color: #dc2626; }

/* 健康度仪表 */
.db-health {
    display: grid; gap: var(--space-3); margin-top: var(--space-3);
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
/* 暂存区未落位提示（v2 口径：缓冲区槽位不计入覆盖率分子） */
.db-buffer-note {
    margin-top: var(--space-4); padding: 11px 15px;
    border-radius: var(--radius-lg);
    background: rgba(245, 158, 11, .10);
    border: 1px solid rgba(245, 158, 11, .30);
    color: var(--warning-deep);
    font-size: var(--font-size-sm); line-height: 1.65;
}
.db-buffer-note b { font-weight: var(--weight-semibold); }
.db-gauge {
    position: relative; padding: var(--space-4);
    border-radius: var(--radius-lg); background: var(--bg-card);
    border: 1px solid var(--border-light); box-shadow: var(--shadow);
}
.db-gauge-hd { display: flex; align-items: center; gap: var(--space-2); font-size: var(--font-size-sm); font-weight: var(--weight-semibold); color: var(--text-light); }
.db-gauge-hd .ds-ico { width: 14px; height: 14px; color: var(--primary); }
.db-gauge-v { font-size: var(--font-size-xl); line-height: 1.1; font-weight: var(--weight-bold); color: var(--text); margin-top: 4px; letter-spacing: -.3px; }
.db-gauge-v small { font-size: var(--font-size-sm); font-weight: var(--weight-semibold); color: var(--text-muted); margin-left: 3px; }
.db-gauge-sub { margin-top: 2px; font-size: var(--font-size-xs); color: var(--text-muted); line-height: var(--leading-xs); }
.db-bar { height: 6px; border-radius: var(--radius-full); background: var(--bg-subtle); overflow: hidden; margin-top: var(--space-2); }
.db-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width .6s var(--ease-quint); }
.db-gauge.ok   .db-bar-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.db-gauge.warn .db-bar-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.db-gauge.err  .db-bar-fill { background: linear-gradient(90deg, var(--danger), var(--danger-deep)); }
.db-gauge.ok   .db-gauge-v { color: var(--success-deep); }
.db-gauge.warn .db-gauge-v { color: var(--warning-deep); }
.db-gauge.err  .db-gauge-v { color: var(--danger-deep); }

/* 数据管理工具区（危险操作，分级着色，仍保持高级感） */
.db-tools {
    margin-top: var(--space-6); border-radius: var(--radius-lg);
    background: var(--bg-card); border: 1px solid var(--border-light);
    box-shadow: var(--shadow); overflow: hidden;
}
.db-tools-hd {
    display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-light);
    background: var(--bg-card); cursor: pointer;
    font-size: var(--font-size-md); font-weight: var(--weight-bold); color: var(--text);
}
.db-tools-hd.open .db-tools-chevron { transform: rotate(90deg); }
.db-tools-chevron { margin-left: auto; transition: transform .2s var(--ease-quint); font-size: 12px; color: var(--text-muted); }
.db-tools-hd .ds-ico { color: var(--danger); }
.db-tools-bd {
    display: grid; gap: var(--space-4); padding: var(--space-5);
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.db-tools-group { padding: var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--border-light); background: var(--bg-subtle); }
.db-tools-group.danger { border-color: rgba(239, 68, 68, .22); background: rgba(239, 68, 68, .04); }
.db-tools-group.destructive { border-color: rgba(239, 68, 68, .32); background: rgba(239, 68, 68, .06); }
.db-tools-label { font-size: var(--font-size-sm); font-weight: var(--weight-bold); color: var(--text); margin-bottom: 6px; }
.db-tools-desc { font-size: var(--font-size-xs); color: var(--text-muted); line-height: var(--leading-xs); margin-bottom: var(--space-3); }
.db-tools-acts { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.db-task-tip { margin-top: var(--space-4); text-align: center; font-size: var(--font-size-sm); color: var(--text-muted); }
.db-task-tip b { color: var(--primary-dark); font-weight: var(--weight-semibold); }

@media (prefers-reduced-motion: reduce) {
    .ds-btn:hover, .ds-card.is-hover:hover { transform: none; }
}


/* ═══════════════════════════════════════════════════════════════════════
   #UI-POLISH 2026-10-24 全站一致性整备（P0+P1）
   1) 顶栏防压缩：修复「退出 / 升级会员」文字竖排（flex 溢出收缩所致）
   2) 顶栏减负：窄屏渐进收纳（皮肤文字 / 协作文字 / 环境徽章文字）
   3) 校区下拉对比度（原为暗底亮字样式，浮在浅色顶栏上几乎不可读）
   4) 登录 tab 层级：激活态改软底色，主 CTA 保持唯一实心视觉重心
   5) 套餐徽章降噪：内联彩色渐变 → 统一浅底描边 class
   6) 表格空态：统一图标
   ═══════════════════════════════════════════════════════════════════════ */

:root { --primary-soft: rgba(99, 102, 241, .09); }

/* 1) 顶栏防压缩 */
.topbar-right > *, .topbar-left > * { flex-shrink: 0; }
.btn-logout, .btn-upgrade, .btn-collab, .skin-btn, .env-pill, .bell-btn, .school-select { white-space: nowrap; }
.topbar-left { gap: 10px; }
.topbar-right { gap: 10px; }

/* 2) 窄屏渐进收纳 */
@media (max-width: 1700px) {
  .topbar { padding: 0 16px; }
  .topbar-left, .topbar-right { gap: 8px; }
}
@media (max-width: 1600px) {
  #skin-current { display: none; }
  .btn-collab .btn-collab-txt { display: none; }
  .btn-collab { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 1480px) {
  .env-pill { font-size: 0; padding-left: 11px; padding-right: 11px; }
  .env-pill::before { margin-right: 0; }
}

/* 3) 校区下拉：跟随顶栏 chip 配色（皮肤变量优先，回退浅色） */
.school-select {
  color: var(--top-fg, #334155);
  background: var(--top-chip-bg, rgba(15, 23, 42, .045));
  border-color: var(--top-chip-bd, var(--border));
}
.school-select:hover {
  color: var(--top-fg, #0f172a);
  background: var(--top-hover-bg, rgba(15, 23, 42, .08));
}
.school-select option { background: #fff; color: #0f172a; }

/* 4) 登录 tab 激活态降权 */
.auth-tab { border-radius: 9px; }
.auth-tab.active {
  background: rgba(99, 102, 241, .10);
  color: var(--primary);
  box-shadow: none;
}

/* 5) 套餐徽章（降噪版，替代 index.html 内联渐变） */
.nav-tier-badge {
  display: inline-block; font-size: 9px; line-height: 1; font-weight: 700;
  letter-spacing: .4px; padding: 2px 5px; border-radius: 6px; vertical-align: 1px;
}
.nav-tier-pro { background: rgba(79, 70, 229, .10); color: var(--primary); border: 1px solid rgba(79, 70, 229, .25); }
.nav-tier-int { background: rgba(234, 88, 12, .10); color: #c2410c; border: 1px solid rgba(234, 88, 12, .28); }
.nav-tier-new { background: rgba(22, 163, 74, .10); color: #15803d; border: 1px solid rgba(22, 163, 74, .28); }
.nav-tier-ai  { background: rgba(147, 51, 234, .10); color: #7e22ce; border: 1px solid rgba(147, 51, 234, .25); }

/* 6) 表格空态：统一图标 */
.table-empty { line-height: 1.7; }
.table-empty::before {
  content: ''; display: block; width: 42px; height: 42px; margin: 2px auto 10px;
  opacity: .5;
  background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M7 14h6'/%3E%3C/svg%3E");
}

/* 7) 图标对齐（登录卖点 SVG / 教务域 SVG） */
.login-feats .lf-ico { color: #e0e7ff; }
.lf-ico svg { width: 15px; height: 15px; }
.ac2-ico { display: inline-flex; align-items: center; justify-content: center; color: var(--primary); }
.ac2-ico svg { flex: none; }

/* ===== theme-bundle source: shell-premium.css (cascade order preserved) ===== */
/* ============================================================
   shell-premium.css — 旗舰壳表现层（清爽白侧栏版）
   加载顺序：style.css → design-system.css → 本文件（最后）
   → 同等特异性下本文件胜出，仅改「侧栏 + 顶栏」表现，不碰任何页面布局/功能。
   全部用字面量 premium 值 + 本文件内局部 --shell-* 变量，
   不新增 design-system.css 的 :root 令牌（避免 _audit_tokens 冲突）。

   风格：白色清爽侧栏（纯白底 + 灰字 + 选中浅蓝高亮）
        + 浅色玻璃顶栏（命令搜索 / 环境胶囊 / 通知铃）。
   ============================================================ */

:root {
  /* ── 侧栏白色清爽基底 ── */
  --shell-bg: #ffffff;
  --shell-bg-soft: #f8fafc;
  --shell-group: #94a3b8;
  --shell-hair: #e2e8f0;
  --shell-hair-strong: #cbd5e1;
  --shell-nav-fg: #475569;
  --shell-nav-fg-hover: #0f172a;
  --shell-nav-bg-hover: #f1f5f9;
  --shell-active-bg: #eff6ff;
  --shell-active-fg: #2563eb;
  --shell-brand-fg: #0f172a;
  --shell-brand-sub: #64748b;
  --shell-footer-fg: #94a3b8;

  /* ── 顶栏（保持浅色玻璃） ── */
  --shell-search-bg: rgba(15, 23, 42, .045);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --shell-pill-bg: rgba(16, 185, 129, .12);
  --shell-pill-fg: #10b981;
}

/* ---------- 侧栏：纯白底 + 微阴影 ---------- */
.sidebar {
  position: relative;
  background: var(--shell-bg);
  border-right: 1px solid var(--shell-hair);
}
.sidebar-brand,
.sidebar-nav,
.sidebar-footer { position: relative; z-index: 1; }

/* 品牌头部：白底品牌卡 */
.sidebar-brand {
  margin: 14px 12px 8px;
  padding: 12px 12px;
  border-bottom: none;
  border-radius: 14px;
  background: var(--shell-bg-soft);
  border: 1px solid var(--shell-hair);
  color: var(--shell-brand-fg);
}
.sidebar-brand .brand-name { color: var(--shell-brand-fg); }
.sidebar-brand .brand-sub { color: var(--shell-brand-sub); }
.brand-badge {
  background: linear-gradient(135deg, #f0d9a0, #e9b949);
  color: #3b2f0a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
  box-shadow: 0 2px 8px rgba(233, 185, 73, .35);
}

/* ---------- 导航分组 ---------- */
.sidebar-nav {
  display: block;
  padding: 4px 10px 12px;
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
}
.nav-group:first-child { margin-top: 2px; }
.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--shell-group);
}

/* 导航项：白色底上的深色字 */
.nav-item {
  position: relative;
  margin: 1px 0;
  color: var(--shell-nav-fg);
  border-radius: 10px;
  transition: background .18s ease, color .18s ease;
}
.nav-item:hover {
  background: var(--shell-nav-bg-hover);
  color: var(--shell-nav-fg-hover);
}
.nav-item.active {
  background: var(--shell-active-bg);
  color: var(--shell-active-fg);
  font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--shell-active-fg); }
/* 移除旧版的金色左条与辉光 */
.nav-item.active::before { display: none; }

/* 侧栏底部 */
.sidebar-footer { color: var(--shell-footer-fg); }
.sidebar-footer .icp-side a { color: var(--shell-footer-fg); }
.sidebar-footer .icp-side a:hover { color: var(--shell-nav-fg); }

/* 折叠态 */
.sidebar.collapsed .nav-group-title { display: none; }
.sidebar.collapsed .nav-group { margin-top: 4px; }

/* ---------- 顶栏：中心命令搜索 + 环境胶囊 + 通知铃 ---------- */
.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 18px;
  min-width: 0;
}
.cmd-search {
  position: relative;   /* #1185：为 .cs-panel 结果下拉提供定位基准 */
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(440px, 100%);
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--shell-search-bg);
  border: 1px solid var(--shell-search-bd);
  color: var(--text-light);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.cmd-search:focus-within {
  border-color: rgba(99, 102, 241, .45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
  background: rgba(15, 23, 42, .03);
}
.cs-ico { width: 16px; height: 16px; opacity: .7; flex-shrink: 0; stroke: currentColor; }
.cs-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.cs-input::placeholder { color: var(--text-sidebar-dim); }
.cs-kbd {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, .06);
  border: 1px solid var(--shell-search-bd);
  color: var(--text-light);
  font-family: inherit;
  flex-shrink: 0;
}

.env-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--shell-pill-bg);
  color: var(--shell-pill-fg);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, .28);
  white-space: nowrap;
}
.env-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--shell-pill-fg);
  box-shadow: 0 0 8px var(--shell-pill-fg);
}

.bell-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.bell-btn:hover {
  color: var(--primary);
  border-color: rgba(99, 102, 241, .4);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.bell-btn .dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px #fff;
}

/* 顶栏在窄屏时收起命令搜索 */
@media (max-width: 1080px) {
  .topbar-center { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   #1181 双轨导航 + 全局条：域切换 / 任务胶囊 / 皮肤切换器
   （只改表现，全部新类名，零回退风险）
   ═══════════════════════════════════════════════════════════ */

/* ---------- 顶栏一级域切换（排课工作台 | 教务中心 | 数据与设置） ---------- */
.domain-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 14px;
  padding: 3px;
  background: var(--shell-search-bg);
  border: 1px solid var(--shell-search-bd);
  border-radius: 12px;
}
.domain-tab {
  border: none;
  background: transparent;
  color: var(--shell-nav-fg);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.domain-tab:hover { color: var(--shell-nav-fg-hover); background: var(--shell-nav-bg-hover); }
.domain-tab.active {
  background: #fff;
  color: var(--shell-active-fg);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .10);
}
@media (max-width: 1240px) {
  .topbar-title { display: none; }
}
@media (max-width: 1080px) {
  .domain-tab { padding: 6px 10px; font-size: 12px; }
}

/* ---------- 顶栏任务选择胶囊（绿点 + 任务名 + 下拉箭头） ---------- */
.topbar .task-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--shell-hair);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.topbar .task-select-wrap:hover { border-color: var(--shell-hair-strong); }
.topbar .task-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
  flex: none;
}
.topbar #task-selector {
  width: auto;
  max-width: 210px;
  padding: 0 4px 0 0;
  border: none;
  background: transparent;
  color: var(--shell-brand-fg);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.topbar #task-selector:hover,
.topbar #task-selector:focus { border: none; background: transparent; outline: none; }
.topbar #task-selector option { background: #fff; color: #0f172a; }
.topbar .task-caret { color: var(--shell-brand-sub); flex: none; pointer-events: none; }
@media (max-width: 1080px) {
  .topbar #task-selector { max-width: 120px; }
}

/* ---------- 皮肤切换器（#1181 建于下拉列表 → #1282 画廊式主题面板） ----------
   面板结构：标题「全部主题」+ 3 列卡片网格；每张卡 = 渐变缩略图（内嵌模拟
   侧栏条 / 内容块 / 强调色圆点）+ 主题名 + 选中勾。缩略图纯 CSS 渐变，
   零图片依赖；配色由 index.html 的 SKINS[].thumb 内联给出。 */
.skin-wrap { position: relative; display: inline-flex; }
.skin-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  background: #fff;
  border: 1px solid var(--shell-hair);
  border-radius: 999px;
  color: var(--shell-nav-fg);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: color .16s ease, border-color .16s ease;
}
.skin-btn:hover { color: var(--shell-active-fg); border-color: var(--shell-hair-strong); }

/* 面板：加宽以容纳 3 列卡片（原 168px 行式列表已不适用） */
.skin-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 424px;
  max-width: calc(100vw - 32px);
  padding: 12px 12px 10px;
  background: #fff;
  border: 1px solid var(--shell-hair);
  border-radius: 16px;
  box-shadow: 0 10px 20px -8px rgba(15, 23, 42, .14), 0 24px 48px -16px rgba(15, 23, 42, .18);
  z-index: 90;
}
.skin-menu-title {
  padding: 0 4px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--shell-nav-fg-hover);
}
.skin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* 卡片 = 缩略图 + 名称（纵向）；选中态用 brand 描边 + 勾标 */
.skin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0 0 2px;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  border-radius: 13px;
  transition: transform .16s ease;
}
.skin-card:hover { transform: translateY(-2px); }
.skin-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 58px;
  border-radius: 11px;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .10), 0 2px 6px -2px rgba(15, 23, 42, .16);
  overflow: hidden;
  background-size: cover;
  transition: border-color .16s ease, box-shadow .16s ease;
}
/* 缩略图内的「模拟界面」：左侧色条（侧栏）+ 中间留白（内容区）+ 强调色圆点 */
.skin-thumb-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 22%;
  background: rgba(0, 0, 0, .22);
  backdrop-filter: saturate(140%);
}
.skin-thumb-content {
  position: absolute;
  left: 30%; right: 12%; top: 22%; height: 26%;
  border-radius: 4px;
  background: rgba(255, 255, 255, .72);
}
.skin-thumb-dot {
  position: absolute;
  right: 9%; bottom: 16%;
  width: 12px; height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .55);
}
.skin-card-name {
  font-size: 12px;
  line-height: 1.2;
  color: var(--shell-nav-fg);
  white-space: nowrap;
}
.skin-check {
  position: absolute;
  top: 5px; right: 5px;
  width: 17px; height: 17px;
  padding: 2px;
  border-radius: 50%;
  background: var(--shell-active-fg);
  color: #fff;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .16s ease, transform .16s ease;
}
.skin-card.on .skin-thumb {
  border-color: var(--shell-active-fg);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06), 0 4px 12px -4px rgba(15, 23, 42, .24);
}
.skin-card.on .skin-card-name { color: var(--shell-active-fg); font-weight: 700; }
.skin-card.on .skin-check { opacity: 1; transform: scale(1); }

/* ==================== #1185 顶栏增强 ==================== */
/* 协作按钮（由侧栏底栏上移顶栏：它是全局动作，不属于任何域的子页面）。
   原实现全靠内联 style 写死白底，无法随皮肤变化，故在此给出正式规则。 */
.topbar .btn-collab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--shell-hair-strong, rgba(148, 163, 184, .35));
  background: var(--shell-nav-bg-hover, rgba(15, 23, 42, .04));
  color: var(--top-fg, var(--text));
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.topbar .btn-collab:hover {
  background: var(--shell-active-bg, rgba(99, 102, 241, .12));
  color: var(--shell-active-fg, var(--text));
  border-color: transparent;
}
/* 环境胶囊：可点击（role=button），补 cursor 与 hover 反馈 */
.env-pill { cursor: pointer; user-select: none; transition: background .18s ease, color .18s ease; }
.env-pill:hover { background: var(--shell-nav-bg-hover, rgba(15, 23, 42, .05)); }
.env-pill:focus-visible { outline: 2px solid var(--cp-brand, #6366f1); outline-offset: 2px; }

/* ---- 铃铛红点角标（待审批数量） ---- */
.bell-btn { position: relative; }
.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--top-bg, #fff);
  pointer-events: none;
}

/* ---- 命令面板下拉结果 ---- */
.cs-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 120;
  max-height: 340px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  background: var(--cs-panel-bg, #fff);
  border: 1px solid var(--shell-hair, rgba(148, 163, 184, .25));
  box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
}
.cs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--top-fg, var(--text));
}
.cs-item:hover, .cs-item.on { background: var(--shell-active-bg, rgba(99, 102, 241, .12)); }
.cs-item.on { color: var(--shell-active-fg, var(--text)); font-weight: 600; }
.cs-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-item-domain { flex: none; font-size: 11px; opacity: .55; }
.cs-empty { padding: 16px 10px; text-align: center; font-size: 12px; opacity: .6; }

/* ==================== #1185 右侧抽屉（通知中心 / 系统状态） ==================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 23, 42, .32);
  backdrop-filter: blur(2px);
}
.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 301;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  background: var(--cp-canvas, #fff);
  border-left: 1px solid var(--shell-hair, rgba(148, 163, 184, .25));
  box-shadow: -12px 0 40px rgba(15, 23, 42, .18);
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.22, .61, .36, 1);
}
.drawer-panel.on { transform: translateX(0); }
.drawer-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--shell-hair, rgba(148, 163, 184, .22));
  font-size: 15px;
  font-weight: 700;
  color: var(--cp-text, var(--text));
}
.drawer-close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: .55;
  padding: 4px 6px;
  border-radius: 6px;
}
.drawer-close:hover { opacity: 1; background: var(--shell-nav-bg-hover, rgba(15, 23, 42, .06)); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 28px; }
.drawer-loading, .drawer-err { padding: 30px 0; text-align: center; font-size: 13px; opacity: .6; }
.drawer-err { color: #dc2626; opacity: 1; }

/* 通知卡片 */
.nt-todo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 15px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(99, 102, 241, .12), rgba(56, 189, 248, .10));
  border: 1px solid rgba(99, 102, 241, .22);
}
.nt-todo-num { font-size: 26px; font-weight: 800; color: var(--cp-brand, #6366f1); line-height: 1; }
.nt-todo-txt { font-size: 13px; color: var(--cp-text, var(--text)); }
.nt-link {
  display: block;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--cp-brand, #6366f1);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.nt-svc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  font-size: 12px;
  background: var(--shell-nav-bg-hover, rgba(15, 23, 42, .04));
  color: var(--cp-text, var(--text));
}
.nt-svc-dot { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; flex: none; }
.nt-svc.ok .nt-svc-dot { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .16); }
.nt-svc.bad .nt-svc-dot { background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .16); }
.nt-sec {
  margin: 16px 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .5;
  color: var(--cp-text, var(--text));
}
.nt-card {
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 11px;
  border: 1px solid var(--shell-hair, rgba(148, 163, 184, .22));
  background: var(--cp-canvas, #fff);
}
.nt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nt-tag {
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(99, 102, 241, .14);
  color: var(--cp-brand, #6366f1);
}
.nt-date { font-size: 11px; opacity: .5; margin-left: auto; }
.nt-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--cp-text, var(--text)); }
.nt-body { font-size: 12px; line-height: 1.6; opacity: .75; color: var(--cp-text, var(--text)); }

/* 通知中心「问题提交」表单（#1365） */
.nt-fb-entry { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.nt-fb-btn {
  display: inline-block;
  margin-top: 0;
  font-size: 13px;
  padding: 6px 13px;
  border-radius: 9px;
  background: var(--cp-brand, #6366f1);
  color: #fff !important;
}
.nt-fb-btn:hover { filter: brightness(1.05); }
.nt-fb-hint { font-size: 11px; opacity: .55; color: var(--cp-text, var(--text)); }
.nt-fb-mine { margin-bottom: 4px; }
.nt-fb-item {
  padding: 9px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid var(--shell-hair, rgba(148, 163, 184, .22));
  background: var(--cp-canvas, #fff);
}
.nt-fb-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.nt-fb-status {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(148, 163, 184, .16);
  color: var(--cp-text, var(--text));
  margin-left: auto;
}
.nt-fb-status-new { background: rgba(99, 102, 241, .14); color: var(--cp-brand, #6366f1); }
.nt-fb-status-processing { background: rgba(245, 158, 11, .16); color: #d97706; }
.nt-fb-status-done { background: rgba(22, 163, 74, .16); color: #16a34a; }
.nt-fb-form { padding: 4px 0 0; }
.nt-fb-label { display: block; font-size: 12px; font-weight: 600; margin: 12px 0 5px; color: var(--cp-text, var(--text)); opacity: .85; }
.nt-req { color: #dc2626; }
.nt-fb-types { display: flex; gap: 16px; }
.nt-fb-type { font-size: 12px; color: var(--cp-text, var(--text)); opacity: .85; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.nt-fb-input, .nt-fb-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--shell-hair, rgba(148, 163, 184, .3));
  background: var(--cp-canvas, #fff);
  color: var(--cp-text, var(--text));
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}
.nt-fb-input:focus, .nt-fb-textarea:focus {
  outline: none;
  border-color: var(--cp-brand, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
}
.nt-fb-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.nt-fb-msg { font-size: 12px; opacity: .8; }

/* 系统状态面板 */
.st-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  background: var(--shell-nav-bg-hover, rgba(15, 23, 42, .04));
  color: var(--cp-text, var(--text));
}
.st-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; flex: none; }
.st-dot.ok { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .16); }
.st-dot.bad { background: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .16); }
.st-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-table th, .st-table td {
  padding: 9px 4px;
  text-align: left;
  border-bottom: 1px solid var(--shell-hair, rgba(148, 163, 184, .18));
}
.st-table th {
  width: 40%;
  font-weight: 500;
  opacity: .6;
  color: var(--cp-text, var(--text));
}
.st-table td { font-weight: 600; color: var(--cp-text, var(--text)); word-break: break-all; }
.st-foot { margin-top: 14px; font-size: 11px; opacity: .45; line-height: 1.6; }

/* ===== theme-bundle source: content-premium.css (cascade order preserved) ===== */
/* ============================================================
   content-premium.css — 内容区换肤层（Nebula 极光 · 内容篇）

   加载顺序：style.css → design-system.css → shell-premium.css → 本文件（最后）
   → 同等特异性下本文件胜出。

   ⚠️ 设计定位（改这个文件前必读）
   现有体系已经是「白卡 + 靛蓝渐变 + 柔阴影」：--bg-card 本就是 #fff、
   --radius-lg 本就是 16px、.stat-value 本就是渐变文字、.btn-primary 本就是
   渐变+光晕。**任何"再白一点 / 再圆一点 / 再加个渐变"的写法都是在复刻它，
   肉眼必然无差别。**
   本层的差异化手法只有四条，改的时候必须落在其中：
     ① 层次：阴影拆成「接触层 + 环境层」双层，卡片真正浮起（而非单层淡影）
     ② 收敛：大面积渐变 → 收敛为"品牌只点亮关键处"，表面回归中性
     ③ 质感：卡片顶沿一道 inset 高光，像被光掠过（零布局成本）
     ④ 节奏：表格用斑马纹 + 悬停左侧品牌竖条，制造行级可读性

   铁律：
   1. **只改「表现」，绝不改「布局」**：主选择器（非伪元素）禁止出现
      display / position / width / height / margin / padding / flex / grid /
      overflow / float / clear / z-index / top / left / right / bottom。
      只动 背景 / 文字色 / 描边 / 圆角 / 阴影 / 字重 / 字距 / 字形 / 过渡 /
      transform（仅 hover 抬升）/ filter。
      → transform 会创建 containing block，内部若有 position:fixed 弹层会错位，
        因此**只对 .stat-card 与 .btn 用，绝不用于 .card**（卡片里最可能有浮层）。
      → 伪元素（::before/::after）是绝对定位的装饰层，允许 position/inset/
        height，不影响主文档流。
   2. **零 JS 改动、零功能改动**。一键回退 = 删掉 index.html 那一行 <link>。
   3. **颜色即语义的类，一律不碰**（改了就是改信息，不是换肤）：
      .tt-* / .timetable-* / .mant-tt-* / .presched-* / .unavail-* /
      .mini-grid* / .conflict-item.hard|soft / .status-dot / .wizard-step /
      .sched-mode-pill / .switch / .ds-badge-* / .ds-tone-* / .btn-danger /
      .btn-warning
      这些承载「课程 / 锁定 / 冲突 / 单双周 / 步骤态 / 严重级 / 危险操作」语义。
   4. **令牌不污染**：自有变量一律 `--cp-*` 且写在本文件 :root。
   5. **作用域**：内容区挂 `.main-content`；模态框在 main 之外，单独挂
      `#modal-overlay`。教务域 ac2-* 由 academic.js 运行时注入 <style>，
      加载更晚，覆盖需 `body .ac2-xxx` 提权（本轮未覆盖，留作后续精修）。
   ============================================================ */

:root {
  /* ── 表面 ── */
  --cp-surface: #ffffff;
  --cp-surface-2: #fafbfd;
  --cp-canvas: #ffffff;                    /* #1181 画布底色：皮肤层可覆盖 */
  --cp-hi: rgba(255, 255, 255, .9);        /* 顶沿高光 */
  --cp-hair: rgba(15, 23, 42, .10);
  --cp-hair-strong: rgba(15, 23, 42, .16);

  /* ── 文字三级 ── */
  --cp-text: #0b1220;
  --cp-text-2: #475569;
  --cp-text-3: #94a3b8;

  /* ── 品牌（与 shell-premium 同源：靛蓝 → 紫 → 天青） ── */
  --cp-brand: #4f46e5;
  --cp-brand-2: #7c6cf6;
  /* #UI-POLISH：去青色尾，主 CTA 全站统一紫色系 */
  --cp-aurora: linear-gradient(100deg, #6366f1 0%, #7c3aed 55%, #8b5cf6 100%);
  --cp-ring: rgba(79, 70, 229, .18);
  --cp-tint: rgba(99, 102, 241, .06);

  /* ── 圆角 ── */
  --cp-r-md: 10px;
  --cp-r-lg: 16px;

  /* ── 阴影：接触层 + 环境层 双层分离，卡片才真正"浮"起来 ── */
  --cp-sh-1: 0 1px 1px rgba(15, 23, 42, .03), 0 2px 6px -2px rgba(15, 23, 42, .07);
  --cp-sh-2: 0 2px 4px -2px rgba(15, 23, 42, .06), 0 14px 30px -12px rgba(15, 23, 42, .20);
  --cp-sh-3: 0 10px 20px -8px rgba(15, 23, 42, .14), 0 40px 70px -20px rgba(15, 23, 42, .30);
  --cp-sh-brand: 0 2px 4px -2px rgba(79, 70, 229, .20), 0 16px 34px -14px rgba(79, 70, 229, .45);
}

/* ═══════════════════════════════════════════════════════════
   1. 画布：极淡网格 + 双极光（①层次 ②收敛）
   ═══════════════════════════════════════════════════════════ */
/* 用户要求：画布纯白，不要网格/极光装饰。层次交给卡片 hairline 描边 + 双层阴影承担。 */
.main-content {
  color: var(--cp-text);
  background-color: var(--cp-canvas, #ffffff);
}

/* ═══════════════════════════════════════════════════════════
   2. 版式：只调色与字距，绝不动字号字重（动了会撑坏布局）
   ═══════════════════════════════════════════════════════════ */
.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4 { color: var(--cp-text); letter-spacing: -.01em; }

.main-content .page-title { color: var(--cp-text); letter-spacing: -.02em; }
.main-content .card-header h3 { letter-spacing: .01em; }

/* 数字统一等宽字形：统计值跳动时不再左右抖 */
.main-content .stat-value,
.main-content .stat-num,
.main-content .ds-stat-v { font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════
   3. 统计卡：本层差异化最强的一块（原为纯白卡，改为品牌微染底）
   ── 用极淡品牌渐变底，而不是加深色：内部文字多为 --text-light，
      深色底会让它们糊掉，渐变浅底则零可读性问题。
   ═══════════════════════════════════════════════════════════ */
.main-content .stat-card {
  background: linear-gradient(158deg, #f2f0ff 0%, #e9efff 46%, #ffffff 100%);
  border: 1px solid rgba(99, 102, 241, .20);
  border-radius: var(--cp-r-lg);
  box-shadow: inset 0 1px 0 var(--cp-hi), var(--cp-sh-1);
}
/* 顶部极光条：原来是 opacity .6 的品牌双色渐，这里拉满并加光晕 */
.main-content .stat-card::before {
  background: var(--cp-aurora);
  opacity: 1;
  box-shadow: 0 0 14px rgba(99, 102, 241, .6);
}
/* 数值本就是渐变文字，这里补一层投影让它"发光" */
.main-content .stat-card .stat-value {
  filter: drop-shadow(0 3px 10px rgba(91, 110, 245, .30));
}
.main-content .stat-card .stat-label { color: var(--cp-text-2); }

.main-content .stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, .38);
  box-shadow: inset 0 1px 0 var(--cp-hi), var(--cp-sh-brand);
}

/* ═══════════════════════════════════════════════════════════
   4. 表面系统：白卡 + 顶沿高光 + 双层阴影（③质感）
   ═══════════════════════════════════════════════════════════ */
/* 白卡真正的可见差异在「边界」：旧 --border-light #eef1f6 几乎是隐形的，
   这里加深到清晰 hairline，整页立刻从"一片白"变成"结构化卡片墙"。
   ⚠️ 顶沿白色 inset 高光在 #fff 卡面上不可见，不要加（只有统计卡的渐变底有效）。 */
.main-content .card,
.main-content .config-card,
.main-content .ds-card {
  background: var(--cp-surface);
  border: 1px solid var(--cp-hair);
  border-radius: var(--cp-r-lg);
  box-shadow: var(--cp-sh-1);
  backdrop-filter: none;      /* 画布已不透明，去掉毛玻璃换取文字锐度 */
  -webkit-backdrop-filter: none;
  transition: box-shadow .22s ease, border-color .22s ease;
}
.main-content .card:hover,
.main-content .config-card:hover,
.main-content .ds-card:hover {
  border-color: var(--cp-hair-strong);
  box-shadow: var(--cp-sh-2);
}

/* 卡片头：左端一道品牌渐染，把"标题区"从整块白里拎出来。
   ⚠️ card 有 padding:22px，card-header 是块内独立色块、并非贴顶，
      因此四角统一小圆角，绝不能用「上圆下直」的贴顶圆角。 */
.main-content .card-header {
  border-bottom: 1px solid var(--cp-hair);
  border-radius: 10px;
  background: linear-gradient(90deg,
    rgba(99, 102, 241, .085) 0%,
    rgba(139, 92, 246, .04) 30%,
    transparent 66%);
}
.main-content .ds-card-hd,
.main-content .ds-card-ft { border-color: var(--cp-hair); }

/* ═══════════════════════════════════════════════════════════
   5. 数据呈现：表头渐变 + 斑马纹 + 悬停左侧品牌竖条（④节奏）
   （仅通用表；.tt-* / .presched-info-table / .man-info-table 属课表域，排除）
   ═══════════════════════════════════════════════════════════ */
.main-content table.table th,
.main-content table.data-table th,
.main-content table.task-table th,
.main-content table.sync-table th,
.main-content table.research-table th,
.main-content .ds-table th {
  background: linear-gradient(180deg, #fbfcfe 0%, #f0f3f9 100%);
  color: var(--cp-text-2);
  font-weight: 600;
  letter-spacing: .06em;
  border-bottom: 1px solid rgba(99, 102, 241, .28);
}
.main-content table.table td,
.main-content table.data-table td,
.main-content table.task-table td,
.main-content table.sync-table td,
.main-content table.research-table td,
.main-content .ds-table td { border-bottom: 1px solid var(--cp-hair); }

/* 斑马纹（写在 hover 之前，让 hover 能盖住它） */
.main-content table.table tbody tr:nth-child(even),
.main-content table.data-table tbody tr:nth-child(even),
.main-content table.task-table tbody tr:nth-child(even),
.main-content table.sync-table tbody tr:nth-child(even),
.main-content table.research-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, .8);
}

/* 悬停：整行淡染 + 首列 3px 品牌竖条（inset 画在 td padding 内，不遮字） */
.main-content table.table tbody tr:hover,
.main-content table.data-table tbody tr:hover,
.main-content table.task-table tbody tr:hover,
.main-content table.sync-table tbody tr:hover,
.main-content table.research-table tbody tr:hover,
.main-content .ds-table tbody tr:hover { background: var(--cp-tint); }

.main-content table.table tbody tr:hover td:first-child,
.main-content table.data-table tbody tr:hover td:first-child,
.main-content table.task-table tbody tr:hover td:first-child,
.main-content table.sync-table tbody tr:hover td:first-child,
.main-content table.research-table tbody tr:hover td:first-child,
.main-content .ds-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--cp-brand);
}

/* 表格容器四角收圆（.table-container / .ds-table-wrap 是外层滚动壳） */
.main-content .table-container,
.main-content .ds-table-wrap {
  border: 1px solid var(--cp-hair);
  border-radius: var(--cp-r-lg);
  background: var(--cp-surface);
  box-shadow: inset 0 1px 0 var(--cp-hi), var(--cp-sh-1);
}

/* ═══════════════════════════════════════════════════════════
   6. 控件：统一圆角 + 品牌焦点环（键盘可达性）
   ── 只收编 .form-control / .btn / .ds-btn，绝不裸选 input/select
      （裸选会误伤课表格子里那些故意无边框的控件）
   ═══════════════════════════════════════════════════════════ */
.main-content .form-control {
  border: 1px solid var(--cp-hair-strong);
  border-radius: var(--cp-r-md);
  background: #fdfdff;
  color: var(--cp-text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.main-content .form-control:hover { border-color: var(--cp-brand-2); }
.main-content .form-control:focus {
  border-color: rgba(79, 70, 229, .60);
  box-shadow: 0 0 0 3px var(--cp-ring), inset 0 1px 2px rgba(15, 23, 42, .03);
}

/* 按钮：主按钮从双色渐升级为三段极光 + 内高光 + 彩色光晕 */
.main-content .btn,
.main-content .ds-btn {
  border-radius: var(--cp-r-md);
  letter-spacing: .01em;
}
.main-content .btn:focus-visible,
.main-content .ds-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--cp-ring);
}

.main-content .btn-primary {
  background-image: var(--cp-aurora);
  background-size: 180% 100%;
  background-position: 0% 0%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .30), 0 6px 16px -6px rgba(99, 102, 241, .65);
  transition: box-shadow .2s ease, transform .2s ease, background-position .45s ease;
}
.main-content .btn-primary:hover {
  transform: translateY(-2px);
  background-position: 70% 0%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 12px 26px -8px rgba(99, 102, 241, .78);
}
.main-content .btn-primary:active { transform: translateY(0); }

.main-content .btn-success {
  background-image: linear-gradient(100deg, #059669 0%, #10b981 55%, #34d399 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 6px 16px -6px rgba(16, 185, 129, .62);
}
.main-content .btn-success:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .30), 0 12px 24px -8px rgba(16, 185, 129, .70);
}

/* 次要按钮：白底 + 明确 hairline，hover 染上品牌色 */
.main-content .btn-default,
.main-content .btn-secondary,
.main-content .btn-outline {
  background: #ffffff;
  background-image: none;
  border: 1px solid var(--cp-hair-strong);
  color: var(--cp-text-2);
}
.main-content .btn-default:hover,
.main-content .btn-secondary:hover,
.main-content .btn-outline:hover {
  border-color: var(--cp-brand-2);
  color: var(--cp-brand);
  background: var(--cp-tint);
}
/* ⚠️ .btn-danger / .btn-warning 是危险操作语义色，一条都不碰 */

/* ═══════════════════════════════════════════════════════════
   7. 空态与提示：更安静，不与数据抢注意力
   ═══════════════════════════════════════════════════════════ */
.main-content .ds-empty-t { color: var(--cp-text); }
.main-content .ds-empty-d { color: var(--cp-text-3); }

/* ═══════════════════════════════════════════════════════════
   8. 模态框（在 .main-content 之外，单独提权）
   ═══════════════════════════════════════════════════════════ */
#modal-overlay { background: rgba(15, 23, 42, .50); }
#modal-overlay .modal {
  background: var(--cp-surface);
  border: 1px solid var(--cp-hair);
  border-radius: 18px;
  box-shadow: var(--cp-sh-3);
}
#modal-overlay .modal-actions { border-top: 1px solid var(--cp-hair); }

/* ═══════════════════════════════════════════════════════════
   9. 滚动条：更细、更淡，hover 才显形
   ═══════════════════════════════════════════════════════════ */
/* 只管内容区与模态框；.sidebar-nav 属壳，归 shell-premium.css 管，不碰 */
.main-content::-webkit-scrollbar-thumb,
#modal-overlay .modal::-webkit-scrollbar-thumb {
  background: #ccd2de;
  border: 2px solid transparent;
  background-clip: content-box;
}
.main-content::-webkit-scrollbar-thumb:hover,
#modal-overlay .modal::-webkit-scrollbar-thumb:hover {
  background: #aeb6c6;
  background-clip: content-box;
}

/* ═══════════════════════════════════════════════════════════
   10. 无障碍：尊重「减少动态效果」系统偏好
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .main-content .card,
  .main-content .stat-card,
  .main-content .config-card,
  .main-content .ds-card,
  .main-content .form-control { transition: none; }
}

/* ═══════════════════════════════════════════════
   11. 教务域 ac2-*（academic.js / portal.js 运行时注入 <style>，加载晚于本文件）
   → 必须用 .main-content 前缀提权才能覆盖。
   只动「表面/边框/圆角/阴影/表头/斑马纹/焦点环」，
   绝不碰语义色类：.ac2-warn / .ac2-ok / .ac2-dgr / .ac2-st / .ac2-bar /
   .ac2-badge / .ac2-tag / .ac2-tip / .ac2-mask
   ═════════════════════════════════════════════ */
.main-content .ac2-card {
  background: var(--cp-surface);
  border: 1px solid var(--cp-hair);
  border-radius: var(--cp-r-lg);
  box-shadow: var(--cp-sh-1);
}
.main-content .ac2-card-h {
  color: var(--cp-text);
  letter-spacing: .01em;
}
/* 表：容器圆角 + 表头渐变 + 斑马纹 + 悬停品牌竖条（与全局 .table 同源） */
.main-content .ac2-tbl {
  border: 1px solid var(--cp-hair);
  border-radius: var(--cp-r-lg);
  box-shadow: inset 0 1px 0 var(--cp-hi), var(--cp-sh-1);
  background: var(--cp-surface);
}
.main-content .ac2-tbl th {
  background: linear-gradient(180deg, #fbfcfe 0%, #f0f3f9 100%);
  color: var(--cp-text-2);
  letter-spacing: .06em;
  border-bottom: 1px solid rgba(99, 102, 241, .28);
}
.main-content .ac2-tbl td { border-bottom: 1px solid var(--cp-hair); }
.main-content .ac2-tbl tbody tr:nth-child(even) { background: rgba(248, 250, 252, .8); }
.main-content .ac2-tbl tbody tr:hover { background: var(--cp-tint); }
.main-content .ac2-tbl tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--cp-brand); }
/* 表单控件：统一圆角 + 品牌焦点环 */
.main-content .ac2-in,
.main-content .ac2-sel,
.main-content .ac2-form input,
.main-content .ac2-form select,
.main-content .ac2-form textarea {
  border: 1px solid var(--cp-hair-strong);
  border-radius: var(--cp-r-md);
  background: #fdfdff;
  color: var(--cp-text);
}
.main-content .ac2-in:focus,
.main-content .ac2-sel:focus,
.main-content .ac2-form input:focus,
.main-content .ac2-form select:focus,
.main-content .ac2-form textarea:focus {
  outline: none;
  border-color: rgba(79, 70, 229, .60);
  box-shadow: 0 0 0 3px var(--cp-ring);
}
/* 按钮：统一圆角 + 焦点环；.pri(天青渐变) / .dgr(危险红) 保留原语义色不动 */
.main-content .ac2-btn { border-radius: var(--cp-r-md); }
.main-content .ac2-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--cp-ring); }

/* ===== theme-bundle source: skin.css (cascade order preserved) ===== */
/* ============================================================
   skin.css — 皮肤变量层（#1181）
   加载顺序：style.css → design-system.css → shell-premium.css
             → content-premium.css → 本文件（最后）
   只覆盖 --shell-*（侧栏）与 --cp-*（内容区品牌/画布）两组变量，
   零布局改动、零 HTML/JS 逻辑改动。切换入口：顶栏调色板按钮，
   <html data-skin="..."> + localStorage('scheduler_skin') 记忆。

   11 套主题：
     dawn     晨光白（默认，无覆盖 = 现行纯白清爽版）
     ocean    深海蓝（深蓝侧栏 + 天青点缀）
     graphite 石墨黑（近黑侧栏 + 靛蓝点缀）
     aurora   极光紫（深紫侧栏 + 紫罗兰点缀）
     forest   森林绿（深绿侧栏 + 祖母绿点缀）
     indigo   极光 Indigo（深靛蓝侧栏 + 靛蓝/青点缀，品牌色）
     sunset   晨曦暖阳（暖酒红侧栏 + 橙/玫/金点缀，首个暖色）
     mint     薄荷青（深青侧栏 + 蓝绿点缀，区别于森林绿）
     flagship 深空旗舰（深蓝侧栏 + 香槟金点缀，呼应 bigscreen 2.0）
     （midnight / auto 为 UI 预留项，skin.css 暂无对应变量块 → 回落 dawn）

   ⚠️ 语义色（.tt-* / .btn-danger / .sched-mode-pill 等）一律不碰。

   #1185 补充：新增 --top-*（顶栏）变量层。
   原因：顶栏 .topbar 的背景/文字用的是全局量 --glass-bg-strong / --text /
   --border-light，而 --bell-btn 更是硬编码 background:#fff，
   env-pill 用的 --shell-pill-* 也从未被各皮肤覆盖 —— 于是换肤时
   「侧栏变了、顶栏纹丝不动」，且深色皮肤下白底按钮与深底顶栏严重割裂。
   修法：顶栏全面改绑 --top-*，每套皮肤给出成组的顶栏配色；
   绑定规则写在**本文件末尾**（同特异性但最后加载 → 胜出，无需 !important），
   因此完全不需要改动 style.css / design-system.css，零回归风险。
   ============================================================ */

/* ── 顶栏变量默认值（dawn 晨光白 = 现行浅色，与未换肤时逐像素一致） ── */
:root {
  --top-bg: rgba(255, 255, 255, .92);
  --top-border: rgba(15, 23, 42, .08);
  --top-fg: #0f172a;
  --top-fg-dim: #64748b;
  --top-hover-bg: #f1f5f9;
  --top-chip-bg: #ffffff;
  --top-chip-fg: #334155;
  --top-chip-bd: rgba(15, 23, 42, .10);
  --top-input-bg: rgba(15, 23, 42, .03);
  --top-input-bd: rgba(15, 23, 42, .09);
  --top-panel-bg: #ffffff;
  --top-panel-fg: #0f172a;
  --cs-panel-bg: #ffffff;
  /* #1186 dawn 对比度修补：未换肤（默认）时这三项低于 WCAG 门槛——
       --border        #e4e8f0 on #fff = 1.23:1（需 1.6，描边几乎看不见）
       --border-strong #d7dde8 on #fff = 1.36:1
       --text-muted    #94a3b8 on #fff = 2.56:1（需 3.0，占位符/弱化文字偏虚）
     刻意**写在本文件而非改 design-system.css**：保持基础文件原样，
     万一用户对默认观感不满意，删掉这几行即可完整回滚。 */
  --border: #c9ccd3;
  --border-strong: #c6cbd5;
  --text-muted: #8896a9;
  --cp-text-3: #8896a9;
}

/* ── 深海蓝 ── */
html[data-skin="ocean"] {
  --shell-bg: #0b2a4a;
  --shell-bg-soft: rgba(255, 255, 255, .06);
  --shell-group: #7da2c8;
  --shell-hair: rgba(255, 255, 255, .12);
  --shell-hair-strong: rgba(255, 255, 255, .22);
  --shell-nav-fg: #c3d7ec;
  --shell-nav-fg-hover: #ffffff;
  --shell-nav-bg-hover: rgba(255, 255, 255, .08);
  --shell-active-bg: rgba(56, 189, 248, .18);
  --shell-active-fg: #7dd3fc;
  --shell-brand-fg: #ffffff;
  --shell-brand-sub: #8fb3d4;
  --shell-footer-fg: #7da2c8;
  --shell-search-bg: rgba(15, 23, 42, .045);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --cp-canvas: #f4f8fd;
  --cp-brand: #0369a1;
  --cp-brand-2: #0ea5e9;
  --cp-aurora: linear-gradient(100deg, #0284c7 0%, #0ea5e9 52%, #38bdf8 100%);
  --cp-ring: rgba(2, 132, 199, .18);
  --cp-tint: rgba(14, 165, 233, .06);
  /* #1185 补全：此前各皮肤只覆盖了 6 个 --cp-*，而 content-premium.css
     实际用到 18 个 —— 缺的 --cp-surface / --cp-text / --cp-hair 等一族
     回落到 :root 默认的中性灰白，于是「卡片/文字/描边」在换肤时纹丝不动。
     这里给它们带上品牌色相（描边与次级文字染蓝调），换肤才有整体感。 */
  --cp-surface: #ffffff;
  --cp-surface-2: #f7fbfe;
  --cp-hi: rgba(255, 255, 255, .92);
  --cp-hair: rgba(2, 132, 199, .13);
  --cp-hair-strong: rgba(2, 132, 199, .20);
  --cp-text: #06263c;
  --cp-text-2: #3a5f7d;
  --cp-text-3: #7998b1;   /* 原 #7d9db6 白底仅 2.85:1（需 3.0）→ 压深一档 */
  /* 顶栏（比侧栏 #0b2a4a 略亮一档，形成层次而不割裂） */
  --top-bg: #10375c;
  --top-border: rgba(255, 255, 255, .10);
  --top-fg: #eaf3fb;
  --top-fg-dim: #a9c6e2;
  --top-hover-bg: rgba(255, 255, 255, .10);
  --top-chip-bg: rgba(255, 255, 255, .09);
  --top-chip-fg: #d6e8f7;
  --top-chip-bd: rgba(255, 255, 255, .16);
  --top-input-bg: rgba(255, 255, 255, .07);
  --top-input-bd: rgba(255, 255, 255, .15);
  --top-panel-bg: #14406b;
  --top-panel-fg: #eaf3fb;
  --cs-panel-bg: #14406b;
  /* #1186 design-system 全局量接管（--primary / --bg-card / --text / --border 一族）
     根因：这族变量被全站引用 418 处，却从未被任何皮肤覆盖 —— 于是
     「侧栏顶栏都换了，中间的卡片/正文/描边/按钮纹丝不动」。
     修法：能嵌套引用的直接指向 --cp-*（零重复、天然同步）；
     描边需实色故单独给值（--cp-hair 是 rgba，当 border 会过淡）。 */
  --primary: var(--cp-brand);
  --primary-light: var(--cp-brand-2);
  --primary-dark: #075985;
  --primary-gradient: var(--cp-aurora);
  --primary-gradient-soft: linear-gradient(135deg, rgba(2, 132, 199, .10) 0%, rgba(56, 189, 248, .10) 100%);
  --text: var(--cp-text);
  --text-light: var(--cp-text-2);
  --text-muted: var(--cp-text-3);
  --border: #bfcedb;      /* 原 #d4e5f3 白底仅 1.29:1（需 1.6）→ 压深 */
  --border-light: #e9f3fa;
  --border-strong: #a9cbe3;
  --bg: var(--cp-canvas);
  --bg-page: var(--cp-canvas);
  --bg-card: var(--cp-surface);
  --bg-subtle: var(--cp-surface-2);
  --glass-bg: rgba(244, 250, 253, .72);
  --glass-bg-strong: rgba(244, 250, 253, .86);
  --glass-border: rgba(2, 132, 199, .14);
  /* 侧栏遗留量：取 --shell-* 同色，即便生效也不会与现方案冲突 */
  --bg-sidebar-grad: var(--shell-bg);
  --text-sidebar: var(--shell-nav-fg);
  --text-sidebar-dim: var(--shell-footer-fg);
}

/* ── 石墨黑 ── */
html[data-skin="graphite"] {
  --shell-bg: #111827;
  --shell-bg-soft: rgba(255, 255, 255, .06);
  --shell-group: #8b94a7;
  --shell-hair: rgba(255, 255, 255, .11);
  --shell-hair-strong: rgba(255, 255, 255, .20);
  --shell-nav-fg: #b9c0cf;
  --shell-nav-fg-hover: #ffffff;
  --shell-nav-bg-hover: rgba(255, 255, 255, .08);
  --shell-active-bg: rgba(99, 102, 241, .20);
  --shell-active-fg: #a5b4fc;
  --shell-brand-fg: #ffffff;
  --shell-brand-sub: #8b94a7;
  --shell-footer-fg: #8b94a7;
  --shell-search-bg: rgba(15, 23, 42, .045);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --cp-canvas: #f6f7f9;
  --cp-brand: #4f46e5;
  --cp-brand-2: #6366f1;
  --cp-aurora: linear-gradient(100deg, #4f46e5 0%, #6366f1 52%, #818cf8 100%);
  --cp-ring: rgba(79, 70, 229, .18);
  --cp-tint: rgba(99, 102, 241, .06);
  /* #1185 补全 --cp-* 表面/文字/描边三族（中性灰，比默认更冷一档） */
  --cp-surface: #ffffff;
  --cp-surface-2: #fafbfc;
  --cp-hi: rgba(255, 255, 255, .92);
  --cp-hair: rgba(15, 23, 42, .11);
  --cp-hair-strong: rgba(15, 23, 42, .17);
  --cp-text: #0b1220;
  --cp-text-2: #4b5768;
  --cp-text-3: #8a95a4;   /* 原 #939eae 白底仅 2.71:1（需 3.0）→ 压深一档 */
  /* 顶栏（侧栏 #111827 提亮） */
  --top-bg: #1b2333;
  --top-border: rgba(255, 255, 255, .10);
  --top-fg: #e7eaf0;
  --top-fg-dim: #99a3b7;
  --top-hover-bg: rgba(255, 255, 255, .10);
  --top-chip-bg: rgba(255, 255, 255, .08);
  --top-chip-fg: #ccd3e0;
  --top-chip-bd: rgba(255, 255, 255, .15);
  --top-input-bg: rgba(255, 255, 255, .06);
  --top-input-bd: rgba(255, 255, 255, .14);
  --top-panel-bg: #212b3d;
  --top-panel-fg: #e7eaf0;
  --cs-panel-bg: #212b3d;
  /* #1186 design-system 全局量接管（中性冷灰，与 --cp-* 同口径） */
  --primary: var(--cp-brand);
  --primary-light: var(--cp-brand-2);
  --primary-dark: #3730a3;
  --primary-gradient: var(--cp-aurora);
  --primary-gradient-soft: linear-gradient(135deg, rgba(79, 70, 229, .10) 0%, rgba(99, 102, 241, .10) 100%);
  --text: var(--cp-text);
  --text-light: var(--cp-text-2);
  --text-muted: var(--cp-text-3);
  --border: #c7cad1;      /* 原 #dde1e8 白底仅 1.31:1（需 1.6）→ 压深 */
  --border-light: #eaedf2;
  --border-strong: #b9c0cd;
  --bg: var(--cp-canvas);
  --bg-page: var(--cp-canvas);
  --bg-card: var(--cp-surface);
  --bg-subtle: var(--cp-surface-2);
  --glass-bg: rgba(249, 250, 251, .72);
  --glass-bg-strong: rgba(249, 250, 251, .86);
  --glass-border: rgba(15, 23, 42, .12);
  --bg-sidebar-grad: var(--shell-bg);
  --text-sidebar: var(--shell-nav-fg);
  --text-sidebar-dim: var(--shell-footer-fg);
}

/* ── 极光紫 ── */
html[data-skin="aurora"] {
  --shell-bg: #241b3d;
  --shell-bg-soft: rgba(255, 255, 255, .06);
  --shell-group: #a89ec9;
  --shell-hair: rgba(255, 255, 255, .12);
  --shell-hair-strong: rgba(255, 255, 255, .22);
  --shell-nav-fg: #cfc6e9;
  --shell-nav-fg-hover: #ffffff;
  --shell-nav-bg-hover: rgba(255, 255, 255, .08);
  --shell-active-bg: rgba(167, 139, 250, .20);
  --shell-active-fg: #c4b5fd;
  --shell-brand-fg: #ffffff;
  --shell-brand-sub: #a89ec9;
  --shell-footer-fg: #a89ec9;
  --shell-search-bg: rgba(15, 23, 42, .045);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --cp-canvas: #f9f7fd;
  --cp-brand: #7c3aed;
  --cp-brand-2: #8b5cf6;
  --cp-aurora: linear-gradient(100deg, #7c3aed 0%, #8b5cf6 52%, #a78bfa 100%);
  --cp-ring: rgba(124, 58, 237, .18);
  --cp-tint: rgba(139, 92, 246, .06);
  /* #1185 补全 --cp-* 表面/文字/描边三族（染紫调） */
  --cp-surface: #ffffff;
  --cp-surface-2: #fbfaff;
  --cp-hi: rgba(255, 255, 255, .92);
  --cp-hair: rgba(124, 58, 237, .13);
  --cp-hair-strong: rgba(124, 58, 237, .20);
  --cp-text: #1b1030;
  --cp-text-2: #553f7a;
  --cp-text-3: #9b86bd;
  /* 顶栏（侧栏 #241b3d 提亮） */
  --top-bg: #2f2450;
  --top-border: rgba(255, 255, 255, .11);
  --top-fg: #eee9fc;
  --top-fg-dim: #b6abd7;
  --top-hover-bg: rgba(255, 255, 255, .10);
  --top-chip-bg: rgba(255, 255, 255, .09);
  --top-chip-fg: #ddd5f5;
  --top-chip-bd: rgba(255, 255, 255, .16);
  --top-input-bg: rgba(255, 255, 255, .07);
  --top-input-bd: rgba(255, 255, 255, .15);
  --top-panel-bg: #382c61;
  --top-panel-fg: #eee9fc;
  --cs-panel-bg: #382c61;
  /* #1186 design-system 全局量接管（染紫调） */
  --primary: var(--cp-brand);
  --primary-light: var(--cp-brand-2);
  --primary-dark: #5b21b6;
  --primary-gradient: var(--cp-aurora);
  --primary-gradient-soft: linear-gradient(135deg, rgba(124, 58, 237, .10) 0%, rgba(139, 92, 246, .10) 100%);
  --text: var(--cp-text);
  --text-light: var(--cp-text-2);
  --text-muted: var(--cp-text-3);
  --border: #d0c6e5;        /* 原 #ddd3f4 在白卡片上仅 1.43:1（描边门槛 1.6）→ 压深 */
  --border-light: #ece5fa;
  --border-strong: #b9a6e0;
  --bg: var(--cp-canvas);
  --bg-page: var(--cp-canvas);
  --bg-card: var(--cp-surface);
  --bg-subtle: var(--cp-surface-2);
  --glass-bg: rgba(251, 249, 254, .72);
  --glass-bg-strong: rgba(251, 249, 254, .86);
  --glass-border: rgba(124, 58, 237, .14);
  --bg-sidebar-grad: var(--shell-bg);
  --text-sidebar: var(--shell-nav-fg);
  --text-sidebar-dim: var(--shell-footer-fg);
}

/* ── 森林绿 ── */
html[data-skin="forest"] {
  --shell-bg: #0d2b22;
  --shell-bg-soft: rgba(255, 255, 255, .06);
  --shell-group: #7fae9d;
  --shell-hair: rgba(255, 255, 255, .12);
  --shell-hair-strong: rgba(255, 255, 255, .22);
  --shell-nav-fg: #c2ddd2;
  --shell-nav-fg-hover: #ffffff;
  --shell-nav-bg-hover: rgba(255, 255, 255, .08);
  --shell-active-bg: rgba(52, 211, 153, .18);
  --shell-active-fg: #6ee7b7;
  --shell-brand-fg: #ffffff;
  --shell-brand-sub: #7fae9d;
  --shell-footer-fg: #7fae9d;
  --shell-search-bg: rgba(15, 23, 42, .045);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --cp-canvas: #f5faf7;
  --cp-brand: #047857;
  --cp-brand-2: #059669;
  --cp-aurora: linear-gradient(100deg, #047857 0%, #059669 52%, #34d399 100%);
  --cp-ring: rgba(4, 120, 87, .18);
  --cp-tint: rgba(5, 150, 105, .06);
  /* #1185 补全 --cp-* 表面/文字/描边三族（染绿调） */
  --cp-surface: #ffffff;
  --cp-surface-2: #f8fdfa;
  --cp-hi: rgba(255, 255, 255, .92);
  --cp-hair: rgba(4, 120, 87, .13);
  --cp-hair-strong: rgba(4, 120, 87, .20);
  --cp-text: #05261c;
  --cp-text-2: #3a6355;
  --cp-text-3: #729d8d;   /* 原 #7fae9d 白底仅 2.49:1（需 3.0）→ 压深一档 */
  /* 顶栏（侧栏 #0d2b22 提亮） */
  --top-bg: #123b2f;
  --top-border: rgba(255, 255, 255, .11);
  --top-fg: #e6f5ee;
  --top-fg-dim: #9fc7b7;
  --top-hover-bg: rgba(255, 255, 255, .10);
  --top-chip-bg: rgba(255, 255, 255, .09);
  --top-chip-fg: #cfe9dc;
  --top-chip-bd: rgba(255, 255, 255, .16);
  --top-input-bg: rgba(255, 255, 255, .07);
  --top-input-bd: rgba(255, 255, 255, .15);
  --top-panel-bg: #17493a;
  --top-panel-fg: #e6f5ee;
  --cs-panel-bg: #17493a;
  /* #1186 design-system 全局量接管（染绿调） */
  --primary: var(--cp-brand);
  --primary-light: var(--cp-brand-2);
  --primary-dark: #065f46;
  --primary-gradient: var(--cp-aurora);
  --primary-gradient-soft: linear-gradient(135deg, rgba(4, 120, 87, .10) 0%, rgba(5, 150, 105, .10) 100%);
  --text: var(--cp-text);
  --text-light: var(--cp-text-2);
  --text-muted: var(--cp-text-3);
  --border: #bcd1c7;      /* 原 #cfe6db 白底仅 1.31:1（需 1.6）→ 压深 */
  --border-light: #e6f4ed;
  --border-strong: #a2cbb8;
  --bg: var(--cp-canvas);
  --bg-page: var(--cp-canvas);
  --bg-card: var(--cp-surface);
  --bg-subtle: var(--cp-surface-2);
  --glass-bg: rgba(247, 252, 249, .72);
  --glass-bg-strong: rgba(247, 252, 249, .86);
  --glass-border: rgba(4, 120, 87, .14);
  --bg-sidebar-grad: var(--shell-bg);
  --text-sidebar: var(--shell-nav-fg);
  --text-sidebar-dim: var(--shell-footer-fg);
}

/* ── 极光 Indigo（#扩皮肤：品牌靛蓝，区别于极光紫/石墨黑） ── */
html[data-skin="indigo"] {
  --shell-bg: #221c54;
  --shell-bg-soft: rgba(255, 255, 255, .06);
  --shell-group: #9a93d4;
  --shell-hair: rgba(255, 255, 255, .12);
  --shell-hair-strong: rgba(255, 255, 255, .22);
  --shell-nav-fg: #c7c2ee;
  --shell-nav-fg-hover: #ffffff;
  --shell-nav-bg-hover: rgba(255, 255, 255, .08);
  --shell-active-bg: rgba(129, 140, 248, .20);
  --shell-active-fg: #a5b4fc;
  --shell-brand-fg: #ffffff;
  --shell-brand-sub: #9a93d4;
  --shell-footer-fg: #9a93d4;
  --shell-search-bg: rgba(15, 23, 42, .045);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --cp-canvas: #f6f7fe;
  --cp-brand: #4f46e5;
  --cp-brand-2: #6366f1;
  --cp-aurora: linear-gradient(100deg, #4f46e5 0%, #6366f1 52%, #38bdf8 100%);
  --cp-ring: rgba(79, 70, 229, .18);
  --cp-tint: rgba(99, 102, 241, .06);
  --cp-surface: #ffffff;
  --cp-surface-2: #f6f7fe;
  --cp-hi: rgba(255, 255, 255, .92);
  --cp-hair: rgba(79, 70, 229, .13);
  --cp-hair-strong: rgba(79, 70, 229, .20);
  --cp-text: #16123a;
  --cp-text-2: #443f6e;
  --cp-text-3: #736fab;
  --top-bg: #2c256b;
  --top-border: rgba(255, 255, 255, .11);
  --top-fg: #eceaff;
  --top-fg-dim: #aba4dd;
  --top-hover-bg: rgba(255, 255, 255, .10);
  --top-chip-bg: rgba(255, 255, 255, .09);
  --top-chip-fg: #d9d5f7;
  --top-chip-bd: rgba(255, 255, 255, .16);
  --top-input-bg: rgba(255, 255, 255, .07);
  --top-input-bd: rgba(255, 255, 255, .15);
  --top-panel-bg: #352e7e;
  --top-panel-fg: #eceaff;
  --cs-panel-bg: #352e7e;
  --primary: var(--cp-brand);
  --primary-light: var(--cp-brand-2);
  --primary-dark: #3730a3;
  --primary-gradient: var(--cp-aurora);
  --primary-gradient-soft: linear-gradient(135deg, rgba(79, 70, 229, .10) 0%, rgba(99, 102, 241, .10) 100%);
  --text: var(--cp-text);
  --text-light: var(--cp-text-2);
  --text-muted: var(--cp-text-3);
  --border: #c5c4e0;
  --border-light: #e9e8f7;
  --border-strong: #b0aedb;
  --bg: var(--cp-canvas);
  --bg-page: var(--cp-canvas);
  --bg-card: var(--cp-surface);
  --bg-subtle: var(--cp-surface-2);
  --glass-bg: rgba(247, 247, 254, .72);
  --glass-bg-strong: rgba(247, 247, 254, .86);
  --glass-border: rgba(79, 70, 229, .14);
  --bg-sidebar-grad: var(--shell-bg);
  --text-sidebar: var(--shell-nav-fg);
  --text-sidebar-dim: var(--shell-footer-fg);
}

/* ── 晨曦暖阳（#扩皮肤：首个暖色，橙→玫→金） ── */
html[data-skin="sunset"] {
  --shell-bg: #3a2233;
  --shell-bg-soft: rgba(255, 255, 255, .06);
  --shell-group: #c79fb0;
  --shell-hair: rgba(255, 255, 255, .12);
  --shell-hair-strong: rgba(255, 255, 255, .22);
  --shell-nav-fg: #e7cdd8;
  --shell-nav-fg-hover: #ffffff;
  --shell-nav-bg-hover: rgba(255, 255, 255, .08);
  --shell-active-bg: rgba(251, 146, 60, .20);
  --shell-active-fg: #fdba74;
  --shell-brand-fg: #ffffff;
  --shell-brand-sub: #c79fb0;
  --shell-footer-fg: #c79fb0;
  --shell-search-bg: rgba(15, 23, 42, .045);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --cp-canvas: #fef8f4;
  --cp-brand: #ea580c;
  --cp-brand-2: #f43f5e;
  --cp-aurora: linear-gradient(100deg, #f97316 0%, #fb7185 52%, #fbbf24 100%);
  --cp-ring: rgba(234, 88, 12, .18);
  --cp-tint: rgba(244, 63, 94, .06);
  --cp-surface: #ffffff;
  --cp-surface-2: #fef8f4;
  --cp-hi: rgba(255, 255, 255, .92);
  --cp-hair: rgba(234, 88, 12, .13);
  --cp-hair-strong: rgba(234, 88, 12, .20);
  --cp-text: #2e1820;
  --cp-text-2: #6e4452;
  --cp-text-3: #9d6a7d;
  --top-bg: #4a2d3a;
  --top-border: rgba(255, 255, 255, .11);
  --top-fg: #fbe9ef;
  --top-fg-dim: #d3a7b6;
  --top-hover-bg: rgba(255, 255, 255, .10);
  --top-chip-bg: rgba(255, 255, 255, .09);
  --top-chip-fg: #f3d8e0;
  --top-chip-bd: rgba(255, 255, 255, .16);
  --top-input-bg: rgba(255, 255, 255, .07);
  --top-input-bd: rgba(255, 255, 255, .15);
  --top-panel-bg: #583746;
  --top-panel-fg: #fbe9ef;
  --cs-panel-bg: #583746;
  --primary: var(--cp-brand);
  --primary-light: var(--cp-brand-2);
  --primary-dark: #c2410c;
  --primary-gradient: var(--cp-aurora);
  --primary-gradient-soft: linear-gradient(135deg, rgba(249, 115, 22, .10) 0%, rgba(244, 63, 94, .10) 100%);
  --text: var(--cp-text);
  --text-light: var(--cp-text-2);
  --text-muted: var(--cp-text-3);
  --border: #ddbfc8;
  --border-light: #f7e6ea;
  --border-strong: #cfa9b6;
  --bg: var(--cp-canvas);
  --bg-page: var(--cp-canvas);
  --bg-card: var(--cp-surface);
  --bg-subtle: var(--cp-surface-2);
  --glass-bg: rgba(254, 248, 244, .72);
  --glass-bg-strong: rgba(254, 248, 244, .86);
  --glass-border: rgba(234, 88, 12, .14);
  --bg-sidebar-grad: var(--shell-bg);
  --text-sidebar: var(--shell-nav-fg);
  --text-sidebar-dim: var(--shell-footer-fg);
}

/* ── 薄荷青（#扩皮肤：蓝绿/青，区别于森林绿） ── */
html[data-skin="mint"] {
  --shell-bg: #0b3b3a;
  --shell-bg-soft: rgba(255, 255, 255, .06);
  --shell-group: #7fc7bd;
  --shell-hair: rgba(255, 255, 255, .12);
  --shell-hair-strong: rgba(255, 255, 255, .22);
  --shell-nav-fg: #c2e7e1;
  --shell-nav-fg-hover: #ffffff;
  --shell-nav-bg-hover: rgba(255, 255, 255, .08);
  --shell-active-bg: rgba(45, 212, 191, .18);
  --shell-active-fg: #5eead4;
  --shell-brand-fg: #ffffff;
  --shell-brand-sub: #7fc7bd;
  --shell-footer-fg: #7fc7bd;
  --shell-search-bg: rgba(15, 23, 42, .045);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --cp-canvas: #f1fbfa;
  --cp-brand: #0d9488;
  --cp-brand-2: #14b8a6;
  --cp-aurora: linear-gradient(100deg, #0d9488 0%, #14b8a6 52%, #67e8f9 100%);
  --cp-ring: rgba(13, 148, 136, .18);
  --cp-tint: rgba(20, 184, 166, .06);
  --cp-surface: #ffffff;
  --cp-surface-2: #f1fbfa;
  --cp-hi: rgba(255, 255, 255, .92);
  --cp-hair: rgba(13, 148, 136, .13);
  --cp-hair-strong: rgba(13, 148, 136, .20);
  --cp-text: #04211f;
  --cp-text-2: #2f5e58;
  --cp-text-3: #64a39a;
  --top-bg: #0f4a48;
  --top-border: rgba(255, 255, 255, .11);
  --top-fg: #e1f5f1;
  --top-fg-dim: #9ccabf;
  --top-hover-bg: rgba(255, 255, 255, .10);
  --top-chip-bg: rgba(255, 255, 255, .09);
  --top-chip-fg: #c9eae3;
  --top-chip-bd: rgba(255, 255, 255, .16);
  --top-input-bg: rgba(255, 255, 255, .07);
  --top-input-bd: rgba(255, 255, 255, .15);
  --top-panel-bg: #125a57;
  --top-panel-fg: #e1f5f1;
  --cs-panel-bg: #125a57;
  --primary: var(--cp-brand);
  --primary-light: var(--cp-brand-2);
  --primary-dark: #0f766e;
  --primary-gradient: var(--cp-aurora);
  --primary-gradient-soft: linear-gradient(135deg, rgba(13, 148, 136, .10) 0%, rgba(20, 184, 166, .10) 100%);
  --text: var(--cp-text);
  --text-light: var(--cp-text-2);
  --text-muted: var(--cp-text-3);
  --border: #b6dad3;
  --border-light: #e3f4f1;
  --border-strong: #9ccabf;
  --bg: var(--cp-canvas);
  --bg-page: var(--cp-canvas);
  --bg-card: var(--cp-surface);
  --bg-subtle: var(--cp-surface-2);
  --glass-bg: rgba(241, 251, 250, .72);
  --glass-bg-strong: rgba(241, 251, 250, .86);
  --glass-border: rgba(13, 148, 136, .14);
  --bg-sidebar-grad: var(--shell-bg);
  --text-sidebar: var(--shell-nav-fg);
  --text-sidebar-dim: var(--shell-footer-fg);
}

/* ── 深空旗舰（#扩皮肤：深蓝 + 香槟金，呼应 bigscreen 2.0 旗舰身份） ── */
html[data-skin="flagship"] {
  --shell-bg: #0a1733;
  --shell-bg-soft: rgba(255, 255, 255, .06);
  --shell-group: #8fa3c8;
  --shell-hair: rgba(255, 255, 255, .12);
  --shell-hair-strong: rgba(255, 255, 255, .22);
  --shell-nav-fg: #c3d2ec;
  --shell-nav-fg-hover: #ffffff;
  --shell-nav-bg-hover: rgba(255, 255, 255, .08);
  --shell-active-bg: rgba(212, 175, 55, .20);
  --shell-active-fg: #e9c46a;
  --shell-brand-fg: #ffffff;
  --shell-brand-sub: #8fa3c8;
  --shell-footer-fg: #8fa3c8;
  --shell-search-bg: rgba(15, 23, 42, .045);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --cp-canvas: #f4f7fc;
  --cp-brand: #1d4ed8;
  --cp-brand-2: #3b82f6;
  --cp-aurora: linear-gradient(100deg, #1e3a8a 0%, #1d4ed8 52%, #e9c46a 100%);
  --cp-ring: rgba(29, 78, 216, .18);
  --cp-tint: rgba(212, 175, 55, .07);
  --cp-surface: #ffffff;
  --cp-surface-2: #f4f7fc;
  --cp-hi: rgba(255, 255, 255, .92);
  --cp-hair: rgba(29, 78, 216, .13);
  --cp-hair-strong: rgba(29, 78, 216, .20);
  --cp-text: #0b1530;
  --cp-text-2: #34436b;
  --cp-text-3: #7984a6;
  --top-bg: #0e1d40;
  --top-border: rgba(255, 255, 255, .11);
  --top-fg: #e7eefb;
  --top-fg-dim: #9db0d6;
  --top-hover-bg: rgba(255, 255, 255, .10);
  --top-chip-bg: rgba(255, 255, 255, .09);
  --top-chip-fg: #cdd9f3;
  --top-chip-bd: rgba(255, 255, 255, .16);
  --top-input-bg: rgba(255, 255, 255, .07);
  --top-input-bd: rgba(255, 255, 255, .15);
  --top-panel-bg: #122451;
  --top-panel-fg: #e7eefb;
  --cs-panel-bg: #122451;
  --primary: var(--cp-brand);
  --primary-light: var(--cp-brand-2);
  --primary-dark: #1e3a8a;
  --primary-gradient: var(--cp-aurora);
  --primary-gradient-soft: linear-gradient(135deg, rgba(29, 78, 216, .10) 0%, rgba(212, 175, 55, .08) 100%);
  --text: var(--cp-text);
  --text-light: var(--cp-text-2);
  --text-muted: var(--cp-text-3);
  --border: #bcc8e0;
  --border-light: #e6ecf7;
  --border-strong: #a9bbdc;
  --bg: var(--cp-canvas);
  --bg-page: var(--cp-canvas);
  --bg-card: var(--cp-surface);
  --bg-subtle: var(--cp-surface-2);
  --glass-bg: rgba(244, 247, 252, .72);
  --glass-bg-strong: rgba(244, 247, 252, .86);
  --glass-border: rgba(29, 78, 216, .14);
  --bg-sidebar-grad: var(--shell-bg);
  --text-sidebar: var(--shell-nav-fg);
  --text-sidebar-dim: var(--shell-footer-fg);
}

/* ═══════════════════════════════════════════════════════════
   顶栏绑定规则（#1185）
   · 本文件加载顺序在 style.css / design-system.css / shell-premium.css
     **之后**，同特异性下后者胜出，故无需 !important，也不改动那两个文件。
   · 只改颜色，绝不碰布局属性（width/height/padding/display/position…），
     遵守换肤边界铁律。
   ═══════════════════════════════════════════════════════════ */

/* 顶栏本体 */
.topbar {
  background: var(--top-bg);
  border-bottom: 1px solid var(--top-border);
  color: var(--top-fg);
}
.topbar-title { color: var(--top-fg); }
.topbar-divider { background: var(--top-border); }
.topbar-user { color: var(--top-fg-dim); }
.topbar .sidebar-toggle { color: var(--top-fg-dim); }
.topbar .sidebar-toggle:hover { background: var(--top-hover-bg); color: var(--top-fg); }

/* 命令搜索：整体跟随顶栏，不再用写死的浅色搜索底 */
.cmd-search {
  background: var(--top-input-bg);
  border-color: var(--top-input-bd);
  color: var(--top-fg-dim);
}
.cmd-search:focus-within { background: var(--top-input-bg); }
.cs-input { color: var(--top-fg); }
.cs-input::placeholder { color: var(--top-fg-dim); opacity: .75; }
.cs-kbd {
  background: var(--top-chip-bg);
  border-color: var(--top-chip-bd);
  color: var(--top-fg-dim);
}

/* 环境胶囊 / 铃铛 / 退出按钮 / 升级按钮：一律改绑顶栏 chip 配色，
   修掉「深色顶栏上顶着一块刺眼白底」的割裂感 */
.env-pill {
  background: var(--top-chip-bg);
  color: var(--top-chip-fg);
  border-color: var(--top-chip-bd);
}
.env-pill::before { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, .8); }
.bell-btn {
  background: var(--top-chip-bg);
  border-color: var(--top-chip-bd);
  color: var(--top-fg-dim);
}
.bell-btn:hover { color: var(--top-fg); background: var(--top-hover-bg); }
.btn-logout {
  background: var(--top-chip-bg);
  border-color: var(--top-chip-bd);
  color: var(--top-fg-dim);
}
.btn-logout:hover { color: #ef4444; border-color: rgba(239, 68, 68, .45); }

/* 下拉面板（命令面板 / 主题面板）跟随顶栏面板底色 */
.cs-panel { background: var(--cs-panel-bg); border-color: var(--top-border); }
.cs-item { color: var(--top-panel-fg); }
.cs-item:hover, .cs-item.on { background: var(--top-hover-bg); color: var(--top-panel-fg); }
.cs-empty { color: var(--top-fg-dim); }
.skin-menu { background: var(--top-panel-bg); border-color: var(--top-border); }
.skin-menu-title { color: var(--top-panel-fg); }
.skin-card-name { color: var(--top-fg-dim); }
.skin-card.on .skin-card-name { color: var(--top-fg); }

/* 抽屉（通知中心 / 系统状态）跟随内容区画布 + 顶栏文字色 */
.drawer-panel { background: var(--cp-canvas, #fff); }
.drawer-head { color: var(--cp-text, var(--top-fg)); border-bottom-color: var(--top-border); }
.drawer-close { color: var(--cp-text, var(--top-fg)); }
.drawer-close:hover { background: var(--top-hover-bg); }

/* ═══════════════════════════════════════════════════════════
   系统概览页（dashboard）硬编码色接管（#1185）
   用户反馈：「系统概览里面的这个没随皮肤颜色变化」。
   根因：style.css 里这些元素是**硬编码色**，绕过了一切变量层：
     .dash-hero  background: linear-gradient(135deg,#4f46e5,#7c3aed,#8b5cf6)  ← 写死靛紫
     .stat-chip  background:#fff; color:var(--primary)
     .dash-clear-accordion / .feat-card / .dash-help-btn  同样写死白底
   --primary / --text-light 是**全局量**，skin.css 从未覆盖，故永远不变色。
   修法：改绑 --cp-*（本文件已为每套皮肤定义），仍只改颜色不碰布局。
   ⚠️ 语义色（清空数据区的 #991b1b 危险红 / #fecaca 边框）一律不碰。
   ═══════════════════════════════════════════════════════════ */

/* 概览大横幅：跟随各皮肤的品牌渐变（最显眼的换肤反馈点） */
.dash-hero { background: var(--cp-aurora); }
.dash-hero-sub { color: rgba(255, 255, 255, .92); }
.dash-hero::after {
  background: radial-gradient(circle, rgba(255, 255, 255, .22) 0%, transparent 65%);
}

/* 统计小卡 */
.stat-chip {
  background: var(--cp-surface);
  border-color: var(--cp-hair);
}
.stat-chip-val { color: var(--cp-brand); }
.stat-chip-lbl { color: var(--cp-text-3); }

/* 核心能力卡 */
.feat-card { background: var(--cp-surface); border-color: var(--cp-hair); }
.feat-card::before { background: var(--cp-aurora); }
.feat-ico { background: var(--cp-tint); }
.feat-title { color: var(--cp-text); }
.feat-desc { color: var(--cp-text-2); }

/* 帮助入口按钮（非 hero 内的那组：写死 #f8fafc 底 + #334155 字） */
.dash-help-btn {
  background: var(--cp-surface-2);
  border-color: var(--cp-hair-strong);
  color: var(--cp-text-2);
}
.dash-help-btn:hover {
  background: var(--cp-tint);
  border-color: var(--cp-brand);
  color: var(--cp-brand);
}

/* 数据管理（清空/重置）折叠区：只换表面，危险语义色保持 */
.dash-clear-accordion { background: var(--cp-surface); }

/* ===== theme-bundle source: future-theme.css (cascade order preserved) ===== */
/* ============================================================
   future-theme.css — 未来 UI 主题层（#1290 · B 方向：自适应深色 + 去趋势化）
   加载顺序：必须排在 skin.css 之后（index.html 中已置于 skin.css 链接之后）。
   作用域铁律：
     · 仅定义 html[data-skin="midnight"] / html[data-skin="auto"] 两套「新皮肤」；
     · 以及 .fs-* 组件类（命令面板 / AI 抽屉）。
     · #119 起在文件末尾以「叠加覆盖」对现有 5 套皮肤做去趋势化微调
       （玻璃更实 + aurora 渐变收敛），不改动 skin.css 一行；删除 #119 段即可完整回滚，零回归。
   设计取向：内容优先、克制、耐看——深色态用实色表面 + 细描边替代重玻璃/霓虹渐变，
   降低「2024 玻璃拟态」的时效性，向「未来 50 年」的耐久审美靠拢。

   变量名与 skin.css 完全同口径（--shell-* / --cp-* / --top-* / --primary* /
   --text* / --bg* / --glass* / --border*），故 content-premium.css 既有组件
   全部自动跟随，无需重绑。
   ============================================================ */

/* ───────────────────────────────────────────────────────────
   深空黑（midnight）：真·深色工作态
   侧栏与内容区同为深色，品牌色用提亮靛蓝（在深底上可读、不刺眼）。
   ─────────────────────────────────────────────────────────── */
html[data-skin="midnight"] {
  --shell-bg: #0a0e16;
  --shell-bg-soft: rgba(255, 255, 255, .05);
  --shell-group: #7c879a;
  --shell-hair: rgba(255, 255, 255, .09);
  --shell-hair-strong: rgba(255, 255, 255, .16);
  --shell-nav-fg: #c2cbda;
  --shell-nav-fg-hover: #ffffff;
  --shell-nav-bg-hover: rgba(255, 255, 255, .07);
  --shell-active-bg: rgba(129, 140, 248, .18);
  --shell-active-fg: #a5b4fc;
  --shell-brand-fg: #ffffff;
  --shell-brand-sub: #7c879a;
  --shell-footer-fg: #7c879a;
  --shell-search-bg: rgba(255, 255, 255, .05);
  --shell-search-bd: rgba(255, 255, 255, .12);
  --bg-sidebar-grad: var(--shell-bg);

  --cp-canvas: #0b0f17;
  --cp-brand: #818cf8;
  --cp-brand-2: #a5b4fc;
  /* 去趋势：aurora 渐变压低饱和度，避免霓虹感 */
  --cp-aurora: linear-gradient(100deg, #6366f1 0%, #7c3aed 52%, #8b5cf6 100%);
  --cp-ring: rgba(129, 140, 248, .30);
  --cp-tint: rgba(129, 140, 248, .10);
  --cp-surface: #131a26;
  --cp-surface-2: #0f1521;
  --cp-hi: rgba(255, 255, 255, .96);
  --cp-hair: rgba(255, 255, 255, .10);
  --cp-hair-strong: rgba(255, 255, 255, .18);
  --cp-text: #e6ebf2;
  --cp-text-2: #aab4c4;
  --cp-text-3: #7c879a;

  --top-bg: #0e131d;
  --top-border: rgba(255, 255, 255, .10);
  --top-fg: #e6ebf2;
  --top-fg-dim: #8b97a9;
  --top-hover-bg: rgba(255, 255, 255, .08);
  --top-chip-bg: rgba(255, 255, 255, .07);
  --top-chip-fg: #cdd5e2;
  --top-chip-bd: rgba(255, 255, 255, .14);
  --top-input-bg: rgba(255, 255, 255, .06);
  --top-input-bd: rgba(255, 255, 255, .14);
  --top-panel-bg: #131a26;
  --top-panel-fg: #e6ebf2;
  --cs-panel-bg: #131a26;

  --primary: var(--cp-brand);
  --primary-light: var(--cp-brand-2);
  --primary-dark: #4f46e5;
  --primary-gradient: var(--cp-aurora);
  --primary-gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, .14) 0%, rgba(139, 92, 246, .14) 100%);
  --text: var(--cp-text);
  --text-light: var(--cp-text-2);
  --text-muted: var(--cp-text-3);
  --border: rgba(255, 255, 255, .14);
  --border-light: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .22);
  --bg: var(--cp-canvas);
  --bg-page: var(--cp-canvas);
  --bg-card: var(--cp-surface);
  --bg-subtle: var(--cp-surface-2);
  /* 去趋势：玻璃更实、模糊更轻，避免「浮」的廉价感 */
  --glass-bg: rgba(19, 26, 38, .70);
  --glass-bg-strong: rgba(19, 26, 38, .86);
  --glass-border: rgba(255, 255, 255, .12);
}

/* 去趋势细化（仅 midnight）：收敛玻璃模糊、卡片用实色薄描边 */
html[data-skin="midnight"] .ds-glass,
html[data-skin="midnight"] .glass {
  backdrop-filter: blur(4px) saturate(112%);
  border: 1px solid var(--glass-border);
}

/* ───────────────────────────────────────────────────────────
   自适应（auto）：跟随系统 prefers-color-scheme
   浅色态 = 现行晨光白（与未换肤逐像素一致）；深色态 = 上方 midnight 配色。
   作用：首次进入即按系统主题呈现，不强迫用户在 6 套里挑。
   ─────────────────────────────────────────────────────────── */
html[data-skin="auto"] {
  /* 浅色默认（= dawn） */
  --shell-bg: #f1f5f9;
  --shell-bg-soft: rgba(15, 23, 42, .03);
  --shell-group: #64748b;
  --shell-hair: rgba(15, 23, 42, .08);
  --shell-hair-strong: rgba(15, 23, 42, .14);
  --shell-nav-fg: #334155;
  --shell-nav-fg-hover: #0f172a;
  --shell-nav-bg-hover: rgba(15, 23, 42, .05);
  --shell-active-bg: rgba(99, 102, 241, .12);
  --shell-active-fg: #4f46e5;
  --shell-brand-fg: #0f172a;
  --shell-brand-sub: #64748b;
  --shell-footer-fg: #64748b;
  --shell-search-bg: rgba(15, 23, 42, .04);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --bg-sidebar-grad: var(--shell-bg);
  --cp-canvas: #f4f7fb;
  --cp-brand: #6366f1;
  --cp-brand-2: #818cf8;
  --cp-aurora: linear-gradient(100deg, #6366f1 0%, #7c3aed 52%, #8b5cf6 100%);
  --cp-ring: rgba(99, 102, 241, .18);
  --cp-tint: rgba(99, 102, 241, .06);
  --cp-surface: #ffffff;
  --cp-surface-2: #f7f9fc;
  --cp-hi: rgba(255, 255, 255, .92);
  --cp-hair: rgba(15, 23, 42, .10);
  --cp-hair-strong: rgba(15, 23, 42, .16);
  --cp-text: #0f172a;
  --cp-text-2: #475569;
  --cp-text-3: #94a3b8;
  --top-bg: rgba(255, 255, 255, .92);
  --top-border: rgba(15, 23, 42, .08);
  --top-fg: #0f172a;
  --top-fg-dim: #64748b;
  --top-hover-bg: #f1f5f9;
  --top-chip-bg: #ffffff;
  --top-chip-fg: #334155;
  --top-chip-bd: rgba(15, 23, 42, .10);
  --top-input-bg: rgba(15, 23, 42, .03);
  --top-input-bd: rgba(15, 23, 42, .09);
  --top-panel-bg: #ffffff;
  --top-panel-fg: #0f172a;
  --cs-panel-bg: #ffffff;
  --primary: var(--cp-brand);
  --primary-light: var(--cp-brand-2);
  --primary-dark: #4338ca;
  --primary-gradient: var(--cp-aurora);
  --primary-gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, .10) 0%, rgba(139, 92, 246, .10) 100%);
  --text: var(--cp-text);
  --text-light: var(--cp-text-2);
  --text-muted: var(--cp-text-3);
  --border: #c9ccd3;
  --border-light: #e4e8f0;
  --border-strong: #c6cbd5;
  --bg: var(--cp-canvas);
  --bg-page: var(--cp-canvas);
  --bg-card: var(--cp-surface);
  --bg-subtle: var(--cp-surface-2);
  --glass-bg: rgba(255, 255, 255, .72);
  --glass-bg-strong: rgba(255, 255, 255, .86);
  --glass-border: rgba(15, 23, 42, .10);
}

@media (prefers-color-scheme: dark) {
  html[data-skin="auto"] {
    --shell-bg: #0a0e16;
    --shell-bg-soft: rgba(255, 255, 255, .05);
    --shell-group: #7c879a;
    --shell-hair: rgba(255, 255, 255, .09);
    --shell-hair-strong: rgba(255, 255, 255, .16);
    --shell-nav-fg: #c2cbda;
    --shell-nav-fg-hover: #ffffff;
    --shell-nav-bg-hover: rgba(255, 255, 255, .07);
    --shell-active-bg: rgba(129, 140, 248, .18);
    --shell-active-fg: #a5b4fc;
    --shell-brand-fg: #ffffff;
    --shell-brand-sub: #7c879a;
    --shell-footer-fg: #7c879a;
    --shell-search-bg: rgba(255, 255, 255, .05);
    --shell-search-bd: rgba(255, 255, 255, .12);
    --bg-sidebar-grad: var(--shell-bg);
    --cp-canvas: #0b0f17;
    --cp-brand: #818cf8;
    --cp-brand-2: #a5b4fc;
    --cp-aurora: linear-gradient(100deg, #6366f1 0%, #7c3aed 52%, #8b5cf6 100%);
    --cp-ring: rgba(129, 140, 248, .30);
    --cp-tint: rgba(129, 140, 248, .10);
    --cp-surface: #131a26;
    --cp-surface-2: #0f1521;
    --cp-hi: rgba(255, 255, 255, .96);
    --cp-hair: rgba(255, 255, 255, .10);
    --cp-hair-strong: rgba(255, 255, 255, .18);
    --cp-text: #e6ebf2;
    --cp-text-2: #aab4c4;
    --cp-text-3: #7c879a;
    --top-bg: #0e131d;
    --top-border: rgba(255, 255, 255, .10);
    --top-fg: #e6ebf2;
    --top-fg-dim: #8b97a9;
    --top-hover-bg: rgba(255, 255, 255, .08);
    --top-chip-bg: rgba(255, 255, 255, .07);
    --top-chip-fg: #cdd5e2;
    --top-chip-bd: rgba(255, 255, 255, .14);
    --top-input-bg: rgba(255, 255, 255, .06);
    --top-input-bd: rgba(255, 255, 255, .14);
    --top-panel-bg: #131a26;
    --top-panel-fg: #e6ebf2;
    --cs-panel-bg: #131a26;
    --primary: var(--cp-brand);
    --primary-light: var(--cp-brand-2);
    --primary-dark: #4f46e5;
    --primary-gradient: var(--cp-aurora);
    --primary-gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, .14) 0%, rgba(139, 92, 246, .14) 100%);
    --text: var(--cp-text);
    --text-light: var(--cp-text-2);
    --text-muted: var(--cp-text-3);
    --border: rgba(255, 255, 255, .14);
    --border-light: rgba(255, 255, 255, .08);
    --border-strong: rgba(255, 255, 255, .22);
    --bg: var(--cp-canvas);
    --bg-page: var(--cp-canvas);
    --bg-card: var(--cp-surface);
    --bg-subtle: var(--cp-surface-2);
    --glass-bg: rgba(19, 26, 38, .70);
    --glass-bg-strong: rgba(19, 26, 38, .86);
    --glass-border: rgba(255, 255, 255, .12);
  }
}

/* ═══════════════════════════════════════════════════════════
   #1290 未来 UI 组件样式（命令面板 + AI 抽屉）
   全部使用既有主题变量（--top-* / --primary / --border / --text），
   故浅色/深色/自适应三态下自动正确呈现。
   ═══════════════════════════════════════════════════════════ */

/* ── 命令面板（⌘K） ── */
.fs-palette-root { position: fixed; inset: 0; z-index: 100000; display: none; }
.fs-palette-root.open { display: block; }
.fs-palette-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 11, 18, .45);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.fs-palette {
  position: absolute; top: 13%; left: 50%; transform: translateX(-50%);
  width: min(640px, 92vw);
  background: var(--top-panel-bg, #fff);
  color: var(--top-panel-fg, #0f172a);
  border: 1px solid var(--top-border, rgba(15, 23, 42, .12));
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(2, 6, 23, .35);
  overflow: hidden;
}
.fs-palette-inputrow {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--top-border, rgba(15, 23, 42, .10));
}
.fs-kbd-hint {
  font-size: 11px; padding: 2px 7px; border-radius: 6px;
  background: var(--top-chip-bg); color: var(--top-fg-dim);
  border: 1px solid var(--top-chip-bd);
}
.fs-palette-input {
  flex: 1; border: none; outline: none; background: transparent;
  color: var(--top-panel-fg, #0f172a); font-size: 15px;
}
.fs-palette-input::placeholder { color: var(--top-fg-dim); }
.fs-palette-list { max-height: 52vh; overflow: auto; padding: 6px; }
.fs-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  color: var(--top-panel-fg, #0f172a);
}
.fs-item.on, .fs-item:hover { background: var(--top-hover-bg, rgba(15, 23, 42, .06)); }
.fs-item-ico { width: 22px; text-align: center; color: var(--primary, #6366f1); }
.fs-item-title { flex: 1; }
.fs-item-hint {
  font-size: 11px; color: var(--top-fg-dim);
  border: 1px solid var(--top-chip-bd); padding: 1px 7px; border-radius: 999px;
}
.fs-empty { padding: 18px; text-align: center; color: var(--top-fg-dim); }
.fs-palette-foot {
  padding: 8px 14px; font-size: 11px; color: var(--top-fg-dim);
  border-top: 1px solid var(--top-border);
}

/* ── AI 智能体抽屉 ── */
.fs-ai-root { position: fixed; inset: 0; z-index: 100001; display: none; }
.fs-ai-root.open { display: block; }
.fs-ai-backdrop { position: absolute; inset: 0; background: rgba(8, 11, 18, .35); }
.fs-ai-panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(420px, 94vw);
  background: var(--top-panel-bg, #fff);
  color: var(--top-panel-fg, #0f172a);
  border-left: 1px solid var(--top-border);
  box-shadow: -20px 0 60px rgba(2, 6, 23, .30);
  display: flex; flex-direction: column;
}
.fs-ai-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--top-border);
}
.fs-ai-title { font-weight: 700; }
.fs-ai-x {
  border: none; background: var(--top-chip-bg); color: var(--top-fg-dim);
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
}
.fs-ai-body {
  flex: 1; overflow: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.fs-ai-msg {
  padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5;
  max-width: 92%; white-space: pre-wrap; word-break: break-word;
}
.fs-ai-msg.user { align-self: flex-end; background: var(--primary, #6366f1); color: #fff; }
.fs-ai-msg.ai { align-self: flex-start; background: var(--top-chip-bg); color: var(--top-panel-fg); }
.fs-ai-msg.sys {
  align-self: stretch; background: transparent; color: var(--top-fg-dim);
  font-size: 12.5px; border: 1px dashed var(--top-chip-bd);
}
.fs-ai-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--top-border); }
.fs-chip {
  border: 1px solid var(--top-chip-bd); background: var(--top-chip-bg);
  color: var(--top-chip-fg); padding: 6px 10px; border-radius: 999px;
  font-size: 12.5px; cursor: pointer;
}
.fs-ai-inputrow { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--top-border); }
.fs-ai-input {
  flex: 1; border: 1px solid var(--top-input-bd); background: var(--top-input-bg);
  color: var(--top-fg); border-radius: 10px; padding: 9px 12px; outline: none;
}
.fs-ai-send {
  border: none; background: var(--primary, #6366f1); color: #fff;
  border-radius: 10px; padding: 0 16px; cursor: pointer; font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   #119 去趋势化反哺 · 现有 5 套皮肤（#1290 设计原则下沉）
   ───────────────────────────────────────────────────────────────
   原则：保持各皮肤品牌色相与既有观感不变，只去除「2024 玻璃拟态 / 霓虹渐变」
   的时效性，向耐久审美靠拢。本段加载在 skin.css 之后（同特异性后者胜出），
   且不改动 skin.css 一行；删除本段即完整回滚。
   两处微调：
     ① 玻璃更实：--glass-bg / --glass-bg-strong 透明度下调（更不透明、更稳重），
        去「浮」的廉价玻璃感（仅影响 .glass/.ds-glass 浮动面 / 抽屉）。
     ② aurora 渐变收敛：把第三停靠点从「高亮霓虹色」收拢到与中停靠点同色系的次亮档，
        保留渐变层次但去 pop 感（影响 .dash-hero / .feat-card::before / 主按钮渐变）。
   ═══════════════════════════════════════════════════════════ */

/* 晨光白（默认 dawn，走 :root 基础值） */
html[data-skin="dawn"] {
  --glass-bg: rgba(255, 255, 255, .80);
  --glass-bg-strong: rgba(255, 255, 255, .93);
  /* 去趋势：去掉 sky-400 第三停靠点，收敛为靛→紫双档耐久渐变 */
  --cp-aurora: linear-gradient(100deg, #6366f1 0%, #7c3aed 55%, #8b5cf6 100%);
}

/* 深海蓝 */
html[data-skin="ocean"] {
  --glass-bg: rgba(244, 250, 253, .80);
  --glass-bg-strong: rgba(244, 250, 253, .93);
  --cp-aurora: linear-gradient(100deg, #0284c7 0%, #0ea5e9 50%, #2ba6db 100%);
}

/* 石墨黑 */
html[data-skin="graphite"] {
  --glass-bg: rgba(249, 250, 251, .80);
  --glass-bg-strong: rgba(249, 250, 251, .93);
  --cp-aurora: linear-gradient(100deg, #4f46e5 0%, #6366f1 50%, #6f74e6 100%);
}

/* 极光紫 */
html[data-skin="aurora"] {
  --glass-bg: rgba(251, 249, 254, .80);
  --glass-bg-strong: rgba(251, 249, 254, .93);
  --cp-aurora: linear-gradient(100deg, #7c3aed 0%, #8b5cf6 50%, #9b7bed 100%);
}

/* 森林绿 */
html[data-skin="forest"] {
  --glass-bg: rgba(247, 252, 249, .80);
  --glass-bg-strong: rgba(247, 252, 249, .93);
  --cp-aurora: linear-gradient(100deg, #047857 0%, #059669 50%, #20b386 100%);
}

