:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-sub: #64748b;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.hidden { display: none !important; }

/* ---------- 全局滚动条（V6.8.31）：细小悬浮胶囊，去掉箭头与轨道底色 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; border: none; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border: 1px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
  min-height: 40px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.8); background-clip: content-box; }
::-webkit-scrollbar-thumb:active { background: rgba(71, 85, 105, 0.9); background-clip: content-box; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
/* 深色底（侧边栏等）更亮一点，避免看不清 */
.sidebar ::-webkit-scrollbar-thumb, .sidebar-nav::-webkit-scrollbar-thumb,
.ov-secnav::-webkit-scrollbar-thumb, .dark ::-webkit-scrollbar-thumb {
  background: rgba(203, 213, 225, 0.45);
}
/* 主内容区滚动条贴右边缘，容器本身不重复留白 */
html, body { scrollbar-gutter: auto; }

/* 登录 - 炫酷透视化版本 */
.login-page {
  height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; perspective: 1000px;
}
/* 动态背景层 */
.login-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
}
.bg-gradient {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.bg-particles {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.particle {
  position: absolute; border-radius: 50%; background: rgba(255,255,255,0.3);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}
/* 透视化浮动元素层 */
.parallax-layer {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
  pointer-events: none; transform-style: preserve-3d;
}
.parallax-item {
  position: absolute; font-size: 48px; opacity: 0.15;
  filter: blur(0.5px); transition: transform 0.1s ease-out;
}
.p-item-1 { top: 10%; left: 8%; font-size: 64px; }
.p-item-2 { top: 20%; right: 12%; font-size: 56px; }
.p-item-3 { top: 60%; left: 5%; font-size: 48px; }
.p-item-4 { top: 75%; right: 8%; font-size: 60px; }
.p-item-5 { top: 40%; left: 15%; font-size: 42px; }
.p-item-6 { top: 15%; left: 45%; font-size: 52px; }
.p-item-7 { top: 80%; left: 40%; font-size: 44px; }
.p-item-8 { top: 50%; right: 15%; font-size: 58px; }
.parallax-shape {
  position: absolute; border-radius: 50%; opacity: 0.08;
  transition: transform 0.1s ease-out;
}
.shape-1 { top: 25%; left: 25%; width: 200px; height: 200px; background: linear-gradient(135deg, #667eea, #764ba2); }
.shape-2 { top: 55%; right: 20%; width: 150px; height: 150px; background: linear-gradient(135deg, #f093fb, #f5576c); border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
.shape-3 { bottom: 15%; left: 30%; width: 180px; height: 180px; background: linear-gradient(135deg, #4facfe, #00f2fe); border-radius: 50%; }
/* 3D登录卡片容器 */
.login-card-3d {
  position: relative; z-index: 10; transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}
.login-card {
  background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); padding: 40px; border-radius: 20px; width: 380px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex; flex-direction: column; gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: translateZ(30px);
}
.login-logo { font-size: 52px; text-align: center; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); animation: logoFloat 3s ease-in-out infinite; }
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.login-card h1 { text-align: center; font-size: 24px; color: #fff; font-weight: 700; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.login-sub { text-align: center; color: rgba(255,255,255,0.7); margin-bottom: 8px; font-size: 13px; }
.login-card input {
  padding: 14px 16px; border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; font-size: 14px;
  background: rgba(255,255,255,0.08); color: #fff; transition: all 0.3s;
}
.login-card input::placeholder { color: rgba(255,255,255,0.5); }
.login-card input:focus {
  outline: none; border-color: rgba(102, 126, 234, 0.8); background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}
.login-msg { color: #fca5a5; font-size: 13px; text-align: center; background: rgba(220,38,38,0.15); padding: 8px; border-radius: 8px; }
.login-hint { color: rgba(255,255,255,0.6); font-size: 12px; text-align: center; }
.init-box { border: 1px dashed rgba(255,255,255,0.3); border-radius: 8px; padding: 12px; }
.init-box summary { cursor: pointer; color: #a5b4fc; font-size: 13px; }
.init-box input { margin-top: 8px; }
.login-tabs { display: flex; border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; overflow: hidden; background: rgba(255,255,255,0.05); }
.login-tab { flex: 1; padding: 12px 0; border: none; cursor: pointer; background: transparent; color: rgba(255,255,255,0.6); font-size: 14px; transition: all 0.3s; }
.login-tab.active { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; box-shadow: 0 4px 15px rgba(102,126,234,0.4); }
.pane-login { display: flex; flex-direction: column; gap: 12px; }
.pane-register { display: flex; flex-direction: column; gap: 12px; }
.reg-perms { display: flex; gap: 14px; font-size: 13.5px; color: rgba(255,255,255,0.8); padding: 2px 0; }
.reg-perms label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.login-remember { color: rgba(255,255,255,0.7); font-size: 13px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.login-card .btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2); border: none; color: #fff;
  padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all 0.3s; box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}
.login-card .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(102,126,234,0.5); }
.login-card .btn-primary:active { transform: translateY(0); }

/* 登录页文字颜色随背景亮度自适应（默认白字=暗背景；body.login-text-dark=亮背景用深色字） */
.login-card h1, .login-card p, .login-card label, .login-card a,
.login-card button, .login-card input, .login-card select,
.login-sub, .login-hint, .login-tab, .login-remember, .reg-perms,
.login-msg, .init-box, .init-box summary { color: #fff !important; }
.login-card input::placeholder { color: #fff; opacity: 0.85; }
body.login-text-dark .login-card { background: rgba(255, 255, 255, 0.42); }
body.login-text-dark .login-card h1,
body.login-text-dark .login-card p,
body.login-text-dark .login-card label,
body.login-text-dark .login-card a,
body.login-text-dark .login-card input,
body.login-text-dark .login-card select,
body.login-text-dark .login-sub,
body.login-text-dark .login-hint,
body.login-text-dark .login-remember,
body.login-text-dark .reg-perms,
body.login-text-dark .init-box,
body.login-text-dark .init-box summary { color: #1f2937 !important; }
body.login-text-dark .login-card input::placeholder { color: rgba(31, 41, 55, 0.55); opacity: 1; }
body.login-text-dark .login-card input,
body.login-text-dark .login-card select { background: rgba(255, 255, 255, 0.65); border-color: rgba(31, 41, 55, 0.18); }
body.login-text-dark .login-tab { color: rgba(31, 41, 55, 0.65) !important; background: rgba(255, 255, 255, 0.35); }
body.login-text-dark .login-tab.active { color: #fff !important; background: linear-gradient(135deg, #667eea, #764ba2); }
body.login-text-dark .login-card .btn-primary { color: #fff !important; }
body.login-text-dark .login-msg { color: #b91c1c !important; background: rgba(220, 38, 38, 0.12); }
body.login-text-dark #forgot-link { color: var(--primary, #2563eb) !important; }

/* 布局 */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 230px; background: #0f172a; color: #cbd5e1;
  display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-brand { display: flex; align-items: center; gap: 8px; padding: 18px 16px; color: #fff; font-weight: 600; font-size: 16px; border-bottom: 1px solid #1e293b; }
.brand-icon { font-size: 20px; }
.view-switch { display: flex; gap: 4px; padding: 12px; }
.view-btn {
  flex: 1; padding: 7px 0; font-size: 12px; border: none; cursor: pointer;
  border-radius: 6px; background: #1e293b; color: #94a3b8; transition: all .2s;
}
.view-btn.active { background: var(--primary); color: #fff; }
.nav { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.nav-group { margin-top: 8px; }
.nav-group-title { font-size: 11px; color: #64748b; padding: 8px 12px 4px; text-transform: uppercase; letter-spacing: .5px; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer;
  border-radius: 6px; color: #cbd5e1; font-size: 13.5px; transition: background .15s;
}
.nav-item:hover { background: #1e293b; }
.nav-item.active { background: #1e40af; color: #fff; }
.nav-item .ni-icon { width: 18px; text-align: center; }
.nav-item .nav-ico { width: 17px; height: 17px; border-radius: 4px; vertical-align: -3px; display: inline-block; }

/* ---------- 零音助手（主内容区内嵌页面） ---------- */
.lingyin-page {
  position: relative;
  height: calc(100vh - 156px);
  min-height: 420px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .08);
}
.lingyin-page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; flex: 0 0 auto;
  background: linear-gradient(90deg, #312e81, #7c3aed);
  color: #fff; font-size: 13px;
}
/* V6.6.22：账号切换提示（零音会话独立，工作台跨源清不掉它的令牌，只能明示）
   按钮保持原来靠左的位置，提示挂到右侧（order:2），长文本单行省略 */
.lingyin-page-head .ly-hint {
  order: 2; margin-left: 10px; min-width: 0; display: none;
  font-size: 12px; line-height: 1.3; opacity: .95; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 640px) { .lingyin-page-head .ly-hint { font-size: 11px; } }
.lingyin-page-head .lingyin-btn {
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12);
  color: #fff; border-radius: 8px; padding: 4px 12px; font-size: 13px; cursor: pointer; flex: 0 0 auto;
}
.lingyin-page-head .lingyin-btn:hover { background: rgba(255,255,255,.25); }
/* V6.4.40：零音助手连接状态按钮（闪动绿点=已连接 / 红点=未连接 + 环状箭头重连） */
.lingyin-status-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; }
.lingyin-status-btn .ly-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; display: inline-block;
  animation: ly-blink 1.2s ease-in-out infinite;
}
.lingyin-status-btn .ly-dot-ok { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.lingyin-status-btn .ly-dot-err { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.lingyin-status-btn .ly-dot-loading { background: #94a3b8; animation-duration: .6s; }
.lingyin-status-btn .ly-label { white-space: nowrap; }
.lingyin-status-btn .ly-arrow {
  display: inline-flex; align-items: center; font-size: 15px; line-height: 1; color: #fff;
  animation: ly-spin-arrow 2.5s linear infinite;
}
.lingyin-status-btn.ly-ok { border-color: rgba(34,197,94,.7); background: rgba(34,197,94,.22); }
.lingyin-status-btn.ly-err { border-color: rgba(239,68,68,.75); background: rgba(239,68,68,.25); }
.lingyin-status-btn.ly-loading { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.12); }
@keyframes ly-blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@keyframes ly-spin-arrow { to { transform: rotate(360deg); } }
.lingyin-frame { width: 100%; flex: 1 1 auto; min-height: 0; border: 0; display: block; }
.lingyin-loading {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  background: #0f172a; color: #c7d2fe; font-size: 14px; letter-spacing: 1px;
}
.lingyin-loading::after {
  content: ''; width: 18px; height: 18px; margin-left: 10px;
  border: 2px solid #7c3aed; border-top-color: transparent; border-radius: 50%;
  animation: ly-spin .8s linear infinite;
}
@keyframes ly-spin { to { transform: rotate(360deg); } }
.sidebar-footer { border-top: 1px solid #1e293b; padding: 12px; display: flex; align-items: center; justify-content: space-between; color: #94a3b8; font-size: 13px; gap: 8px; }
.sidebar-user { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.sidebar-user #user-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #e2e8f0; }
.sidebar-storage { font-size: 12px; line-height: 1.4; }
.sidebar-storage .storage-box { margin: 0; }
/* 存储空间进度条（系统设置卡片 + 侧边栏深色适配） */
.storage-box { font-size: 12px; line-height: 1.5; }
.sb-row { display: flex; justify-content: space-between; font-weight: 600; color: #555; }
.sb-bar { background: #e8e8e8; border-radius: 4px; height: 7px; margin-top: 4px; overflow: hidden; }
.sb-fill { display: block; background: linear-gradient(90deg, #11998e, #38ef7d); height: 7px; border-radius: 4px; }
.sb-fill.over { background: #e74c3c; }
.sb-pct { color: #888; margin-top: 2px; }
.sb-pct.over { color: #e74c3c; }
.sidebar-storage .sb-row { color: #e2e8f0; }
.sidebar-storage .sb-bar { background: #334155; }
.sidebar-storage .sb-pct { color: #94a3b8; }
.sidebar-storage .sb-pct.over { color: #f87171; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 56px; background: var(--card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0;
}
.topbar-title { font-size: 17px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.today-date { color: var(--text-sub); font-size: 13px; }
.todo-badge {
  background: var(--danger-light); color: var(--danger); padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
/* v6.3.51：内容区顶部内边距归零，改由首个子元素自带顶距。
   原因：吸顶工具栏只能停在滚动容器的内容上沿，若 .content 保留 padding-top，
   工具栏上方会永远空出一条，滚动的数据行从缝里露出来（看起来像第一行错位）。 */
.content { flex: 1; overflow-y: auto; padding: 0 24px 24px; }
.content > *:first-child { margin-top: 24px; }
.content > .toolbar:first-child { margin-top: 0; }

/* 卡片/工具条 */
/* v6.3.50：工具栏吸顶 —— 滚动长列表（如不分页的学生档案）时这排按钮始终可用。
   两侧负外边距抵消 .content 的左右内边距，让底色铺满、滚动内容不会从边缝透出。 */
.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 60;
  background: var(--bg);
  margin: 0 -24px 16px; padding: 12px 24px;
}
.toolbar .spacer { flex: 1; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* 统计卡片 */
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border-left: 4px solid var(--primary); }
.stat-card .sc-label { color: var(--text-sub); font-size: 12.5px; }
.stat-card .sc-value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat-card .sc-sub { color: var(--text-sub); font-size: 12px; margin-top: 4px; }
.stat-green { border-left-color: var(--success); }
.stat-amber { border-left-color: var(--warning); }
.stat-red { border-left-color: var(--danger); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; background: #f8fafc; color: var(--text-sub); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tr:hover td { background: #f8fafc; }
.empty { text-align: center; color: var(--text-sub); padding: 40px !important; }

/* 徽章 */
.badge { padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--success-light); color: var(--success); }
.badge-amber { background: var(--warning-light); color: var(--warning); }
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: #f1f5f9; color: var(--text-sub); }

/* 按钮 */
.btn {
  padding: 8px 14px; border: none; border-radius: 8px; cursor: pointer; font-size: 13px;
  transition: all .15s; font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--text-sub); }
.btn-ghost:hover { color: var(--text); background: #f1f5f9; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表单 */
input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
/* 下拉选项显式配色：防止深色主题/浏览器深色模式导致选项文字不可见（科目下拉白屏修复） */
select option, select optgroup { color: #1e293b !important; background: #ffffff !important; }
select:focus option { color: #1e293b !important; background: #ffffff !important; }
label { font-size: 12.5px; color: var(--text-sub); margin-bottom: 5px; display: block; }
.form-row { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 700px) { .form-grid, .form-grid-3 { grid-template-columns: 1fr; } }

/* 弹窗 */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal { position: relative; background: #fff; border-radius: 14px; width: 640px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal.large { width: 900px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-sub); }
.modal-body { padding: 22px; overflow-y: auto; }
/* 未保存内容确认层：盖在当前弹窗上，不动正在编辑的表单 */
.modal-guard { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 20px; border-radius: 14px; background: rgba(248,250,252,.86); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal-guard-box { background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 22px 24px; width: 340px; max-width: 100%; text-align: center; }
.modal-guard-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.modal-guard-text { font-size: 13px; color: var(--text-sub); line-height: 1.6; margin-bottom: 18px; }
.modal-guard-actions { display: flex; gap: 10px; justify-content: center; }

/* 统一提示弹窗（替代原生 confirm/alert，标题固定「大小教室提示」） */
#dx-dlg-layer { position: fixed; inset: 0; z-index: 2147480000; pointer-events: none; }
.dx-dlg-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.42); pointer-events: auto;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: dxDlgFade .16s ease;
}
.dx-dlg {
  width: 400px; max-width: 100%; background: #fff; border-radius: 14px;
  box-shadow: 0 24px 70px rgba(15,23,42,.32); overflow: hidden;
  animation: dxDlgIn .18s ease; font-family: inherit;
}
.dx-dlg-head { display: flex; align-items: center; gap: 9px; padding: 15px 20px 0; }
.dx-dlg-ico {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 12px/1 system-ui, sans-serif; color: #fff; background: var(--primary);
}
.dx-dlg-ico.is-danger { background: var(--danger); }
.dx-dlg-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.dx-dlg-body {
  padding: 10px 20px 4px 49px; font-size: 13px; line-height: 1.7; color: var(--text-sub);
  white-space: pre-wrap; word-break: break-word; max-height: 52vh; overflow-y: auto;
}
.dx-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px 18px; }
.dx-dlg-foot .btn { min-width: 76px; justify-content: center; }
.dx-dlg-mask.is-out { animation: dxDlgFade .13s ease reverse forwards; }
@keyframes dxDlgFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dxDlgIn { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }

/* toast */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #0f172a; color: #fff; padding: 11px 16px; border-radius: 8px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: slideIn .25s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 16px; }
.tl-item::before {
  content: ''; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary-light);
}
.tl-date { font-size: 12px; color: var(--text-sub); }
.tl-title { font-weight: 600; margin: 2px 0; }
.tl-content { color: var(--text-sub); font-size: 13px; }

/* 搜索栏 */
.search-input { width: 220px; }
.filter-select { width: 150px; }

/* 带图标的搜索框（V5） */
.search-box { position: relative; display: inline-block; }
.search-box .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 14px; opacity: .6; }
.search-box .input { padding-left: 32px; }

/* 全局上传/下载进度条（V5.5） */
.global-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; background: rgba(0,0,0,.85); display: flex; align-items: center; gap: 10px; padding: 8px 16px; color: #fff; font-size: 13px; }
.global-progress.hidden { display: none; }
.gp-track { flex: 1; height: 8px; background: rgba(255,255,255,.2); border-radius: 4px; overflow: hidden; }
.gp-fill { height: 100%; width: 0; background: linear-gradient(90deg,#4facfe,#00f2fe); border-radius: 4px; transition: width .15s ease; }
.gp-text { white-space: nowrap; min-width: 90px; text-align: right; }

/* V6.3.83 全局传输任务面板 */
/* V6.4.27 传输任务按钮（浅绿胶囊：与待办同款高度、数量内嵌、跳动圆点） */
.task-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; background: var(--success-light); color: var(--success); padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; transition: filter .15s ease; }
.task-btn:hover, .task-btn.active { filter: brightness(.96); }
.task-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex: none; }
.task-btn.busy .task-dot { animation: task-pulse 1.4s ease-in-out infinite; }
@keyframes task-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }
.task-count { font-variant-numeric: tabular-nums; }
.task-badge { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 11px; text-align: center; padding: 0 4px; }
.task-badge.hidden { display: none; }
.task-panel { position: fixed; top: 52px; right: 12px; z-index: 9998; width: 340px; max-height: 420px; overflow-y: auto; background: var(--card-bg, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.16); padding: 10px; }
.task-panel.hidden { display: none; }
.task-item { padding: 8px 6px; border-bottom: 1px dashed var(--border, #e2e8f0); }
.task-item:last-child { border-bottom: none; }
.task-name { font-size: 13px; font-weight: 500; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.task-state { font-size: 12px; color: var(--text-sub, #64748b); white-space: nowrap; }
.task-item .btn-sm { font-size: 12px; padding: 2px 8px; }

/* 详情网格 */
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.detail-item { padding: 8px 0; border-bottom: 1px dashed var(--border); display: flex; gap: 8px; }
.detail-item .dk { color: var(--text-sub); min-width: 80px; }
.detail-item .dv { font-weight: 500; }
@media (max-width: 700px) { .detail-grid { grid-template-columns: 1fr; } }

/* 分页 */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 14px; font-size: 13px; color: var(--text-sub); }
.pagination button { padding: 4px 10px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination .pg-cur { font-weight: 600; }

/* 课件文件列表 */
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.file-icon { font-size: 20px; }
.file-info { flex: 1; }
.file-name { font-weight: 500; }
.file-meta { font-size: 12px; color: var(--text-sub); }

/* 复选框列 */
.chk { width: 18px; height: 18px; cursor: pointer; }

/* 标签 */
.tag { display: inline-block; background: var(--primary-light); color: var(--primary); border-radius: 6px; padding: 2px 8px; font-size: 12px; margin: 2px; }

/* 图表容器 */
.chart-box { position: relative; height: 260px; }
.chart-box-sm { position: relative; height: 200px; }

/* ===== 以下为 v2 升级新增样式 ===== */

/* 表单字段 */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid .form-field.full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.ff-label { font-size: 13px; color: var(--text-sub); }
.form-field .input { width: 100%; }
.modal.large { width: 780px; max-width: 94vw; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* 届数条与届数按钮 */
.cohort-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.cohort-bar .cb-label { color: var(--text-sub); font-size: 13px; }
.cohort-bar .cb-cur { font-weight: 700; color: var(--primary); }
/* v6.4.11：周次气泡（点击设置当前周次，联动今日课程单双周） */
.cohort-bar .week-bubble { cursor: pointer; margin-left: 14px; padding: 3px 12px; border-radius: 999px; background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35); transition: transform 0.15s, box-shadow 0.15s; user-select: none; }
.cohort-bar .week-bubble:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(37, 99, 235, 0.45); }
.cohort-bar .week-bubble.week-unset { background: linear-gradient(135deg, #64748b, #475569); box-shadow: 0 2px 6px rgba(100, 116, 139, 0.3); }
/* 总览问候横幅内的周次气泡：跟随皮肤主题色（与届数徽章同款配色） */
.ov-hello .week-bubble { margin-left: 0; padding: 4px 12px; border-radius: 999px; background: var(--primary-light); color: var(--primary); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: filter .15s, transform .15s; user-select: none; }
.ov-hello .week-bubble:hover { filter: brightness(1.06); transform: translateY(-1px); }
.ov-hello .week-bubble.week-unset { background: rgba(100, 116, 139, .12); color: var(--text-sub); }
body.skin-dark .ov-hello .week-bubble { background: var(--primary-light); color: var(--primary); box-shadow: 0 0 12px rgba(255, 255, 255, .06); }
body.skin-dark .ov-hello .week-bubble.week-unset { background: rgba(255, 255, 255, .08); color: var(--text-sub); }
.cb-btn { padding: 5px 14px; border: 1px solid var(--border); background: #fff; border-radius: 16px; cursor: pointer; font-size: 13px; }
.cb-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cohort-mgr { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }

/* 页签 */
.tab-bar { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 2px solid var(--border); }
.tab { padding: 8px 16px; cursor: pointer; border: none; background: none; font-size: 14px; color: var(--text-sub); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
/* v6.3.53：设置页等以 tab-bar 作顶部导航的页面，滚动时同样吸顶常驻。
   与 .toolbar 同一套做法：两侧负外边距抵消 .content 左右内边距，底色铺满；
   margin-top 归零以抵消 .content > *:first-child 的 24px 顶距，避免上方露缝。 */
.content > .tab-bar:first-child {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg);
  margin: 0 -24px 12px; padding: 12px 24px 0;
}
body.is-mobile .content > .tab-bar:first-child { margin: 0 -12px 12px; padding: 10px 12px 0; }

/* v6.3.54：datalist 增强浮层 —— 替代原生那个点不开的下拉箭头 */
.list-pop {
  position: fixed; z-index: 3000;
  min-width: 200px; max-width: 330px; max-height: 300px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .16); padding: 8px;
}
.list-pop-head { font-size: 12px; color: var(--text-sub); padding: 2px 4px 8px; }
.list-pop-body { display: flex; flex-wrap: wrap; gap: 6px; }
.list-pop-item {
  padding: 6px 10px; border-radius: 8px; font-size: 13px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); user-select: none;
}
.list-pop-item:hover { border-color: var(--primary); color: var(--primary); }
.list-pop-item.on { background: var(--primary); color: #fff; border-color: var(--primary); }
body.is-mobile .list-pop { max-width: calc(100vw - 24px); }
body.is-mobile .list-pop-item { min-height: 36px; display: flex; align-items: center; }

/* ============================================================
 * v6.3.65：课程表（浅色主题）
 * 结构、班级配色逻辑都不变，只把原来的深色霓虹底换成浅色底 + 深色字：
 * --tc（主色）用作文字与左侧色条，--tg（浅底）用作卡片底色。
 * 浅底深字在投影、打印、明亮环境下比原来的深色底清楚得多。
 * ============================================================ */
.tt-card {
  background: linear-gradient(160deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e2e8f0;
  padding: 14px;
}
.tt-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tt-legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
  color: var(--tc); background: var(--tg);
  border: 1px solid var(--tc);
}
.tt-legend-item::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tc); }
.tt-scroll { overflow: auto; }
/* 通用表格包裹层在这里不再额外滚动，避免双层滚动条 */
.tt-scroll .table-wrap { margin: 0; padding: 0; overflow: visible; }
.tt-table { width: 100%; border-collapse: separate; border-spacing: 4px; min-width: 900px; }
.tt-table th {
  font-size: 12.5px; font-weight: 600; color: #0369a1; letter-spacing: .06em;
  padding: 8px 6px; text-align: center;
  background: #e0f2fe; border: 1px solid #bae6fd;
  border-radius: 8px;
}
.tt-table th.tt-th-fixed { color: #a21caf; background: #fae8ff; border-color: #f5d0fe; }
.tt-period {
  font-size: 12px; color: #92400e; background: #fef3c7;
  border: 1px solid #fde68a; border-radius: 8px;
  padding: 6px 4px; text-align: center; white-space: nowrap;
}
.tt-time {
  font-size: 11.5px; color: #3730a3; background: #e0e7ff;
  border: 1px solid #c7d2fe; border-radius: 8px;
  padding: 6px; text-align: center; white-space: nowrap;
}
.tt-cell {
  vertical-align: middle; text-align: center; cursor: pointer;
  min-width: 108px; height: 58px;
  background: #ffffff; border: 1px dashed #cbd5e1;
  border-radius: 10px; padding: 5px; transition: .15s;
}
.tt-cell:hover { border-color: #0e7490; background: #f0f9ff; box-shadow: 0 0 0 2px rgba(14, 116, 144, .10); }
/* 空格子的 + 号：跟着格子垂直水平居中 */
.tt-empty { color: #cbd5e1; font-size: 16px; line-height: 1; }
/* 课程卡片：内容居中，固定最小高度，左右留出对称内边距（右侧避让删除按钮） */
.tt-chip {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 42px;
  padding: 5px 20px; margin: 0 auto 4px;
  border-radius: 8px; text-align: center;
  background: var(--tg); border-left: 3px solid var(--tc);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
/* 同一格里的最后一张卡片不留下边距，整组才能真正居中 */
.tt-chip:last-child { margin-bottom: 0; }
.tt-chip-course { font-size: 12.5px; font-weight: 700; color: var(--tc); line-height: 1.25; }
/* 第二行：单双周标签 + 班级名，并排居中，保证每张卡片都是两行一样高 */
.tt-chip-sub { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
/* 浅色版主色本身是深色，所以标签要反过来用「深底白字」才看得清 */
.tt-chip-week {
  font-size: 10px; font-weight: 700; color: #fff; background: var(--tc);
  border-radius: 4px; padding: 0 4px; font-style: normal; line-height: 1.5;
}
.tt-chip-class { font-size: 10.5px; color: #64748b; }
/* 卡片右上角的删除按钮：平时很淡，鼠标移到卡片上才变亮 */
.tt-chip-del {
  position: absolute; top: 2px; right: 2px;
  width: 17px; height: 17px; line-height: 15px; padding: 0;
  font-size: 13px; font-weight: 700; cursor: pointer;
  color: #94a3b8; background: transparent;
  border: 1px solid transparent; border-radius: 50%;
  opacity: 0; transition: .15s;
}
.tt-chip:hover .tt-chip-del { opacity: 1; }
.tt-chip-del:hover { color: #fff; background: #ef4444; border-color: #ef4444; }
/* 触屏没有 hover，直接在移动端常显 */
body.is-mobile .tt-chip-del { opacity: .8; }
/* 卡片不再做随机倾斜：同一行列格子对齐才整齐 */

/* 弹窗内的选择区 */
.tt-pick-block { margin: 10px 0 4px; }
.tt-pick-title { font-size: 12.5px; color: var(--text-sub); margin-bottom: 8px; }
.tt-class-grid, .tt-course-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tt-class-btn {
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--tc); background: var(--tg); border: 1px solid var(--tc);
}
.tt-class-btn:hover { filter: brightness(.97); box-shadow: 0 2px 6px rgba(15, 23, 42, .10); }
.tt-course-btn {
  padding: 7px 13px; border-radius: 8px; cursor: pointer; font-size: 13px;
  color: var(--text); background: var(--bg); border: 1px solid var(--border);
}
.tt-course-btn.on { color: var(--tc); border-color: var(--tc); background: var(--tg); font-weight: 700; }
.tt-exist {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; margin-bottom: 6px; border-radius: 8px;
  background: var(--tg); border-left: 3px solid var(--tc);
}
.tt-exist-main { font-size: 13px; }
.tt-time-input { width: 132px; }
.tt-periods-table td { padding: 5px 8px; }
/* 拖动把手：只有按住这里才能上下拖行 */
.tt-drag {
  width: 36px; text-align: center; cursor: grab; user-select: none;
  color: #94a3b8; font-size: 15px; letter-spacing: -1px;
}
.tt-drag:hover { color: #0891b2; }
.tt-drag:active { cursor: grabbing; }
/* 拖动中的行半透明，落点用上下两条边提示插到哪 */
.tt-periods-table tr.dragging { opacity: .38; }
.tt-periods-table tr.tt-drop-before td { box-shadow: inset 0 2px 0 #0891b2; }
.tt-periods-table tr.tt-drop-after td { box-shadow: inset 0 -2px 0 #0891b2; }
.tt-rowops { white-space: nowrap; text-align: right; }
.tt-rowops .btn + .btn { margin-left: 4px; }
/* 节次后面挂一个"这一节有几门课"的小计数 */
.tt-cnt {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  font-size: 10px; font-weight: 700; color: #92400e; background: #fde68a;
  border-radius: 999px; vertical-align: middle;
}
/* 已删除的节次：整行划掉置灰 */
.tt-periods-table tr.is-deleted { opacity: .45; }
.tt-periods-table tr.is-deleted .tt-period b { text-decoration: line-through; }
.tt-periods-table tr.is-deleted .tt-cnt { display: none; }

body.is-mobile .tt-table { min-width: 780px; }
body.is-mobile .tt-cell { min-width: 94px; }
body.is-mobile .tt-class-btn, body.is-mobile .tt-course-btn { min-height: 38px; }

/* 统计卡片 */
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.stat-card .sc-label { color: var(--text-sub); font-size: 12px; }
.stat-card .sc-value { font-size: 26px; font-weight: 700; }
.stat-card .sc-sub { color: var(--text-sub); font-size: 12px; }
.stat-green .sc-value { color: var(--success, #16a34a); }
.stat-red .sc-value { color: var(--danger, #dc2626); }
.stat-amber .sc-value { color: var(--warning, #f59e0b); }

/* 值日表 */
.duty-table th, .duty-table td { text-align: center; min-width: 110px; }
.duty-name { display: inline-block; background: var(--primary-light); color: var(--primary); border-radius: 12px; padding: 2px 8px; margin: 2px; font-size: 12px; }
.duty-empty { color: var(--text-sub); }

/* 教案四类文件 */
.plan-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 900px) { .plan-types { grid-template-columns: repeat(2, 1fr); } }
.plan-type { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.plan-type > b { display: block; margin-bottom: 6px; color: var(--primary); }
.plan-file { font-size: 12px; padding: 3px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* 时间轴 */
.timeline { position: relative; padding-left: 24px; }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item::before { content: ''; position: absolute; left: -24px; top: 6px; bottom: 0; width: 2px; background: var(--border); }
.timeline-item:last-child::before { bottom: auto; height: 20px; }
.tl-dot { position: absolute; left: -29px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary); }
.tl-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tl-thumbs img { border: 1px solid var(--border); }

/* 材料网格 */
.mat-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.mat-item { position: relative; }
.mat-item img { border: 1px solid var(--border); }

/* 子排名/分数下标 */
.sub-rank { font-size: 11px; color: var(--text-sub); margin-left: 3px; }

/* 劳动文件 */
.labor-file-row { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-top: 6px; }
.labor-file-row .link { margin-right: 8px; }

/* 上传隐藏 input */
.upload-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* 表格紧凑 */
.table-sm td, .table-sm th { padding: 6px 8px; font-size: 13px; }

/* 行内小按钮危险色（仅 ghost 变体：红字透明底；不影响实心 btn-danger 的白字红底） */
.btn-ghost.btn-danger { color: var(--danger, #dc2626); }

/* 登录页记住账号 */
.login-remember { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-sub); margin: 8px 0; }
.login-remember input { width: 16px; height: 16px; }

/* 页边距 */
.mb { margin-bottom: 12px; }
.row-ops { white-space: nowrap; }



/* 公告徽章与弹窗 */
.ann-badge {
  position: relative; cursor: pointer; font-size: 18px; padding: 2px 6px; border-radius: 6px; transition: background 0.2s;
}
.ann-badge:hover { background: var(--bg-hover); }
.ann-count {
  position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.ann-popup {
  position: fixed; top: 60px; right: 20px; width: 380px; max-height: 500px; background: var(--card); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15); z-index: 1000; overflow: hidden; display: none; flex-direction: column;
}
.ann-popup.show { display: flex; }
.ann-popup-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 14px;
}
.ann-popup-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.ann-popup-item {
  padding: 12px 16px; border-bottom: 1px dashed var(--border); cursor: pointer; transition: background 0.15s;
}
.ann-popup-item:hover { background: var(--bg-hover); }
.ann-popup-item-title { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.ann-popup-item-time { font-size: 11px; color: var(--text-sub); }
.ann-popup-item-content { font-size: 12px; color: var(--text-sub); margin-top: 6px; display: none; line-height: 1.6; }
.ann-popup-item.expanded .ann-popup-item-content { display: block; }
.ann-popup-empty { padding: 40px 20px; text-align: center; color: var(--text-sub); font-size: 13px; }

/* ============================================================
   v6.3.40 移动端自适应（手机登录后自动启用）
   由 core.js 识别设备并给 <body> 加 .is-mobile；移动样式统一以
   body.is-mobile 为前缀，桌面端完全不受影响；末尾另有窄屏媒体查询兜底。
   ============================================================ */

/* 顶栏汉堡按钮与侧栏遮罩：桌面默认都隐藏 */
.nav-toggle {
  display: none; background: transparent; border: none; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--text); padding: 6px 8px; border-radius: 8px;
}
.nav-toggle:hover { background: #f1f5f9; }
.sidebar-mask { display: none; }

/* ---- 手机端：侧栏改为抽屉 ---- */
body.is-mobile .nav-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
body.is-mobile .sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 1100;
  width: 80%; max-width: 300px;
  transform: translateX(-102%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 24px rgba(0,0,0,.28);
  padding-bottom: env(safe-area-inset-bottom);
}
body.is-mobile.sidebar-open .sidebar { transform: translateX(0); }
body.is-mobile .sidebar-mask {
  display: block; position: fixed; inset: 0; z-index: 1050;
  background: rgba(15,23,42,.45); opacity: 0; pointer-events: none; transition: opacity .25s;
}
body.is-mobile.sidebar-open .sidebar-mask { opacity: 1; pointer-events: auto; }
body.is-mobile.sidebar-open { overflow: hidden; }

/* 侧栏内元素放大，便于手指点按 */
body.is-mobile .sidebar-brand { padding: 16px; font-size: 17px; }
body.is-mobile .view-btn { padding: 9px 0; font-size: 13px; }
body.is-mobile .nav-group-title { font-size: 12px; padding: 10px 12px 4px; }
body.is-mobile .nav-item { padding: 12px; font-size: 15px; }
body.is-mobile .sidebar-footer { padding: 12px 16px; }

/* ---- 顶栏紧凑 ---- */
body.is-mobile .topbar { height: 52px; padding: 0 10px; gap: 4px; }
body.is-mobile .topbar-title { font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.is-mobile .topbar-right { gap: 6px; flex-shrink: 0; }
body.is-mobile .topbar-right .btn { padding: 6px 8px; min-height: 34px; }
body.is-mobile .topbar-right .btn-label { display: none; }
body.is-mobile .today-date { display: none; }
body.is-mobile .todo-badge { padding: 4px 9px; font-size: 12px; }
body.is-mobile .ann-badge { font-size: 17px; padding: 2px 4px; }

/* ---- 内容区 ---- */
body.is-mobile .content { padding: 0 12px 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
body.is-mobile .content > *:first-child { margin-top: 12px; }
body.is-mobile .content > .toolbar:first-child { margin-top: 0; }
body.is-mobile .card { padding: 14px; border-radius: 12px; margin-bottom: 12px; }
body.is-mobile .card-title { font-size: 14.5px; margin-bottom: 10px; }
body.is-mobile .toolbar { gap: 8px; margin: 0 -12px 12px; padding: 10px 12px; }
body.is-mobile .stat-card { padding: 14px; }
body.is-mobile .stat-card .sc-value { font-size: 22px; }

/* ---- 触摸优化：按钮更大，输入控件字号 16px 防止 iOS 聚焦缩放 ---- */
body.is-mobile .btn { min-height: 38px; padding: 9px 14px; font-size: 14px; }
body.is-mobile .btn-sm { min-height: 32px; padding: 6px 10px; font-size: 13px; }
body.is-mobile input, body.is-mobile select, body.is-mobile textarea { font-size: 16px; padding: 10px 12px; }
body.is-mobile label, body.is-mobile .ff-label { font-size: 13px; }

/* ---- 栅格与表单统一单列 ---- */
body.is-mobile .grid-4, body.is-mobile .grid-3, body.is-mobile .grid-2 { grid-template-columns: 1fr; }
body.is-mobile .form-grid, body.is-mobile .form-grid-3 { grid-template-columns: 1fr; }
body.is-mobile .form-grid .form-field.full { grid-column: auto; }
body.is-mobile .detail-grid { grid-template-columns: 1fr; }
body.is-mobile .plan-types { grid-template-columns: 1fr 1fr; }
body.is-mobile .search-input, body.is-mobile .filter-select { width: 100%; }
body.is-mobile .search-box { display: block; width: 100%; }

/* ---- 表格：横向滑动 + 紧凑 ---- */
body.is-mobile .table-wrap { -webkit-overflow-scrolling: touch; overflow-x: auto; }
body.is-mobile table { font-size: 13px; }
body.is-mobile th, body.is-mobile td { padding: 9px 10px; white-space: nowrap; }
body.is-mobile .table-sm td, body.is-mobile .table-sm th { padding: 7px 8px; }
body.is-mobile .empty { padding: 28px 14px !important; }

/* ---- 弹窗：底部升起、全宽，单手可达 ---- */
body.is-mobile .modal-overlay { padding: 0; align-items: flex-end; }
body.is-mobile .modal, body.is-mobile .modal.large {
  width: 100% !important; max-width: 100%; max-height: 92vh;
  border-radius: 18px 18px 0 0; animation: mSlideUp .25s ease;
}
body.is-mobile .modal-header { padding: 14px 16px; font-size: 15px; }
body.is-mobile .modal-close { font-size: 22px; padding: 0 4px; }
body.is-mobile .modal-body { padding: 16px; }
@keyframes mSlideUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---- 公告弹窗、Toast ---- */
body.is-mobile .ann-popup { left: 10px; right: 10px; width: auto; top: 56px; max-height: 72vh; }
body.is-mobile .toast-wrap { left: 12px; right: 12px; top: 12px; }
body.is-mobile .toast { text-align: center; animation: mToastIn .25s ease; }
@keyframes mToastIn { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- 图表、分页、届数条、页签、其它 ---- */
body.is-mobile .chart-box { height: 230px; }
body.is-mobile .chart-box-sm { height: 190px; }
body.is-mobile .pagination { justify-content: center; flex-wrap: wrap; gap: 8px; }
body.is-mobile .cohort-bar { padding: 8px 10px; gap: 6px; }
body.is-mobile .cb-btn { padding: 6px 12px; font-size: 13px; }
body.is-mobile .tab-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.is-mobile .tab { padding: 8px 12px; font-size: 14px; white-space: nowrap; }
body.is-mobile .duty-table th, body.is-mobile .duty-table td { min-width: 88px; }
body.is-mobile .file-row { flex-wrap: wrap; }
body.is-mobile .global-progress { padding: 8px 10px; font-size: 12px; }
body.is-mobile .gp-text { min-width: 68px; }

/* ---- 登录页：竖屏自适应，关闭视差层省电 ---- */
body.is-mobile .parallax-layer { display: none; }
body.is-mobile .login-card-3d { transform: none !important; }
body.is-mobile .login-card { width: 92vw; max-width: 420px; padding: 26px 20px; border-radius: 16px; }
body.is-mobile .login-card h1 { font-size: 24px; }
body.is-mobile .login-logo { font-size: 34px; }
body.is-mobile .login-sub { font-size: 13px; }
body.is-mobile .login-tab { font-size: 14px; padding: 9px 0; }

/* ---- v6.3.48 手机端溢出防护（解决"超出边框"） ---- */
/* 表格统一在容器内横向滑动，页面本身不再被撑宽 */
body.is-mobile .table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.is-mobile .card, body.is-mobile .content { min-width: 0; }
/* 明细项允许换行，避免长值把卡片顶出边界 */
body.is-mobile .detail-item { flex-wrap: wrap; }
body.is-mobile .detail-item .dk { min-width: auto; }
/* 值日安排列宽收紧（原 88px × 6 列仍会超出屏宽） */
body.is-mobile .duty-table th, body.is-mobile .duty-table td { min-width: 74px; font-size: 12.5px; }
/* 长文本、长单词、长路径换行而非溢出 */
body.is-mobile pre, body.is-mobile code { white-space: pre-wrap; word-break: break-word; }
body.is-mobile .muted, body.is-mobile .file-row, body.is-mobile .file-name { word-break: break-word; overflow-wrap: anywhere; }
/* 图片与视频不超出容器 */
body.is-mobile img, body.is-mobile video { max-width: 100%; height: auto; }
/* 页签条、届数条允许横向滚动 */
body.is-mobile .tab-bar, body.is-mobile .cohort-bar { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- v6.3.48 手机端列表卡片化（列数 ≤6 的表格） ----
   由 core.js 的 makeCardTables() 给表加 .card-table 并写入 data-label；
   值日安排、课程表、成绩大表等宽表不加此类，仍走横向滑动。 */
body.is-mobile table.card-table,
body.is-mobile table.card-table tbody,
body.is-mobile table.card-table tr,
body.is-mobile table.card-table td { display: block; width: auto; }
body.is-mobile table.card-table thead { display: none; }
body.is-mobile table.card-table tbody tr {
  border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px; background: #fff;
}
body.is-mobile table.card-table tbody tr:last-child { margin-bottom: 0; }
body.is-mobile table.card-table td {
  border: none; padding: 4px 0; display: flex; gap: 10px;
  white-space: normal; align-items: flex-start;
}
body.is-mobile table.card-table td::before {
  content: attr(data-label); color: var(--text-sub, #64748b); font-size: 12.5px;
  min-width: 78px; flex-shrink: 0; padding-top: 2px;
}
body.is-mobile table.card-table td:empty { display: none; }
body.is-mobile table.card-table td[data-label=""]::before { display: none; }
body.is-mobile table.card-table td:last-child { flex-wrap: wrap; }

/* ---- 兜底：即使脚本未执行，窄屏也按手机布局渲染 ---- */
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 1100;
    width: 80%; max-width: 300px; transform: translateX(-102%); transition: transform .25s ease;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-mask { display: block; position: fixed; inset: 0; z-index: 1050; background: rgba(15,23,42,.45); opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.sidebar-open .sidebar-mask { opacity: 1; pointer-events: auto; }
  body.sidebar-open { overflow: hidden; }
  .topbar { padding: 0 10px; }
  .today-date { display: none; }
  .topbar-right .btn-label { display: none; }
  .content { padding: 0 12px 12px; }
  .content > *:first-child { margin-top: 12px; }
  .content > .toolbar:first-child { margin-top: 0; }
  .toolbar { margin: 0 -12px 12px; padding: 10px 12px; }
  .content > .tab-bar:first-child { margin: 0 -12px 12px; padding: 10px 12px 0; }
  .modal, .modal.large { width: 100% !important; max-width: 100%; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  input, select, textarea { font-size: 16px; }
  .ann-popup { left: 10px; right: 10px; width: auto; }
}

/* ============ v6.3.43 版本变更提醒横幅（升级后提示刷新，避免界面不更新） ============ */
#app-update-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99999;
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
  color: #fff; text-align: center; padding: 10px 16px;
  font-size: 14px; line-height: 1.4; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
  -webkit-user-select: none; user-select: none;
}
#app-update-banner b { font-weight: 700; }
#app-update-banner:hover { background: linear-gradient(90deg, #1e40af, #2563eb); }

/* ---------- v6.3.61 班级可不选：选班行 + 不指定班级按钮 ---------- */
.tt-cls-row { display: flex; gap: 6px; align-items: center; }
.tt-cls-row .input { flex: 1; min-width: 0; }
.tt-class-btn.tt-class-none { border-style: dashed; opacity: .92; }
.tt-class-btn.tt-class-none:hover { opacity: 1; }

/* ---------- v6.3.69 备课教案目录化：册下拉 + 章节目录 + 节四卡片 ---------- */
.lp-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: nowrap; }
.lp-book { width: 132px; min-width: 0; flex-shrink: 1; }
.lp-export-bar { display: inline-flex; gap: 6px; align-items: center; flex-shrink: 0; }
.lp-export-bar .lp-type { width: 112px; text-align: center; text-align-last: center; }
/* 长方形按钮与类型选择框：同高、同字号、同字体，视觉完全统一（!important 覆盖 is-mobile 的 .btn 规则） */
.lp-btn {
  height: 36px !important; min-height: 36px !important; padding: 0 14px !important; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px !important; font-family: inherit; line-height: 1 !important; white-space: nowrap; box-sizing: border-box;
}
.lp-export-bar .input {
  height: 36px !important; box-sizing: border-box;
  font-size: 13px !important; font-family: inherit; line-height: 1 !important; padding: 0 8px;
}
.lp-export-bar select option { font-size: 13px; font-family: inherit; }
@media (max-width: 1180px) { .lp-toolbar { flex-wrap: wrap; } .lp-book { width: 150px; } }
.lp-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 4px; }
@media (max-width: 900px) { .lp-wrap { grid-template-columns: 1fr; } }
.lp-outline { padding: 12px 10px; max-height: calc(100vh - 210px); display: flex; flex-direction: column; overflow: hidden; }
.lp-outline-head { font-size: 13.5px; font-weight: 700; color: #4f46e5; padding: 0 4px 10px; border-bottom: 1px solid #eef0f6; margin-bottom: 8px; flex-shrink: 0; }
.lp-tree { display: flex; flex-direction: column; gap: 6px; overflow: auto; min-height: 0; padding-right: 2px; }
/* V6.4.30 课后服务行内添加主题卡片 */
.as-inline-add { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #eef2ff; border: 1px dashed #4f46e5; border-radius: 8px; }
.as-inline-add .input { flex: 1; min-width: 0; height: 30px; font-size: 13px; }
/* V6.4.31 课后服务主题卡片（折叠+数量+SVG图标） */
.as-topic-h { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px; cursor: pointer; transition: background .15s; }
.as-topic-h:hover { background: #eef2ff; }
.as-topic.active .as-topic-h { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.as-topic-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; }
.as-cnt { background: #e2e8f0; color: #64748b; font-size: 11px; line-height: 16px; border-radius: 9px; padding: 0 7px; flex: none; }
.as-topic.active .as-cnt { background: rgba(255,255,255,.25); color: #fff; }
.as-topic-ops { display: inline-flex; gap: 4px; flex: none; }
.as-op { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; color: #94a3b8; cursor: pointer; transition: all .15s; }
.as-op:hover { background: #f1f5f9; color: #4f46e5; }
.as-topic.active .as-op { color: rgba(255,255,255,.85); }
.as-topic.active .as-op:hover { background: rgba(255,255,255,.18); color: #fff; }
.as-op[data-act="del"]:hover { background: #fee2e2; color: #dc2626; }
.lp-unit-h {
  font-size: 12.5px; font-weight: 700; color: #334155; padding: 6px 8px;
  background: #f1f5f9; border-radius: 7px; cursor: default;
}
.lp-ch-h { font-size: 12px; font-weight: 600; color: #64748b; padding: 6px 10px 2px; }
.lp-sec {
  font-size: 12.5px; color: #475569; padding: 6px 10px 6px 26px; margin: 1px 0;
  border-radius: 7px; cursor: pointer; line-height: 1.4; transition: all .15s;
}
.lp-sec:hover { background: #eef2ff; color: #4f46e5; }
.lp-sec.active { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; font-weight: 600; box-shadow: 0 3px 8px rgba(102,126,234,.3); }
.lp-sec-standalone { padding-left: 12px; font-weight: 600; color: #b45309; }
.lp-sec-standalone.active { color: #fff; }
.lp-body { min-width: 0; padding: 2px 0; }
.lp-sec-row { display: flex; align-items: center; gap: 10px; width: min(560px, 100%); margin: 0 auto; padding: 4px 2px 12px; box-sizing: border-box; }
.lp-sec-title { font-size: 15px; font-weight: 700; color: #1e293b; flex: 1; min-width: 0; }
.lp-cards { display: grid; grid-template-columns: minmax(0, 560px); justify-content: center; gap: 14px; }
.lp-card {
  border: 1px solid #e5e9f2; border-radius: 14px; overflow: hidden; background: #fff;
  display: flex; flex-direction: column; box-shadow: 0 2px 6px rgba(15,23,42,.05); transition: all .2s;
}
.lp-card:hover { box-shadow: 0 8px 20px rgba(102,126,234,.16); transform: translateY(-2px); }
.lp-card-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  background: linear-gradient(135deg, hsl(var(--hue) 70% 55%), hsl(calc(var(--hue) + 40) 65% 50%));
  color: #fff;
}
.lp-card-icon { font-size: 20px; }
.lp-card-name { font-size: 14px; font-weight: 700; flex: 1; }
.lp-card-cnt { background: rgba(255,255,255,.28); border-radius: 10px; padding: 1px 9px; font-size: 12px; }
.lp-card-files { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; min-height: 60px; }
.lp-none { font-size: 12px; color: #a1aab8; text-align: center; padding: 16px 0; }
.lp-file {
  display: flex; align-items: center; gap: 6px; font-size: 12px;
  border: 1px solid #edf0f6; border-radius: 8px; padding: 6px 8px; background: #fafbfe;
}
.lp-file-name { flex: 1; min-width: 0; white-space: normal; word-break: break-all; line-height: 1.35; color: #334155; font-weight: 600; }
.lp-file-meta { font-size: 10.5px; color: #94a3b8; white-space: nowrap; }
.lp-file-ops { display: inline-flex; gap: 4px; flex-shrink: 0; }
.lp-upload {
  display: flex; align-items: center; justify-content: center; margin: 0 12px 12px; padding: 10px 0;
  border: 1.5px dashed #c7d2fe; border-radius: 10px; color: #4f46e5; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all .18s; background: #f8faff;
}
.lp-upload:hover { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border-color: transparent; }
.lp-up-progress { margin: 0 12px 12px; padding: 10px 12px; border: 1px solid #e5e9f2; border-radius: 10px; background: #f8faff; display: flex; flex-direction: column; gap: 7px; }
.lp-up-progress .lp-up-txt { font-size: 11.5px; color: #4f46e5; font-weight: 600; align-self: flex-end; }
.lp-up-ops { display: flex; gap: 6px; align-items: center; }
.lp-up-pause, .lp-up-cancel { flex: 1; padding: 5px 0; border: none; border-radius: 7px; font-size: 12px; cursor: pointer; font-weight: 600; }
.lp-up-pause { background: #e0e7ff; color: #4338ca; }
.lp-up-pause:hover { background: #c7d2fe; }
.lp-up-cancel { background: #fee2e2; color: #b91c1c; }
.lp-up-cancel:hover { background: #fecaca; }
.lp-up-bar { height: 8px; border-radius: 6px; background: #e5e9f2; overflow: hidden; }
.lp-up-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #667eea, #764ba2); transition: width .18s; }
.lp-pack { margin-top: 14px; display: flex; gap: 8px; }
/* ================= 电子教材 V6.4.18：PDF 阅读器 ================= */
.eb-toolbar { gap: 10px; flex-wrap: wrap; }
.eb-book { width: 132px; min-width: 0; flex-shrink: 1; }
.eb-tool-ops { display: inline-flex; gap: 6px; align-items: center; }
.eb-wrap { align-items: stretch; }
.eb-reader { min-width: 0; display: flex; flex-direction: column; background: #f4f5f9; border: 1px solid #e6e8f0; border-radius: 10px; overflow: hidden; }
.eb-rtool { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border-bottom: 1px solid #eef0f6; flex-wrap: wrap; }
.eb-pagebox { font-size: 13px; color: #333; display: inline-flex; align-items: center; gap: 4px; }
.eb-pagebox input { width: 58px; height: 26px; border: 1px solid #d8dbe6; border-radius: 6px; text-align: center; font-size: 13px; }
.eb-zoom { display: inline-flex; gap: 4px; margin-left: 4px; }
.eb-state { font-size: 12px; color: #8a90a6; margin-left: auto; }
.eb-canvas-box { flex: 1; overflow: auto; min-height: 62vh; display: flex; align-items: flex-start; justify-content: center; background: #e8eaef; padding: 10px; }
.eb-canvas-box canvas { background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .18); border-radius: 3px; max-width: none; }
.eb-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(255,255,255,.85); padding: 10px 18px; border-radius: 8px; z-index: 3; }
.eb-reader { position: relative; }
@media (max-width: 900px) {
  .eb-canvas-box { min-height: 45vh; }
  .eb-state { display: none; }
}

/* ========== 综合总览美化（浅色精致 + 暗色玻璃，跟随皮肤 dark 标记自动切换） ========== */
/* --- 浅色层（所有皮肤生效，配色取皮肤变量） --- */
.ov { animation: ovIn .25s ease; border-radius: 16px; }
@keyframes ovIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ov .cohort-bar { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); }
.ov .stat-card { border-left: none; border: 1px solid var(--border); border-radius: 14px; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.ov .stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(15, 23, 42, .10); }
.ov .stat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); }
.ov .stat-green::before { background: var(--success); }
.ov .stat-amber::before { background: var(--warning); }
.ov .stat-red::before { background: var(--danger); }
.ov .sc-label::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: 6px; vertical-align: 1px; }
.ov .stat-green .sc-label::before { background: var(--success); }
.ov .stat-amber .sc-label::before { background: var(--warning); }
.ov .stat-red .sc-label::before { background: var(--danger); }
.ov .card { border: 1px solid var(--border); border-radius: 14px; transition: box-shadow .15s; }
.ov .card:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .08); }
.ov .card-title { font-size: 14.5px; border-left: 3px solid var(--primary); padding-left: 9px; }
.ov .table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ov .table th { background: var(--primary-light); color: var(--primary); }
.ov .table tbody tr:nth-child(even) td { background: rgba(100, 116, 139, .045); }
.ov .table tbody tr:hover td { background: var(--primary-light); }
.ov .card .btn { border-radius: 10px; }
.ov .card .btn:hover { transform: translateY(-1px); }
/* --- 暗色玻璃层（静夜/墨玉鎏金/星云紫/曜石灰） --- */
body.skin-dark .ov { background: radial-gradient(60% 40% at 85% 0%, rgba(129, 140, 248, .14), transparent 60%), radial-gradient(50% 35% at 8% 30%, rgba(45, 212, 191, .10), transparent 60%); }
body.skin-dark .ov .card, body.skin-dark .ov .stat-card, body.skin-dark .ov .cohort-bar { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: none; }
body.skin-dark .ov .card:hover, body.skin-dark .ov .stat-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
body.skin-dark .ov .table { border-color: rgba(255, 255, 255, .12); }
body.skin-dark .ov .table th { background: rgba(255, 255, 255, .08); color: var(--text); }
body.skin-dark .ov .table td { border-bottom-color: rgba(255, 255, 255, .08); }
body.skin-dark .ov .table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .03); }
body.skin-dark .ov .table tbody tr:hover td { background: rgba(255, 255, 255, .07); }
body.skin-dark .ov .sc-value { text-shadow: 0 0 16px currentColor; }

/* --- 总览美化二阶段：问候横幅/图标统计卡/年龄柱状图/徽章/磁贴/进行中 --- */
.ov-hello { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); }
.ov-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; flex: 0 0 auto; }
.ov-hello-main { flex: 1; min-width: 0; }
.ov-hello-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.ov-hello-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--text-sub); }
.ov-cohort { background: var(--primary-light); color: var(--primary); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; }
.ov .stat-card { display: flex; align-items: center; gap: 12px; }
.ov .stat-card .sc-main { min-width: 0; }
.ov .stat-card .sc-value { margin-top: 2px; }
.ov .stat-card .sc-sub { margin-top: 0; margin-left: 2px; }
.ov .stat-card .sc-label::before { display: none; }
.sc-ico { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; flex: 0 0 auto; }
.ico-blue { background: #e6f1fb; color: #185fa5; }
.ico-red { background: #fcebeb; color: #a32d2d; }
.ico-amber { background: #faeeda; color: #854f0b; }
.ico-green { background: #eaf3de; color: #3b6d11; }
.ov-agechart { display: flex; gap: 14px; align-items: flex-end; margin: 12px 0 4px; padding: 0 4px; }
.ov-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: default; }
.ov-bar-col { width: 38px; height: 56px; display: flex; align-items: flex-end; }
.ov-bar-fill { width: 100%; background: var(--primary); border-radius: 6px 6px 3px 3px; display: flex; align-items: flex-start; justify-content: center; min-height: 16px; transition: filter .15s; }
.ov-bar-fill b { color: #fff; font-size: 11px; line-height: 16px; }
.ov-bar:hover .ov-bar-fill { filter: brightness(1.15); }
.ov-bar-age { font-size: 11.5px; color: var(--text-sub); }
.ov-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ov-chip { font-size: 12px; border-radius: 999px; padding: 3px 10px; cursor: default; }
.chip-pink { background: #fbeaf0; color: #993556; }
.chip-teal { background: #e1f5ee; color: #0f6e56; }
.chip-red { background: #fcebeb; color: #a32d2d; }
.chip-gray { background: #f1f5f9; color: #64748b; }
.ov-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ov-tile { border: none; cursor: pointer; border-radius: 12px; padding: 14px 8px; font-size: 13.5px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .15s, filter .15s; }
.ov-tile:hover { transform: translateY(-2px); filter: brightness(1.03); }
.ov-tile span { font-size: 18px; }
.t-blue { background: #e6f1fb; color: #185fa5; }
.t-purple { background: #eeedfe; color: #534ab7; }
.t-green { background: #eaf3de; color: #3b6d11; }
.t-amber { background: #faeeda; color: #854f0b; }
.ov-todo { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-left: 3px solid var(--border); border-bottom: 1px dashed var(--border); border-radius: 6px; margin: 4px 0; background: rgba(100, 116, 139, .04); }
.ov .table tr.ov-now td { background: var(--primary-light) !important; }
.ov .table tr.ov-past td { opacity: .45; }
.ov-live { font-size: 11px; background: var(--success-light, #dcfce7); color: var(--success, #15803d); border-radius: 4px; padding: 1px 6px; margin-left: 6px; font-weight: 600; }
.ov-progress-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-left: 3px solid var(--border); border-bottom: 1px dashed var(--border); border-radius: 6px; margin: 4px 0; }
/* 暗色皮肤适配 */
body.skin-dark .ov-hello { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: none; }
body.skin-dark .sc-ico.ico-blue { background: rgba(96, 165, 250, .18); color: #93c5fd; }
body.skin-dark .sc-ico.ico-red { background: rgba(248, 113, 113, .18); color: #fca5a5; }
body.skin-dark .sc-ico.ico-amber { background: rgba(251, 191, 36, .16); color: #fcd34d; }
body.skin-dark .sc-ico.ico-green { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
body.skin-dark .ov-chip.chip-pink { background: rgba(244, 114, 182, .16); color: #f9a8d4; }
body.skin-dark .ov-chip.chip-teal { background: rgba(45, 212, 191, .14); color: #5eead4; }
body.skin-dark .ov-chip.chip-red { background: rgba(248, 113, 113, .16); color: #fca5a5; }
body.skin-dark .ov-chip.chip-gray { background: rgba(255, 255, 255, .08); color: var(--text-sub); }
body.skin-dark .ov-tile.t-blue { background: rgba(96, 165, 250, .16); color: #93c5fd; }
body.skin-dark .ov-tile.t-purple { background: rgba(129, 140, 248, .16); color: #a5b4fc; }
body.skin-dark .ov-tile.t-green { background: rgba(52, 211, 153, .14); color: #6ee7b7; }
body.skin-dark .ov-tile.t-amber { background: rgba(251, 191, 36, .14); color: #fcd34d; }
body.skin-dark .ov-todo { background: rgba(255, 255, 255, .04); }
body.skin-dark .ov-progress-row { background: rgba(255, 255, 255, .04); }
body.skin-dark .ov-live { background: rgba(52, 211, 153, .18); color: #6ee7b7; }
body.skin-dark .ov-bar-fill { background: var(--primary); }
.ov-chip-toggle { cursor: pointer; user-select: none; }
.ov-chiplist { margin-top: 6px; font-size: 12px; line-height: 1.9; border-radius: 8px; padding: 6px 10px; background: rgba(100, 116, 139, .07); border: 1px solid var(--border); color: var(--text); word-break: break-all; }
body.skin-dark .ov-chiplist { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.t-red { background: #fcebeb; color: #a32d2d; }
.t-teal { background: #e1f5ee; color: #0f6e56; }
body.skin-dark .ov-tile.t-red { background: rgba(248, 113, 113, .16); color: #fca5a5; }
body.skin-dark .ov-tile.t-teal { background: rgba(45, 212, 191, .14); color: #5eead4; }
.chip-blue { background: #e6f1fb; color: #185fa5; }
body.skin-dark .ov-chip.chip-blue { background: rgba(96, 165, 250, .16); color: #93c5fd; }

/* 名单导入模式胶囊按钮 */
.mode-capsule { position: relative; display: inline-flex; align-items: center; padding: 6px 16px; border: 1px solid #d1d5db; border-radius: 999px; font-size: 13px; cursor: pointer; color: #4b5563; background: #fff; transition: all .15s; user-select: none; white-space: nowrap; }
.mode-capsule input { position: absolute; opacity: 0; pointer-events: none; }
.mode-capsule:hover { border-color: #9ca3af; }
.mode-capsule.active { background: var(--primary, #2563eb); border-color: var(--primary, #2563eb); color: #fff; font-weight: 600; box-shadow: 0 1px 4px rgba(37, 99, 235, .3); }
body.skin-dark .mode-capsule { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); color: #cbd5e1; }
body.skin-dark .mode-capsule.active { background: var(--primary, #3b82f6); border-color: var(--primary, #3b82f6); color: #fff; }

/* V6.6.7 作息设置：另一侧课程表的课程数徽章（灰蓝，区别于本表计数） */
.tt-cnt-other { background: #e6f1fb; color: #185fa5; margin-left: 4px; }
body.skin-dark .tt-cnt-other { background: rgba(96, 165, 250, .2); color: #93c5fd; }

/* V6.6.8 学科班级名单 × 成绩映射 */
.stu-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.stu-sum-item { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.stu-sum-item b { color: #0f172a; }
.stu-sum-warn { background: #fff7ed; color: #b45309; }
.stu-sum-warn i { font-style: normal; background: #ffedd5; border-radius: 6px; padding: 0 5px; margin: 0 2px; }
.stu-sum-ok { background: #ecfdf5; color: #047857; }
.stu-pill { border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 3px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.stu-pill:hover { background: var(--primary, #2563eb); border-color: var(--primary, #2563eb); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.28); }
/* 学生排名表格里的姓名胶囊：比学科页的更紧凑，适配窄列；绿点也在胶囊内 */
.stu-pill-xs { display: inline-block; padding: 1px 10px; font-size: 12.5px; line-height: 1.7; font-weight: 600; text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.stu-pill-xs .ai-dot { margin-left: 4px; }
.stu-score { font-size: 15px; color: #0f172a; }
.stu-rank { margin-left: 6px; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: #e6f1fb; color: #185fa5; }
.stu-noscore { color: #9ca3af; font-size: 12px; }
.stu-avg { font-size: 12px; color: #475569; }
.stu-trend-cards { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.stu-tcard { flex: 1 1 110px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.stu-tcard span { font-size: 11px; color: #64748b; }
.stu-tcard b { font-size: 18px; color: #0f172a; }
.stu-src-imp { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: #fef3c7; color: #92400e; }
.stu-src-manage { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: #e6f1fb; color: #185fa5; }
.csi-batch { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; display: inline-flex; align-items: center; gap: 6px; }
.csi-batch button { border: 0; background: transparent; color: #b91c1c; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
body.skin-dark .stu-sum-item { background: rgba(255,255,255,.08); color: #cbd5e1; }
body.skin-dark .stu-sum-item b { color: #f8fafc; }
body.skin-dark .stu-pill { background: rgba(99,102,241,.18); border-color: rgba(129,140,248,.45); color: #c7d2fe; }
body.skin-dark .stu-pill:hover { background: var(--primary, #3b82f6); color: #fff; }
body.skin-dark .stu-score { color: #f1f5f9; }
body.skin-dark .stu-tcard { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
body.skin-dark .stu-tcard b { color: #f8fafc; }
body.skin-dark .csi-batch { background: rgba(255,255,255,.08); color: #cbd5e1; }

/* V6.6.9 未匹配姓名映射 */
.stu-unmatch { border: 1px solid #fdba74; background: #ffedd5; color: #9a3412; border-radius: 999px; padding: 1px 9px; margin: 0 2px; font-size: 12px; cursor: pointer; transition: all .15s; }
.stu-unmatch:hover { background: #f97316; border-color: #f97316; color: #fff; box-shadow: 0 2px 8px rgba(249,115,22,.32); }
.stu-sum-tip { font-size: 11px; opacity: .8; margin-left: 2px; }
.stu-alias-tag { font-style: normal; font-size: 10px; margin-left: 5px; padding: 1px 5px; border-radius: 6px; background: #ede9fe; color: #6d28d9; vertical-align: middle; }
.stu-pill-off { border-style: dashed; border-color: #d1d5db; background: #f8fafc; color: #6b7280; }
.stu-pill-off:hover { background: var(--primary, #2563eb); border-color: var(--primary, #2563eb); color: #fff; }
.nm-tip { font-size: 12px; line-height: 1.7; color: #6b7280; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.nm-stu { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; margin-bottom: 12px; }
.nm-cur { background: #ede9fe; color: #5b21b6; padding: 2px 8px; border-radius: 999px; }
body.skin-dark .stu-unmatch { background: rgba(249,115,22,.16); border-color: rgba(251,146,60,.5); color: #fdba74; }
body.skin-dark .stu-alias-tag { background: rgba(139,92,246,.22); color: #c4b5fd; }
body.skin-dark .stu-pill-off { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.2); color: #94a3b8; }
body.skin-dark .nm-tip { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: #94a3b8; }
body.skin-dark .nm-cur { background: rgba(139,92,246,.22); color: #c4b5fd; }

/* V6.6.9 名单逐行编辑 */
.stu-edit { border: 1px solid #d1d5db; background: #fff; color: #475569; border-radius: 6px; padding: 2px 9px; font-size: 12px; cursor: pointer; transition: all .15s; }
.stu-edit:hover { border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); background: #eff6ff; }
body.skin-dark .stu-edit { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.2); color: #cbd5e1; }
body.skin-dark .stu-edit:hover { border-color: #60a5fa; color: #93c5fd; background: rgba(96,165,250,.14); }

/* V6.6.10 名单删除 / 去重 */
.stu-del { border: 1px solid #fecaca; background: #fff; color: #b91c1c; border-radius: 6px; padding: 2px 9px; font-size: 12px; cursor: pointer; transition: all .15s; }
.stu-del:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.stu-sum-dup { background: #fef2f2; color: #b91c1c; }
.stu-sum-dup i { font-style: normal; background: #fee2e2; border-radius: 6px; padding: 0 5px; margin: 0 2px; }
.stu-dedupe { border: 1px solid #fca5a5; background: #fff; color: #b91c1c; border-radius: 999px; padding: 1px 9px; font-size: 12px; cursor: pointer; margin-left: 6px; }
.stu-dedupe:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
body.skin-dark .stu-del { background: rgba(239,68,68,.12); border-color: rgba(248,113,113,.4); color: #fca5a5; }
body.skin-dark .stu-sum-dup { background: rgba(239,68,68,.14); color: #fca5a5; }

/* V6.6.17 已发布滑块开关 */
.tw-switch { position: relative; display: inline-block; width: 38px; height: 21px; vertical-align: middle; }
.tw-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.tw-switch .sl { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .2s; cursor: pointer; display: block; }
.tw-switch .sl::before { content: ''; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(15,23,42,.3); }
.tw-switch input:checked + .sl { background: #22c55e; }
.tw-switch input:checked + .sl::before { transform: translateX(17px); }
body.skin-dark .tw-switch .sl { background: rgba(255,255,255,.22); }

/* ============================================================
 * V6.6.29 成绩 AI 分析
 * 1) 弹窗标题栏右侧操作区（AI分析 / 预览 / 下载 PDF）
 * 2) 学生排名列表的「已分析」小标记
 * 3) A4 成绩分析报告页（预览 + 截图导出 PDF）
 *    注意：报告页尽量用 table / 块级排版，少用 flex/grid 与伪元素，
 *    因为导出走 html2canvas，复杂布局在它自己的渲染器里容易走样。
 * ============================================================ */
.modal-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 14px; }
.modal-actions .btn { padding: 5px 12px; font-size: 12.5px; border-radius: 999px; }
.btn-ai { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border: none; box-shadow: 0 2px 8px rgba(99, 102, 241, .35); }
.btn-ai:hover { filter: brightness(1.06); }
.btn-ai[disabled] { opacity: .6; box-shadow: none; cursor: default; }
.ai-pulse { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #6366f1; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: #eef2ff; }
.ai-pulse i { width: 7px; height: 7px; border-radius: 50%; background: #6366f1; animation: aiPulse 1.1s ease-in-out infinite; }
@keyframes aiPulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.ai-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 2px rgba(16,185,129,.16); margin-left: 5px; vertical-align: middle; }
/* 分析中：琥珀色 + 呼吸闪动（最低 35% 不透明度，保证任何时候都看得见） */
.ai-dot.run { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.22); animation: aiDotBlink 1s ease-in-out infinite; }
@keyframes aiDotBlink { 0%, 100% { opacity: .35; transform: scale(.86); } 50% { opacity: 1; transform: scale(1.12); } }
/* 姓名胶囊里的点：左右留一点气，别贴着胶囊边 */
.stu-pill .ai-dot { margin-left: 5px; margin-right: 1px; }
/* 工具栏按钮上的「已生成分析」绿点（用伪元素，改文案不会把它冲掉） */
.btn[data-ai-done="1"]::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 2px rgba(16,185,129,.16); margin-left: 6px; vertical-align: middle; }
.btn[data-ai-done="run"]::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; margin-left: 6px; vertical-align: middle; animation: aiPulse 1.1s ease-in-out infinite; }

/* ---------- 报告容器 ---------- */
.rpt-overlay { position: fixed; inset: 0; z-index: 9000; background: #eef1f6; display: flex; flex-direction: column; }
.rpt-bar { flex: none; height: 54px; background: #fff; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.rpt-bar .t { font-weight: 600; font-size: 14px; color: #0f172a; }
.rpt-bar .s { font-size: 12px; color: #94a3b8; }
.rpt-bar .grow { flex: 1; }
.rpt-scroll { flex: 1; overflow: auto; padding: 24px 0 48px; text-align: center; }
.rpt-page { width: 794px; min-height: 1123px; background: #fff; margin: 0 auto 22px; padding: 40px 44px 52px; text-align: left; position: relative; box-shadow: 0 10px 34px rgba(15, 23, 42, .16); }
.rpt-ph { border-bottom: 1px solid #eef2f7; padding-bottom: 8px; margin-bottom: 18px; font-size: 11px; color: #94a3b8; }
.rpt-ph b { color: #475569; font-weight: 600; }
.rpt-pf { position: absolute; left: 44px; right: 44px; bottom: 22px; border-top: 1px solid #eef2f7; padding-top: 7px; font-size: 10.5px; color: #a8b3c2; }

/* ---------- 封面 ---------- */
.rpt-hero { border-radius: 14px; background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 52%, #6366f1 100%); color: #fff; padding: 24px 26px; }
.rpt-hero table { width: 100%; border-collapse: collapse; }
.rpt-hero td { vertical-align: middle; padding: 0; }
.rpt-hero .k { font-size: 11.5px; letter-spacing: 2px; opacity: .78; }
.rpt-hero .n { font-size: 30px; font-weight: 700; letter-spacing: 1px; margin: 6px 0 8px; }
.rpt-hero .m { font-size: 12px; opacity: .9; }
.rpt-hero .m span { margin-right: 14px; }
.rpt-rate { text-align: center; width: 132px; }
.rpt-rate .num { font-size: 34px; font-weight: 700; line-height: 1; }
.rpt-rate .lb { font-size: 11.5px; opacity: .85; margin-top: 4px; letter-spacing: 1px; }
.rpt-rate .sc { display: inline-block; margin-top: 8px; font-size: 11px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); }

/* ---------- 指标卡 ---------- */
.rpt-tiles { width: 100%; border-collapse: separate; border-spacing: 8px 0; margin: 16px -8px 0; table-layout: fixed; }
.rpt-tile { background: #f6f8fc; border: 1px solid #e8eef7; border-radius: 10px; padding: 13px 13px; }
.rpt-tile .l { font-size: 11px; color: #7b8aa0; }
.rpt-tile .v { font-size: 20px; font-weight: 700; color: #0f172a; margin-top: 3px; }
.rpt-tile .v small { font-size: 11px; font-weight: 500; color: #94a3b8; margin-left: 2px; }
.rpt-tile .d { font-size: 11px; margin-top: 2px; }

/* ---------- 章节 ---------- */
.rpt-sec { margin-top: 23px; }
.rpt-cont { margin-top: 6px; }
.rpt-sec-t { font-size: 14px; font-weight: 700; color: #0f172a; padding-left: 10px; border-left: 3px solid #2563eb; line-height: 1.1; margin-bottom: 9px; }
.rpt-p { font-size: 12.5px; color: #334155; line-height: 1.85; }
.rpt-quote { background: #f7f9fd; border-left: 3px solid #c7d6ef; border-radius: 0 8px 8px 0; padding: 12px 15px; font-size: 12.5px; color: #334155; line-height: 1.95; }
.rpt-chip { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px; background: #eef2ff; color: #4f46e5; margin-right: 6px; }
.rpt-chip.g { background: #e9f9f1; color: #059669; }
.rpt-chip.r { background: #fdeceb; color: #dc2626; }
.rpt-chip.a { background: #fff6e6; color: #b45309; }

/* ---------- 科目条形 ---------- */
.rpt-srow { width: 100%; border-collapse: collapse; }
.rpt-srow td { padding: 3px 0; font-size: 11.5px; color: #475569; }
.rpt-srow .nm { width: 108px; white-space: nowrap; }
.rpt-srow .trk { width: auto; }
.rpt-srow .vl { width: 92px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rpt-track { position: relative; height: 12px; background: #eef2f7; border-radius: 6px; }
.rpt-track i { position: absolute; top: 0; height: 12px; border-radius: 6px; }
.rpt-mid { position: absolute; left: 50%; top: -2px; width: 1px; height: 15px; background: #dbe3ee; }

/* ---------- 科目点评卡 ---------- */
.rpt-cards { width: 100%; border-collapse: separate; border-spacing: 8px 8px; margin: 0 -8px; table-layout: fixed; }
.rpt-card { border: 1px solid #e8eef7; border-radius: 10px; padding: 9px 12px; background: #fff; vertical-align: top; }
.rpt-card .h { font-size: 12.5px; font-weight: 700; color: #0f172a; }
.rpt-card .h em { font-style: normal; font-weight: 500; font-size: 11px; color: #94a3b8; margin-left: 5px; }
.rpt-card .b { font-size: 11.5px; color: #4b5a70; line-height: 1.66; margin-top: 5px; }
.rpt-lv { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.lv-you { background: #e9f9f1; color: #047857; }
.lv-liang { background: #eef4ff; color: #2563eb; }
.lv-yiban { background: #f4f6fa; color: #64748b; }
.lv-boruo { background: #fdeceb; color: #dc2626; }

/* ---------- 双栏（优劣势 / 建议） ---------- */
.rpt-2 { width: 100%; border-collapse: separate; border-spacing: 10px 0; margin: 0 -10px; table-layout: fixed; }
.rpt-2 td { vertical-align: top; }

/* ---------- 三栏（单科报告：老师 / 学生 / 家长三方视角） ---------- */
.rpt-3 { width: 100%; border-collapse: separate; border-spacing: 8px 0; margin: 0 -8px; table-layout: fixed; }
.rpt-3 td { vertical-align: top; }
.rpt-3 .rpt-box { padding: 10px 11px; }
.rpt-3 .rpt-item { font-size: 11px; line-height: 1.7; margin-bottom: 4px; }
.rpt-box { border: 1px solid #e8eef7; border-radius: 10px; padding: 12px 14px; }
.rpt-box.good { background: #f6fdf9; border-color: #d6f0e2; }
.rpt-box.bad { background: #fef8f7; border-color: #f7dcd8; }
.rpt-box .t { font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.rpt-box.good .t { color: #047857; }
.rpt-box.bad .t { color: #b91c1c; }
.rpt-item { font-size: 11.5px; color: #475569; line-height: 1.75; margin-bottom: 5px; }
.rpt-item b { color: #0f172a; font-weight: 600; }

/* ---------- 列表 / 建议 / 目标 ---------- */
.rpt-li { font-size: 12px; color: #334155; line-height: 1.8; padding-left: 16px; position: relative; margin-bottom: 4px; }
.rpt-li em { position: absolute; left: 0; font-style: normal; color: #94a3b8; }
.rpt-risk { font-size: 12px; color: #7f1d1d; background: #fdf2f2; border: 1px solid #f7dede; border-radius: 8px; padding: 8px 12px; line-height: 1.7; margin-bottom: 6px; }
.rpt-goal { border: 1px dashed #c7d6ef; border-radius: 8px; padding: 9px 12px; font-size: 12px; color: #1e3a8a; background: #f7faff; margin-bottom: 6px; }
.rpt-empty { font-size: 12px; color: #94a3b8; }

/* ============================================================
 * V6.6.30 AI 连通性测试结果面板
 * 真实反馈：HTTP 状态 / 耗时 / 模型回显 / 错误原文，分成功-失败-进行中三态
 * ============================================================ */
.ai-test-box { margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; background: #f7f9fc; }
.ai-test-box.ok { border-color: #bbe6cd; background: #f3fbf6; }
.ai-test-box.bad { border-color: #f5cfcb; background: #fdf5f4; }
.ai-test-box.run { border-color: #cdd9f5; background: #f5f8ff; }
.ai-test-head { font-weight: 600; font-size: 13px; color: #334155; display: flex; align-items: center; gap: 7px; }
.ai-test-box.ok .ai-test-head { color: #047857; }
.ai-test-box.bad .ai-test-head { color: #b91c1c; }
.ai-test-box.run .ai-test-head { color: #2563eb; }
.ai-test-row { display: flex; gap: 10px; margin-top: 6px; line-height: 1.65; }
.ai-test-row span { flex: 0 0 76px; color: #8494a8; }
.ai-test-row b { flex: 1 1 auto; font-weight: 600; color: #1e293b; word-break: break-word; }
.ai-test-row b.bad { color: #b91c1c; font-weight: 500; }
.ai-test-line { margin-top: 8px; font-size: 11px; color: #94a3b8; word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; }
.ai-test-spin { width: 11px; height: 11px; border: 2px solid #bfd4f7; border-top-color: #2563eb; border-radius: 50%; animation: aiSpin .8s linear infinite; display: inline-block; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-row-badge { font-size: 11.5px; color: #64748b; white-space: nowrap; }
.ai-row-badge.ok { color: #059669; font-weight: 600; }
.ai-row-badge.bad { color: #dc2626; font-weight: 600; }
.ai-row-badge.run { color: #6366f1; }

/* ============================================================
 * V6.6.32 整场考试 AI 专业分析报告（复用 .rpt-* 版式，补表格/热力图/时间轴）
 * ============================================================ */
.ex-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; color: #334155; table-layout: fixed; }
.ex-tbl thead th { background: #f4f7fc; color: #64748b; font-weight: 600; font-size: 10.5px; text-align: left; padding: 6px 5px; border-bottom: 1px solid #e3ebf6; }
.ex-tbl tbody td { padding: 6px 5px; border-bottom: 1px solid #f2f6fb; vertical-align: middle; font-variant-numeric: tabular-nums; }
.ex-tbl tbody tr:last-child td { border-bottom: none; }
.ex-tbl .c { text-align: center; }
.ex-tbl .r { text-align: right; }

.ex-heat { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 10px; table-layout: fixed; }
.ex-heat th { font-size: 10px; color: #64748b; font-weight: 600; padding: 4px 2px; background: #f4f7fc; border-radius: 4px; text-align: center; }
.ex-heat th.rowh { text-align: left; padding-left: 7px; white-space: nowrap; }
.ex-heat td { text-align: center; padding: 5px 2px; border-radius: 4px; font-variant-numeric: tabular-nums; font-weight: 600; }

.ex-note { font-size: 10.5px; color: #94a3b8; line-height: 1.7; margin-top: 6px; }

.ex-tag { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 999px; background: #eef2f7; color: #64748b; white-space: nowrap; }
.ex-tag.h { background: #fdeceb; color: #b91c1c; }
.ex-tag.m { background: #fff6e6; color: #b45309; }
.ex-tag.l { background: #eef2f7; color: #64748b; }

.ex-tl { border-left: 2px solid #dbe6f7; margin-left: 5px; padding-left: 16px; }
.ex-tl-item { position: relative; margin-bottom: 11px; }
.ex-tl-item:last-child { margin-bottom: 0; }
.ex-tl-item:before { content: ''; position: absolute; left: -21px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 2px #e8f0fe; }
.ex-tl-h { font-size: 12px; font-weight: 700; color: #1e3a8a; margin-bottom: 4px; }

.ex-sign { margin-top: 16px; border-top: 1px dashed #cbd5e1; padding-top: 9px; font-size: 10.5px; color: #94a3b8; display: flex; justify-content: space-between; }

/* ---- 学生档案 · 字段筛选条（V6.6.42）---- */
.stu-filterbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 9px 12px; margin: 0 0 12px;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px;
}
.stu-filterbar:empty { display: none; }
.stu-fchip {
  display: inline-flex; align-items: center; gap: 2px;
  background: #fff; border: 1px solid #dbe3ef; border-radius: 8px;
  padding: 2px 3px 2px 6px; font-size: 12.5px; color: var(--text);
}
.stu-fchip select, .stu-fchip input {
  border: none; background: transparent; font-size: 12.5px; color: var(--text);
  padding: 3px 2px; max-width: 168px; outline: none; cursor: pointer;
}
.stu-fchip input { cursor: text; }
.stu-fchip select:first-child { color: #475569; font-weight: 600; }
.stu-fchip button {
  border: none; background: transparent; color: #94a3b8;
  cursor: pointer; padding: 0 5px; font-size: 13px; line-height: 1;
}
.stu-fchip button:hover { color: var(--danger); }
.stu-fstat { margin-left: auto; font-size: 12.5px; color: var(--text-sub); white-space: nowrap; }
/* V6.6.43：筛选条内下拉 / 条件胶囊 / 按钮统一高度（原来看起来高低不齐） */
.stu-filterbar { --stu-fh: 32px; }
.stu-filterbar > .input,
.stu-filterbar > .btn-sm {
  height: var(--stu-fh); box-sizing: border-box; padding-top: 0; padding-bottom: 0;
  display: inline-flex; align-items: center;
}
.stu-filterbar > .input { padding-left: 9px; padding-right: 6px; font-size: 12.5px; }
.stu-filterbar .stu-fchip {
  height: var(--stu-fh); box-sizing: border-box; padding-top: 0; padding-bottom: 0;
}
.stu-filterbar .stu-fchip select,
.stu-filterbar .stu-fchip input {
  height: 100%; padding-top: 0; padding-bottom: 0;
}
.stu-filterbar .btn-sm { padding-left: 9px; padding-right: 9px; font-size: 12.5px; }
body.is-mobile .stu-filterbar { padding: 8px; gap: 6px; }
body.is-mobile .stu-fstat { margin-left: 0; width: 100%; text-align: right; }

/* 学生档案：姓名彩色胶囊（颜色由姓名+班级哈希，同一学生始终同色） */
.stu-name-pill {
  display: inline-block; padding: 2px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.7;
  color: #fff; white-space: nowrap; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.stu-name-pill:hover { transform: translateY(-1px); box-shadow: 0 3px 9px rgba(15, 23, 42, .22); filter: brightness(1.06); }
.stu-name-pill:active { transform: translateY(0); }


/* ============================================================
 * V6.8.9 登录方式限制卡片：滑块开关
 * 与「已发布」的 .tw-switch 同一视觉语言，尺寸放大到适合后台卡片。
 * ============================================================ */
.dv-login-row { display: flex; align-items: center; gap: 18px; padding: 2px 0 14px; }
.dv-login-row.is-off { opacity: .5; }
.dv-login-sep { border-top: 1px dashed #e6ebf2; margin: 2px 0 14px; }
.dv-login-txt { flex: 1 1 auto; min-width: 0; }
.dv-login-h { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: .2px; }
.dv-login-d { font-size: 12.5px; color: var(--text-sub); line-height: 1.9; margin-top: 5px; }
.dv-switch { position: relative; display: inline-block; width: 50px; height: 28px; flex: 0 0 auto; cursor: pointer; }
.dv-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.dv-switch .sl { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .22s; cursor: pointer; }
.dv-switch .sl::before {
  content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .22s;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .28);
}
.dv-switch input:checked + .sl { background: #22c55e; }
.dv-switch input:checked + .sl::before { transform: translateX(22px); }
.dv-switch input:disabled + .sl { opacity: .55; cursor: not-allowed; }
.dv-switch input:focus-visible + .sl { box-shadow: 0 0 0 3px rgba(34, 197, 94, .22); }
.dv-login-note { font-size: 12px; color: #8a94a6; line-height: 1.9; border-top: 1px dashed #e6ebf2; padding-top: 10px; }
.dv-login-note code { white-space: nowrap; }
body.skin-dark .dv-switch .sl { background: rgba(255, 255, 255, .2); }
body.skin-dark .dv-login-note { border-top-color: rgba(255, 255, 255, .12); color: #93a0b3; }
body.skin-dark .dv-login-sep { border-top-color: rgba(255, 255, 255, .12); }
@media (max-width: 640px) {
  .dv-login-row { gap: 12px; }
  .dv-login-h { font-size: 13.5px; }
  .dv-login-d { font-size: 12px; line-height: 1.8; }
}

/* ===== V6.8.23 管理员总控台 ===== */
.ov-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ov-two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) {
  .ov-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ov-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ===== V6.8.24 总控台：分区导航 + 锚点 ===== */
.ov-secnav { position: sticky; top: -1px; z-index: 20; display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 9px; margin-bottom: 12px; background: var(--bg); border-bottom: 1px solid var(--border); }
.ov-secnav::-webkit-scrollbar { display: none; }
.ov-secnav a { flex: 0 0 auto; padding: 6px 13px; border-radius: 999px; font-size: 13px; color: var(--text-sub); cursor: pointer; white-space: nowrap; background: var(--card, #fff); border: 1px solid var(--border); transition: background .15s, color .15s, border-color .15s; }
.ov-secnav a:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }
.ov-secnav a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ov-section { scroll-margin-top: 58px; }
@media (max-width: 640px) {
  .ov-secnav { padding-left: 0; padding-right: 0; }
  .ov-secnav a { padding: 5px 11px; font-size: 12.5px; }
}

/* ===== V6.8.25 安全管理 ===== */
.sec-head { display: grid; grid-template-columns: 190px 1fr; gap: 14px; margin-bottom: 16px; }
.sec-score { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.sec-score-num { font-size: 40px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.sec-score-lb { font-size: 12.5px; color: var(--text-sub); margin-top: 6px; }
.sec-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sec-kpi { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-width: 0; }
.sec-kpi-lb { font-size: 12.5px; color: var(--text-sub); }
.sec-kpi-val { font-size: 26px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.sec-kpi-sub { font-size: 11.5px; color: var(--text-sub); opacity: .85; line-height: 1.5; }
.sec-ok { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; padding: 14px 16px; border-left: 4px solid var(--success); }
.sec-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0; border-top: 1px dashed var(--border); }
.sec-alert:first-of-type { border-top: 0; }
.sec-alert-act { flex: 0 0 auto; color: var(--danger); }
.sec-bars { display: flex; align-items: flex-end; gap: 2px; height: 82px; padding-top: 4px; }
.sec-bar-g { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; }
.sec-bar-stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 1px; width: 100%; max-width: 15px; height: 56px; }
.sec-bar-stack i { display: block; width: 100%; border-radius: 1px; min-height: 0; }
.sec-bar-h { font-size: 9.5px; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.legend { font-size: 11.5px; color: var(--text-sub); font-weight: 400; display: inline-flex; align-items: center; gap: 4px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-left: 6px; }
.sec-cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sec-col-main, .sec-col-side { min-width: 0; }
.sec-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.sec-filter { border: 1px solid var(--border); background: var(--card); color: var(--text-sub); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; }
.sec-filter:hover { border-color: var(--primary-light); color: var(--primary); }
.sec-filter.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sec-table { font-size: 12.5px; }
.sec-table th { font-weight: 500; color: var(--text-sub); white-space: nowrap; }
.sec-table td { padding-top: 7px; padding-bottom: 7px; vertical-align: middle; }
.sec-acct-list { display: flex; flex-direction: column; gap: 0; }
.sec-acct { padding: 10px 0; border-top: 1px dashed var(--border); }
.sec-acct:first-child { border-top: 0; }
.sec-acct-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-sub); line-height: 1.75; }
.sec-acct-row span:last-child { font-variant-numeric: tabular-nums; text-align: right; word-break: break-all; }
.sec-block { padding: 10px 0 10px 10px; border-top: 1px dashed var(--border); border-left: 3px solid var(--danger); margin-bottom: 6px; }
.sec-block:first-of-type { border-top: 0; }
.sec-advice { margin: 4px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.95; color: var(--text-sub); }
@media (max-width: 1080px) {
  .sec-cols { grid-template-columns: minmax(0, 1fr); }
  .sec-head { grid-template-columns: 150px 1fr; }
  .sec-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sec-head { grid-template-columns: 1fr; }
  .sec-score { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding: 12px 14px; }
  .sec-score-num { font-size: 30px; line-height: 1; }
  .sec-score-lb { margin-top: 0; font-size: 12px; white-space: nowrap; }
  .sec-alert { flex-wrap: wrap; }
  .sec-alert-act { flex: 0 0 100%; text-align: right; padding: 2px 0 0; }
  .sec-bars { height: 70px; }
  .sec-bar-h { font-size: 8px; overflow: hidden; }
}

/* ================= 常用网站（内嵌网页）V6.8.29 =================
   页面高度吃满 .content（.content 是 flex:1 的滚动容器）。
   注意：内嵌的网页在客户端里是「原生子 WebView」，不属于 DOM，
   所以这里的圆角/阴影只能作用在「宿主框」上，网页本身仍是矩形，
   靠 .embed-stage 的内边距把网页缩进去，视觉上就成了悬浮的圆角卡片。 */
.embed-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.content > .embed-shell:first-child { margin-top: 0; }
/* V6.9.2：底部留出空隙，让网页区看起来是浮起来的卡片 */
.content.embed-mode { padding-bottom: 14px; overflow: hidden; }
.embed-bar { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; flex-shrink: 0; }
/* 标签栏自己滚动，右侧 10px 渐隐提示「还能往右翻」，与按钮区之间加竖分隔线，
   避免标签被裁到一半时看起来像是被按钮盖住 */
.embed-tabs {
  display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  padding: 2px 2px 2px 0;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 10px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 10px), transparent 100%);
}
.embed-tabs::-webkit-scrollbar { display: none; }
.embed-tab {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px 3px 8px;
  border-radius: 7px; background: #fff; border: 1px solid var(--border);
  color: #475569; font-size: 12px; line-height: 18px; cursor: pointer; white-space: nowrap;
  flex-shrink: 0; transition: background .15s, border-color .15s, color .15s; font-family: inherit;
}
.embed-tab:hover { border-color: var(--primary); color: var(--primary); }
.embed-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.embed-tab .ic { font-size: 11.5px; line-height: 1; }
.embed-tab .nm { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.embed-tab .x { font-size: 14px; line-height: 1; opacity: 0; width: 0; overflow: hidden; transition: .15s; }
.embed-tab:hover .x { opacity: .6; width: 11px; }
.embed-tab .x:hover { opacity: 1; color: #dc2626; }
.embed-tab.active .x { color: #fff; opacity: .75; }
.embed-notab { font-size: 12.5px; color: #94a3b8; white-space: nowrap; padding-left: 2px; }
.embed-tools {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding-left: 10px; border-left: 1px solid var(--border);
}
.embed-tools .btn { padding: 3px 9px; font-size: 12px; line-height: 18px; }
/* V6.9.3：后退/前进/刷新/浏览器 四个按钮连成一个控件，与 26px 标签等高 */
.embed-nav {
  display: flex; align-items: stretch; height: 26px; flex-shrink: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.embed-nav-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; padding: 0; border: 0; border-left: 1px solid var(--border);
  background: transparent; color: #475569; cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s;
}
.embed-nav-btn:first-child { border-left: 0; }
.embed-nav-btn svg { width: 15px; height: 15px; display: block; }
.embed-nav-btn:hover { background: #f1f5f9; color: #0f172a; }
.embed-nav-btn:active { background: #e2e8f0; }
.embed-stage {
  flex: 1; min-height: 320px; position: relative;
  background: #e9eef5; border: 1px solid #dde5ee; border-radius: 14px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .07);
  padding: 10px; overflow: hidden;
}
/* 宿主：原生子 WebView 就盖在这块矩形上，量 rect 也用它；
   它四周的阴影正好落在 stage 的内边距里，网页看起来是浮起来的一张白卡 */
.embed-host {
  position: relative; width: 100%; height: 100%;
  border-radius: 8px; overflow: hidden; background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .10);
}
.embed-hint {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  color: #94a3b8; font-size: 13.5px; text-align: center; padding: 24px; line-height: 1.7;
}
.embed-tip {
  display: flex; align-items: center; gap: 7px; padding: 7px 12px; margin-bottom: 10px;
  border-radius: 9px; background: #fffbeb; border: 1px solid #fde68a;
  color: #92400e; font-size: 12.5px; line-height: 1.6;
}
@media (max-width: 700px) {
  .embed-bar { flex-wrap: wrap; }
  .embed-tabs { width: 100%; flex: none; }
}

/* ================= 座位设置（V6.8.40 美化重构：统一控件规范） ================= */
/* —— 工具条：所有控件统一 32px 高、8px 圆角，分组排布 —— */
.seat-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; row-gap: 10px; }
.seat-toolbar .input { width: auto; height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.seat-class-sel { min-width: 128px; }
.seat-tb-group { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 2px; height: 32px; box-sizing: border-box; }
.seat-tb-group .btn { height: 26px; padding: 2px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 500; }
.seat-tb-group .btn:hover { background: var(--primary-light); color: var(--primary-dark); }
.seat-auto-btn { height: 32px !important; padding: 5px 16px !important; font-size: 13px !important; border-radius: 8px !important; box-shadow: 0 2px 8px rgba(37,99,235,.28); }

/* —— 行列步进：胶囊分组控件 —— */
.seat-stepper { display: inline-flex; align-items: center; height: 32px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 0 4px; gap: 1px; box-sizing: border-box; }
.seat-step-label { font-size: 12.5px; color: var(--text-sub); padding: 0 5px 0 6px; }
.seat-stepper b { min-width: 24px; text-align: center; font-size: 13.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.seat-step { width: 24px; height: 24px; border: none; border-radius: 6px; background: transparent; cursor: pointer; font-size: 14px; line-height: 1; color: var(--text-sub); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.seat-step:hover { background: var(--primary-light); color: var(--primary-dark); }

/* —— 中央过道：开关式胶囊 —— */

/* —— 布局 / 画布 —— */
.seat-layout { display: flex; gap: 14px; align-items: flex-start; }
.seat-canvas-wrap { flex: 1; min-width: 0; padding: 18px 20px 16px; }
.seat-podium { max-width: 720px; margin: 2px auto 14px; padding: 7px 0; text-align: center; letter-spacing: 10px; text-indent: 10px; font-size: 13px; font-weight: 600; color: var(--text-sub); background: linear-gradient(180deg, #eef2f8, #e4eaf3); border: 1px solid var(--border); border-radius: 8px; }
.seat-grid { display: flex; flex-direction: column; gap: 8px; }
.seat-row { display: flex; gap: 8px; }
.seat-cell { position: relative; flex: 1; min-width: 84px; height: 46px; border-radius: 9px; border: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; cursor: grab; user-select: none; touch-action: none; font-size: 13px; transition: box-shadow .12s, border-color .12s, transform .12s; }
.seat-cell:hover { border-color: var(--primary); box-shadow: 0 3px 10px rgba(37,99,235,.16); transform: translateY(-1px); }
.seat-cell.seat-m { background: #f2f7ee; border-color: #bcd9a8; }
.seat-cell.seat-f { background: #fdf4e7; border-color: #ecd3a8; }
.seat-cell.seat-empty { background: #fafbfc; border-style: dashed; color: #94a3b8; cursor: pointer; }
.seat-cell.seat-empty:hover { transform: none; box-shadow: none; background: var(--primary-light); }
.seat-cell.seat-iso { outline: 1.5px dashed #dc8a8a; outline-offset: -3px; }
.seat-cell.seat-front::after { content: '↑前排'; position: absolute; right: 4px; bottom: 2px; font-size: 9px; color: var(--primary); }
.seat-cell.seat-sel { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.35); }
.seat-cell.seat-over { border-color: var(--primary); background: var(--primary-light); }
.seat-name { pointer-events: none; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.seat-locktag { position: absolute; left: 3px; top: 1px; font-size: 10px; }
.seat-tier { position: absolute; left: 4px; bottom: 2px; font-size: 10px; font-weight: 700; line-height: 1.2; }
.seat-tier-A, .seat-tier-B { color: #185fa5; }
.seat-tier-C, .seat-tier-D { color: #c58a1d; }
.seat-tier-E, .seat-tier-F { color: #a32d2d; }
.seat-hint { margin-top: 10px; font-size: 12px; color: #9aa2ae; line-height: 1.5; }

/* —— 预览条 / 轮换提醒条 —— */
.seat-preview-bar { margin-top: 12px; padding: 10px 14px; background: var(--primary-light); border: 1px solid var(--primary); border-radius: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.seat-report { color: var(--primary-dark); font-weight: 600; flex: 1; min-width: 200px; line-height: 1.5; }
.seat-rotate-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--primary-light); border: 1px solid var(--primary); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--primary-dark); }
.seat-preview-bar .btn, .seat-rotate-banner .btn { height: 28px; padding: 3px 12px; }

/* —— 状态条：当前周次 + 轮换状态 + 暂停开关 —— */
.seat-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; padding: 5px 8px 5px 6px; margin-bottom: 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; color: var(--text-sub); }
.seat-status.is-due { background: #fff8ec; border-color: #e8c07a; }
.seat-status.is-paused { background: #fbfaf6; border-style: dashed; }
.seat-week-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seat-status.is-due .seat-week-chip { background: #d98324; }
.seat-status.is-paused .seat-week-chip { background: #9aa2ae; }
.seat-rot-state { display: inline-flex; align-items: baseline; gap: 8px; line-height: 1.5; color: var(--text-sub); }
.seat-rot-state b { color: #a35b00; font-weight: 600; }
.seat-status.is-paused .seat-rot-state b { color: #9aa2ae; }
.seat-rot-state em { font-style: normal; font-size: 12px; color: #9aa2ae; }
.seat-spacer { flex: 1; min-width: 8px; }
.seat-status .btn { height: 28px; padding: 3px 12px; }
.seat-status .btn.btn-ghost { border: 1px solid var(--border); background: #fff; color: var(--text); }
.seat-status .btn.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-light); }
.seat-status .btn.is-on { border-color: #e8c07a; background: #fff8ec; color: #a35b00; }
.seat-status .btn.is-on:hover { border-color: #d98324; background: #fff3e0; }
.seat-field-note { font-size: 12.5px; color: var(--text-sub); line-height: 1.5; padding: 6px 0; }

/* —— 右侧栏 —— */
.seat-side { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.seat-side-card { padding: 12px; }
.seat-side-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.seat-side-sub { font-size: 11px; font-weight: 400; color: var(--text-sub); margin-left: 8px; }
.seat-pool { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; min-height: 56px; border-radius: 8px; transition: background .12s; }
/* —— 拖拽移出：整张「未安排」卡片都是放置区（原来只有 56px 高的列表内部能放） —— */
#seat-unassigned-card { position: relative; transition: border-color .12s, background .12s, box-shadow .12s; }
body.seat-dragging #seat-unassigned-card { border-color: #93b4f8; background: #f7faff; }
body.seat-dragging #seat-unassigned-card.seat-drop-over { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.seat-drop-tip { display: none; margin-top: 8px; padding: 7px 0; text-align: center; font-size: 12px; color: var(--primary); background: rgba(37,99,235,.06); border: 1px dashed #93b4f8; border-radius: 7px; }
body.seat-dragging .seat-drop-tip { display: block; }
#seat-unassigned-card.seat-drop-over .seat-drop-tip { background: #fff; border-color: var(--primary); font-weight: 600; }
body.seat-dragging .seat-cell { cursor: grabbing; }
body.seat-dragging .seat-cell:hover { transform: none; box-shadow: none; }
/* 拖拽时跟随指针的小标签（指针拖拽自建，不依赖浏览器原生 drag image） */
.seat-drag-ghost { position: fixed; z-index: 2147483600; pointer-events: none; padding: 4px 10px; border-radius: 7px; background: var(--primary); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 18px rgba(37,99,235,.35); transform: translate(0, -100%); }
.seat-cell.seat-over { cursor: grabbing; }
.seat-pool-item { display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); font-size: 12.5px; cursor: grab; user-select: none; touch-action: none; }
.seat-pool-item:hover { border-color: var(--primary); background: #fff; }
.seat-pool-item.seat-sel { border-color: var(--primary); background: var(--primary-light); }
.seat-pool-item.is-absent { cursor: pointer; border-style: dashed; color: var(--text-sub); background: #fbfaf6; }
.seat-pool-item.is-absent:hover { border-color: #c58a1d; color: var(--text); }
.seat-absent-back { margin-left: auto; font-size: 11px; color: var(--primary); opacity: .6; transition: opacity .12s; flex-shrink: 0; }
.seat-pool-item.is-absent:hover .seat-absent-back { opacity: 1; }
.seat-pool-foot { margin-top: 8px; font-size: 11px; color: #9aa2ae; line-height: 1.4; }
.seat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.seat-dot-m { background: #3b6d11; }
.seat-dot-f { background: #c58a1d; }
.seat-dot-u { background: #cbd5e1; }
.seat-chart-list { display: flex; flex-direction: column; gap: 6px; }
.seat-chart-item { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.seat-chart-item:hover { border-color: var(--primary); }
.seat-chart-item.active { background: var(--primary-light); border-color: var(--primary); }
.seat-chart-name { font-size: 13px; font-weight: 600; color: var(--text); }
.seat-chart-item.active .seat-chart-name { color: var(--primary-dark); }
.seat-chart-meta { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
.seat-ctx { position: fixed; z-index: 2147483000; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 4px; min-width: 190px; }
.seat-ctx-item { padding: 7px 12px; font-size: 13px; border-radius: 6px; cursor: pointer; color: var(--text); white-space: nowrap; }
.seat-ctx-item:hover { background: var(--primary-light); }
.seat-ctx-sep { height: 1px; margin: 4px 8px; background: var(--border); }

/* —— 一键排座弹窗：策略卡片（栅格左对齐） —— */
.seat-strats { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 14px; }
.seat-strat { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; margin: 0; background: #fff; transition: border-color .12s, background .12s; }
.seat-strat input { width: 15px; height: 15px; margin: 0; padding: 0; accent-color: var(--primary); }
.seat-strat-txt { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.seat-strat-txt b { font-size: 13.5px; color: var(--text); line-height: 1.35; }
.seat-strat-txt span { font-size: 12px; color: var(--text-sub); line-height: 1.45; }
.seat-strat:hover { border-color: #b6c6de; }
.seat-strat:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.seat-strat:has(input:checked) .seat-strat-txt b { color: var(--primary-dark); }

/* —— 策略选项区：浅底卡片 + 两列栅格 —— */
.seat-opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 14px; background: var(--bg); border-radius: 10px; margin-bottom: 14px; }
.seat-opts-grid .ff-label { font-size: 12.5px; }
.seat-opts-grid .input { height: 34px; padding: 4px 10px; font-size: 13px; background: #fff; }
@media (max-width: 560px) { .seat-opts-grid { grid-template-columns: 1fr; } }

/* —— 多条件混排行 —— */
.seat-mix-opts { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--bg); border-radius: 10px; margin-bottom: 14px; }
.seat-mix-row { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.seat-mix-check { display: inline-flex; align-items: center; gap: 6px; min-width: 104px; margin: 0; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; }
.seat-mix-check input { width: 14px; height: 14px; margin: 0; padding: 0; accent-color: var(--primary); }
.seat-mix-row .input { height: 30px; padding: 3px 8px; font-size: 12.5px; width: auto; background: #fff; }
.seat-mix-sel-lg { flex: 1; min-width: 150px !important; }
.seat-mix-hint { font-size: 12px; color: var(--text-sub); line-height: 1.5; padding-top: 2px; border-top: 1px dashed var(--border); }
.seat-auto-note { font-size: 12px; color: var(--text-sub); background: var(--bg); border-radius: 8px; padding: 9px 12px; margin-bottom: 14px; line-height: 1.55; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.modal-footer .btn { min-width: 84px; height: 36px; justify-content: center; }
.modal-footer .btn-block { width: 100%; justify-content: center; height: 38px; font-size: 14px; }
@media (max-width: 640px) { .modal-footer { flex-wrap: wrap; } .modal-footer .btn { flex: 1 1 auto; } }

/* —— 座位方案弹窗（新建 / 重命名） —— */
.seat-form { display: flex; flex-direction: column; gap: 16px; }
.seat-form .ff-req { font-style: normal; color: #ef4444; margin-left: 3px; }
.seat-form .input { height: 38px; }
.seat-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); font-size: 13.5px; color: var(--text); line-height: 1.42; cursor: pointer; transition: border-color .15s, background .15s; }
.seat-check:hover { border-color: #c7d2fe; background: #f8faff; }
.seat-check input { width: 15px; height: 15px; margin: 1px 0 0; padding: 0; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; }
.seat-check small { display: block; font-size: 11.5px; color: var(--text-sub); margin-top: 3px; line-height: 1.5; }
.seat-check:has(input:checked) { border-color: #bfdbfe; background: #f5f9ff; }


/* —— 轮换设置弹窗 —— */
.seat-pause-box { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 6px 0; font-size: 13px; color: var(--text); cursor: pointer; line-height: 1.45; }
.seat-pause-box input { width: 14px; height: 14px; margin: 2px 0 0; padding: 0; flex-shrink: 0; accent-color: var(--primary); }
.seat-pause-box small { display: block; font-size: 11.5px; color: var(--text-sub); margin-top: 1px; }
.seat-rot-subtitle { font-size: 13px; font-weight: 600; color: var(--text); margin: 16px 0 0; }
.rot-cols { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; padding: 12px; background: var(--bg); border-radius: 10px; margin-top: 8px; }
.rot-col { display: grid; grid-template-columns: 56px 1fr 1fr; align-items: center; gap: 10px; font-size: 12.5px; }
.rot-col span { color: var(--text-sub); white-space: nowrap; }
.rot-col .input { height: 32px; padding: 4px 8px; font-size: 12.5px; background: #fff; }
.seat-rot-foot-hint { font-size: 12px; color: var(--text-sub); line-height: 1.55; margin-top: 10px; }

/* —— 轮换预览小图 —— */
.seat-grid-mini .seat-cell { min-width: 56px; height: 32px; font-size: 11.5px; cursor: default; }
.seat-grid-mini .seat-cell:hover { transform: none; box-shadow: none; }
