/* ================================================================
   阅见智评 · 样式表（2026-10 合并）：由下面四个文件按原加载顺序合并而成，层叠顺序与合并前一致。
     1. styles.css       全局基础样式、教师端 / 学生端各页面
     2. discussion.css   讨论区
     3. step-groups.css  题目组（分步骤题）
     4. auth.css         账号 / 角色 / 组织管理
   survey.css（问卷）仍单独加载，放在最后。
   找某个原文件的样式：搜索 "▼ 原 文件名"。
   ================================================================ */

/* ████████████████████████████████████████████████████████████████
   ▼ 原 styles.css（全局与各页面）
   ████████████████████████████████████████████████████████████████ */
        /* ===== 全局基础样式 ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        :root {
            --primary: #1a2a4a;
            --primary-light: #2c4a7a;
            --secondary: #2d5a4a;
            --accent: #c9a84c;
            --accent-light: #e8d5a3;
            --bg: #f0f2f6;
            --card: #ffffff;
            --text: #1e2a3a;
            --text-light: #5a6a7a;
            --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
            --radius: 16px;
            --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        body {
            font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            min-height: 100vh;
        }
        .hidden {
            display: none !important;
        }
        /* ===== 登录页 ===== */
        #loginPage {
            width: 100%;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            background: linear-gradient(145deg, #f0f4fa 0%, #dce3ed 100%);
        }
        .login-container {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(16px);
            padding: 56px 48px 48px;
            border-radius: 40px;
            box-shadow: 0 20px 60px rgba(26, 42, 74, 0.15);
            width: 100%;
            max-width: 820px;
            text-align: center;
        }
        .login-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-bottom: 8px;
        }
        .login-logo .icon {
            font-size: 42px;
        }
        .login-logo h1 {
            font-size: 32px;
            font-weight: 700;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .login-sub {
            color: var(--text-light);
            font-size: 16px;
            margin-bottom: 40px;
            letter-spacing: 2px;
        }
        .login-sub em {
            font-style: normal;
            color: var(--accent);
            font-weight: 600;
        }
        .login-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin-top: 12px;
        }
        .login-card {
            background: var(--card);
            border-radius: 24px;
            padding: 36px 24px 30px;
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: var(--transition);
            border: 2px solid transparent;
        }
        .login-card:hover {
            transform: translateY(-4px);
            border-color: var(--accent-light);
            box-shadow: 0 16px 48px rgba(26, 42, 74, 0.12);
        }
        .login-card .emoji {
            font-size: 48px;
            display: block;
            margin-bottom: 12px;
        }
        .login-card h3 {
            font-size: 22px;
            font-weight: 600;
            color: var(--primary);
        }
        .login-card p {
            color: var(--text-light);
            font-size: 14px;
            margin-top: 6px;
        }
        .login-card .badge {
            display: inline-block;
            background: var(--accent);
            color: #fff;
            font-size: 12px;
            font-weight: 600;
            padding: 2px 14px;
            border-radius: 20px;
            margin-top: 12px;
        }
        /* ===== 主应用 ===== */
        #app {
            width: 100%;
            min-height: 100vh;
            background: var(--bg);
            display: flex;
            flex-direction: column;
        }
        .app-header {
            background: var(--card);
            padding: 0 32px;
            height: 68px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
            position: sticky;
            top: 0;
            z-index: 100;
            flex-shrink: 0;
        }
        .app-header .brand {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 700;
            font-size: 20px;
            color: var(--primary);
            flex-shrink: 0;
            white-space: nowrap;
        }
        .app-header .brand span {
            color: var(--accent);
        }
        .app-header .nav {
            display: flex;
            gap: 4px;
            align-items: center;
            flex-wrap: nowrap;
            flex: 1 1 auto;
            min-width: 0;
            overflow: hidden;
            justify-content: center;
        }
        .app-header .nav button {
            background: transparent;
            border: none;
            padding: 8px 20px;
            border-radius: 40px;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-light);
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .app-header .nav button:hover {
            background: var(--bg);
            color: var(--text);
        }
        .app-header .nav button.active {
            background: var(--primary);
            color: #fff;
            box-shadow: 0 4px 12px rgba(26, 42, 74, 0.2);
        }
        .app-header .user-info {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 14px;
            color: var(--text-light);
            flex-shrink: 0;
            white-space: nowrap;
        }
        .app-header .user-info .avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary-light);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 16px;
            flex-shrink: 0;
        }
        .app-header .user-info .logout-btn {
            background: transparent;
            border: 1px solid #e2e8f0;
            padding: 6px 16px;
            border-radius: 40px;
            font-size: 13px;
            color: var(--text-light);
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .app-header .user-info .logout-btn:hover {
            background: #fee;
            border-color: #fcc;
            color: #c0392b;
        }
        .app-body {
            flex: 1;
            padding: 24px 32px 40px;
            max-width: 1440px;
            margin: 0 auto;
            width: 100%;
        }
        /* ===== 通用卡片 ===== */
        .reading-layout {
            display: flex;
            gap: 24px;
            height: calc(100vh - 230px);
            min-height: 600px;
        }
        .left-panel {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 24px 28px;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            position: relative;
            flex: 1;
            min-width: 30%;
            transition: flex 0.2s;
        }
        .right-panel {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            flex: 1;
            min-width: 30%;
            transition: flex 0.2s;
        }
        .resize-handle {
            width: 8px;
            background: transparent;
            cursor: col-resize;
            flex-shrink: 0;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .resize-handle::after {
            content: '⋮';
            color: var(--text-light);
            font-size: 18px;
            opacity: 0.3;
        }
        .resize-handle:hover::after {
            opacity: 0.8;
        }
        .right-tabs {
            display: flex;
            border-bottom: 1px solid #edf2f7;
            flex-shrink: 0;
            background: #fafbfc;
            border-radius: var(--radius) var(--radius) 0 0;
            flex-wrap: wrap;
        }
        .right-tabs button {
            flex: 1;
            padding: 14px 8px;
            background: transparent;
            border: none;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-light);
            cursor: pointer;
            transition: var(--transition);
            border-bottom: 3px solid transparent;
            font-family: inherit;
            min-width: 60px;
        }
        .right-tabs button.active {
            color: var(--primary);
            border-bottom-color: var(--accent);
            background: #fff;
        }
        .tab-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px 24px;
            display: none;
            flex-direction: column;
        }
        .tab-content.active {
            display: flex;
        }
        .article-content {
            flex: 1;
            font-size: 15px;
            line-height: 1.9;
            color: #1e2a3a;
            padding-right: 4px;
            user-select: text;
        }
        .article-content h2 {
            font-size: 22px;
            font-weight: 700;
            margin-bottom: 12px;
            color: var(--primary);
        }
        .article-content .meta {
            font-size: 13px;
            color: var(--text-light);
            margin-bottom: 20px;
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }
        .article-content p {
            margin-bottom: 16px;
            text-align: justify;
            font-family: "STSong", "SimSun", "宋体", serif;
            text-indent: 2em;
        }
        .article-content p.text-author,
        .article-content p.text-date {
            text-indent: 0;
        }
        .article-content p.text-quote {
            font-family: "STKaiti", "KaiTi", "楷体", serif;
        }
        /* 诗词正文：不做首行缩进，逐行呈现更符合诗词排版习惯 */
        .article-content p.text-poem {
            text-indent: 0;
            letter-spacing: .5px;
        }
        /* 词句注释：默认带波浪下划线，鼠标悬停显示浮层注释；
           学生可通过右上角"注释"开关整体关闭（见 .annot-off）。
           浮层本身改由 JS 用一个共享的 #zhuAnnotTip 元素定位显示（见下方
           showZhuAnnotTip），而不是纯 CSS 居中的 ::after——诗词句子普遍很短、
           注释词又常常靠近阅读区左侧，纯 CSS 居中弹出会被顶到视口外面，
           看不到左半边；JS 定位时会按实际视口宽度做边界收紧。 */
        .zhu-annot {
            position: relative;
            border-bottom: 1px dashed #d68910;
            cursor: help;
        }
        /* 学生自己添加的注释：复用同一套 zhu-annot 悬浮浮层机制，只是换一个
           下划线颜色（蓝色），让学生一眼能分清哪些是自己加的、哪些是老师
           写好的（老师的是橙色虚线）。鼠标样式也从 help 换成 pointer，
           提示"这个可以点击删除"，教师写的注释没有这个交互，不应该给
           同样的鼠标提示。 */
        .zhu-annot.student-annot {
            border-bottom: 1px dashed #2980b9;
            cursor: pointer;
            background: rgba(41,128,185,0.06);
        }
        /* 篇名后的来源注释，样式区别于词句内注释，做成小圆角标 */
        .zhu-annot-src {
            display: inline-block;
            vertical-align: super;
            font-size: 11px;
            line-height: 1;
            margin-left: 3px;
            padding: 1px 5px;
            border-radius: 8px;
            background: #fdebd0;
            color: #d68910;
            border-bottom: none;
            cursor: help;
        }
        /* 注释开关关闭时：去掉下划线视觉提示；浮层是否显示由 showZhuAnnotTip
           里的 annot-off 判断控制，这里只需要处理静态视觉样式 */
        .article-content.annot-off .zhu-annot {
            border-bottom: none;
            cursor: text;
        }
        .article-content.annot-off .zhu-annot-src {
            background: transparent;
            color: #c2c8d0;
        }
        /* 共享的注释浮层（JS 动态定位、填内容），固定定位所以坐标以视口为准，
           展示前会按 window.innerWidth/innerHeight 做边界收紧，不会被顶出视口 */
        .zhu-annot-tip {
            position: fixed;
            display: none;
            min-width: 140px;
            max-width: 300px;
            width: max-content;
            white-space: normal;
            text-align: left;
            font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
            font-size: 12.5px;
            line-height: 1.6;
            background: #2c3e50;
            color: #fff;
            padding: 8px 10px;
            border-radius: 6px;
            box-shadow: 0 6px 16px rgba(0,0,0,.2);
            z-index: 70;
            pointer-events: none;
        }
        .annot-toggle-btn {
            font-size: 12px;
            padding: 4px 12px;
            border-radius: 12px;
            border: 1px solid #f1c40f;
            background: #fffbea;
            color: #b7791f;
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
        }
        .annot-toggle-btn.on {
            background: #fdebd0;
            border-color: #e67e22;
            color: #c05621;
        }
        .annot-toggle-btn:hover {
            filter: brightness(0.96);
        }
        /* 标记样式 - 按题目编号，使用预设颜色 */
        .hl-q1 {
            background: #d5f5e3;
            padding: 2px 4px;
            border-radius: 4px;
            cursor: pointer;
            border-left: 3px solid #2ecc71;
        }
        .hl-q2 {
            background: #fcf3a0;
            padding: 2px 4px;
            border-radius: 4px;
            cursor: pointer;
            border-left: 3px solid #f1c40f;
        }
        .hl-q3 {
            background: #b3d9f7;
            padding: 2px 4px;
            border-radius: 4px;
            cursor: pointer;
            border-left: 3px solid #3498db;
        }
        .hl-q4 {
            background: #f5b7b1;
            padding: 2px 4px;
            border-radius: 4px;
            cursor: pointer;
            border-left: 3px solid #e74c3c;
        }
        .hl-q5 {
            background: #e8daef;
            padding: 2px 4px;
            border-radius: 4px;
            cursor: pointer;
            border-left: 3px solid #9b59b6;
        }
        .hl-q6 {
            background: #fdebd0;
            padding: 2px 4px;
            border-radius: 4px;
            cursor: pointer;
            border-left: 3px solid #e67e22;
        }
        .hl-redline {
            background: transparent;
            padding: 2px 4px;
            border-radius: 4px;
            cursor: pointer;
            border-bottom: 2px solid #e74c3c;
            color: #c0392b;
        }
        .hl-note {
            background: #e8daef;
            padding: 2px 4px;
            border-radius: 4px;
            border-left: 3px solid #8e44ad;
            cursor: pointer;
        }
        .hl-question {
            background: #fadbd8;
            padding: 2px 4px;
            border-radius: 4px;
            border-bottom: 2px dashed #e74c3c;
            cursor: pointer;
        }
        /* 教师端"讲解标记·难点"：双下划线，视觉上与学生端的疑问(虚线)、划线(单实线)区分开 */
        .hl-teacher-hard {
            background: transparent;
            padding: 2px 4px;
            border-radius: 4px;
            cursor: pointer;
            border-bottom: 3px double #c0392b;
            color: #c0392b;
        }
        /* 浮动工具栏 - 新版 */
        #floatingToolbar {
            position: fixed;
            background: var(--primary);
            color: #fff;
            border-radius: 40px;
            padding: 6px 12px;
            display: none;
            align-items: center;
            gap: 4px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
            z-index: 999;
            transform: translateX(-50%);
            white-space: nowrap;
            flex-wrap: wrap;
        }
        #floatingToolbar button {
            background: transparent;
            border: none;
            color: #fff;
            padding: 4px 8px;
            border-radius: 20px;
            font-size: 12px;
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
            display: flex;
            align-items: center;
            gap: 3px;
        }
        #floatingToolbar button:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        #floatingToolbar .divider {
            width: 1px;
            height: 20px;
            background: rgba(255, 255, 255, 0.2);
            margin: 0 2px;
        }
        .color-dot {
            display: inline-block;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.3);
            flex-shrink: 0;
        }
        /* 任务创建弹窗：原文与题目关联标注（教师端，仿照学生划线交互） */
        .modal-overlay .modal-box .ref-anchor-section {
            background: #f8fafc;
            border-radius: 14px;
            padding: 18px 20px;
            margin: 16px 0;
            border: 1px solid #edf2f7;
        }
        .modal-overlay .modal-box .ref-anchor-section .ref-refresh-btn {
            background: var(--primary-light);
            color: #fff;
            border: none;
            padding: 6px 16px;
            border-radius: 40px;
            font-size: 12px;
            cursor: pointer;
            font-family: inherit;
            transition: var(--transition);
            white-space: nowrap;
        }
        .modal-overlay .modal-box .ref-anchor-section .ref-refresh-btn:hover {
            background: var(--primary);
        }
        .ref-anchor-preview-wrap {
            max-height: 260px;
            overflow-y: auto;
            background: #fff;
            border: 1px dashed #d6dee8;
            border-radius: 10px;
            padding: 14px 16px;
        }
        .ref-anchor-preview-wrap .article-content {
            font-size: 14px;
            line-height: 1.8;
        }
        .q-refanchor-hint {
            font-size: 12px;
            color: var(--text-light);
            margin: -4px 0 10px 2px;
        }
        .q-refanchor-hint .q-refanchor-count {
            font-weight: 600;
        }
        /* 教师标注专用迷你浮动工具条（样式与学生端 #floatingToolbar 保持一致，层级高于弹窗） */
        #modalMarkToolbar {
            position: fixed;
            background: var(--primary);
            color: #fff;
            border-radius: 40px;
            padding: 6px 12px;
            display: none;
            align-items: center;
            gap: 4px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
            z-index: 10050;
            transform: translateX(-50%);
            white-space: nowrap;
            flex-wrap: wrap;
        }
        #modalMarkToolbar button {
            background: transparent;
            border: none;
            color: #fff;
            padding: 4px 8px;
            border-radius: 20px;
            font-size: 12px;
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
            display: flex;
            align-items: center;
            gap: 3px;
        }
        #modalMarkToolbar button:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        /* 对话 */
        .chat-messages {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 14px;
            margin-bottom: 16px;
            padding-right: 4px;
        }
        .chat-msg {
            display: flex;
            gap: 12px;
            max-width: 92%;
        }
        .chat-msg.user {
            align-self: flex-end;
            flex-direction: row-reverse;
        }
        .chat-msg .avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 600;
            color: #fff;
        }
        .chat-msg .avatar.ai {
            background: var(--secondary);
        }
        .chat-msg .avatar.user-av {
            background: var(--primary-light);
        }
        .chat-msg .bubble {
            background: #f1f4f9;
            padding: 12px 18px;
            border-radius: 16px;
            border-top-left-radius: 4px;
            font-size: 14px;
            line-height: 1.7;
            color: var(--text);
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
        }
        .chat-msg.user .bubble {
            background: var(--primary);
            color: #fff;
            border-top-left-radius: 16px;
            border-top-right-radius: 4px;
        }
        .chat-msg .bubble .tag {
            display: inline-block;
            font-size: 11px;
            background: rgba(201, 168, 76, 0.2);
            color: var(--accent);
            padding: 0 10px;
            border-radius: 12px;
            margin-top: 6px;
            font-weight: 500;
        }
        .chat-msg .bubble .tag.scaffold {
            background: rgba(45, 90, 74, 0.15);
            color: var(--secondary);
        }
        /* AI主动介入的两种标签：疑问答疑用暖橙（对应正文里❓疑问标记的颜色），
           一般的学习陪伴用低饱和的绿，视觉上比"脚手架"更轻，不抢内容 */
        .chat-msg .bubble .tag.qa {
            background: rgba(230, 126, 34, 0.16);
            color: #b9651a;
        }
        .chat-msg .bubble .tag.companion {
            background: rgba(45, 90, 74, 0.10);
            color: #4a7a68;
        }
        /* "继续引导"（晾着不理第①阶段的自然接话）：比"学习陪伴"更轻一档的中性蓝灰，
           视觉上介于"脚手架"和"学习陪伴"之间——它其实就是AI导师在自然接话 */
        .chat-msg .bubble .tag.continue {
            background: rgba(90, 120, 150, 0.12);
            color: #5a7896;
        }
        .chat-divider {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-light);
            text-align: center;
            position: relative;
            margin: 6px 0;
            align-self: stretch;
        }
        .chat-divider::before,
        .chat-divider::after {
            content: '';
            position: absolute;
            top: 50%;
            width: 32%;
            border-top: 1px solid #edf2f7;
        }
        .chat-divider::before {
            left: 0;
        }
        .chat-divider::after {
            right: 0;
        }
        .chat-input {
            display: flex;
            gap: 12px;
            flex-shrink: 0;
            border-top: 1px solid #edf2f7;
            padding-top: 16px;
        }
        .chat-input input {
            flex: 1;
            padding: 12px 18px;
            border: 1px solid #e2e8f0;
            border-radius: 40px;
            font-size: 14px;
            outline: none;
            transition: var(--transition);
            font-family: inherit;
            background: #fafbfc;
        }
        .chat-input input:focus {
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(44, 74, 122, 0.08);
            background: #fff;
        }
        .chat-input button {
            padding: 12px 28px;
            background: var(--primary);
            color: #fff;
            border: none;
            border-radius: 40px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
            white-space: nowrap;
        }
        .chat-input button:hover {
            background: var(--primary-light);
            transform: scale(1.02);
        }
        /* 练习 */
        .exercise-item {
            border-radius: 12px;
            padding: 16px 20px;
            margin-bottom: 20px;
            border-left: 6px solid var(--accent);
            background: #fafbfc;
            transition: var(--transition);
        }
        .exercise-item .q-title {
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 6px;
            font-size: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .exercise-item .q-title .q-badge {
            font-size: 12px;
            background: var(--accent-light);
            color: var(--primary);
            padding: 0 12px;
            border-radius: 20px;
            font-weight: 500;
        }
        .exercise-item .q-text {
            font-size: 14px;
            color: var(--text);
            margin-bottom: 12px;
        }
        .exercise-item textarea {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            font-size: 14px;
            font-family: inherit;
            resize: vertical;
            min-height: 70px;
            transition: var(--transition);
            background: #fff;
        }
        .exercise-item textarea:focus {
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(44, 74, 122, 0.06);
            outline: none;
        }
        .exercise-item .feedback-box {
            margin-top: 12px;
            padding: 12px 16px;
            background: #eef6f3;
            border-radius: 10px;
            font-size: 14px;
            border-left: 3px solid var(--secondary);
            display: none;
        }
        .exercise-item .feedback-box .score {
            font-weight: 700;
            color: var(--primary);
        }
        /* 选择题选项（学生作答） */
        .q-options {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .q-option-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 14px;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            background: #fff;
            font-size: 14px;
            cursor: pointer;
            transition: var(--transition);
        }
        .q-option-item:hover {
            border-color: var(--accent-light);
            background: #fffdf5;
        }
        .q-option-item input[type="radio"] {
            margin-top: 3px;
            accent-color: var(--primary);
            cursor: pointer;
            flex-shrink: 0;
        }
        .q-option-item .opt-key {
            font-weight: 700;
            color: var(--primary);
            flex-shrink: 0;
        }
        .q-option-item .opt-text {
            color: var(--text);
        }
        .q-option-item:has(input:checked) {
            border-color: var(--primary-light);
            background: #eef3fb;
        }
        /* 选择题选项回顾（教师批改） */
        .grading-options {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin: 4px 0 10px;
        }
        .grading-options .go-item {
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 13px;
            background: #f8fafc;
            border: 1px solid #edf2f7;
            color: var(--text-light);
        }
        .grading-options .go-item.correct {
            border-color: #27ae60;
            background: #eafaf1;
            color: #1e8449;
            font-weight: 600;
        }
        .grading-options .go-item.selected:not(.correct) {
            border-color: #e74c3c;
            background: #fdedec;
            color: #c0392b;
            font-weight: 600;
        }
        .grading-options .go-item.selected::after {
            content: ' ← 学生选择';
            font-weight: 500;
        }
        .exercise-submit-all {
            margin: 16px 0 8px;
            padding: 10px 32px;
            background: var(--secondary);
            color: #fff;
            border: none;
            border-radius: 40px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
        }
        .exercise-submit-all:hover {
            background: #1e4a3a;
            transform: scale(1.02);
        }
        /* 报告 */
        .report-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            height: calc(100vh - 160px);
            min-height: 500px;
        }
        .report-card {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 24px 28px;
            display: flex;
            flex-direction: column;
        }
        .report-card .card-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-light);
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .report-card .card-title .badge {
            font-size: 12px;
            background: var(--accent-light);
            color: var(--primary);
            padding: 0 12px;
            border-radius: 20px;
            font-weight: 500;
        }
        .card-title-sub {
            font-size: 12px;
            font-weight: 400;
            color: var(--text-light);
        }
        /* ===== 教师端：任务范围选择条 ===== */
        .teacher-scope-bar {
            background: #fff;
            border-bottom: 1px solid #edf2f7;
            padding: 12px 32px;
            display: flex;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
        }
        .teacher-scope-bar .tsb-label {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-light);
            white-space: nowrap;
        }
        /* 查看范围现在只是一个"综合评价 / 具体任务"二选一开关；选中"具体任务"后，
           具体是哪一次任务——在"过程分析"页由左侧任务清单选（见 .process-sidebar-col），
           在"学生列表""群体诊断"页没有侧栏可放，就在开关右边补一个精简下拉（沿用下面的 select 样式）。 */
        .teacher-scope-bar .tsb-scope-switch {
            display: inline-flex;
            border: 1.5px solid var(--accent-light);
            border-radius: 20px;
            overflow: hidden;
            background: #fffdf7;
        }
        .teacher-scope-bar .tsb-scope-switch button {
            padding: 6px 16px;
            border: none;
            background: transparent;
            font-size: 13px;
            font-family: inherit;
            font-weight: 600;
            color: var(--text-light);
            cursor: pointer;
            transition: var(--transition);
        }
        .teacher-scope-bar .tsb-scope-switch button.active {
            background: var(--primary);
            color: #fff;
        }
        .teacher-scope-bar .tsb-scope-switch button:hover:not(.active) {
            background: var(--accent-light);
            color: var(--primary);
        }
        .teacher-scope-bar .tsb-scope-switch button:disabled {
            cursor: not-allowed;
            opacity: 0.5;
        }
        .teacher-scope-bar select {
            padding: 7px 16px;
            border-radius: 20px;
            border: 1.5px solid var(--accent-light);
            background: #fffdf7;
            font-size: 13px;
            font-family: inherit;
            color: var(--primary);
            font-weight: 600;
            cursor: pointer;
        }
        .teacher-scope-bar .tsb-hint {
            font-size: 12px;
            color: var(--text-light);
        }
        /* 「阅读策略类型不受此范围影响」的固定提示：常驻显示为一个醒目的小徽标，
           与上面会随选择变化的 tsb-hint 区分开，避免教师误以为所有"行为"相关内容都会跟着查看范围切换 */
        .teacher-scope-bar .tsb-hint-fixed {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 12px;
            border-radius: 20px;
            background: var(--accent-light);
            color: var(--primary);
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap;
        }
        /* ===== 通用筛选条 / 分段选项卡（学生端学期&完成状态、教师端任务分组等） ===== */
        .filter-bar {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px 16px;
            margin-bottom: 16px;
            padding: 12px 16px;
            background: #fff;
            border-radius: 14px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.04);
        }
        .filter-bar .fb-group {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .filter-bar .fb-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-light);
            white-space: nowrap;
            margin-right: 2px;
        }
        .filter-pill {
            padding: 6px 16px;
            border-radius: 20px;
            border: 1.5px solid #e2e8f0;
            background: #fff;
            color: var(--text-light);
            font-size: 12.5px;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
            transition: var(--transition);
            white-space: nowrap;
        }
        .filter-pill:hover {
            border-color: var(--accent-light);
            color: var(--primary);
        }
        .filter-pill.active {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }
        .filter-pill.active.accent {
            background: var(--accent);
            border-color: var(--accent);
            color: #fff;
        }
        .filter-divider {
            width: 1px;
            height: 20px;
            background: #e2e8f0;
        }
        .task-status-badge {
            display: inline-block;
            font-size: 10px;
            font-weight: 700;
            padding: 2px 10px;
            border-radius: 8px;
        }
        .task-status-badge.done {
            background: #d5f5e3;
            color: #1e8449;
        }
        .task-status-badge.todo {
            background: #fdebd0;
            color: #b9770e;
        }
        .chart-container {
            flex: 1;
            min-height: 240px;
            width: 100%;
        }
        .diagnosis-text {
            font-size: 14px;
            line-height: 1.8;
            color: var(--text);
            padding: 8px 0;
            flex: 1;
            overflow-y: auto;
        }
        .diagnosis-text strong {
            color: var(--primary);
        }
        .suggestion-list {
            list-style: none;
            padding: 0;
            margin: 8px 0;
        }
        .suggestion-list li {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 0;
            border-bottom: 1px solid #f0f2f6;
            font-size: 14px;
        }
        .suggestion-list li:last-child {
            border-bottom: none;
        }
        .suggestion-list .num {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--accent-light);
            color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 13px;
            flex-shrink: 0;
            margin-top: 1px;
        }
        /* 教师端 任务管理 */
        .task-list {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-bottom: 30px;
        }
        .task-item {
            background: var(--card);
            border-radius: var(--radius);
            padding: 16px 20px;
            box-shadow: var(--shadow);
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-left: 6px solid var(--accent);
            flex-wrap: wrap;
            gap: 12px;
        }
        .task-item .info {
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1;
        }
        .task-item .info .name {
            font-weight: 600;
            font-size: 16px;
        }
        .task-item .info .detail {
            font-size: 13px;
            color: var(--text-light);
        }
        .task-item .info .tools-badge {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 4px;
        }
        .task-item .info .tools-badge span {
            font-size: 11px;
            background: var(--bg);
            padding: 1px 10px;
            border-radius: 12px;
            color: var(--text-light);
        }
        .task-item .actions button {
            padding: 6px 18px;
            border-radius: 30px;
            border: none;
            background: var(--primary);
            color: #fff;
            font-size: 13px;
            cursor: pointer;
            font-family: inherit;
            transition: var(--transition);
            margin-left: 8px;
        }
        .task-item .actions button:hover {
            background: var(--primary-light);
        }
        .task-item .actions button.danger {
            background: #c0392b;
        }
        .task-item .actions button.danger:hover {
            background: #a93226;
        }
        /* 教师端任务管理：按学期分组展示（替代此前"综合"之外无任何组织的平铺列表） */
        .task-stage-group {
            margin-bottom: 18px;
        }
        .task-stage-heading {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            font-weight: 700;
            color: var(--primary-light);
            margin: 4px 0 10px;
            padding-left: 2px;
        }
        .task-stage-heading .tsh-count {
            background: var(--bg);
            color: var(--text-light);
            border-radius: 10px;
            padding: 1px 9px;
            font-size: 11px;
            font-weight: 600;
        }
        .course-badge {
            display: inline-block;
            font-size: 10px;
            font-weight: 700;
            padding: 1px 9px;
            border-radius: 8px;
            margin-right: 8px;
            vertical-align: middle;
        }
        .course-badge.required {
            background: #dbe9ff;
            color: #1a4a8a;
        }
        .course-badge.elective {
            background: #efe0fb;
            color: #6a3d9a;
        }
        /* 文本类型标签（新增：文学类/实用类/论述类/信息类），颜色由 TEXT_TYPE_META 内联指定 */
        .text-type-badge {
            display: inline-block;
            font-size: 11px;
            font-weight: 700;
            padding: 2px 11px;
            border-radius: 20px;
            color: #fff;
            white-space: nowrap;
            vertical-align: middle;
        }
        /* 教学环节标签（新增：课前预习/课中任务/课后练习/阶段测试/自定义） */
        .phase-badge {
            display: inline-block;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 11px;
            border-radius: 20px;
            background: #eef2f7;
            color: var(--text-light);
            white-space: nowrap;
            border: 1px solid #e2e8f0;
            vertical-align: middle;
        }
        /* "综合阅读"类任务在同一 task.content 内以标签形式呈现多篇课文（新增） */
        .comprehensive-text-tabs {
            margin-bottom: 4px;
        }
        .ctt-tabbar {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin-bottom: 16px;
            border-bottom: 2px solid #edf2f7;
        }
        .ctt-tab-btn {
            padding: 8px 18px;
            border: none;
            background: transparent;
            color: var(--text-light);
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            margin-bottom: -2px;
            transition: var(--transition);
            border-radius: 8px 8px 0 0;
        }
        .ctt-tab-btn:hover {
            color: var(--primary);
            background: #f7f8fb;
        }
        .ctt-tab-btn.active {
            color: var(--primary);
            border-bottom-color: var(--accent);
        }
        .ctt-tab-panel {
            display: none;
        }
        .ctt-tab-panel.active {
            display: block;
        }
        .ctt-intro-box {
            margin-top: 22px;
            padding: 14px 18px;
            background: #f7f5ef;
            border-left: 4px solid var(--accent);
            border-radius: 8px;
            font-size: 14px;
            color: var(--text);
        }
        /* 高考真题类文本中，用于标注题干引用位置的【甲】【乙】等标记（新增） */
        .marked-ref {
            color: var(--accent);
            font-weight: 700;
        }
        /* 教师端"综合评价·统计设置"入口按钮 */
        .teacher-scope-bar .tsb-config-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 6px 16px;
            border-radius: 20px;
            border: 1.5px solid var(--primary-light);
            background: #fff;
            color: var(--primary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
            transition: var(--transition);
        }
        .teacher-scope-bar .tsb-config-btn:hover {
            background: var(--primary);
            color: #fff;
        }
        /* 综合评价统计设置弹窗内部布局 */
        .eval-config-tasklist {
            max-height: 260px;
            overflow-y: auto;
            border: 1px solid #edf2f7;
            border-radius: 12px;
            padding: 10px 16px;
            background: #fff;
        }
        .eval-config-task-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 7px 2px;
            border-bottom: 1px dashed #edf2f7;
            font-size: 13px;
            cursor: pointer;
        }
        .eval-config-task-row:last-child {
            border-bottom: none;
        }
        .eval-config-task-row input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: var(--primary);
            cursor: pointer;
            flex-shrink: 0;
        }
        .eval-config-task-row .etr-name {
            flex: 1;
            font-weight: 500;
            color: var(--text);
        }
        .eval-weight-head, .eval-weight-row {
            display: grid;
            grid-template-columns: 116px repeat(5, 1fr);
            gap: 8px;
            align-items: center;
        }
        .eval-weight-head {
            font-size: 11px;
            color: var(--text-light);
            margin-bottom: 6px;
            text-align: center;
        }
        .eval-weight-row {
            margin-bottom: 10px;
        }
        .eval-weight-row .ewr-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--primary);
        }
        .eval-weight-row input {
            width: 100%;
            padding: 6px 4px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 13px;
            text-align: center;
            font-family: inherit;
        }
        /* 题目"核心素养权重"输入行（新增：四项能力可分别设百分比，求和须为100） */
        .q-ability-weight-row {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }
        .q-ability-weight-row .aw-item {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }
        .q-ability-weight-row .aw-item label {
            font-size: 12px;
            font-weight: 500;
            color: var(--text-light);
        }
        .q-ability-weight-row .aw-item .aw-input-wrap {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .q-ability-weight-row .aw-item input {
            width: 100%;
            padding: 8px 10px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 13px;
            background: #fff;
            font-family: inherit;
        }
        /* 模态框 - 优化样式 */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(6px);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .modal-overlay .modal-box {
            background: #fff;
            border-radius: 28px;
            max-width: 820px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            padding: 36px 40px;
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
            position: relative;
            animation: modalFadeIn 0.25s ease-out;
        }
        @keyframes modalFadeIn {
            from {
                opacity: 0;
                transform: scale(0.96) translateY(12px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }
        .modal-overlay .modal-box .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            border-bottom: 1px solid #edf2f7;
            padding-bottom: 16px;
        }
        .modal-overlay .modal-box .modal-header h2 {
            font-size: 24px;
            font-weight: 700;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .modal-overlay .modal-box .modal-header h2::before {
            content: '✏️';
        }
        .modal-overlay .modal-box .modal-close {
            background: transparent;
            border: none;
            font-size: 30px;
            cursor: pointer;
            color: var(--text-light);
            padding: 0 8px;
            transition: var(--transition);
            line-height: 1;
        }
        .modal-overlay .modal-box .modal-close:hover {
            color: #c0392b;
            transform: rotate(90deg);
        }
        .modal-overlay .modal-box .form-row {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }
        .modal-overlay .modal-box .form-group {
            flex: 1;
            min-width: 200px;
        }
        .modal-overlay .modal-box .form-group label {
            display: block;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-light);
            margin-bottom: 4px;
        }
        .modal-overlay .modal-box .form-group input,
        .modal-overlay .modal-box .form-group select,
        .modal-overlay .modal-box .form-group textarea {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            font-size: 14px;
            font-family: inherit;
            background: #fafbfc;
            transition: var(--transition);
        }
        .modal-overlay .modal-box .form-group textarea {
            resize: vertical;
            min-height: 100px;
        }
        .modal-overlay .modal-box .form-group input:focus,
        .modal-overlay .modal-box .form-group select:focus,
        .modal-overlay .modal-box .form-group textarea:focus {
            border-color: var(--primary-light);
            outline: none;
            background: #fff;
            box-shadow: 0 0 0 3px rgba(44, 74, 122, 0.06);
        }
        .modal-overlay .modal-box .tools-section {
            background: #f8fafc;
            border-radius: 14px;
            padding: 18px 20px;
            margin: 16px 0;
            border: 1px solid #edf2f7;
        }
        .modal-overlay .modal-box .tools-section .tools-title {
            font-weight: 600;
            font-size: 15px;
            color: var(--text);
            margin-bottom: 10px;
        }
        .modal-overlay .modal-box .tools-section .checkbox-group {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        .modal-overlay .modal-box .tools-section .checkbox-group label {
            position: relative;
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 500;
            font-size: 13.5px;
            color: var(--text-light);
            cursor: pointer;
            padding: 8px 16px 8px 14px;
            border-radius: 20px;
            border: 1.5px solid #e2e8f0;
            background: #fff;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
            user-select: none;
        }
        .modal-overlay .modal-box .tools-section .checkbox-group label:hover {
            border-color: var(--primary);
        }
        .modal-overlay .modal-box .tools-section .checkbox-group label:has(input:checked) {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }
        .modal-overlay .modal-box .tools-section .checkbox-group input[type="checkbox"] {
            /* 原生复选框本身不显示——用整个胶囊标签的背景色变化来表示选中
               状态，比"文字+一个小方框"更清楚也更好点（触控区域也更大）。 */
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
        }
        .modal-overlay .modal-box .question-group {
            background: #f8fafc;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 12px;
            border: 1px solid #edf2f7;
        }
        .modal-overlay .modal-box .question-group .q-row {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 8px;
        }
        .modal-overlay .modal-box .question-group .q-row>div {
            flex: 1;
            min-width: 120px;
        }
        .modal-overlay .modal-box .question-group .q-row label {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-light);
        }
        .modal-overlay .modal-box .question-group .q-row input,
        .modal-overlay .modal-box .question-group .q-row select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 13px;
            background: #fff;
        }
        .modal-overlay .modal-box .add-question-btn {
            padding: 6px 20px;
            border: 1px dashed var(--primary);
            background: transparent;
            border-radius: 30px;
            font-size: 13px;
            color: var(--primary);
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
        }
        .modal-overlay .modal-box .add-question-btn:hover {
            background: var(--bg);
            border-color: var(--primary-light);
        }
        .modal-overlay .modal-box .submit-btn {
            padding: 10px 36px;
            background: var(--secondary);
            color: #fff;
            border: none;
            border-radius: 40px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
            margin-top: 8px;
        }
        .modal-overlay .modal-box .submit-btn:hover {
            background: #1e4a3a;
            transform: scale(1.02);
        }
        /* 学生任务列表 */
        .student-task-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
            padding: 8px 0;
        }
        .student-task-card {
            background: var(--card);
            border-radius: var(--radius);
            padding: 20px 18px;
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: var(--transition);
            border: 2px solid transparent;
        }
        .student-task-card:hover {
            transform: translateY(-4px);
            border-color: var(--accent-light);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
        }
        .student-task-card .task-type {
            display: inline-block;
            background: var(--accent-light);
            color: var(--primary);
            font-size: 12px;
            padding: 2px 14px;
            border-radius: 20px;
            font-weight: 600;
        }
        .student-task-card .task-name {
            font-weight: 600;
            font-size: 17px;
            margin-top: 8px;
        }
        .student-task-card .task-desc {
            font-size: 13px;
            color: var(--text-light);
            margin-top: 4px;
        }
        /* 教师其他视图 */
        .student-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
            gap: 20px;
            padding: 8px 0;
        }
        .student-card {
            background: var(--card);
            border-radius: var(--radius);
            padding: 20px 18px 18px;
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: var(--transition);
            border: 2px solid transparent;
            text-align: center;
        }
        .student-card:hover {
            transform: translateY(-4px);
            border-color: var(--accent-light);
        }
        .student-card .s-avatar {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: var(--primary-light);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            font-weight: 600;
            margin: 0 auto 10px;
        }
        .student-card .s-name {
            font-weight: 600;
            font-size: 16px;
        }
        .student-card .s-class {
            font-size: 13px;
            color: var(--text-light);
        }
        .student-card .s-status {
            display: inline-block;
            font-size: 12px;
            padding: 2px 14px;
            border-radius: 20px;
            margin-top: 8px;
            background: #d5f5e3;
            color: var(--secondary);
        }
        .student-card .s-behavior-tag {
            font-size: 11px;
            font-weight: 600;
            margin-top: 6px;
        }
        .student-card .s-bars {
            margin-top: 10px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            text-align: left;
        }
        .student-card .s-bar-row {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .student-card .s-bar-label {
            font-size: 11px;
            color: var(--text-light);
            width: 14px;
            flex-shrink: 0;
        }
        .student-card .s-bar-track {
            flex: 1;
            height: 6px;
            background: #edf2f7;
            border-radius: 4px;
            overflow: hidden;
        }
        .student-card .s-bar-fill {
            display: block;
            height: 100%;
            border-radius: 4px;
        }
        .student-card .s-bar-val {
            font-size: 10px;
            color: var(--text-light);
            width: 20px;
            text-align: right;
            flex-shrink: 0;
        }
        .group-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            height: calc(100vh - 160px);
            min-height: 500px;
        }
        .group-card {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 24px 28px;
            display: flex;
            flex-direction: column;
        }
        .group-card .card-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-light);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .insight-box {
            background: #f8fafc;
            border-radius: 12px;
            padding: 16px 20px;
            margin-top: 12px;
            border-left: 4px solid var(--accent);
            font-size: 14px;
            line-height: 1.8;
        }
        .insight-box strong {
            color: var(--primary);
        }
        /* 重点关注名单 */
        .watch-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .watch-item {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 12px 16px;
            background: #f8fafc;
            border-radius: 10px;
            cursor: pointer;
            transition: var(--transition);
            flex-wrap: wrap;
            border-left: 4px solid #e67e22;
        }
        .watch-item:hover {
            background: #fdebd0;
            transform: translateX(2px);
        }
        .watch-item .watch-name {
            font-weight: 600;
            color: var(--primary);
            min-width: 60px;
        }
        .watch-item .watch-avg {
            font-size: 13px;
            color: var(--text-light);
        }
        .watch-item .watch-weak {
            font-size: 13px;
            color: #e67e22;
            font-weight: 500;
        }
        .watch-item .watch-arrow {
            margin-left: auto;
            font-size: 12px;
            color: var(--text-light);
        }
        /* 过程分析 - 新tab样式（左侧栏改成可收起，跟"讨论互动"页用同一套思路：
           从 grid 改成 flex，两栏靠 flex 而不是 grid-template-columns 分配宽度，
           这样才能给左侧栏加一个平滑的收起/展开过渡） */
        .process-layout {
            display: flex;
            gap: 24px;
            height: calc(100vh - 160px);
            min-height: 500px;
        }
        .process-sidebar {
            flex: 0 0 260px;
            width: 260px;
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 20px 16px;
            overflow-y: auto;
            overflow-x: hidden;
            opacity: 1;
            transition: flex-basis 0.22s ease, width 0.22s ease, padding 0.22s ease, opacity 0.18s ease;
        }
        .process-layout.sidebar-collapsed .process-sidebar {
            flex-basis: 0;
            width: 0;
            padding-left: 0;
            padding-right: 0;
            opacity: 0;
            pointer-events: none;
            box-shadow: none;
        }
        .process-sidebar-toggle {
            flex-shrink: 0;
            align-self: flex-start;
            margin-top: 20px;
            width: 22px;
            height: 46px;
            border-radius: 8px;
            background: var(--card);
            box-shadow: var(--shadow);
            border: 1px solid #edf2f7;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text-light);
            font-size: 15px;
            font-family: inherit;
            padding: 0;
            transition: var(--transition);
        }
        .process-sidebar-toggle:hover {
            background: #f1f4f9;
            color: var(--primary);
            border-color: #dfe6ee;
        }
        .pv-mode-switch {
            display: flex;
            gap: 6px;
            margin-bottom: 16px;
        }
        .pv-mode-switch button {
            flex: 1;
            padding: 8px 6px;
            font-size: 12.5px;
            font-family: inherit;
            font-weight: 500;
            border: 1px solid #e2e8f0;
            background: #fff;
            color: var(--text-light);
            border-radius: 10px;
            cursor: pointer;
            transition: var(--transition);
        }
        .pv-mode-switch button.active {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }
        .pv-mode-switch button:hover:not(.active) {
            background: var(--bg);
        }
        .process-sidebar .p-title {
            font-weight: 600;
            font-size: 15px;
            color: var(--text-light);
            margin-bottom: 14px;
            padding-bottom: 10px;
            border-bottom: 1px solid #edf2f7;
        }
        .process-sidebar .p-student {
            padding: 10px 14px;
            border-radius: 12px;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 14px;
            margin-bottom: 2px;
        }
        .process-sidebar .p-student:hover {
            background: var(--bg);
        }
        .process-sidebar .p-student.active {
            background: #eef2f9;
            color: var(--primary);
            font-weight: 500;
        }
        .process-sidebar .p-student .dot-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent);
            flex-shrink: 0;
        }
        /* "按学生查看"需要同时选学生、选任务时，侧栏改成左右两栏（学生姓名 | 任务清单），
           而不是像之前那样把任务清单堆在学生列表下面、要多滚一层才看到。
           两栏并排比默认 260px 更挤，所以侧栏本身在这种情况下会加宽（见 .process-sidebar.two-col）。 */
        .process-sidebar-cols {
            display: flex;
            gap: 10px;
        }
        .process-sidebar-col {
            flex: 1;
            min-width: 0;
        }
        .process-sidebar-col .p-title {
            font-size: 13px;
            margin-bottom: 10px;
            padding-bottom: 8px;
        }
        .process-sidebar-col .p-student {
            padding: 8px 10px;
            font-size: 13px;
            gap: 8px;
        }
        .process-sidebar.two-col {
            flex-basis: 380px;
            width: 380px;
        }
        .process-main {
            flex: 1;
            min-width: 0;
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 20px 24px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        .process-main .pm-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            margin-bottom: 12px;
            gap: 8px;
        }
        .process-main .pm-title {
            font-weight: 600;
            font-size: 17px;
            color: var(--text);
        }
        .process-main .pm-sub {
            font-size: 14px;
            color: var(--text-light);
            margin-bottom: 16px;
        }
        .process-tabs {
            display: flex;
            gap: 4px;
            border-bottom: 1px solid #edf2f7;
            margin-bottom: 16px;
            flex-wrap: wrap;
        }
        .process-tabs button {
            padding: 8px 20px;
            background: transparent;
            border: none;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-light);
            cursor: pointer;
            transition: var(--transition);
            border-bottom: 3px solid transparent;
            font-family: inherit;
        }
        .process-tabs button.active {
            color: var(--primary);
            border-bottom-color: var(--accent);
            background: #fafbfc;
            border-radius: 8px 8px 0 0;
        }
        .process-tab-content {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            display: none;
            flex-direction: column;
        }
        .process-tab-content.active {
            display: flex;
        }
        /* 行为分析卡片 */
        .behavior-type-card {
            background: #f8fafc;
            border-radius: 12px;
            padding: 16px 20px;
            margin-bottom: 16px;
            border-left: 6px solid var(--primary);
        }
        .behavior-type-card .b-title {
            font-weight: 700;
            font-size: 18px;
            color: var(--primary);
        }
        .behavior-type-card .b-desc {
            font-size: 14px;
            color: var(--text-light);
            margin: 4px 0 8px;
        }
        .behavior-type-card .b-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .behavior-type-card .b-tags span {
            font-size: 12px;
            background: var(--bg);
            padding: 2px 12px;
            border-radius: 12px;
            color: var(--text-light);
        }
        .behavior-type-card .b-suggestion {
            margin-top: 10px;
            padding: 10px 14px;
            background: #eef6f3;
            border-radius: 8px;
            font-size: 14px;
            border-left: 3px solid var(--secondary);
        }
        .behavior-stat {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 10px;
            margin: 12px 0;
        }
        .behavior-stat .stat-item {
            background: var(--card);
            border-radius: 10px;
            padding: 12px 14px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            text-align: center;
            border: 1px solid #edf2f7;
        }
        .behavior-stat .stat-item .num {
            font-size: 24px;
            font-weight: 700;
            color: var(--primary);
        }
        .behavior-stat .stat-item .label {
            font-size: 12px;
            color: var(--text-light);
        }
        /* 行为分析 · 判断依据 */
        .behavior-evidence {
            background: #fbf8f0;
            border: 1px solid var(--accent-light);
            border-radius: 10px;
            padding: 10px 16px;
            font-size: 13px;
            line-height: 1.9;
            color: var(--text);
        }
        /* 行为分析 · 雷达图 + 行为组合分布 两栏 */
        .behavior-charts-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin: 14px 0;
        }
        .behavior-chart-card {
            background: #f8fafc;
            border: 1px solid #edf2f7;
            border-radius: 12px;
            padding: 14px 16px;
            display: flex;
            flex-direction: column;
        }
        .behavior-chart-card .bc-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .behavior-chart-card .bc-sub {
            font-size: 11px;
            font-weight: 400;
            color: var(--text-light);
        }
        .behavior-comp-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
            justify-content: center;
            flex: 1;
        }
        .behavior-comp-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .behavior-comp-row .bc-label {
            font-size: 12px;
            color: var(--text-light);
            width: 74px;
            flex-shrink: 0;
        }
        .behavior-comp-row .bc-track {
            flex: 1;
            height: 8px;
            background: #edf2f7;
            border-radius: 4px;
            overflow: hidden;
        }
        .behavior-comp-row .bc-fill {
            display: block;
            height: 100%;
            border-radius: 4px;
            min-width: 2px;
            transition: var(--transition);
        }
        .behavior-comp-row .bc-val {
            font-size: 12px;
            font-weight: 600;
            color: var(--text);
            width: 20px;
            text-align: right;
            flex-shrink: 0;
        }
        /* 行为分析 · 时间轴 */
        .behavior-timeline {
            max-height: 260px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding-right: 4px;
        }
        .behavior-timeline .bt-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 7px 12px;
            background: #f8fafc;
            border-left: 3px solid #ccc;
            border-radius: 6px;
            font-size: 13px;
            flex-wrap: wrap;
        }
        .behavior-timeline .bt-time {
            font-size: 11px;
            color: var(--text-light);
            font-variant-numeric: tabular-nums;
            flex-shrink: 0;
        }
        .behavior-timeline .bt-desc {
            color: var(--text);
            flex: 1;
            min-width: 120px;
        }
        .behavior-timeline .bt-task {
            font-size: 11px;
            color: var(--text-light);
            background: var(--bg);
            padding: 1px 8px;
            border-radius: 10px;
            flex-shrink: 0;
        }
        /* 行为分析 · 时间轴可视化条（序列色带） */
        .behavior-timeline-viz {
            margin-bottom: 14px;
            padding: 12px 14px;
            background: #f8fafc;
            border-radius: 10px;
        }
        .btv-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 12px;
            color: var(--text-light);
            margin-bottom: 8px;
        }
        .btv-header .btv-duration {
            font-weight: 600;
            color: var(--primary);
        }
        .btv-track {
            position: relative;
            height: 30px;
            background: #eef1f6;
            border-radius: 6px;
            overflow: visible;
        }
        .btv-track .btv-dot {
            position: absolute;
            top: 3px;
            width: 6px;
            height: 24px;
            border-radius: 3px;
            transform: translateX(-50%);
            cursor: pointer;
            box-shadow: 0 0 0 1px rgba(255,255,255,0.6);
            transition: var(--transition);
        }
        .btv-track .btv-dot:hover {
            transform: translateX(-50%) scaleY(1.15);
            box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
        }
        .btv-axis {
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            color: var(--text-light);
            margin-top: 4px;
            font-variant-numeric: tabular-nums;
        }
        .btv-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 4px 12px;
            margin-top: 10px;
        }
        .btv-legend .btv-legend-item {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 11px;
            color: var(--text-light);
        }
        .btv-legend .btv-legend-swatch {
            width: 9px;
            height: 9px;
            border-radius: 2px;
            flex-shrink: 0;
        }
        /* 群体诊断 · 班级行为类型分布 */
        .behavior-dist-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 14px;
            margin-bottom: 12px;
        }
        .behavior-dist-card {
            background: #f8fafc;
            border-radius: 12px;
            border-top: 4px solid #ccc;
            padding: 14px 16px;
        }
        .behavior-dist-card .bd-count {
            font-size: 28px;
            font-weight: 700;
            line-height: 1.1;
        }
        .behavior-dist-card .bd-type {
            font-size: 14px;
            font-weight: 600;
            color: var(--text);
            margin: 4px 0 8px;
        }
        .behavior-dist-card .bd-names {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .behavior-dist-card .bd-chip {
            font-size: 12px;
            background: #fff;
            border: 1px solid #e2e8f0;
            padding: 2px 10px;
            border-radius: 12px;
            color: var(--text-light);
            cursor: pointer;
            transition: var(--transition);
        }
        .behavior-dist-card .bd-chip:hover {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }
        /* 批改答案表单 */
        .grading-card {
            background: #f8fafc;
            border-radius: 12px;
            padding: 14px 18px;
            margin-bottom: 14px;
            border-left: 4px solid #95a5a6;
        }
        .grading-card-head {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 6px;
        }
        .grading-stem {
            font-size: 13px;
            color: var(--text-light);
            margin: 4px 0 8px;
        }
        .grading-answer {
            font-size: 14px;
            background: #fff;
            padding: 10px 14px;
            border-radius: 8px;
            border: 1px solid #edf2f7;
        }
        .grading-form {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px dashed #e2e8f0;
        }
        .grading-form .gf-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
            flex-wrap: wrap;
        }
        .grading-form .gf-row-comment {
            align-items: flex-start;
        }
        .grading-form .gf-row label {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-light);
            min-width: 32px;
        }
        .grading-form input[type="number"] {
            width: 70px;
            padding: 6px 10px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            font-weight: 700;
            color: var(--primary);
        }
        .grading-form .gf-hint {
            font-size: 12px;
            color: var(--text-light);
        }
        .grading-form textarea {
            flex: 1;
            min-width: 200px;
            padding: 8px 12px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 13px;
            font-family: inherit;
            resize: vertical;
            min-height: 56px;
        }
        .grading-form input[type="number"]:focus,
        .grading-form textarea:focus {
            border-color: var(--primary-light);
            outline: none;
            box-shadow: 0 0 0 3px rgba(44, 74, 122, 0.06);
        }
        .gf-actions {
            display: flex;
            gap: 8px;
            margin-top: 8px;
            flex-wrap: wrap;
        }
        .gf-actions button {
            padding: 6px 18px;
            border-radius: 20px;
            border: none;
            font-size: 13px;
            cursor: pointer;
            font-family: inherit;
            transition: var(--transition);
        }
        .gf-ai-btn {
            background: #eef2f9;
            color: var(--primary);
        }
        .gf-ai-btn:hover {
            background: #e0e7f3;
        }
        .gf-save-btn {
            background: var(--secondary);
            color: #fff;
        }
        .gf-save-btn:hover {
            background: #1e4a3a;
        }
        /* 标记筛选 */
        .mark-filter-group {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 16px;
        }
        .mark-filter-group button {
            padding: 4px 16px;
            border-radius: 20px;
            border: 1px solid #e2e8f0;
            background: #fff;
            font-size: 13px;
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
        }
        .mark-filter-group button.active {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
        }
        .mark-filter-group button:hover:not(.active) {
            background: var(--bg);
        }
        .mark-filter-group .mf-count {
            display: inline-block;
            margin-left: 4px;
            font-size: 11px;
            opacity: 0.75;
        }
        .mark-card {
            background: #fff;
            border: 1px solid #edf2f7;
            border-left-width: 4px;
            border-left-style: solid;
            border-radius: 10px;
            padding: 12px 16px;
            margin-bottom: 10px;
        }
        .mark-card-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 8px;
        }
        .mark-card .mark-tag {
            font-size: 12px;
            padding: 2px 12px;
            border-radius: 12px;
            font-weight: 600;
        }
        .mark-card .mark-source {
            font-size: 12px;
            color: var(--text-light);
            white-space: nowrap;
        }
        .mark-quote {
            font-size: 14px;
            line-height: 1.7;
            color: var(--text);
            font-style: italic;
            padding: 8px 12px;
            background: #f8fafc;
            border-radius: 8px;
        }
        .mark-quote mark {
            font-style: normal;
            font-weight: 700;
            padding: 1px 3px;
            border-radius: 3px;
            color: var(--text);
        }
        .mark-quote .mq-context {
            color: var(--text-light);
            font-style: normal;
        }
        .mark-loc {
            font-size: 12px;
            color: var(--text-light);
            margin-top: 6px;
        }
        .mark-extra {
            font-size: 13px;
            color: var(--text);
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px dashed #edf2f7;
        }
        /* 比例调整滑块 */
        .size-control {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 4px 0;
            font-size: 12px;
            color: var(--text-light);
        }
        .size-control input[type="range"] {
            width: 100px;
            accent-color: var(--primary);
            cursor: pointer;
        }
        .size-control .val {
            min-width: 30px;
            text-align: center;
            font-weight: 600;
            color: var(--primary);
        }
        .empty-state {
            color: var(--text-light);
            font-size: 14px;
            text-align: center;
            padding: 40px 0;
        }
        /* 过程分析 · 全班整体查看（新增） */
        .cav-section-title {
            font-weight: 600;
            font-size: 14.5px;
            color: var(--text);
            margin: 22px 0 12px;
            padding-top: 4px;
            border-top: 1px solid #edf2f7;
        }
        .cav-section-title:first-child {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
        }
        .cav-question-coverage {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .cav-qc-item {
            background: #f8fafc;
            border-radius: 10px;
            padding: 10px 14px;
            font-size: 13px;
        }
        .cav-qc-head {
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 4px;
        }
        .cav-qc-body {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text);
            flex-wrap: wrap;
        }
        .cav-qc-bar-wrap {
            flex: 1;
            min-width: 80px;
            max-width: 200px;
            height: 8px;
            background: #e8edf3;
            border-radius: 4px;
            overflow: hidden;
            display: inline-block;
        }
        .cav-qc-bar {
            display: block;
            height: 100%;
            border-radius: 4px;
            transition: var(--transition);
        }
        .cav-article {
            background: #fafbfc;
            border-radius: 12px;
            padding: 18px 22px;
            border: 1px solid #edf2f7;
        }
        .cav-sent {
            transition: var(--transition);
            border-radius: 3px;
            padding: 1px 0;
        }
        .cav-sent-hot {
            cursor: pointer;
        }
        .cav-sent-hot:hover {
            outline: 2px solid var(--accent);
            outline-offset: 1px;
        }
        .cav-sent-key {
            /* 星标句底部改用⭐ + 加粗呈现，不再用box-shadow画下划线——
               这条位置现在留给下方"热度关注度色条"（由JS按人数动态内联设置），
               两者叠加在一起容易互相盖掉，分开后各自都清晰可辨 */
            font-weight: 700;
        }
        /* 星标旁的题号小标：解决"看得出是关键句，但看不出对应第几题"的问题——
           跟在⭐后面的小号数字标签，字号只比正文略小，不额外抢视觉 */
        .cav-star-tag {
            white-space: nowrap;
        }
        .cav-star-qnum {
            font-size: 10.5px;
            font-weight: 700;
            color: var(--accent-light);
            background: var(--primary);
            border-radius: 4px;
            padding: 0 3px;
            margin-left: 1px;
        }
        /* 人数徽标：原先用 var(--primary) 深蓝底 + sup 标签，在暖色热度背景上显得突兀，
           且 sup 自带的上标偏移与我们手动设置的偏移叠加，导致徽标"悬"得很高很明显。
           改为 span 标签 + 手动小幅上移（不再叠加两层"上标"），配色也换成与热度色系更呼应的
           金色（--accent），体积更小、更贴合句子本身，只在需要时提示人数，不抢正文视觉。 */
        .cav-heat-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 14px;
            height: 14px;
            padding: 0 3px;
            margin-left: 3px;
            border-radius: 7px;
            background: var(--accent);
            color: var(--primary);
            font-size: 9.5px;
            font-weight: 800;
            position: relative;
            top: -3px;
            line-height: 14px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.12);
        }
        /* 全班关注度 Top 排行——用条形图把最受关注的几句话单独列出来，
           作为热力图颜色深浅之外的另一种呈现方式，一眼就能看出排名，无需逐句辨色 */
        .cav-top-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .cav-top-item {
            background: #f8fafc;
            border: 1px solid #edf2f7;
            border-radius: 10px;
            padding: 10px 14px;
            cursor: pointer;
            transition: var(--transition);
        }
        .cav-top-item:hover {
            border-color: var(--accent);
            background: #fff8ef;
        }
        .cav-top-text {
            font-size: 13.5px;
            color: var(--text);
            line-height: 1.6;
            margin-bottom: 6px;
            font-family: "STSong", "SimSun", "宋体", serif;
        }
        .cav-top-bar-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .cav-top-bar-wrap {
            flex: 1;
            height: 8px;
            background: #e8edf3;
            border-radius: 4px;
            overflow: hidden;
        }
        .cav-top-bar {
            display: block;
            height: 100%;
            border-radius: 4px;
            background: linear-gradient(90deg, #f2b04a, #c85a0a);
        }
        .cav-top-count {
            font-size: 12px;
            color: var(--text-light);
            white-space: nowrap;
            font-weight: 600;
        }
        .cav-detail-panel {
            margin-top: 12px;
            background: #fff;
            border: 1px solid #e2e8f0;
            border-left: 4px solid var(--accent);
            border-radius: 10px;
            padding: 14px 18px;
        }
        .cav-detail-quote {
            font-size: 14px;
            color: var(--text);
            font-style: normal;
            font-family: "STSong", "SimSun", "宋体", serif;
            margin-bottom: 8px;
            line-height: 1.7;
        }
        .cav-detail-sub {
            font-size: 12.5px;
            color: var(--text-light);
            margin-bottom: 10px;
        }
        .cav-detail-students {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .cav-detail-stu-item {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            font-size: 13px;
            padding: 6px 0;
            border-bottom: 1px dashed #edf2f7;
        }
        .cav-detail-stu-item:last-child {
            border-bottom: none;
        }
        .cav-detail-stu-name {
            font-weight: 600;
            color: var(--text);
        }
        .cav-detail-stu-note {
            color: var(--text-light);
            font-size: 12.5px;
        }
        .cav-offtrack-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .cav-offtrack-item {
            display: flex;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
            background: #fff8f0;
            border: 1px solid #fce8cc;
            border-radius: 10px;
            padding: 10px 16px;
            cursor: pointer;
            transition: var(--transition);
            font-size: 13px;
        }
        .cav-offtrack-item:hover {
            background: #fef1de;
            border-color: var(--accent);
        }
        .cav-offtrack-name {
            font-weight: 700;
            color: var(--primary);
        }
        .cav-offtrack-desc {
            color: var(--text-light);
            flex: 1;
            min-width: 200px;
        }
        .cav-offtrack-arrow {
            color: var(--accent);
            font-weight: 600;
            white-space: nowrap;
        }
        /* 逐题关键句覆盖卡片扩展：题干 + 参考答案/评分要点 + AI学情速览 + 查看全部作答（新增）
           目的：教师不用再切到"批改答案"tab来回核对题目内容，这里直接把题目、参考答案、
           全班作答情况一次性铺开 */
        .cav-qc-item {
            background: #f8fafc;
            border-radius: 12px;
            padding: 14px 16px 16px;
            font-size: 13px;
        }
        .cav-qc-head-row {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 8px;
        }
        .cav-qc-head {
            font-weight: 700;
            color: var(--primary);
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 2px 9px;
            font-size: 12.5px;
        }
        .cav-qc-ability {
            color: var(--text-light);
            font-size: 12px;
        }
        .cav-qc-fullscore {
            margin-left: auto;
            color: var(--text-light);
            font-size: 12px;
            white-space: nowrap;
        }
        .cav-qc-stem {
            color: var(--text);
            font-size: 13.5px;
            line-height: 1.7;
            margin-bottom: 8px;
            font-family: "STSong", "SimSun", "宋体", serif;
        }
        .cav-qc-ref {
            background: #fff;
            border: 1px solid #edf2f7;
            border-radius: 8px;
            padding: 8px 12px;
            margin-bottom: 10px;
        }
        .cav-qc-ref-label {
            font-size: 11.5px;
            font-weight: 700;
            color: var(--text-light);
            margin-bottom: 4px;
        }
        .cav-qc-criteria-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .cav-qc-criteria-list li {
            font-size: 12.5px;
            color: var(--text);
            line-height: 1.6;
        }
        .cav-qc-criteria-score {
            display: inline-block;
            min-width: 32px;
            font-weight: 700;
            color: var(--accent);
            margin-right: 4px;
        }
        .cav-qc-options {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .cav-qc-opt {
            font-size: 12.5px;
            color: var(--text-light);
            padding: 2px 0;
        }
        .cav-qc-opt.correct {
            color: #27ae60;
            font-weight: 700;
        }
        .cav-qc-cover-row {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            color: var(--text);
            margin-bottom: 10px;
        }
        .cav-ai-summary {
            background: #fff8ef;
            border: 1px solid #f0dfb8;
            border-radius: 8px;
            padding: 10px 12px;
            margin-bottom: 10px;
        }
        .cav-ai-summary-title {
            font-size: 12px;
            font-weight: 700;
            color: #a8760a;
            margin-bottom: 4px;
        }
        .cav-ai-summary-body {
            font-size: 12.5px;
            color: var(--text);
            line-height: 1.7;
        }
        .cav-ai-deep-footer {
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px dashed #f0dfb8;
        }
        .cav-ai-deep-btn {
            border: 1px solid #d68910;
            background: #fff;
            color: #a8760a;
            border-radius: 14px;
            padding: 4px 12px;
            font-size: 11.5px;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
        }
        .cav-ai-deep-btn:hover {
            background: #fdf1d6;
        }
        .cav-ai-deep-loading {
            font-size: 11.5px;
            color: #a8760a;
        }
        .cav-ai-deep-error {
            font-size: 11.5px;
            color: #e74c3c;
            margin-right: 8px;
        }
        .cav-qc-viewall-btn {
            border: 1px solid var(--primary);
            background: #fff;
            color: var(--primary);
            font-size: 12.5px;
            font-weight: 600;
            padding: 6px 14px;
            border-radius: 20px;
            cursor: pointer;
            transition: var(--transition);
            font-family: inherit;
        }
        .cav-qc-viewall-btn:hover {
            background: var(--primary);
            color: #fff;
        }
        /* "查看全部作答"弹窗（新增）：复用全局 .modal-overlay/.modal-box，
           这里只覆盖标题图标（避免和"编辑"语义的✏️叠在一起）并补充列表样式 */
        #classAnswersModal .modal-header h2::before {
            content: none;
        }
        .caa-stem {
            font-size: 14px;
            color: var(--text);
            line-height: 1.7;
            background: #f8fafc;
            border-radius: 10px;
            padding: 10px 14px;
            margin-bottom: 16px;
            font-family: "STSong", "SimSun", "宋体", serif;
        }
        .caa-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-height: 55vh;
            overflow-y: auto;
        }
        .caa-row {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            padding: 10px 12px;
            background: #f8fafc;
            border-radius: 8px;
            font-size: 13px;
            cursor: pointer;
            border: 1px solid transparent;
            transition: var(--transition);
        }
        .caa-row:hover {
            background: #eef2f9;
            border-color: var(--accent-light);
        }
        .caa-hint {
            font-size: 12px;
            color: var(--text-light);
            margin-bottom: 10px;
        }
        .caa-row-empty {
            opacity: 0.65;
        }
        .caa-name {
            font-weight: 700;
            color: var(--primary);
            min-width: 56px;
        }
        .caa-answer {
            flex: 1;
            min-width: 160px;
            color: var(--text);
            line-height: 1.6;
        }
        .caa-score {
            white-space: nowrap;
            font-weight: 600;
            color: var(--text-light);
        }
        .caa-status {
            color: var(--text-light);
        }
        /* 响应式 */
        @media (max-width: 1024px) {
            .reading-layout {
                flex-direction: column;
                height: auto;
                min-height: auto;
            }
            .left-panel,
            .right-panel {
                min-height: 300px;
                flex: none !important;
                width: 100%;
            }
            .resize-handle {
                display: none;
            }
            .report-grid,
            .group-layout {
                grid-template-columns: 1fr;
                height: auto;
                min-height: auto;
            }
            .process-layout {
                flex-direction: column;
                height: auto;
                min-height: auto;
            }
            .behavior-charts-row {
                grid-template-columns: 1fr;
            }
            .app-body {
                padding: 16px;
            }
            .teacher-scope-bar {
                padding: 10px 16px;
            }
            .app-header {
                padding: 0 16px;
                flex-wrap: wrap;
                height: auto;
                padding-top: 12px;
                padding-bottom: 12px;
                gap: 8px;
            }
            .app-header .nav {
                flex-wrap: wrap;
                overflow: visible;
                gap: 2px;
            }
            .app-header .nav button {
                white-space: normal;
                padding: 6px 14px;
                font-size: 13px;
            }
            .login-grid {
                grid-template-columns: 1fr;
            }
            .login-container {
                padding: 32px 20px;
            }
            .process-sidebar,
            .process-sidebar.two-col {
                max-height: 200px;
                flex-basis: auto;
                width: 100%;
            }
            .process-sidebar-cols {
                flex-direction: column;
                gap: 0;
            }
            .process-sidebar-toggle {
                display: none; /* 移动端已经改成上下堆叠，收起栏的意义不大，直接常驻显示更省心 */
            }
            #floatingToolbar {
                transform: translateX(0);
                left: 50% !important;
                padding: 4px 8px;
                font-size: 11px;
                flex-wrap: wrap;
                max-width: 90vw;
            }
            #floatingToolbar button {
                font-size: 11px;
                padding: 3px 6px;
            }
            .modal-overlay .modal-box {
                padding: 24px 20px;
            }
        }
        @media (max-width: 480px) {
            .login-logo h1 {
                font-size: 24px;
            }
            .app-header .brand {
                font-size: 16px;
            }
            .app-header .user-info .logout-btn {
                padding: 4px 12px;
                font-size: 12px;
            }
            .chat-input input {
                padding: 10px 14px;
                font-size: 13px;
            }
            .chat-input button {
                padding: 10px 18px;
                font-size: 13px;
            }
            .task-form .form-row {
                flex-direction: column;
                gap: 12px;
            }
            .task-item {
                flex-direction: column;
                align-items: stretch;
            }
            .task-item .actions {
                display: flex;
                flex-wrap: wrap;
                gap: 6px;
            }
            .task-item .actions button {
                margin-left: 0;
                flex: 1;
            }
            .process-main {
                padding: 16px;
            }
            .right-tabs button {
                font-size: 12px;
                padding: 10px 6px;
            }
        }
        ::-webkit-scrollbar {
            width: 4px;
            height: 4px;
        }
        ::-webkit-scrollbar-track {
            background: transparent;
        }
        ::-webkit-scrollbar-thumb {
            background: #c4c9d4;
            border-radius: 8px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #a8b0be;
        }

        /* ================================================================
           平台管理面板 —— org-patch.js 用到的样式
           ----------------------------------------------------------------
           这个板块此前完全没有专属样式（纯浏览器默认外观）。这里沿用全局
           已经定下的配色变量（--primary 深靛蓝 / --accent 暖金 / --text-light
           灰蓝）与既有的 tab、pill、卡片圆角阴影约定（对照 .process-tabs、
           .filter-pill、.chat-input input 的写法），不引入新的调色板——
           让这个板块看起来和其余页面出自同一双手，而不是另外拼上去的。
           ================================================================ */

        /* ---- 页头 ---- */
        .org-page-head {
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid #edf2f7;
        }
        .org-page-head h2 {
            font-size: 20px;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 6px;
        }
        .org-page-head p {
            font-size: 13.5px;
            color: var(--text-light);
            line-height: 1.6;
        }

        /* ---- 顶部 Tab：沿用 .process-tabs 的下划线切换手法 ---- */
        .org-tabs {
            display: flex;
            gap: 4px;
            border-bottom: 1px solid #edf2f7;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        .org-tabs button {
            padding: 10px 16px;
            background: transparent;
            border: none;
            border-bottom: 3px solid transparent;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-light);
            cursor: pointer;
            font-family: inherit;
            transition: var(--transition);
            white-space: nowrap;
        }
        .org-tabs button:hover {
            color: var(--primary);
        }
        .org-tabs button.active {
            color: var(--primary);
            border-bottom-color: var(--accent);
            background: #fafbfc;
            border-radius: 8px 8px 0 0;
        }

        /* ---- 工具条：搜索框 + 操作按钮 + 计数 ---- */
        .org-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }
        .org-toolbar-left {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }
        .org-toolbar-left input[type="text"],
        .org-toolbar-left select {
            padding: 8px 14px;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            font-size: 13.5px;
            font-family: inherit;
            background: #fafbfc;
            color: var(--text);
            outline: none;
            transition: var(--transition);
            min-width: 200px;
        }
        .org-toolbar-left input[type="text"]:focus,
        .org-toolbar-left select:focus {
            border-color: var(--accent);
            background: #fff;
        }
        .ot-label {
            font-size: 13px;
            color: var(--text-light);
            font-weight: 600;
        }
        .ot-count {
            font-size: 13px;
            color: var(--text-light);
            white-space: nowrap;
        }

        /* ---- 按钮：org-mini 是紧凑的次要操作，org-btn 稍大一号，
           两者视觉分量接近——这个板块里"取消/关闭"和"查询/批量添加"
           用的是同一个 org-btn class，没有强调"这个更重要"的语义，
           所以刻意不做成醒目的强调色按钮，保持克制、中性。 ---- */
        .org-mini, .org-btn {
            border: 1.5px solid #e2e8f0;
            background: #fff;
            color: var(--text-light);
            font-family: inherit;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            white-space: nowrap;
        }
        .org-mini {
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 12.5px;
        }
        .org-btn {
            padding: 8px 18px;
            border-radius: 10px;
            font-size: 13.5px;
        }
        .org-mini:hover, .org-btn:hover {
            border-color: var(--accent-light);
            color: var(--primary);
        }
        .org-mini:disabled, .org-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .org-mini:disabled:hover, .org-btn:disabled:hover {
            border-color: #e2e8f0;
            color: var(--text-light);
        }

        /* ---- 翻页控件 ---- */
        .org-pager {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 16px;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid #edf2f7;
        }

        /* ---- 表格：这个应用此前没有任何表格，这里是第一次引入，
           风格上贴着卡片（圆角+阴影）走，表头用深靛蓝实色区分层级 ---- */
        .org-table-wrap {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            overflow: hidden;
            overflow-x: auto;
        }
        .org-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13.5px;
        }
        .org-table thead th {
            background: var(--primary);
            color: #fff;
            text-align: left;
            padding: 12px 16px;
            font-weight: 600;
            font-size: 12.5px;
            white-space: nowrap;
        }
        .org-table tbody td {
            padding: 11px 16px;
            border-bottom: 1px solid #f0f2f6;
            color: var(--text);
            vertical-align: top;
        }
        .org-table tbody tr:last-child td {
            border-bottom: none;
        }
        .org-table tbody tr:hover {
            background: #fafbfc;
        }
        .log-text {
            max-width: 420px;
            line-height: 1.6;
        }

        /* ---- 卡片：用于分组展示，比如"划线统计"的明细表格外层 ---- */
        .org-card {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 20px;
            margin-bottom: 16px;
        }
        .org-card-title {
            font-size: 15px;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 14px;
            display: flex;
            align-items: baseline;
            gap: 8px;
            flex-wrap: wrap;
        }
        .org-card-title span {
            font-size: 12.5px;
            font-weight: 500;
            color: var(--text-light);
        }
        .org-card-foot {
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px solid #edf2f7;
        }

        /* ---- 统计数字卡片（各班标注总量等） ---- */
        .stat-row {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }
        .stat-box {
            flex: 1;
            min-width: 140px;
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 18px 20px;
            text-align: center;
        }
        .sb-num {
            font-size: 28px;
            font-weight: 700;
            color: var(--primary);
            line-height: 1.2;
        }
        .sb-label {
            font-size: 12.5px;
            color: var(--text-light);
            margin-top: 6px;
            line-height: 1.5;
        }
        .sb-label em {
            font-style: normal;
            color: var(--accent);
            font-weight: 600;
        }

        /* ---- 空状态 / 提示条 ---- */
        .org-empty {
            color: var(--text-light);
            font-size: 14px;
            text-align: center;
            padding: 40px 0;
        }
        .org-note {
            font-size: 13px;
            color: var(--text-light);
            background: #f7f8fb;
            border-left: 3px solid var(--accent-light);
            padding: 12px 16px;
            border-radius: 0 10px 10px 0;
            line-height: 1.7;
            margin-bottom: 16px;
        }

        /* ---- 对话日志里的角色标签 ---- */
        .log-role {
            display: inline-block;
            padding: 2px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 600;
        }
        .log-role.user {
            background: var(--accent-light);
            color: #8a6d1f;
        }
        .log-role.ai {
            background: #e3e9f5;
            color: var(--primary);
        }
        .log-tag {
            display: inline-block;
            margin-left: 6px;
            padding: 1px 8px;
            border-radius: 10px;
            background: #f0f2f6;
            color: var(--text-light);
            font-size: 11px;
        }

        @media (max-width: 1024px) {
            .org-toolbar-left input[type="text"],
            .org-toolbar-left select {
                min-width: 160px;
            }
        }

        @media (max-width: 480px) {
            .org-page-head h2 { font-size: 18px; }
            .org-toolbar { flex-direction: column; align-items: stretch; }
            .org-toolbar-left { flex-direction: column; align-items: stretch; }
            .org-toolbar-left input[type="text"],
            .org-toolbar-left select { min-width: 0; width: 100%; }
            .stat-box { min-width: 100%; }
            .org-table { font-size: 12.5px; }
            .org-table thead th, .org-table tbody td { padding: 8px 10px; }
        }

/* ================================================================
   【2026-09 改版·三期】整体紧凑化（compact density）
   ----------------------------------------------------------------
   诉求：四周留白太大，一屏能看到的信息太少，尤其"过程分析"右侧内容多。
   做法：不去逐条改上面几千行里的原始规则（那样改一处漏一处、也不好回退），
   而是在文件最末尾统一写一组同名选择器的覆盖规则——CSS 后面的规则优先，
   所以这一段就是整站的"密度开关"：想恢复成原来的宽松版式，把这一整段
   注释掉即可，上面的原始样式一行都没动过。

   调整的是外框留白（页边距、卡片内边距、区块间距），正文字号一律没动，
   可读性不受影响。
   ================================================================ */

/* ---- 页面外框：左右和上下的页边距收紧，同时放宽最大宽度，让大屏能多铺内容 ---- */
.app-body {
    padding: 14px 20px 20px;
    max-width: 1760px;
}

/* ---- 各个整屏布局的高度：页边距少了 30px，这里同步跟上，避免底部留一条空白 ----
   【2026-09 修复】原来这里写的是一个写死的数字 calc(100vh - 130px)——这个
   130px 只是"header高度 + app-body上下padding"在某一个瞬间的估算值，从头到
   尾不会变。但 header-autohide.js 会把菜单栏收起来（此时 #app 的 padding-top
   从 header 实际高度收缩到只剩 6px，把腾出来的空间还给内容区），这里的 130px
   却完全不知道这件事——不管菜单栏是展开还是收起，永远只让出 130px 的空间，
   于是"菜单栏收起后，理应多出来的可视范围"根本没有被这几个布局用上，
   在下方留下一条和"header实际高度 - 130px"等宽的空白，这正是"缩上去，
   下面留白还是非常宽"的根因。
   现在改用 header-autohide.js 同一份 --yjzp-header-h 变量（它已经在实时
   维护"当前header实际占用高度，收起时会自动变成一个很小的值"），这几个
   布局的高度会跟着 header 的展开/收起状态一起联动，而不是用一个静态估算值
   假装 header 高度从不变化。上面一行 calc(100vh - 160px) 是 --yjzp-header-h
   变量不存在时（比如 header-autohide.js 未加载/加载顺序被调整）的静态兜底，
   CSS 逐行覆盖、不支持的浏览器会自动停在这一行，不依赖变量一定存在。 */
.reading-layout,
.report-grid,
.group-layout,
.process-layout {
    height: calc(100vh - 160px);
    height: calc(100vh - var(--yjzp-header-h, 68px) - 32px);
    gap: 14px;
}

/* ---- 阅读页 ---- */
.left-panel { padding: 16px 18px; }
.tab-content { padding: 14px 16px; }
.right-tabs button { padding: 10px 6px; }

/* ---- 报告 / 群体诊断卡片 ---- */
.report-card,
.group-card { padding: 16px 18px; }

/* ---- 过程分析：左侧栏更窄、主区内边距更小，把空间让给右边的正文与统计 ---- */
.process-sidebar {
    flex: 0 0 216px;
    width: 216px;
    padding: 12px 12px;
}
.process-sidebar.two-col {
    flex-basis: 330px;
    width: 330px;
}
.process-sidebar .p-title {
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 7px;
}
.process-sidebar .p-student {
    padding: 7px 10px;
    font-size: 13.5px;
    gap: 9px;
    border-radius: 9px;
}
.process-sidebar-col .p-student { padding: 6px 8px; font-size: 12.5px; }
.pv-mode-switch { margin-bottom: 10px; gap: 5px; }
.pv-mode-switch button { padding: 6px 4px; font-size: 12px; }
.process-main { padding: 12px 14px; }
.process-main .pm-header { margin-bottom: 8px; }
.process-main .pm-title { font-size: 15.5px; }
.process-tabs { margin-bottom: 10px; }
.process-tabs button { padding: 7px 14px; font-size: 13.5px; }

/* ---- 全班整体查看：各区块之间的距离收紧 ---- */
.cav-section-title { margin: 12px 0 7px; font-size: 14px; }
.cav-question-coverage { gap: 6px; }
.cav-qc-item { padding: 10px 12px 11px; border-radius: 10px; }
.cav-article { padding: 12px 14px; }
.cav-top-list { gap: 6px; }
.cav-top-item { padding: 7px 10px; }
.cav-top-text { margin-bottom: 4px; }
.cav-offtrack-list { gap: 6px; }
.cav-offtrack-item { padding: 7px 11px; gap: 10px; }
.cav-offtrack-desc { min-width: 140px; }
.empty-state { padding: 20px 0; }

/* ---- 窄屏（笔记本小屏 / 投影）时进一步收紧，优先保证内容区 ---- */
@media (max-width: 1400px) {
    .app-body { padding: 12px 14px 16px; }
    .process-sidebar { flex: 0 0 196px; width: 196px; }
    .process-sidebar.two-col { flex-basis: 300px; width: 300px; }
}


/* ████████████████████████████████████████████████████████████████
   ▼ 原 discussion.css（讨论区）
   ████████████████████████████████████████████████████████████████ */
/* ================================================================
   讨论区样式 (discussion.css)
   与主样式表共用 :root 变量（--primary / --accent / --text / --text-light 等）
   ================================================================ */

/* ---------- 通用面板 ---------- */
.disc-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.disc-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.disc-panel-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 15px;
}
.disc-panel-sub {
    font-size: 12px;
    color: var(--text-light);
}
.disc-hint {
    background: #fff8ec;
    border: 1px solid var(--accent-light);
    color: #8a6d2f;
    font-size: 12.5px;
    line-height: 1.6;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}

/* ---------- 发帖/发布主题 composer ---------- */
.disc-composer {
    margin-bottom: 14px;
}
.disc-new-btn {
    width: 100%;
    padding: 10px;
    background: #f1f4f9;
    border: 1px dashed #c7d0dc;
    border-radius: 12px;
    color: var(--primary);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.disc-new-btn:hover {
    background: #e8edf5;
}
.disc-composer-form {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #edf2f7;
}
.disc-composer-form.open {
    display: flex;
}
.disc-composer-form input[type="text"],
.disc-composer-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #dfe6ee;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13.5px;
    resize: vertical;
}
.disc-composer-form input[type="text"]:focus,
.disc-composer-form textarea:focus {
    outline: none;
    border-color: var(--accent-light);
}
.disc-submit-btn {
    align-self: flex-end;
    padding: 8px 22px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.disc-submit-btn:hover {
    background: var(--primary-light);
}

/* ---------- 帖子卡片 ---------- */
.disc-post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.disc-post {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 14px 16px;
}
.disc-post.teacher {
    border-color: var(--accent-light);
    background: linear-gradient(180deg, #fffdf7 0%, #ffffff 60%);
}
.disc-post.pinned {
    border-color: #e2b23c;
    box-shadow: 0 2px 10px rgba(201, 168, 76, 0.12);
}
.disc-post.closed {
    opacity: 0.72;
}
.disc-post-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.disc-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-light);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.disc-avatar.teacher {
    background: var(--secondary);
}
.disc-avatar.small {
    width: 24px;
    height: 24px;
    font-size: 11px;
}
.disc-post-headinfo {
    flex: 1;
    min-width: 0;
}
.disc-post-author {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.disc-post-time {
    font-size: 11.5px;
    color: var(--text-light);
    margin-top: 2px;
}
.disc-role-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 500;
    background: rgba(45, 90, 74, 0.12);
    color: var(--secondary);
    padding: 1px 8px;
    border-radius: 10px;
}
.disc-pin-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 500;
    background: rgba(201, 168, 76, 0.2);
    color: #a3781f;
    padding: 1px 8px;
    border-radius: 10px;
}
.disc-tag-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 500;
    background: #eef1f6;
    color: var(--text-light);
    padding: 1px 8px;
    border-radius: 10px;
}
.disc-tag-badge.star {
    background: rgba(201, 168, 76, 0.22);
    color: #a3781f;
}
.disc-post-title {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--text);
    margin: 8px 0 4px;
}
.disc-post-content {
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}
.disc-post-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.disc-like-btn,
.disc-reply-btn,
.disc-likelist-btn {
    background: #f1f4f9;
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.disc-like-btn:hover,
.disc-reply-btn:hover {
    background: #e8edf5;
    color: var(--text);
}
.disc-like-btn.liked {
    background: rgba(230, 126, 34, 0.14);
    color: #c0392b;
}
.disc-like-btn.small,
.disc-likelist-btn.small,
.disc-reply-btn.small {
    padding: 3px 9px;
    font-size: 11px;
}

/* ---------- 楼中楼：回复某一条具体回复 ---------- */
.disc-reply-to-tag {
    display: inline-block;
    color: var(--secondary);
    font-weight: 600;
    margin-right: 4px;
}
.disc-reply-target-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--secondary);
    background: rgba(45, 90, 74, 0.08);
    border-radius: 8px;
    padding: 6px 10px;
    margin-top: 10px;
}
.disc-reply-target-cancel {
    color: var(--text-light);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 400;
}
.disc-reply-target-cancel:hover {
    color: var(--text);
}
.disc-likelist-btn {
    background: transparent;
    text-decoration: underline;
    padding: 5px 4px;
}
.disc-reply-btn.danger {
    color: #c0392b;
}
.disc-reply-btn.danger:hover {
    background: rgba(231, 76, 60, 0.1);
}
.disc-closed-tag {
    font-size: 12px;
    color: var(--text-light);
}
.disc-likelist {
    font-size: 12px;
    color: var(--text-light);
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 10px;
    margin-top: 6px;
}

/* ---------- 回复 ---------- */
.disc-reply-list {
    margin-top: 10px;
    padding-left: 14px;
    border-left: 2px solid #edf2f7;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.disc-reply {
    display: flex;
    gap: 8px;
}
.disc-reply-body {
    flex: 1;
    min-width: 0;
}
.disc-reply-author {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.disc-reply-time {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
}
.disc-reply-content {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    margin-top: 2px;
    white-space: pre-wrap;
    word-break: break-word;
}
.disc-reply-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.disc-reply-box {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.disc-reply-box input,
.disc-reply-box textarea {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid #dfe6ee;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
}
.disc-reply-box input:focus,
.disc-reply-box textarea:focus {
    outline: none;
    border-color: var(--accent-light);
}
/* 【2026-09 新增】回复框改为可自适应增高的 <textarea>（原来是单行
   <input>，内容一长会被横向裁掉看不见）——配合 JS 的 autoGrowReplyBox
   按内容高度调整 style.height，这里只负责静态外观：单行时和原来的
   input 视觉高度一致（line-height+上下padding≈一行输入框的高度），
   圆角在单行时是"胶囊"形状、增高后由 border-radius 保持顶部/底部的
   圆角不突兀；resize:none 是因为高度已经由 JS 自动接管，不需要用户
   再拖拽把手，两者同时存在反而容易冲突；max-height 和 JS 里的
   REPLY_TEXTAREA_MAX_HEIGHT 保持一致（160px），超出后交给内部滚动条。 */
.disc-reply-box textarea {
    resize: none;
    line-height: 1.5;
    min-height: 34px;
    max-height: 160px;
    border-radius: 16px;
    overflow-y: auto;
}
.disc-reply-box button {
    padding: 8px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    align-self: flex-end;
}

/* ---------- 教师端：任务列表侧栏 mini badge ---------- */
.disc-mini-badge {
    background: var(--accent-light);
    color: #8a6d2f;
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
}
.disc-mini-badge.off {
    background: #eee;
    color: #999;
}

/* ---------- 教师端：题目统计 ---------- */
.disc-qstat-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.disc-qstat {
    font-size: 12px;
    color: var(--text-light);
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 3px 10px;
}
.disc-qstat-bar {
    height: 6px;
    background: #edf2f7;
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}
.disc-qstat-bar-fill {
    height: 100%;
    border-radius: 4px;
}
.disc-qstat-link {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    border: 1px solid #dfe6ee;
    background: #fff;
    border-radius: 8px;
    padding: 3px 10px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.disc-qstat-link:hover {
    background: #eef2f9;
    border-color: var(--accent-light);
}

/* ---------- 教师端：逐条评分标准的班级得分情况 ---------- */
.disc-criteria-block {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #edf2f7;
}
.disc-criteria-block-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
}
.disc-criteria-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(70px, 1fr) 72px;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}
.disc-criteria-row:last-child {
    margin-bottom: 0;
}
.disc-criteria-text {
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.5;
}
.disc-criteria-bar {
    height: 6px;
    background: #edf2f7;
    border-radius: 4px;
    overflow: hidden;
}
.disc-criteria-bar-fill {
    height: 100%;
    border-radius: 4px;
}
.disc-criteria-score {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

/* ---------- 教师端：工具条 / 筛选条 ---------- */
.disc-teacher-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}
.disc-teacher-filterbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #edf2f7;
}
.disc-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #dfe6ee;
    border-radius: 20px;
    padding: 8px 14px;
    margin-bottom: 10px;
    transition: var(--transition);
}
.disc-search-bar:focus-within {
    border-color: var(--accent-light);
    background: #fff;
}
.disc-search-icon {
    font-size: 13px;
    opacity: 0.6;
    flex-shrink: 0;
}
.disc-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    outline: none;
}
.disc-search-bar input::placeholder {
    color: var(--text-light);
}
.disc-search-clear {
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    padding: 0;
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}
.disc-search-clear:hover {
    background: #cbd5e0;
    color: var(--text);
}

/* ---------- 教师端：讨论区设置面板 ---------- */
.disc-settings-panel {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.disc-settings-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}
.disc-settings-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.disc-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.disc-radio {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
}

/* ---------- 教师端：AI 归纳面板 ---------- */
.disc-ai-summary {
    background: linear-gradient(180deg, #fbf9f3 0%, #ffffff 100%);
    border: 1px solid var(--accent-light);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.disc-ai-summary-head {
    font-weight: 700;
    color: var(--primary);
    font-size: 14.5px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.disc-ai-analyze-btn {
    padding: 7px 18px;
    border: none;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}
.disc-ai-analyze-btn:hover:not(:disabled) {
    background: var(--primary-light);
}
.disc-ai-analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.disc-ai-analyzed-at {
    font-size: 11.5px;
    color: var(--text-light);
    font-weight: 400;
}
.disc-ai-analyzing {
    text-align: center;
    padding: 32px 10px;
}
.disc-ai-analyzing-spinner {
    font-size: 32px;
    animation: discAiPulse 1.2s ease-in-out infinite;
}
@keyframes discAiPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}
.disc-ai-analyzing-text {
    margin-top: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary);
}
.disc-ai-analyzing-hint {
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--text-light);
}
.disc-ai-error-banner {
    background: #fdedec;
    border: 1px solid #f1a9a0;
    color: #c0392b;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.5px;
    margin-bottom: 12px;
}
.disc-ai-stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.disc-ai-stat {
    flex: 1;
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    text-align: center;
    padding: 10px 6px;
}
.disc-ai-stat .n {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
.disc-ai-stat .l {
    font-size: 11.5px;
    color: var(--text-light);
    margin-top: 2px;
}
.disc-ai-block {
    margin-bottom: 14px;
}
.disc-ai-block:last-child {
    margin-bottom: 0;
}
.disc-ai-block-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.disc-keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.disc-keyword {
    background: rgba(201, 168, 76, 0.16);
    color: #8a6d2f;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}
.disc-ai-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.6;
}
.disc-ai-list li {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: var(--transition);
}
.disc-ai-list li:hover {
    border-color: var(--accent-light);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.disc-low-reason {
    color: #c0392b;
    font-size: 11.5px;
}
.disc-quality-bar {
    display: flex;
    height: 10px;
    border-radius: 6px;
    overflow: hidden;
    background: #edf2f7;
}
.disc-quality-bar .seg.high { background: #2ecc71; }
.disc-quality-bar .seg.mid { background: #f1c40f; }
.disc-quality-bar .seg.low { background: #e74c3c; }
.disc-quality-legend {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
}
.disc-quality-legend .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}
.disc-quality-legend .dot.high { background: #2ecc71; }
.disc-quality-legend .dot.mid { background: #f1c40f; }
.disc-quality-legend .dot.low { background: #e74c3c; }

/* ---------- 教师端：AI深度分析 —— 风险预警区 ---------- */
.disc-risk-block {
    background: #fff9f5;
    border: 1px solid #f5c6a5;
    border-radius: 12px;
    padding: 12px 14px;
}
.disc-risk-block.has-crisis {
    border-color: #e74c3c;
    background: #fef2f0;
}
.disc-crisis-alert {
    background: #e74c3c;
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.6;
}
.disc-risk-list li {
    border-left: 4px solid #e0a458;
    position: relative;
}
.disc-risk-item.risk-crisis { border-left-color: #e74c3c; background: #fef5f4; }
.disc-risk-item.risk-attack { border-left-color: #e74c3c; }
.disc-risk-item.risk-bias { border-left-color: #d35400; }
.disc-risk-item.risk-rude { border-left-color: #e0a458; }
.disc-risk-item.risk-spam { border-left-color: #95a5a6; }
.disc-risk-item.risk-other { border-left-color: #95a5a6; }
.disc-risk-type-tag {
    display: inline-block;
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 10px;
    margin-right: 6px;
}
.disc-risk-reason {
    color: #c0392b;
    font-size: 11.5px;
    margin-top: 3px;
}

/* ---------- 教师端：AI深度分析 —— 核心素养关联条形图 ---------- */
.disc-ability-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.disc-ability-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 3px 4px;
    border-radius: 6px;
    transition: var(--transition);
}
.disc-ability-bar-row:hover {
    background: #f5f8fc;
}
.disc-ability-label {
    flex: 0 0 108px;
    font-size: 12px;
    color: var(--text);
}
.disc-ability-bar-track {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: #edf2f7;
    overflow: hidden;
}
.disc-ability-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: var(--transition);
}
.disc-ability-bar-fill.ability-L { background: #2c4a7a; }
.disc-ability-bar-fill.ability-T { background: #c9a84c; }
.disc-ability-bar-fill.ability-A { background: #8e44ad; }
.disc-ability-bar-fill.ability-C { background: #16a085; }
.disc-ability-count {
    flex: 0 0 20px;
    text-align: right;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
}

/* ---------- 教师端：AI深度分析 —— 认知层级配色（复用 .disc-quality-bar/.seg 结构）---------- */
.disc-quality-bar .seg.level-L0 { background: #95a5a6; }
.disc-quality-bar .seg.level-L1 { background: #a6c8e8; }
.disc-quality-bar .seg.level-L2 { background: #4a90c4; }
.disc-quality-bar .seg.level-L3 { background: #2c4a7a; }
.disc-quality-legend .dot.level-L0 { background: #95a5a6; }
.disc-quality-legend .dot.level-L1 { background: #a6c8e8; }
.disc-quality-legend .dot.level-L2 { background: #4a90c4; }
.disc-quality-legend .dot.level-L3 { background: #2c4a7a; }

/* ---------- 教师端：学生标签选择器 ---------- */
.disc-tag-picker-wrap {
    position: relative;
    display: inline-block;
}
.disc-tag-picker {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid #dfe6ee;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 10px;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
    margin-top: 4px;
}
.disc-tag-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}
.disc-tag-add {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    border-top: 1px solid #edf2f7;
    padding-top: 6px;
}
.disc-tag-add input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #dfe6ee;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
}
.disc-tag-add button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 24px;
    cursor: pointer;
    font-family: inherit;
}

/* ---------- 回复列表折叠/展开 ---------- */
.disc-replies-toggle {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    padding: 5px 8px;
    border-radius: 20px;
    transition: var(--transition);
}
.disc-replies-toggle:hover {
    background: #eef2f9;
}

/* ---------- 学生端："回复后可见"锁定提示 ---------- */
.disc-locked-hint {
    margin-top: 10px;
    background: #f8fafc;
    border: 1px dashed #dfe6ee;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.6;
    padding: 8px 12px;
    border-radius: 10px;
}

/* ---------- 教师端：讨论互动整体布局（可收起的任务目录 + 可调宽度的原文/功能区）----------
   讨论区内容一多（设置面板 + AI归纳 + 筛选栏 + 一长串帖子）确实容易显得局促，
   但整块交给页面自然撑高滚动，又会出现"原文卡片矮、讨论区卡片超长"一长一短、
   翻到下面找不到原文对照的问题。这里改回"一屏卡片 + 内部滚动"的常规模式，
   只是不再沿用 calc(100vh - 160px) 这个偏矮的固定值——讨论互动页顶部没有
   其它数据页面那条"查看范围"选择条，可用空间更多，卡片整体调高一截，
   让设置面板/AI归纳/帖子列表在卡片内部滚动时更舒展、不至于太局促。 */
.disc-teacher-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.disc-teacher-sidebar {
    flex: 0 0 250px;
    width: 250px;
    overflow-x: hidden;
    overflow-y: auto;
    /* 【2026-09 修复】原来写死 100vh - 40px，没跟着 header-autohide.js 的
       --yjzp-header-h 变量联动——菜单栏收起后，这里的可视高度理应跟着变高，
       但固定值完全不知道菜单栏收起了这件事，白白浪费了腾出来的空间。
       下面第一行是变量不存在时的静态兜底，第二行才是实际生效值。*/
    max-height: calc(100vh - 40px);
    max-height: calc(100vh - var(--yjzp-header-h, 68px) - 20px);
    opacity: 1;
    position: sticky;
    top: 20px;
    transition: flex-basis 0.22s ease, width 0.22s ease, padding 0.22s ease, opacity 0.18s ease;
}
.disc-teacher-layout.sidebar-collapsed .disc-teacher-sidebar {
    flex-basis: 0;
    width: 0;
    padding-left: 0;
    padding-right: 0;
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
}
.disc-sidebar-toggle {
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    width: 22px;
    height: 46px;
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow);
    border: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    font-size: 15px;
    font-family: inherit;
    padding: 0;
    transition: var(--transition);
}
.disc-sidebar-toggle:hover {
    background: #f1f4f9;
    color: var(--primary);
    border-color: #dfe6ee;
}
.disc-teacher-layout .process-main {
    flex: 1;
    min-width: 0;
    overflow: visible;
}
/* .reading-layout / .left-panel / .right-panel 在 styles.css 里默认是"钉死一屏、
   内部各自滚动"设计（左侧原文、右侧功能区各自 overflow-y:auto），这里沿用同一套
   机制，只是把整卡的高度从默认的 calc(100vh - 160px) 调高，给右侧"题目 / AI对话 /
   讨论区"三个tab（尤其讨论区：设置面板 + AI归纳 + 筛选栏 + 帖子列表）更充裕的
   内部可视高度，减少还没展开就要滚动大半屏的局促感；左右两栏仍然等高对齐，
   哪一栏内容更长，就在自己内部滚动，不会把另一栏也拖变形。 */
.disc-teacher-layout .reading-layout {
    /* 【2026-09 修复】原来写死 100vh - 120px，同样没跟 header-autohide.js
       联动，菜单栏收起后这里的高度纹丝不动，白白浪费腾出来的空间——
       改法与 styles.css 里 .process-layout 等布局的修复完全一致。 */
    height: calc(100vh - 120px);
    height: calc(100vh - var(--yjzp-header-h, 68px) + 8px);
    min-height: 680px;
}

/* ---------- 教师端：AI 归纳 · 讨论热点话题（按主题聚类，取代原来的字符切片"关键词"）---------- */
.disc-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.disc-topic-card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: var(--transition);
}
.disc-topic-card:hover {
    border-color: var(--accent-light);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}
.disc-topic-card.top {
    border-color: rgba(201, 168, 76, 0.5);
    background: linear-gradient(180deg, #fffdf5 0%, #ffffff 70%);
}
.disc-topic-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.disc-topic-count {
    font-size: 11.5px;
    font-weight: 700;
    color: #a3781f;
    background: rgba(201, 168, 76, 0.16);
    padding: 1px 8px;
    border-radius: 10px;
}
.disc-topic-example {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
}
.disc-topic-example strong {
    color: var(--text);
    font-weight: 600;
}
.disc-topic-open-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    opacity: 0;
    transition: var(--transition);
}
.disc-topic-card:hover .disc-topic-open-hint {
    opacity: 1;
}

/* ---------- 教师端：讨论热点话题 · 详情弹窗 ---------- */
.disc-topic-modal-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.disc-topic-modal-title span {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-light);
}
.disc-topic-modal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.disc-topic-modal-item {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: var(--transition);
}
.disc-topic-modal-item:hover {
    border-color: var(--accent-light);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}
.disc-topic-modal-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.disc-topic-modal-item-author {
    display: flex;
    align-items: center;
    gap: 6px;
}
.disc-topic-modal-item-type {
    font-size: 11.5px;
    font-weight: 400;
    color: var(--text-light);
}
.disc-topic-modal-item-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.disc-topic-modal-item-jump {
    margin-top: 6px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    opacity: 0;
    transition: var(--transition);
}
.disc-topic-modal-item:hover .disc-topic-modal-item-jump {
    opacity: 1;
}

/* ---------- 跳转定位高亮：从"热点话题/低质量发帖"点击某条发言、或从"批改答案"
   跳到具体学生任务时，短暂给目标卡片一圈提示光晕，帮老师一眼找到滚动到的位置 ---------- */
@keyframes discJumpPulse {
    0% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.55); }
    100% { box-shadow: 0 0 0 10px rgba(201, 168, 76, 0); }
}
.disc-jump-highlight {
    animation: discJumpPulse 0.9s ease-out 2;
    border-color: var(--accent) !important;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .disc-ai-stats-row {
        flex-wrap: wrap;
    }
    .disc-ai-stat {
        min-width: 30%;
    }
    .disc-topic-grid {
        grid-template-columns: 1fr;
    }
    .disc-teacher-sidebar {
        flex-basis: 200px;
        width: 200px;
        position: static;
        max-height: none;
    }
    .disc-sidebar-toggle {
        position: static;
    }
}

/* ---------- 教师端：AI深度分析 —— 可折叠区块标题 ---------- */
.disc-ai-collapsible-head {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.disc-ai-collapsible-head:hover {
    color: var(--primary);
}
.disc-ai-collapse-arrow {
    color: var(--text-light);
    font-size: 12px;
    flex-shrink: 0;
    margin-left: 8px;
}

/* ---------- 教师端：AI深度分析 —— 认知层级分布可点击 ---------- */
.disc-quality-bar .seg {
    cursor: pointer;
    transition: var(--transition);
}
.disc-quality-bar .seg:hover {
    filter: brightness(1.15);
}
.disc-level-legend-item {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 10px;
    transition: var(--transition);
}
.disc-level-legend-item:hover {
    background: #f5f8fc;
    color: var(--primary);
}



/* ████████████████████████████████████████████████████████████████
   ▼ 原 step-groups.css（题目组 · 分步骤题）
   ████████████████████████████████████████████████████████████████ */
/* ================================================================
   题目组（分步骤题） —— 学生端样式
   风格延续 styles.css 里 .exercise-item / .q-option-item 等既有语言：
   同样的圆角(12px)、同样的边框色(#e2e8f0)、同样的强调色(--primary/--secondary)。
   ================================================================ */

.stepgroup-card {
    border-radius: 14px;
    padding: 18px 20px 16px;
    margin-bottom: 22px;
    border: 1px solid #e2e8f0;
    border-left: 6px solid var(--primary-light);
    background: #fafbfc;
    transition: var(--transition);
}
.stepgroup-card.stepgroup-done {
    border-left-color: #27ae60;
}

.stepgroup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.stepgroup-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.stepgroup-badge {
    font-size: 12px;
    background: var(--primary);
    color: #fff;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 500;
    flex-shrink: 0;
}
.stepgroup-meta {
    font-size: 12px;
    color: var(--text-light);
}
.stepgroup-done-tag {
    color: #27ae60;
    font-weight: 600;
}

/* 顶部步骤进度点 */
.stepgroup-progress {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 2px;
}
.stepgroup-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    background: #e2e8f0;
    color: var(--text-light);
}
.stepgroup-dot.dot-active {
    background: var(--accent-light);
    color: var(--primary);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}
.stepgroup-dot.dot-done {
    background: #27ae60;
    color: #fff;
}
.stepgroup-dot.dot-locked {
    background: #edf1f5;
    color: #b7c0cc;
}
.stepgroup-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 4px;
    min-width: 12px;
}

.stepgroup-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 单个步骤：三种状态 —— 锁定 / 已完成折叠 / 当前展开 */
.step-item {
    border-radius: 10px;
    transition: var(--transition);
}

.step-locked {
    padding: 12px 14px;
    background: #f1f3f6;
    border: 1px dashed #d3dae3;
}
.step-locked-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #98a3b0;
    font-size: 13px;
}
.step-lock-icon {
    font-size: 14px;
}

.step-collapsed {
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}
.step-collapsed:hover {
    border-color: var(--accent-light);
}
.step-collapsed-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.step-done-icon {
    flex-shrink: 0;
}
.step-collapsed-title {
    color: var(--text);
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.step-collapsed-summary {
    color: var(--text-light);
    font-size: 12px;
    flex-shrink: 0;
}
.step-collapsed-arrow {
    color: var(--text-light);
    flex-shrink: 0;
}
.step-review-body {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    font-size: 13px;
    color: var(--text-light);
}
.step-review-body.hidden {
    display: none;
}
.step-answer-review {
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text);
    white-space: pre-wrap;
}
.step-answer-feedback {
    margin-top: 6px;
    color: var(--text-light);
}

.step-current {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--accent-light);
    box-shadow: 0 2px 10px rgba(201, 168, 76, 0.08);
}
.step-current-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 6px;
}
.step-current .q-text {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 12px;
}
.step-current textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
    transition: var(--transition);
    background: #fff;
}
.step-current textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(44, 74, 122, 0.06);
    outline: none;
}
.step-current .feedback-box {
    margin-top: 12px;
    padding: 12px 16px;
    background: #eef6f3;
    border-radius: 10px;
    font-size: 14px;
    border-left: 3px solid var(--secondary);
    display: none;
}
/* "下一步 / 完成" 按钮靠右下角放置，符合"往下走"的方向直觉；
   题组最后一步文案是"✅ 完成"，其余步骤是"下一步 →" */
.step-next-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}
.step-next-btn {
    padding: 8px 26px;
    background: var(--primary-light);
    color: #fff;
    border: none;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.step-next-btn:hover:not(:disabled) {
    background: var(--primary);
    transform: scale(1.02);
}
.step-next-btn:disabled {
    background: #cbd3dc;
    cursor: not-allowed;
}

/* 回顾前置步骤的小方块（referencesSteps） */
.step-refs-box {
    background: #fff8e8;
    border: 1px solid var(--accent-light);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
}
.step-refs-title {
    font-size: 12px;
    font-weight: 700;
    color: #a67c1e;
    margin-bottom: 6px;
}
.step-refs-item {
    font-size: 13px;
    color: var(--text);
    line-height: 1.7;
}
.step-refs-label {
    font-weight: 600;
    color: var(--primary);
}
.step-refs-snippet {
    color: var(--text-light);
}

/* AI对话步骤 */
.step-dialogue-box {
    max-height: 260px;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sd-empty {
    color: var(--text-light);
    font-size: 13px;
    text-align: center;
    padding: 10px 0;
}
.sd-msg {
    font-size: 13px;
    line-height: 1.6;
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 88%;
}
.sd-msg.sd-ai {
    background: #fff;
    border: 1px solid #e2e8f0;
    align-self: flex-start;
}
.sd-msg.sd-user {
    background: var(--primary-light);
    color: #fff;
    align-self: flex-end;
}
.sd-msg .sd-role {
    display: block;
    font-size: 11px;
    font-weight: 700;
    opacity: 0.7;
    margin-bottom: 2px;
}
.sd-pending {
    opacity: 0.6;
}
.step-dialogue-review {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.step-dialogue-review .sd-msg {
    max-width: 100%;
}

.step-dialogue-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.step-dialogue-input-row input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
}
.step-dialogue-input-row input:focus {
    border-color: var(--primary-light);
    outline: none;
}
.step-dialogue-input-row button {
    padding: 8px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}
.step-dialogue-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

/* 对话tab的未读红点——AI主动开口时不再强制切走学生所在的tab，
   只在这里留一个小红点提示，学生自己决定什么时候去看 */
.right-tabs button {
    position: relative;
}
.chat-tab-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    border-radius: 8px;
    text-align: center;
}

/* AI对话步骤：学生"最终采纳说法"输入区 —— 视觉上和上方对话气泡区分开，
   用强调色边框标出这是需要学生自己下决定的关键动作，而不是随手一填 */
.step-final-choice-box {
    background: #fff8e8;
    border: 1px solid var(--accent);
    border-radius: 10px;
    padding: 10px 14px;
    margin: 10px 0;
}
.step-final-choice-title {
    font-size: 13px;
    font-weight: 700;
    color: #8a6416;
    margin-bottom: 4px;
}
.step-final-choice-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.6;
}
.step-final-choice-box textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2c98a;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 56px;
    background: #fff;
}
.step-final-choice-box textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
    outline: none;
}
/* 折叠回看时展示的"你最终采纳的说法"，和上面对话气泡视觉呼应但单独标出 */
.sd-final-choice {
    margin-top: 4px;
    padding: 8px 12px;
    background: #fff8e8;
    border: 1px solid var(--accent-light);
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
}
.sd-final-choice .sd-role {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #8a6416;
    margin-bottom: 2px;
}

/* "全部完成、AI综合评价中"提示条 —— 批量批改要跑几秒，需要一个明确的等待反馈 */
.task-evaluating-banner {
    background: #eef3fb;
    border: 1px solid var(--primary-light);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

/* 批改完成后的整体评价总结条 */
.task-evaluation-summary {
    background: #eafaf1;
    border: 1px solid #27ae60;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #1e8449;
    font-weight: 600;
}

/* 多个题组共存时，题组卡片之间的间距沿用 .stepgroup-card 自身的
   margin-bottom，这里不用额外加；仅在此说明，避免以后误加重复间距 */

/* 顶部"全部提交"按钮的禁用态——内容没填全时按钮可见但不可点，
   用明显的灰色 + 不可点光标，让"为什么点不动"一目了然 */
.exercise-submit-all:disabled {
    background: #cbd3dc;
    cursor: not-allowed;
    transform: none;
}
.exercise-submit-all:disabled:hover {
    background: #cbd3dc;
    transform: none;
}
/* 已经点过"全部提交"、答案已锁定后，顶部原按钮位置换成这个静态标签，
   不再是可交互的按钮 */
.exercise-submit-all-locked {
    padding: 10px 24px;
    background: #eafaf1;
    color: #1e8449;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
}

/* ================================================================
   题目组编辑器（教师端 · 新建/修改任务表单）
   ================================================================ */

.stepgroup-editor {
    background: #fffaf0;
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}
.stepgroup-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.stepgroup-editor-badge {
    font-size: 13px;
    font-weight: 700;
    color: #8a6416;
}
/* 【2026-09 新增】题组整体共用的"原文关联"提示——原来这行提示是每道
   题（组内每一步）各自一份、跟在题干表单下面不起眼的一小行；现在整个
   题组只有一份，挪到了题组标题下面，视觉上稍微提一级重量，让教师一眼
   看到"这是这整个题组共用的标注状态"，不会误以为还得给每一步单独标。 */
.sg-refanchor-hint {
    background: #fff;
    border: 1px dashed var(--accent-light);
    border-radius: 8px;
    padding: 7px 12px;
    margin: 0 0 12px !important;
}
.stepgroup-editor-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}
.stepgroup-editor-addrow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* 单个步骤编辑卡片——复用 .modal-box .question-group 的 .q-row 视觉语言，
   因为 AI对话步骤的表单不嵌套在 .question-group 里（避免和"这是一道
   普通题目"产生语义混淆），这里单独把同一套 .q-row 样式扩展过来 */
.step-editor-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}
.step-editor-item .question-group {
    margin-bottom: 0;
    background: #f8fafc;
}
.step-editor-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.step-editor-type-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
}
.step-editor-type-badge.answer {
    background: #eef3fb;
    color: var(--primary);
}
.step-editor-type-badge.dialogue {
    background: #fff3d6;
    color: #8a6416;
}
.step-editor-item-actions {
    display: flex;
    gap: 4px;
}
.step-editor-item-actions button {
    width: 26px;
    height: 26px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-light);
    transition: var(--transition);
}
.step-editor-item-actions button:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}
.step-editor-item-actions button.danger {
    color: #e74c3c;
}
.step-editor-item-actions button.danger:hover {
    border-color: #e74c3c;
    background: #fdedec;
}

/* AI对话步骤表单字段（.q-row 布局从 question-group 场景搬过来，因为这里
   不套在 .question-group 容器内） */
.step-editor-item .q-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.step-editor-item .q-row > div {
    flex: 1;
    min-width: 120px;
}
.step-editor-item .q-row label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    display: block;
    margin-bottom: 4px;
}
.step-editor-item .q-row input,
.step-editor-item .q-row select,
.step-editor-item .q-row textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    font-family: inherit;
}
.step-editor-item .q-row textarea {
    min-height: 60px;
    resize: vertical;
}

/* "回顾前面哪些步骤"——横向chip标签，比原来纵向一行一个更紧凑，
   一眼能扫完所有可选步骤，点击整个标签即可切换选中，不用精确点在
   小小的checkbox上 */
.sd-refsteps-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.sd-refstep-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}
.sd-refstep-chip:hover {
    border-color: var(--primary-light);
}
.sd-refstep-chip.checked {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: #fff;
    font-weight: 600;
}
/* checkbox 本身仍然是真实存在、功能完整的表单控件（收集逻辑靠它的
   checked状态），只是视觉上缩小藏在标签左侧，不做成不可见（accessibility：
   保留可被键盘tab到、可被屏幕阅读器识别） */
.sd-refstep-chip input[type="checkbox"] {
    width: 13px;
    height: 13px;
    margin: 0;
    cursor: pointer;
    accent-color: #fff;
}
.sd-refstep-chip-num {
    font-weight: 700;
    opacity: 0.7;
}

/* 文章库来源切换（单选） */
.article-source-toggle {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.article-source-toggle label {
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
}

/* "✨ 根据题干生成"按钮——教师端AI辅助生成开场白 */
.ai-gen-btn {
    padding: 5px 14px;
    border: 1px solid var(--accent);
    background: #fff8e8;
    color: #8a6416;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}
.ai-gen-btn:hover:not(:disabled) {
    background: var(--accent-light);
}
.ai-gen-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* "主要考查素养"改用下拉菜单（.q-ability-select），复用 .question-group
   .q-row select 的通用表单样式，不需要额外定义——单选radio+chip标签的旧
   方案已弃用（曾经出现过"同一题4个选项name不互斥、能同时勾选"的问题，
   下拉菜单从控件层面就不存在这类互斥性bug，故换成下拉）。

   这里只需要给"AI推荐"按钮旁的提示文案定义样式。 */
.q-ability-suggest-hint {
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

/* AI服务连通状态徽标（教师端头部）——三种故障态用不同颜色区分，
   让教师能一眼看出问题出在哪一步：红=后端完全连不上，黄=后端启动了
   但没配Key，绿=一切正常；检测中用中性灰蓝色，避免和三种结果色混淆 */
.ai-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    user-select: none;
}
.ai-status-badge:hover {
    transform: scale(1.03);
}
.ai-status-badge.ai-status-checking {
    background: #eef1f5;
    color: #64748b;
}
.ai-status-badge.ai-status-ok {
    background: #eafaf1;
    color: #1e8449;
}
.ai-status-badge.ai-status-warn {
    background: #fff8e1;
    color: #b8860b;
}
.ai-status-badge.ai-status-off {
    background: #fdedec;
    color: #c0392b;
}

/* 多篇对比阅读——教师端新建任务表单里勾选多篇文章。改成卡片网格样式
   （原来是竖排"圆点+一行标题"，信息单薄、纵向占地方还不好看）：
   每张卡片是一个可点击的整体，含小书本图标、标题、作者/文本类型副标题，
   选中态用主题色高亮背景+右上角勾选标记，一眼能看清选了哪几篇。 */
.article-multi-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 2px;
    margin-top: 6px;
}
.article-multi-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
}
.article-multi-chip:hover {
    border-color: var(--primary-light);
}
.article-multi-chip.checked {
    border-color: var(--primary);
    background: #eef3fb;
}
.article-multi-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.amc-check-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #cbd3dc;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: transparent;
    transition: var(--transition);
}
.article-multi-chip.checked .amc-check-icon {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.amc-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 20px;
}
.amc-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}
.amc-meta {
    font-size: 12px;
    color: var(--text-light);
}



/* ████████████████████████████████████████████████████████████████
   ▼ 原 auth.css（账号 / 角色 / 组织管理）
   ████████████████████████████████████████████████████████████████ */
/* ================================================================
   账号 / 角色 / 组织管理相关样式
   —— 与 styles.css 完全隔离：本文件只新增类名，不覆盖任何既有选择器，
      需要回退到"无角色版本"时，删掉这个 <link> 与两个 js 即可。
   变量（--primary / --secondary / --accent / --text / --text-light /
   --transition）沿用 styles.css 里定义的那套，保持视觉统一。
   ================================================================ */

/* ---------------------------------------------------------------- 登录页 */
.login-container .login-sub {
    margin-bottom: 6px;
}

.auth-panel {
    margin-top: 8px;
    text-align: left;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 2px;
}

.auth-field {
    display: block;
}

.auth-field .af-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: #fbfdff;
    transition: var(--transition);
    box-sizing: border-box;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--secondary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(44, 122, 90, 0.12);
}

.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text-light);
    cursor: pointer;
    background: #f8fafc;
    border-radius: 12px;
    padding: 11px 14px;
}

.auth-consent input {
    margin-top: 3px;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.auth-consent a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.auth-consent a:hover {
    text-decoration: underline;
}

.auth-msg {
    font-size: 13px;
    min-height: 0;
    line-height: 1.6;
}

.auth-msg.error {
    color: #c0392b;
    background: #fdecea;
    border-radius: 10px;
    padding: 9px 13px;
}

.auth-msg.ok {
    color: #1e7a4a;
    background: #e8f7ef;
    border-radius: 10px;
    padding: 9px 13px;
}

.auth-submit {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 3px;
}

.auth-submit:hover {
    background: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(44, 74, 122, 0.25);
}

.auth-links {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}

.auth-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.auth-links a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.auth-links .sep {
    margin: 0 10px;
    color: #cbd5e0;
}

.auth-note {
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--text-light);
    background: #f8fafc;
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 0;
}

.auth-note code,
.demo-account-box code,
.org-note code,
.org-hint code {
    background: #eef2f7;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 12.5px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    color: #2c4a7a;
}

/* ---- 演示账号提示（正式部署时可整块删除） ---- */
.demo-account-box {
    margin-top: 22px;
    border-top: 1px dashed #dbe4ee;
    padding-top: 16px;
}

.demo-account-box .dab-title {
    font-size: 12.5px;
    color: var(--text-light);
    margin-bottom: 10px;
    text-align: center;
}

.demo-account-box .dab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 8px;
}

.demo-account-box .dab-item {
    border: 1px solid #e8eef5;
    border-radius: 12px;
    padding: 9px 11px;
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.demo-account-box .dab-item:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.demo-account-box .dab-role {
    display: inline-block;
    color: #fff;
    font-size: 11px;
    border-radius: 20px;
    padding: 2px 9px;
    align-self: flex-start;
}

.demo-account-box .dab-item code {
    font-size: 13px;
    font-weight: 700;
    background: transparent;
    padding: 0;
    color: var(--text);
}

.demo-account-box .dab-item em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--text-light);
}

.demo-account-box .dab-foot {
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--text-light);
    text-align: center;
    line-height: 1.7;
}

/* ---------------------------------------------------------------- 顶栏身份 */
#userNameDisplay {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.org-role-chip {
    display: inline-block;
    color: #fff;
    font-size: 11px;
    border-radius: 20px;
    padding: 2px 9px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.org-role-chip.sm {
    font-size: 10.5px;
    padding: 1px 8px;
    margin-left: 0;
}

/* 顶栏专用的简短角色标签：藏蓝色描边、无填充色的轻量小框，配合简短
   角色名（"学生"而不是"班级学生"）使用，比原来各角色各自的实心色块
   更省宽度，也不需要在这个高频出现的位置上区分四种角色各自的颜色——
   账号管理表格那边的 .org-role-chip（实心色块+完整角色名）仍然保留，
   那边需要一眼分清不同角色，顶栏这里只需要"知道自己是什么角色"即可。 */
.org-role-chip-mini {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #1a3a6e;
    background: transparent;
    border: 1.5px solid #1a3a6e;
    border-radius: 20px;
    padding: 1px 8px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
    flex-shrink: 0;
}

.org-scope-text {
    font-size: 12px;
    color: var(--text-light);
    margin-left: 6px;
    white-space: nowrap;
}

.org-pwd-btn {
    margin-right: 4px;
}

/* ---------------------------------------------------------------- 顶栏导航"更多"折叠菜单 */
/* 角色权限越多（尤其系统管理员），顶栏导航项越多；与其让它们挤在一起
   自动换行破坏顶栏高度，不如超出可见宽度时收进一个"更多 ▾"下拉里。
   具体收纳几项由 org-patch.js 的 renderOrgNav() 按当前视口宽度动态计算，
   这里只负责下拉本身的外观。 */
.nav-more-wrap {
    position: relative;
    flex-shrink: 0;
}

.nav-more-btn {
    background: transparent;
    border: none;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-more-btn:hover,
.nav-more-btn.open {
    background: var(--bg);
    color: var(--text);
}

.nav-more-btn.has-active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 42, 74, 0.2);
}

.nav-more-btn.has-active:hover {
    background: var(--primary);
    color: #fff;
}

.nav-more-btn .caret {
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-more-btn.open .caret {
    transform: rotate(180deg);
}

.nav-more-menu {
    position: fixed;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    padding: 6px;
    min-width: 168px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 500;
}

.nav-more-menu button {
    background: transparent;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-align: left;
    white-space: nowrap;
}

.nav-more-menu button:hover {
    background: var(--bg);
}

.nav-more-menu button.active {
    background: var(--primary);
    color: #fff;
}

/* ---------------------------------------------------------------- 班级切换条 */
.org-scope-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 32px;
    background: #f4f8fc;
    border-bottom: 1px solid #e3ecf5;
    font-size: 13px;
}

.org-scope-bar.hidden {
    display: none;
}

.org-scope-bar .osb-label {
    font-weight: 700;
    color: var(--primary);
}

.org-scope-bar .osb-class-switch,
.org-toolbar .osb-class-switch {
    display: inline-flex;
    background: #fff;
    border: 1px solid #dbe4ee;
    border-radius: 24px;
    padding: 3px;
    gap: 2px;
}

.osb-class-switch button {
    border: none;
    background: transparent;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.osb-class-switch button:hover {
    color: var(--secondary);
}

.osb-class-switch button.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.org-scope-bar .osb-fixed {
    font-weight: 600;
    color: var(--text);
}

.org-scope-bar .osb-fixed em {
    font-style: normal;
    font-weight: 400;
    color: var(--text-light);
    font-size: 12px;
}

.org-scope-bar .osb-count {
    color: var(--text-light);
}

/* 【2026-10 新增】按年级分组的班级切换：先选年级（只有一个年级时不显示这一层），
   再在年级内选班；班级太多时班级那一层会换成下拉框，见 org-patch.js 的 renderOrgScopeBar */
.org-scope-bar .osb-grade-switch {
    display: inline-flex;
    gap: 2px;
    background: #e9eff6;
    border-radius: 24px;
    padding: 3px;
}

.osb-grade-switch button {
    border: none;
    background: transparent;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.osb-grade-switch button:hover {
    color: var(--secondary);
}

.osb-grade-switch button.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.org-scope-bar .osb-class-select {
    border: 1px solid #dbe4ee;
    background: #fff;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
    max-width: 220px;
}

.org-scope-bar .osb-total {
    font-size: 12px;
    color: var(--text-light);
}

/* 班级很多时，这一条不允许越撑越高：班级按钮区自己横向滚动，整条高度固定一行 */
.org-scope-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}

.org-scope-bar > * {
    flex-shrink: 0;
}

.org-scope-bar .osb-class-switch {
    max-width: 52vw;
    overflow-x: auto;
    scrollbar-width: thin;
}

.org-scope-bar .osb-flag {
    margin-left: auto;
    background: #fff6e5;
    color: #a06008;
    border: 1px solid #f5dfb8;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: help;
}

/* ---------------------------------------------------------------- 通用页面骨架 */
.org-page-head {
    margin-bottom: 18px;
}

.org-page-head h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.org-page-head p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    max-width: 980px;
}

.org-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.org-tabs button {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--text-light);
    border-radius: 24px;
    padding: 8px 20px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.org-tabs button:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.org-tabs button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.org-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 16px;
}

.org-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.org-toolbar .ot-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.org-toolbar .ot-count {
    font-size: 13px;
    color: var(--text-light);
}

.org-toolbar select,
.org-toolbar input[type="text"] {
    padding: 7px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    min-width: 160px;
}

.org-btn {
    border: 1px solid #dbe4ee;
    background: #fff;
    color: var(--text);
    border-radius: 24px;
    padding: 8px 20px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.org-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.org-btn.primary {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
    font-weight: 600;
}

.org-btn.primary:hover {
    filter: brightness(1.08);
    color: #fff;
}

.org-btn.danger {
    background: #fff;
    border-color: #f0c0bb;
    color: #c0392b;
}

.org-btn.danger:hover {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}

.org-btn.tiny {
    padding: 5px 14px;
    font-size: 12.5px;
}

.org-mini {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--text-light);
    border-radius: 16px;
    padding: 4px 11px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    margin-left: 5px;
    transition: var(--transition);
}

.org-mini:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.org-mini.danger:hover {
    border-color: #c0392b;
    color: #c0392b;
}

.org-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
    background: #f8fafc;
    border-radius: 14px;
    font-size: 14px;
}

.org-note {
    margin-top: 18px;
    padding: 14px 18px;
    background: #f8fafc;
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--text-light);
}

.org-note.warn {
    background: #fff8ec;
    border-left-color: #e6a23c;
}

.org-perm-tip {
    margin: 10px 0 16px;
    padding: 11px 16px;
    background: #fff8ec;
    border-left: 4px solid #e6a23c;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.8;
    color: #8a5a10;
}

.org-perm-tip.owner {
    background: #eef6ff;
    border-left-color: var(--secondary);
    color: #2c4a7a;
}

.org-card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.org-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
}

.org-card-title span {
    font-weight: 400;
    font-size: 12.5px;
    color: var(--text-light);
    margin-left: 8px;
}

.org-card-foot {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ---------------------------------------------------------------- 表格 */
.org-table-wrap {
    overflow-x: auto;
}

.org-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.org-table th {
    text-align: left;
    padding: 11px 12px;
    background: #f4f8fc;
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    border-bottom: 1px solid #e3ecf5;
}

.org-table th:first-child {
    border-radius: 10px 0 0 0;
}

.org-table th:last-child {
    border-radius: 0 10px 0 0;
}

.org-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f0f4f8;
    color: var(--text);
    vertical-align: middle;
}

.org-table tbody tr:hover {
    background: #fafcfe;
}

.org-table td.cell-weak {
    color: #c0392b;
    font-weight: 600;
}

.org-table td.cell-strong {
    color: #1e7a4a;
    font-weight: 600;
}

.org-table code {
    background: #f4f6f9;
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 12.5px;
    font-family: 'SFMono-Regular', Consolas, monospace;
}

.org-status {
    font-size: 12px;
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}

.org-status.on {
    background: #e8f7ef;
    color: #1e7a4a;
}

.org-status.off {
    background: #fdecea;
    color: #c0392b;
}

.org-status.warn {
    background: #fff6e5;
    color: #a06008;
}

.org-self-tag {
    font-size: 11px;
    color: var(--secondary);
    background: #e8f4ef;
    border-radius: 20px;
    padding: 1px 8px;
    margin-left: 6px;
}

.log-role {
    font-size: 11.5px;
    border-radius: 20px;
    padding: 2px 9px;
}

.log-role.user {
    background: #eef2f7;
    color: #2c4a7a;
}

.log-role.ai {
    background: #e8f4ef;
    color: #2c7a5a;
}

.log-tag {
    font-size: 11px;
    color: var(--text-light);
    margin-left: 5px;
}

.log-text {
    max-width: 520px;
    line-height: 1.7;
}

/* ---------------------------------------------------------------- 年级看板 */
.grade-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.grade-kpi-card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-top: 4px solid var(--secondary);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.grade-kpi-card.top {
    border-top-color: #e6a23c;
    background: linear-gradient(180deg, #fffdf7 0%, #fff 60%);
}

.grade-kpi-card .gk-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.grade-kpi-card .gk-top {
    font-size: 11px;
    background: #e6a23c;
    color: #fff;
    border-radius: 20px;
    padding: 1px 9px;
    font-weight: 500;
}

.grade-kpi-card .gk-main {
    font-size: 38px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin: 8px 0 4px;
}

.grade-kpi-card .gk-main span {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
    margin-left: 8px;
}

.grade-kpi-card .gk-sub {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.grade-kpi-card .gk-flags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.gk-flag {
    font-size: 11.5px;
    border-radius: 20px;
    padding: 2px 10px;
}

.gk-flag.strong {
    background: #e8f7ef;
    color: #1e7a4a;
}

.gk-flag.weak {
    background: #fdecea;
    color: #c0392b;
}

/* ---------------------------------------------------------------- 任务归属标记 */
.org-task-scope {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    font-size: 12px;
}

.ots-badge {
    background: #eef2f7;
    color: #2c4a7a;
    border-radius: 20px;
    padding: 2px 10px;
}

.ots-badge.shared {
    background: #e8f4ef;
    color: #2c7a5a;
}

.ots-names {
    color: var(--text-light);
}

.org-grant-btn {
    border: 1px solid #cfe0d8 !important;
    color: #2c7a5a !important;
}

/* ---------------------------------------------------------------- 平台管理 */
.switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.switch-text .sw-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.switch-text .sw-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 720px;
}

.org-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dbe4ee;
    background: #f4f6f9;
    border-radius: 30px;
    padding: 6px 16px 6px 8px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    flex-shrink: 0;
}

.org-switch .knob {
    width: 34px;
    height: 20px;
    border-radius: 20px;
    background: #cbd5e0;
    position: relative;
    transition: var(--transition);
}

.org-switch .knob::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: var(--transition);
}

.org-switch em {
    font-style: normal;
    font-size: 13px;
    color: var(--text-light);
}

.org-switch.on {
    border-color: #2c7a5a;
    background: #e8f7ef;
}

.org-switch.on .knob {
    background: #2c7a5a;
}

.org-switch.on .knob::after {
    left: 16px;
}

.org-switch.on em {
    color: #1e7a4a;
    font-weight: 600;
}

.stat-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.stat-box {
    flex: 1;
    min-width: 130px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 16px 18px;
    text-align: center;
}

.stat-box .sb-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
}

.stat-box .sb-label {
    font-size: 12.5px;
    color: var(--text-light);
    margin-top: 4px;
    line-height: 1.6;
}

.stat-box .sb-label em {
    font-style: normal;
    font-size: 11.5px;
}

/* ---------------------------------------------------------------- AI 知识库 */
.kb-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kb-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border: 1px solid #edf2f7;
    border-left: 4px solid var(--accent);
    border-radius: 14px;
    padding: 14px 18px;
}

.kb-item .kb-icon {
    font-size: 22px;
    line-height: 1;
    margin-top: 2px;
}

.kb-item .kb-main {
    flex: 1;
    min-width: 0;
}

.kb-item .kb-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.kb-item .kb-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.kb-item .kb-cat {
    background: #eef2f7;
    color: #2c4a7a;
    border-radius: 20px;
    padding: 1px 10px;
}

.kb-item .kb-preview {
    font-size: 12.5px;
    color: var(--text-light);
    line-height: 1.7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-item .kb-actions {
    flex-shrink: 0;
}

.kb-pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text);
    max-height: 55vh;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    font-family: inherit;
}

/* ---------------------------------------------------------------- 自有弹窗 */
.org-modal-box {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.org-modal-box.wide {
    max-width: 820px;
}

.org-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px 16px;
    border-bottom: 1px solid #edf2f7;
}

.org-modal-head h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.org-modal-x {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.org-modal-x:hover {
    color: #c0392b;
    transform: rotate(90deg);
}

.org-modal-body {
    padding: 22px 28px;
    overflow-y: auto;
}

.org-modal-foot {
    padding: 16px 28px 22px;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.org-modal-msg {
    font-size: 13px;
    line-height: 1.7;
    color: #c0392b;
}

.org-modal-msg.ok {
    color: #1e7a4a;
}

.org-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.org-field input[type="text"],
.org-field input[type="password"],
.org-field select,
.org-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    background: #fbfdff;
    box-sizing: border-box;
}

.org-field textarea {
    resize: vertical;
    line-height: 1.8;
}

/* 教师/组长"任教班级"多选复选框组——一名教师可以勾多个班，也可以
   一个都不勾（比如只统管年级、不直接任教的组长）。样式上和工具勾选框
   用同一套"胶囊+选中变色"的视觉语言，保持整站一致，不用原生方框复选框。 */
.org-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.org-checkbox-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 13.5px;
    color: var(--text-light);
    cursor: pointer;
    padding: 7px 14px;
    border-radius: 18px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    user-select: none;
}
.org-checkbox-item:hover {
    border-color: var(--primary);
}
.org-checkbox-item:has(input:checked) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.org-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.org-field input:focus,
.org-field select:focus,
.org-field textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: #fff;
}

.org-field input:disabled {
    background: #f4f6f9;
    color: var(--text-light);
}

.org-field-hint {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

.org-hint {
    font-size: 12.5px;
    color: var(--text-light);
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 14px;
    line-height: 1.8;
}

.org-check-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.org-check,
.org-radio {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text);
    cursor: pointer;
    line-height: 1.8;
}

.org-radio {
    margin-bottom: 8px;
}

.org-radio input {
    margin-top: 5px;
    flex-shrink: 0;
}

.auth-doc-p {
    margin: 0 0 12px;
    line-height: 1.95;
    font-size: 13.5px;
    color: var(--text);
}

