/* 点微培训管理后台 - 蓝紫配色主题 */

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --primary-light: #a18cd1;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    --bg-main: #f5f7fa;
    --bg-sidebar: #1a1a2e;
    --bg-sidebar-hover: #16213e;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #bdc3c7;
    --text-white: #ffffff;
    
    --border-color: #e8e8e8;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    
    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;
    --header-height: 60px;
    
    --success: #43e97b;
    --warning: #f6d365;
    --danger: #f5576c;
    --info: #4facfe;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 登录页面 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -200px;
    right: -200px;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
}

.login-container {
    background: white;
    border-radius: 16px;
    padding: 50px 40px;
    width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.logo-icon i {
    font-size: 32px;
    color: white;
}

.login-logo h1 {
    font-size: 28px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.form-group label i {
    margin-right: 5px;
    color: var(--primary);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.captcha-group {
    display: flex;
    gap: 10px;
}

.captcha-group input {
    flex: 1;
}

.captcha-img {
    width: 120px;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border: 1px solid var(--primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-dark);
    letter-spacing: 3px;
    cursor: pointer;
    user-select: none;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* 主应用布局 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .admin-details {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    color: white;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* 导航项 */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    margin: 2px 10px;
    border-radius: 8px;
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span {
    font-size: 14px;
    white-space: nowrap;
}

.nav-item:hover {
    background: var(--bg-sidebar-hover);
}

.nav-item.active {
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: white;
    border-radius: 0 4px 4px 0;
}

/* ===== 导航分组（二级菜单） ===== */
.nav-group {
    margin: 4px 10px;
}

.nav-group-header {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    position: relative;
    user-select: none;
}

.nav-group-header:hover {
    background: var(--bg-sidebar-hover);
}

.nav-group-header i:first-child {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-group-header span {
    font-size: 14px;
    white-space: nowrap;
    flex: 1;
}

.nav-group-arrow {
    font-size: 12px !important;
    width: auto !important;
    transition: transform 0.3s;
    opacity: 0.7;
}

.nav-group.expanded .nav-group-arrow {
    transform: rotate(90deg);
}

.nav-group-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 10px;
}

.nav-group.expanded .nav-group-body {
    max-height: 500px;
}

.nav-sub-item {
    padding: 12px 20px 12px 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    position: relative;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin: 2px 0;
}

.nav-sub-item i {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-sub-item span {
    white-space: nowrap;
}

.nav-sub-item:hover {
    background: var(--bg-sidebar-hover);
    color: white;
}

.nav-sub-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.nav-sub-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 50%;
    background: white;
    border-radius: 0 3px 3px 0;
}

/* 侧边栏折叠状态 - 分组处理 */
.sidebar.collapsed .nav-group-body {
    display: none;
}

.sidebar.collapsed .nav-group-arrow {
    display: none;
}

.sidebar.collapsed .nav-group-header span {
    display: none;
}

.sidebar.collapsed .nav-sub-item {
    display: none;
}

/* 移动端 - 展开状态下子菜单显示 */
@media (max-width: 768px) {
    .nav-group-body {
        padding-left: 0;
    }
    .nav-sub-item {
        padding-left: 54px;
    }
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-avatar i {
    font-size: 20px;
}

.admin-details {
    display: flex;
    flex-direction: column;
}

.admin-name {
    font-size: 14px;
    font-weight: 600;
}

.admin-role {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* 顶部栏 */
.top-header {
    height: var(--header-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-primary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-notification,
.header-message {
    position: relative;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.header-notification:hover,
.header-message:hover {
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.header-user:hover {
    background: rgba(102, 126, 234, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i {
    color: white;
    font-size: 16px;
}

/* 页面内容 */
.page-content {
    padding: 30px;
    min-height: calc(100vh - var(--header-height));
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 页面标题 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.page-header h2 {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn i {
    font-size: 14px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 233, 123, 0.4);
}

.btn-info {
    background: var(--gradient-info);
    color: white;
}

.btn-danger {
    background: var(--gradient-secondary);
    color: white;
}

.btn-default,
.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-default:hover,
.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-sm.btn-primary {
    background: var(--primary);
    color: white;
}

/* 数据卡片 */
.data-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.data-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.data-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon i {
    font-size: 22px;
    color: white;
}

.card-info {
    flex: 1;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.card-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card-trend {
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.card-trend.up {
    color: #43e97b;
}

.card-trend.down {
    color: var(--danger);
}

/* Dashboard 布局 */
.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-row:last-child {
    grid-template-columns: 1fr;
}

/* 图表容器 */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 16px;
    color: var(--text-primary);
}

.time-filter {
    display: flex;
    gap: 5px;
}

.time-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.time-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 快捷操作 */
.quick-actions {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-btn {
    padding: 15px;
    border: 2px dashed var(--border-color);
    background: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 13px;
    color: var(--text-secondary);
}

.action-btn i {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.action-btn:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-3px);
}

/* 列表容器 */
.list-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.view-all {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
}

.view-all:hover {
    text-decoration: underline;
}

/* 数据表格 */
.data-table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: all 0.3s;
}

.data-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.data-table tbody td {
    padding: 12px 15px;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

/* 状态标签 */
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-badge.success {
    background: rgba(67, 233, 123, 0.15);
    color: #2ecc71;
}

.status-badge.warning {
    background: rgba(246, 211, 101, 0.15);
    color: #f39c12;
}

.status-badge.danger {
    background: rgba(245, 87, 108, 0.15);
    color: #e74c3c;
}

.status-badge.info {
    background: rgba(79, 172, 254, 0.15);
    color: #3498db;
}

.status-badge.default {
    background: #f5f5f5;
    color: #999;
}

/* 待办列表 */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.todo-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.todo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.todo-icon.warning {
    background: rgba(246, 211, 101, 0.2);
    color: #f39c12;
}

.todo-icon.info {
    background: rgba(79, 172, 254, 0.2);
    color: #3498db;
}

.todo-icon.danger {
    background: rgba(245, 87, 108, 0.2);
    color: #e74c3c;
}

.todo-icon.success {
    background: rgba(67, 233, 123, 0.2);
    color: #2ecc71;
}

.todo-icon.primary {
    background: rgba(102, 126, 234, 0.2);
    color: var(--primary);
}

.todo-content {
    flex: 1;
}

.todo-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.todo-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

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

.filter-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-input,
.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.3s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.page-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.page-nav {
    display: flex;
    gap: 5px;
}

.page-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.3s;
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tab 标签 */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

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

.tab:hover {
    color: var(--primary);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 课程封面 */
.course-cover {
    width: 60px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

/* 课程封面图上传（新建/编辑课程） */
.course-cover-upload {
    position: relative;
    width: 240px;
    height: 135px;
    border: 2px dashed var(--border-color, #d9dde3);
    border-radius: 10px;
    background: #f8f9fb;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s;
}
.course-cover-upload:hover {
    border-color: var(--primary-color, #4c6ef5);
    background: #f0f4ff;
}
.course-cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-secondary, #8a94a6);
    text-align: center;
    padding: 10px;
}
.course-cover-placeholder i {
    font-size: 28px;
    color: var(--primary-color, #4c6ef5);
}
.course-cover-placeholder p {
    margin: 0;
    font-size: 13px;
}
.course-cover-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.course-cover-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.course-cover-remove:hover {
    background: rgba(0,0,0,0.75);
}

/* 进度条 */
.progress-bar-sm {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar-sm .progress-fill {
    height: 6px;
    background: var(--gradient-primary);
    border-radius: 3px;
    min-width: 30px;
}

.progress-bar-sm span {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 35px;
}

/* 题库布局 */
.question-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
}

.category-tree {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow-sm);
}

.question-content-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.question-content-card .filter-bar {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.question-content-card .data-table-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow-x: auto;
}

.tree-header {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tree-item {
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tree-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.tree-item i {
    font-size: 10px;
    color: var(--text-secondary);
}

.tree-children {
    padding-left: 20px;
    margin-top: 5px;
}

/* 题型标签 */
.type-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.type-badge.single {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary);
}

.type-badge.multiple {
    background: rgba(240, 147, 251, 0.15);
    color: #f5576c;
}

.type-badge.judge {
    background: rgba(79, 172, 254, 0.15);
    color: #3498db;
}

.type-badge.manual {
    background: rgba(245, 87, 108, 0.15);
    color: #e74c3c;
}

.type-badge.auto {
    background: rgba(67, 233, 123, 0.15);
    color: #2ecc71;
}

/* 难度标签 */
.difficulty {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.difficulty.easy {
    background: rgba(67, 233, 123, 0.15);
    color: #2ecc71;
}

.difficulty.medium {
    background: rgba(246, 211, 101, 0.15);
    color: #f39c12;
}

.difficulty.hard {
    background: rgba(245, 87, 108, 0.15);
    color: #e74c3c;
}

/* 分析卡片 */
.analytics-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.analytics-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.analytics-value {
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.analytics-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.analytics-trend {
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.analytics-trend.up {
    color: #2ecc71;
}

.analytics-trend.down {
    color: #e74c3c;
}

/* 分析图表双栏布局 */
.analytics-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* 图表容器高度 */
.chart-wrapper {
    position: relative;
    height: 300px;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* 学习进度分布 */
.progress-distribution {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-label {
    width: 70px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.progress-bar-wrap {
    flex: 1;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease;
}

.progress-num {
    width: 40px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    flex-shrink: 0;
}

/* 排名标签 */
.rank-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.rank-badge.top1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-badge.top2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
}

.rank-badge.top3 {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
}

/* 证书管理 - 数据卡片 */
.cert-cards {
    margin-bottom: 20px;
}

/* 证书模板 */
.certificate-templates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.template-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.template-preview {
    margin-bottom: 15px;
}

.template-mock {
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    position: relative;
    background: #fafbff;
}

.template-mock-blue {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff, #eef0ff);
}

.template-mock-red {
    border-color: #f5576c;
    background: linear-gradient(135deg, #fff5f5, #ffe8ec);
}

.template-mock-green {
    border-color: #43e97b;
    background: linear-gradient(135deg, #f5fff8, #e8ffee);
}

.template-mock-orange {
    border-color: #fa709a;
    background: linear-gradient(135deg, #fffaf5, #fff0e8);
}

.mock-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.mock-content {
    font-size: 12px;
    line-height: 2;
}

.mock-seal {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border: 2px solid var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--danger);
    transform: rotate(-15deg);
}

.template-info {
    flex: 1;
}

.template-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.template-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.template-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* 证书颁发记录 - 筛选栏 */
.cert-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

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

.search-input-wrap {
    position: relative;
    min-width: 240px;
}

.search-input-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
}

.filter-search {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
}

.filter-search:focus {
    border-color: var(--primary);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: white;
    outline: none;
    cursor: pointer;
    min-width: 130px;
}

.filter-right {
    display: flex;
    gap: 8px;
}

/* 证书分页 */
.cert-pagination {
    margin-top: 20px;
}

/* ========== 新建证书模版向导 ========== */
#certTemplateWizardModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

#certTemplateWizardModal.active {
    display: flex;
}

.cert-wizard-dialog {
    background: white;
    border-radius: 16px;
    width: 780px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: modalFadeIn 0.3s ease;
}

.cert-wizard-dialog .modal-header {
    flex-shrink: 0;
}

.cert-wizard-dialog .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cert-wizard-dialog .modal-footer {
    flex-shrink: 0;
}

/* 表单组件补充 */
.form-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s;
    font-family: inherit;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
    min-height: 100px;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.cert-wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 40px;
    background: #f8f9fc;
    border-radius: 12px;
    margin-bottom: 24px;
}

.cert-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: default;
}

.cert-step .step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
}

.cert-step span {
    font-size: 13px;
    color: #999;
    transition: color 0.3s;
}

.cert-step.active .step-number {
    background: var(--gradient-primary);
    color: white;
}

.cert-step.active span {
    color: var(--primary);
    font-weight: 600;
}

.cert-step.done .step-number {
    background: var(--success);
    color: white;
}

.cert-step.done span {
    color: var(--success);
}

.cert-step-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 16px;
    margin-bottom: 24px;
    max-width: 80px;
    transition: background 0.3s;
}

.cert-step-line.done {
    background: var(--success);
}

.cert-wizard-body {
    min-height: 300px;
}

/* 字段选择网格 */
.field-check-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.field-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    user-select: none;
}

.field-check-item:hover {
    border-color: var(--primary);
    background: #f8f9ff;
}

.field-check-item input[type="checkbox"] {
    accent-color: var(--primary);
}

/* 配色方案网格 */
.color-scheme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.color-scheme-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    user-select: none;
}

.color-scheme-item:hover {
    border-color: var(--primary);
}

.color-scheme-item.active {
    border-color: var(--primary);
    background: #f8f9ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.color-dot {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 边框样式网格 */
.border-style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.border-style-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    user-select: none;
}

.border-style-item:hover {
    border-color: var(--primary);
}

.border-style-item.active {
    border-color: var(--primary);
    background: #f8f9ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.border-preview {
    display: block;
    width: 120px;
    height: 70px;
    background: white;
    border-radius: 4px;
}

.border-style-double {
    border: 3px double #667eea;
}

.border-style-single {
    border: 3px solid #667eea;
}

.border-style-ornate {
    border: 3px solid #667eea;
    box-shadow: inset 0 0 0 4px white, inset 0 0 0 6px #667eea;
}

/* 证书预览区 */
.cert-preview-section {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.cert-preview-card {
    flex-shrink: 0;
    width: 320px;
}

.cert-preview-inner {
    border: 3px double #667eea;
    border-radius: 12px;
    padding: 30px 24px;
    min-height: 320px;
    position: relative;
    background: linear-gradient(135deg, #f8f9ff, #eef0ff);
}

.cert-preview-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
}

.cert-preview-fields {
    font-size: 14px;
    line-height: 2.4;
    color: #333;
}

.cert-preview-seal {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border: 2px solid #f5576c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #f5576c;
    transform: rotate(-15deg);
}

.cert-preview-info {
    flex: 1;
}

.cert-preview-info p {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.8;
}

.cert-preview-info strong {
    color: var(--text-secondary);
    margin-right: 8px;
}

.cert-wizard-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 证书向导响应式 */
@media (max-width: 768px) {
    .field-check-grid,
    .color-scheme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .border-style-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-preview-section {
        flex-direction: column;
        align-items: center;
    }
    
    .cert-preview-card {
        width: 100%;
        max-width: 320px;
    }
    
    .cert-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-left {
        flex-direction: column;
    }
    
    .search-input-wrap {
        min-width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
}

/* 角色卡片 */
.role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.role-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.role-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.role-icon i {
    font-size: 22px;
    color: white;
}

.role-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.role-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ========== 错题统计 ========== */

/* 统计卡片行 */
.wrong-stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.wrong-stat-card {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.wrong-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.wrong-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.wrong-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* 错题统计 Tabs */
.wrong-stats-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.wrong-stats-tab {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-secondary);
    transition: all 0.3s;
    user-select: none;
}

.wrong-stats-tab:hover {
    color: var(--primary);
}

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

.wrong-stats-pane {
    display: none;
}

.wrong-stats-pane.active {
    display: block;
}

/* 错题统计筛选栏 */
.wrong-stats-filter {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.wrong-stats-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 响应式 */
@media (max-width: 768px) {
    .wrong-stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .wrong-stats-tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .wrong-stats-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ========== 批量阅卷 ========== */

.grading-top-bar {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.grading-summary {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.grading-summary strong {
    color: var(--primary);
    font-size: 18px;
    margin: 0 2px;
}

/* 学员卡片 */
.grading-student-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.grading-student-card:hover {
    box-shadow: var(--shadow-md);
}

.grading-student-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f8f9fc, #eef0f7);
    border-bottom: 1px solid var(--border-color);
}

.grading-student-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.grading-student-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.grading-student-dept {
    font-size: 13px;
    color: var(--text-secondary);
    background: #e8ecf1;
    padding: 2px 10px;
    border-radius: 10px;
}

.grading-q-count {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.grading-answers-list {
    padding: 0;
}

.grading-answer-item {
    padding: 16px 20px;
    border-bottom: 1px dashed var(--border-color);
}

.grading-answer-item:last-child {
    border-bottom: none;
}

.grading-question-stem {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

.grading-question-label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #667eea;
    padding: 1px 8px;
    border-radius: 4px;
    height: fit-content;
}

.grading-answer-text {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    background: #fafbfc;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.grading-answer-label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #43e97b;
    padding: 1px 8px;
    border-radius: 4px;
    height: fit-content;
}

.grading-answer-text p {
    margin: 0;
}

.grading-score-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.grading-score-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.grading-score-input label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.grading-score-field {
    width: 80px;
    padding: 6px 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    color: var(--primary);
    transition: border-color 0.3s;
}

.grading-score-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.grading-max-score {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.grading-note-input {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.grading-note-input label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.grading-note-field {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.grading-note-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.grading-note-field::placeholder {
    color: #c0c4cc;
}

/* 响应式 */
@media (max-width: 768px) {
    .grading-top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .grading-score-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .grading-note-input {
        flex-direction: column;
        align-items: stretch;
    }
}

/* AI 阅卷徽章 */
.ai-graded-badge {
    font-size: 11px;
    font-weight: 600;
    color: #667eea;
    background: rgba(102, 126, 234, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    animation: ai-pulse 2s ease-in-out infinite;
}

@keyframes ai-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* AI 打分输入框 */
.ai-score-field {
    background: rgba(102, 126, 234, 0.06);
    border-color: rgba(102, 126, 234, 0.3) !important;
}

.ai-score-field:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
}

.ai-score-field.manual-edited {
    background: rgba(67, 233, 123, 0.06);
    border-color: rgba(67, 233, 123, 0.4) !important;
}

.ai-score-field.manual-edited:focus {
    border-color: #43e97b !important;
    box-shadow: 0 0 0 3px rgba(67, 233, 123, 0.15) !important;
}

/* 角色标签 */
.role-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.role-badge.super {
    background: rgba(245, 87, 108, 0.15);
    color: #e74c3c;
}

/* 设置区域 */
.settings-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.settings-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

/* 图标按钮 */
.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(245, 87, 108, 0.1);
    color: var(--danger);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label .required {
    color: var(--danger);
    margin-left: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
    
    .analytics-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .data-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-cards {
        grid-template-columns: 1fr;
    }
    
    .question-layout {
        grid-template-columns: 1fr;
    }
}

/* 步骤指示器 */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
}

.step.active .step-num {
    background: var(--gradient-primary);
}

.step.completed .step-num {
    background: var(--gradient-success);
}

.step-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-line {
    width: 60px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 10px;
    margin-bottom: 25px;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.upload-placeholder i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 15px;
}

.upload-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

/* ========== 课程详情页 ========== */
.course-detail-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.course-detail-cover {
    flex-shrink: 0;
}

.course-detail-meta {
    flex: 1;
}

.course-detail-meta h2 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.course-meta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.course-meta-row i {
    margin-right: 4px;
    color: var(--primary);
}

.course-detail-body {
    max-height: 55vh;
    overflow-y: auto;
}

.detail-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.detail-section h4 i {
    color: var(--primary);
    margin-right: 6px;
}

.chapter-card {
    background: #f8f9fc;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.chapter-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #eef1f8;
    font-weight: 600;
    font-size: 14px;
}

.chapter-name {
    flex: 1;
}

.chapter-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

.chapter-lessons {
    padding: 8px 16px;
}

.chapter-lessons .lesson-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f8;
    background: transparent;
    margin-bottom: 0;
    border-radius: 0;
}

.chapter-lessons .lesson-item:last-child {
    border-bottom: none;
}

.lesson-type-badge {
    padding: 2px 8px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .course-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .course-meta-row {
        justify-content: center;
    }
}

/* ==================== 课程数据统计 ==================== */
.course-stats-container {
    max-height: 70vh;
    overflow-y: auto;
}

/* 统计卡片 */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 16px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stat-card.blue {
    background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fd 100%);
    border-left: 4px solid #4285f4;
}

.stat-card.green {
    background: linear-gradient(135deg, #e6f4ea 0%, #ceead6 100%);
    border-left: 4px solid #34a853;
}

.stat-card.orange {
    background: linear-gradient(135deg, #fef7e0 0%, #feefc3 100%);
    border-left: 4px solid #fbbc04;
}

.stat-card.gray {
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    border-left: 4px solid #9aa0a6;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card.blue .stat-card-icon {
    background: #4285f4;
    color: #fff;
}

.stat-card.green .stat-card-icon {
    background: #34a853;
    color: #fff;
}

.stat-card.orange .stat-card-icon {
    background: #fbbc04;
    color: #fff;
}

.stat-card.gray .stat-card-icon {
    background: #9aa0a6;
    color: #fff;
}

.stat-card-info {
    display: flex;
    flex-direction: column;
}

.stat-card-num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card.blue .stat-card-num { color: #1a5fc7; }
.stat-card.green .stat-card-num { color: #1e7e34; }
.stat-card.orange .stat-card-num { color: #b8860b; }
.stat-card.gray .stat-card-num { color: #5f6368; }

.stat-card-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* 考试统计卡片 — 通过率样式 */
.stat-card-rate {
    font-size: 14px;
    font-weight: 500;
    margin-left: 4px;
}

.stat-card.green .stat-card-rate {
    color: #1e7e34;
}

/* 筛选栏 */
.stats-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: #f8f9fc;
    border-radius: 10px;
    margin-bottom: 16px;
}

.stats-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stats-filter-row label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.filter-input {
    width: 150px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
}

.filter-keyword {
    width: 200px !important;
}

.stats-filter-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-sm {
    padding: 6px 14px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
}

/* 进度条 */
.stat-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.stat-progress-bar {
    flex: 1;
    height: 6px;
    background: #e8eaed;
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}

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

.stat-progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 32px;
    text-align: right;
}

/* 统计表格 */
.stats-table-container {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.stats-table {
    margin-bottom: 0;
}

.stats-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.stats-table thead th {
    background: #f8f9fc;
    font-size: 13px;
    padding: 12px 14px;
}

.stats-table tbody td {
    font-size: 13px;
    padding: 10px 14px;
    vertical-align: middle;
}

.stats-table-footer {
    padding: 12px 0 0;
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 统计弹窗加宽 */
#modal.stats-wide {
    --modal-max-width: 960px;
}

#modal.stats-wide .modal-content {
    max-width: 960px;
    width: 95vw;
}

@media (max-width: 768px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-filter-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-input, .filter-keyword {
        width: 100% !important;
    }
    
    #modal.stats-wide .modal-content {
        max-width: 98vw;
    }
}

/* 章节管理 */
.chapter-manager {
    max-height: 500px;
    overflow-y: auto;
}

.chapter-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.chapter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.chapter-title {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chapter-actions {
    display: flex;
    gap: 5px;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 5px;
    border: 1px solid #f0f0f0;
}

.lesson-icon {
    color: var(--primary);
}

.lesson-title {
    flex: 1;
}

.lesson-duration {
    font-size: 12px;
    color: var(--text-secondary);
}

.lesson-actions {
    display: flex;
    gap: 5px;
}

/* 视频上传 */
.video-upload-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.video-upload-progress {
    flex: 1;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 5px;
}

/* 大弹窗 */
.modal-lg {
    max-width: 800px;
}

/* 弹题配置动画 */
.quiz-config {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 课件相关样式 ========== */

/* 课件类型徽标 */
.lesson-type-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    white-space: nowrap;
}

.lesson-type-video { color: #4facfe; }
.lesson-type-document { color: #f6d365; }
.lesson-type-image { color: #43e97b; }
.lesson-type-link { color: #f093fb; }

/* 课件编辑弹窗 */
.courseware-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.courseware-popup {
    background: white;
    border-radius: 12px;
    width: 560px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.courseware-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.courseware-popup-header h4 {
    font-size: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.courseware-popup-body {
    padding: 20px 24px;
}

.courseware-popup-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 课件类型选择器 */
.courseware-type-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 8px;
}

@media (max-width: 500px) {
    .courseware-type-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cw-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.cw-type-card:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.cw-type-card.active {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.cw-type-card i {
    font-size: 22px;
    color: var(--primary);
}

.cw-type-card span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.cw-type-card.active span {
    color: var(--primary);
    font-weight: 600;
}

/* ========== 高级设置样式 ========== */

.setting-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.setting-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-section-title i {
    color: var(--primary);
    width: 20px;
}

.setting-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-radio {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.setting-radio:hover {
    border-color: var(--primary);
}

.setting-radio:has(input:checked) {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.setting-radio input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.setting-radio-content strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.setting-radio-content span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 设置开关列表 */
.setting-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.setting-toggle-info strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.setting-toggle-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.setting-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.setting-toggle-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

/* 人脸识别监考配置行 */
.face-config-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 10px 16px;
    background: var(--bg-hover);
    border-radius: 10px;
    margin-bottom: 8px;
}

.face-config-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
    flex-shrink: 0;
}

.face-config-label i {
    color: var(--primary-color);
    font-size: 14px;
}

.face-config-control {
    flex: 1;
}

.face-config-control select,
.face-config-control input {
    font-size: 13px;
}

/* iOS风格开关 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* ========== Tab Pane Card ========== */
.tab-pane-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.tab-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

/* ========== Setting Radio Active (onclick variant) ========== */
.setting-radio.active {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.setting-radio-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(102, 126, 234, 0.1);
}

.setting-radio-icon i {
    font-size: 18px;
    color: var(--primary);
}

.setting-radio-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.setting-radio-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ========== Exam Wizard Modal ========== */
#examWizardModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

#examWizardModal.active {
    display: flex;
}

.exam-wizard-dialog {
    background: white;
    border-radius: 16px;
    width: 850px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.exam-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.exam-wizard-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text-primary);
}

.exam-wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ========== Exam Steps Indicator ========== */
.exam-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    padding: 0 60px;
}

.exam-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: default;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    background: #e8e8e8;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.exam-step.active .step-number {
    background: var(--primary);
    color: white;
}

.exam-step.completed .step-number {
    background: var(--primary);
    color: white;
}

.exam-step.completed .step-number::after {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 14px;
}

.step-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.exam-step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.exam-step.completed .step-label {
    color: var(--primary);
}

.exam-step-line {
    flex: 1;
    height: 2px;
    background: #e8e8e8;
    margin: 0 12px;
    margin-bottom: 24px;
    transition: all 0.3s;
}

.exam-step-line.completed {
    background: var(--primary);
}

/* ========== Exam Step Content ========== */
.exam-step-content {
    display: none;
}

.exam-step-content.active {
    display: block;
}

/* ========== Exam Generation Rules ========== */
.exam-gen-section {
    margin-top: 16px;
}

.exam-gen-rules {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exam-gen-rule {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* ========== Manual Question Pick ========== */
.manual-pick-area {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 16px;
    min-height: 400px;
}

.manual-pick-left {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    overflow-y: auto;
}

.manual-pick-right {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    background: #fafafa;
}

.question-pick-list {
    max-height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.question-pick-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.question-pick-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.question-pick-item input[type="checkbox"] {
    flex-shrink: 0;
    accent-color: var(--primary);
}

.q-type-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
    text-align: center;
    min-width: 32px;
}

.q-type-badge.single {
    background: rgba(102, 126, 234, 0.12);
    color: var(--primary);
}

.q-type-badge.multiple {
    background: rgba(245, 87, 108, 0.12);
    color: #f5576c;
}

.q-type-badge.judge {
    background: rgba(52, 152, 219, 0.12);
    color: #3498db;
}

.q-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.q-score {
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.picked-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.picked-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 12px;
}

/* ========== Exam Wizard Footer ========== */
.exam-wizard-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ========== Responsive: Exam ========== */
@media (max-width: 768px) {
    .manual-pick-area {
        grid-template-columns: 1fr;
    }
    
    .exam-wizard-dialog {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .exam-steps {
        padding: 0 20px;
    }
    
    .exam-gen-rule {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .analytics-charts-row {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        height: 250px;
    }
}

/* ==================== 认证项目管理 ==================== */

/* 阶段项样式 */
.stage-item {
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
}

.stage-item:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

/* 阶段标题输入 */
.stage-title-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.stage-title-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 课程和试卷选择标签 */
.stage-courses-select label,
.stage-exams-select label {
    transition: all 0.3s ease;
}

.stage-courses-select label:hover,
.stage-exams-select label:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.05);
}

.stage-courses-select input[type="checkbox"]:checked + span,
.stage-exams-select input[type="checkbox"]:checked + span {
    color: #667eea;
    font-weight: 500;
}

.stage-courses-select label:has(input[type="checkbox"]:checked),
.stage-exams-select label:has(input[type="checkbox"]:checked) {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

/* 阶段管理界面 */
.stage-manage-item {
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.stage-manage-item:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

/* 封面预览 */
#certCoverPreview {
    transition: all 0.3s ease;
    border: 2px dashed #e8e8e8;
    cursor: pointer;
}

#certCoverPreview:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

/* 价格类型单选按钮 */
input[type="radio"][name="priceType"] {
    accent-color: #667eea;
}

/* 认证项目表单行 */
.cert-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.cert-form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* 认证项目统计卡片图标 */
#page-certifications .data-card .card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

/* ==================== 认证项目卡片式布局 ==================== */

/* 项目卡片网格 */
.cert-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* 单个项目卡片 */
.cert-project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.cert-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

/* 卡片封面 */
.cert-card-cover {
    height: 160px;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px;
    color: white;
}

.cert-card-status {
    position: absolute;
    top: 16px;
    left: 16px;
}

.cert-card-status .status-badge {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cert-card-price {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 18px;
    font-weight: 700;
}

.cert-price.free {
    color: #43e97b;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cert-price.paid {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 卡片内容 */
.cert-card-body {
    padding: 20px;
}

.cert-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cert-card-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 13px;
    margin-bottom: 16px;
}

.cert-card-time i {
    color: #667eea;
    font-size: 14px;
}

/* 统计信息 */
.cert-card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.cert-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 13px;
}

.cert-stat-item i {
    color: #667eea;
    font-size: 14px;
}

/* 阶段预览 */
.cert-card-stages {
    margin-bottom: 16px;
}

.stages-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cert-stage-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.cert-stage-mini:hover {
    background: #f0f2ff;
}

.stage-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.stage-name {
    flex: 1;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stage-count {
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}

.cert-stage-mini.more {
    justify-content: center;
    color: #667eea;
    font-weight: 500;
    cursor: pointer;
}

.cert-stage-mini.more:hover {
    background: #e8eaff;
}

/* 操作按钮 */
.cert-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    justify-content: flex-end;
}

.cert-card-actions .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.cert-card-actions .btn-icon:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.cert-card-actions .btn-icon[title="删除"]:hover {
    background: #f5576c;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .cert-projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .cert-projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .cert-card-cover {
        height: 140px;
    }
    
    .cert-card-body {
        padding: 16px;
    }
    
    .cert-card-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .cert-projects-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-card-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================================
   部门管理页面样式
   ============================================================ */

/* 左右布局 */
.dept-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    min-height: 1000px;
}

/* 左侧部门树面板 */
.dept-tree-panel {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100vh - 140px);
}

.dept-tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
}

.dept-tree-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dept-tree-title i {
    color: var(--primary);
}

.dept-tree-search {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.dept-tree-search input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s;
    background: var(--bg-main) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23999' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
}

.dept-tree-search input:focus {
    border-color: var(--primary);
    background-color: white;
}

.dept-tree-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* 树节点 */
.dept-tree-node {
    position: relative;
}

.dept-tree-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    white-space: nowrap;
}

.dept-tree-row:hover {
    background: rgba(102, 126, 234, 0.06);
}

.dept-tree-node.selected > .dept-tree-row {
    background: rgba(102, 126, 234, 0.12);
}

.dept-tree-node.selected > .dept-tree-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
}

.dept-tree-arrow {
    font-size: 11px;
    color: var(--text-secondary);
    width: 14px;
    text-align: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.dept-tree-arrow:hover {
    color: var(--primary);
}

.dept-tree-arrow-placeholder {
    width: 14px;
    flex-shrink: 0;
}

.dept-tree-icon {
    font-size: 14px;
    color: var(--primary);
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.dept-tree-name {
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dept-tree-count {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-main);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.dept-tree-status.disabled {
    font-size: 10px;
    color: var(--text-light);
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.dept-tree-ops {
    display: none;
    gap: 4px;
    flex-shrink: 0;
}

.dept-tree-row:hover .dept-tree-ops {
    display: flex;
}

.dept-tree-ops i {
    font-size: 11px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.dept-tree-ops i:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.dept-tree-ops i[title="删除"]:hover {
    color: var(--danger);
    background: rgba(245, 87, 108, 0.1);
}

.dept-tree-row:hover .dept-tree-count {
    display: none;
}

/* 搜索高亮 */
.dept-highlight {
    color: var(--primary);
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 2px;
    padding: 0 2px;
}

/* 右侧详情面板 */
.dept-detail-panel {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 24px;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

.dept-detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 800px;
    color: var(--text-light);
    gap: 16px;
}

.dept-detail-empty i {
    font-size: 48px;
}

.dept-detail-empty p {
    font-size: 14px;
}

/* 详情头部 */
.dept-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.dept-detail-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dept-detail-avatar {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.dept-detail-title h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.dept-detail-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* 信息网格 */
.dept-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.dept-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: var(--bg-main);
    border-radius: 8px;
    transition: background 0.2s;
}

.dept-info-item:hover {
    background: rgba(102, 126, 234, 0.04);
}

.dept-info-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.dept-info-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

/* 成员列表 */
.dept-members-section {
    margin-top: 8px;
}

.dept-members-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dept-members-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dept-members-header h4 i {
    color: var(--primary);
}

.dept-members-table {
    width: 100%;
}

.dept-members-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.03);
}

.dept-member-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dept-members-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-light);
    gap: 12px;
}

.dept-members-empty i {
    font-size: 36px;
}

.dept-members-empty span {
    font-size: 14px;
}

/* 滚动条样式 */
.dept-tree-body::-webkit-scrollbar,
.dept-detail-panel::-webkit-scrollbar {
    width: 6px;
}

.dept-tree-body::-webkit-scrollbar-thumb,
.dept-detail-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.dept-tree-body::-webkit-scrollbar-track,
.dept-detail-panel::-webkit-scrollbar-track {
    background: transparent;
}

/* 响应式 */
@media (max-width: 1024px) {
    .dept-layout {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 768px) {
    .dept-layout {
        grid-template-columns: 1fr;
    }

    .dept-tree-panel {
        max-height: 350px;
    }

    .dept-info-grid {
        grid-template-columns: 1fr;
    }

    .dept-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* 学员管理表单分组 */
.student-form-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.student-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.student-form-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.student-form-section h4 i {
    color: var(--primary-color);
    font-size: 15px;
}

/* 学员档案详情查看 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 24px;
}
.detail-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.detail-label {
    font-size: 12px;
    color: var(--text-light);
}
.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 学员标签徽章（详情查看） */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    margin: 2px 4px 2px 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color);
    background: rgba(64, 132, 244, 0.1);
    border: 1px solid rgba(64, 132, 244, 0.25);
    border-radius: 12px;
    white-space: nowrap;
}
.tag-chip i {
    font-size: 10px;
}

/* 学员标签选择器（表单） */
.tag-picker {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    background: var(--bg-hover);
}
.tag-picker-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
    margin-bottom: 8px;
    padding: 6px;
    background: #fff;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
}
.tag-picker-selected:empty::before {
    content: '暂未选择标签';
    color: var(--text-light);
    font-size: 13px;
    line-height: 20px;
}
.tag-picker-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: var(--primary-color);
    border-radius: 12px;
    cursor: pointer;
    transition: opacity 0.15s;
}
.tag-picker-chip:hover {
    opacity: 0.85;
}
.tag-picker-chip i {
    font-size: 10px;
}
.tag-picker-input-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.tag-picker-input-row input {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
}
.tag-picker-input-row input:focus {
    border-color: var(--primary-color);
}
.tag-picker-input-row button {
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
}
.tag-picker-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag-picker-pool-label {
    width: 100%;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}
.tag-pool-item {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 12px;
    color: var(--text-secondary);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.tag-pool-item:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.tag-pool-item.selected {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* ====== 课程表单：课件管理 ====== */
.cw-form-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-hover);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s;
}
.cw-form-item:hover {
    background: var(--bg-active);
}
.cw-drag-handle {
    color: var(--text-light);
    cursor: grab;
    font-size: 14px;
}
.cw-type-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}
.cw-form-info {
    flex: 1;
    min-width: 0;
}
.cw-form-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cw-form-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}
.cw-add-area {
    padding: 16px;
    background: var(--bg-hover);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

/* ====== 课程表单：开放对象 ====== */
.audience-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(79,108,255,0.08), rgba(79,108,255,0.03));
    border: 1px solid rgba(79,108,255,0.2);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s;
}
.audience-chip i {
    cursor: pointer;
    font-size: 11px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.audience-chip i:hover {
    opacity: 1;
    color: #e74c3c;
}
.audience-check-item:hover {
    background: var(--bg-hover) !important;
}

/* 开放对象逻辑切换 */
.audience-logic-toggle {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border-radius: 10px;
}
.logic-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
}
.logic-option i {
    font-size: 16px;
}
.logic-option.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* 开放对象分组行 */
.audience-group-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.audience-group-row:last-child {
    border-bottom: none;
}
.audience-group-label {
    flex: 0 0 100px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding-top: 6px;
}
.audience-group-label i {
    color: var(--primary-color);
    font-size: 12px;
}
.audience-group-count {
    color: var(--text-light);
    font-weight: 400;
}
.audience-group-chips {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* 公告开放对象逻辑条 */
.audience-logic {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border-radius: 10px;
}
.audience-logic-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}
.audience-groups {
    margin-top: 2px;
}
.audience-groups .audience-group-row:first-child {
    padding-top: 4px;
}

/* 通过条件卡片 */
.course-pass-radio {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
    background: var(--bg-card);
}
.course-pass-radio i {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 4px;
}
.course-pass-radio span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.course-pass-radio small {
    font-size: 12px;
    color: var(--text-light);
}
.course-pass-radio.active {
    border-color: var(--primary-color);
    background: rgba(79, 108, 255, 0.04);
}
.course-pass-radio.active i {
    color: var(--primary-color);
}

/* 开关行 */
.toggle-switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

/* 超小按钮 */
.btn-xs {
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ====== 课程工作流弹窗 ====== */
#modal.course-wizard .modal-content,
#modal.project-wizard .modal-content {
    max-width: 1080px;
    width: 95vw;
    max-height: 92vh;
}

#modal.course-wizard .modal-body,
#modal.project-wizard .modal-body {
    padding: 24px 28px;
}

/* 步骤指示器 */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    padding: 0 20px;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    transition: all 0.3s;
}

.ws-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #fff;
    color: #c5cad6;
    border: 2px solid #e4e8ef;
    box-shadow: 0 0 0 6px rgba(228, 232, 239, 0.5);
    transition: all 0.3s;
}

.ws-label {
    font-size: 14px;
    font-weight: 500;
    color: #c5cad6;
    white-space: nowrap;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.wizard-step.active .ws-num {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 0 8px rgba(118, 75, 162, 0.15), 0 8px 20px rgba(102, 126, 234, 0.45);
    transform: scale(1.08);
}

.wizard-step.active .ws-label {
    color: #1f2330;
    font-weight: 700;
}

.wizard-step.done .ws-num {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 0 6px rgba(118, 75, 162, 0.12);
}

.wizard-step.done .ws-label {
    color: var(--primary);
}

.ws-line {
    flex: 1;
    height: 3px;
    background: #e4e8ef;
    margin: 0 16px;
    margin-bottom: 28px;
    border-radius: 2px;
    transition: background 0.4s;
    max-width: 160px;
}

.ws-line.active {
    background: linear-gradient(to right, #764ba2 0%, #c5cad6 100%);
}

/* 步骤面板 */
.wizard-panel {
    display: none;
    animation: wizardPanelFadeIn 0.3s ease;
}

.wizard-panel.active {
    display: block;
}

@keyframes wizardPanelFadeIn {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 工作流底部按钮栏 */
#wizardFooterBar .btn {
    min-width: 110px;
}

/* ====== 课件上传（多章节式） ====== */
.cw-upload-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.cw-upload-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.cw-upload-subtitle {
    font-size: 13px;
    color: var(--text-light);
}

/* 添加章节行 */
.cw-add-chapter-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.cw-chapter-summary {
    font-size: 13px;
    color: var(--text-light);
}

/* 章节块 */
.cw-chapter-block {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin-bottom: 20px;
    overflow: hidden;
    background: var(--bg-card);
}

.cw-chapter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-color);
}

.cw-chapter-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cw-chapter-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.cw-chapter-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.cw-chapter-count-badge {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.cw-chapter-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cw-chapter-actions .btn-icon[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.cw-del-btn:hover {
    color: #e74c3c !important;
}

/* 章节课件列表 */
.cw-chapter-cws {
    padding: 12px 16px 4px;
}

.cw-chapter-empty {
    text-align: center;
    padding: 24px 0;
    color: var(--text-light);
    font-size: 13px;
}

.cw-chapter-empty i {
    margin-right: 6px;
    opacity: 0.5;
}

/* 添加课件卡片（章节内联） */
.cw-add-actions-inline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 12px 16px 16px;
}

.cw-add-actions-inline .cw-add-card {
    padding: 16px 8px;
    border-radius: 10px;
}

.cw-add-actions-inline .cw-add-card i {
    font-size: 20px;
}

.cw-add-actions-inline .cw-add-card span {
    font-size: 13px;
}

.cw-add-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    background: var(--bg-card);
}

.cw-add-card:hover {
    border-color: var(--primary-color);
    background: rgba(79, 108, 255, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(79, 108, 255, 0.1);
}

.cw-add-card span {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== 试卷管理样式 ==================== */

/* 试卷详情弹窗 */
.paper-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.paper-detail-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}
.paper-detail-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg-hover);
    border-radius: 8px;
    line-height: 1.6;
}
.paper-detail-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-hover);
    border-radius: 12px;
}
.paper-detail-info-grid .detail-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.paper-detail-info-grid .detail-label {
    font-size: 12px;
    color: var(--text-light);
}
.paper-detail-info-grid .detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 试卷统计卡片 */
.paper-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.paper-stat-item {
    text-align: center;
    padding: 14px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.06));
    border-radius: 12px;
}
.paper-stat-val {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}
.paper-stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* 试卷题目列表 */
.paper-questions-section {
    margin-top: 8px;
}
.paper-q-group {
    margin-bottom: 20px;
}
.paper-q-group-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.08));
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary-color);
}
.paper-q-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-light);
    margin-left: 6px;
}
.paper-q-item {
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 10px;
}
.paper-q-stem {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.7;
}
.paper-q-option {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 3px 0 3px 20px;
    line-height: 1.6;
}
.paper-q-answer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}
.paper-q-answer-label {
    font-size: 12px;
    color: var(--text-light);
}
.paper-q-answer-val {
    font-size: 14px;
    font-weight: 700;
    color: #e74c3c;
}
.paper-q-score {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 4px;
}
.paper-q-analysis {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(241, 196, 15, 0.08);
    border-radius: 6px;
    line-height: 1.6;
}
.paper-q-analysis i {
    color: #f1c40f;
    margin-right: 4px;
}

/* 试卷编辑 - 题型分布编辑器 */
.paper-edit-dist-section {
    margin-top: 16px;
    padding: 14px;
    background: var(--bg-hover);
    border-radius: 10px;
}
.paper-dist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.paper-dist-row select {
    flex: 1;
}
.paper-dist-row span {
    font-size: 13px;
    color: var(--text-light);
}
.paper-edit-tip {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(52, 152, 219, 0.08);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.paper-edit-tip i {
    color: #3498db;
    margin-right: 4px;
}

/* 试卷表格名称链接 */
.data-table td a {
    text-decoration: none;
}
.data-table td a:hover {
    text-decoration: underline;
}

/* ==================== 考试次数设置样式 ==================== */

.exam-attempts-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}
.exam-attempts-label {
    width: 120px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    padding-top: 8px;
}
.exam-attempts-control {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* 次数输入器 */
.exam-attempts-input-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 0.2s;
}
.exam-attempts-input-wrap:focus-within {
    border-color: var(--primary-color);
}
.exam-attempts-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-hover);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
    transition: background 0.2s;
}
.exam-attempts-btn:hover {
    background: rgba(102, 126, 234, 0.12);
    color: var(--primary-color);
}
.exam-attempts-input-wrap input {
    width: 60px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    outline: none;
    -moz-appearance: textfield;
}
.exam-attempts-input-wrap input::-webkit-inner-spin-button,
.exam-attempts-input-wrap input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.exam-attempts-unit {
    padding: 0 12px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    height: 36px;
    display: flex;
    align-items: center;
}

/* 不限次数 */
.exam-attempts-unlimited {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}
.exam-attempts-unlimited input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* 提示信息 */
.exam-attempts-tip {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(52, 152, 219, 0.08);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.exam-attempts-tip i {
    color: #3498db;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========== Fixed Paper (固定试卷) ========== */
.fixed-paper-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.fixed-paper-summary {
    margin-left: auto;
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}
.fixed-paper-summary strong {
    color: var(--primary-color, #667eea);
    font-size: 15px;
}
.fixed-paper-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-light, #bbb);
    border: 2px dashed var(--border-color, #e8e8e8);
    border-radius: 10px;
}
.fixed-paper-empty i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
    color: var(--text-light, #ccc);
}
.fixed-paper-empty p {
    font-size: 13px;
    margin: 0;
}
.fixed-paper-table-wrap {
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 10px;
    overflow: hidden;
}
.fixed-paper-table {
    margin-bottom: 0;
}
.fixed-paper-table th {
    background: #f5f6fa;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #666);
}
.fixed-paper-table td {
    font-size: 13px;
    vertical-align: middle;
}
.fixed-paper-score-input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    transition: border-color 0.2s;
}
.fixed-paper-score-input:focus {
    border-color: var(--primary-color, #667eea);
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* 题库选题弹窗 */
.picker-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.picker-count {
    font-size: 13px;
    color: var(--text-secondary, #666);
    white-space: nowrap;
}
.picker-count strong {
    color: var(--primary-color, #667eea);
    font-size: 15px;
}

/* ========== Project Wizard ========== */
.project-stage-card {
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    background: #fafafa;
}
.project-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.project-stage-num {
    font-weight: 600;
    color: var(--text-primary, #333);
    font-size: 14px;
}
.project-stage-actions {
    display: flex;
    gap: 4px;
}
.project-stage-actions .btn-icon[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}
.stage-pick-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.stage-pick-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
}
.stage-pick-chip:hover {
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.04);
}
.stage-pick-chip input[type="checkbox"] {
    accent-color: var(--primary-color, #667eea);
}
.stage-pick-chip:has(input:checked) {
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.08);
}

/* 项目通过设置 */
.project-pass-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.project-pass-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border: 2px solid var(--border-color, #e8e8e8);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.project-pass-radio:hover {
    border-color: var(--primary-color, #667eea);
}
.project-pass-radio.active {
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.05);
}
.project-pass-radio > i {
    font-size: 18px;
    color: var(--text-light, #ccc);
    margin-top: 1px;
}
.project-pass-radio.active > i {
    color: var(--primary-color, #667eea);
}

/* ==================== 通过后获取证书 ==================== */
.cert-toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    margin-left: 12px;
    vertical-align: middle;
}
.cert-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cert-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 22px;
    transition: 0.3s;
}
.cert-toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.cert-toggle-switch input:checked + .cert-toggle-slider {
    background-color: var(--primary-color, #667eea);
}
.cert-toggle-switch input:checked + .cert-toggle-slider::before {
    transform: translateX(18px);
}

/* 证书模版背景色 */
.cert-tpl-blue {
    background: linear-gradient(135deg, #e8ecfe, #f0e8fe);
}
.cert-tpl-red {
    background: linear-gradient(135deg, #fee8ec, #fff0e8);
}
.cert-tpl-green {
    background: linear-gradient(135deg, #e8feee, #e8feff);
}
.cert-tpl-orange {
    background: linear-gradient(135deg, #fee8f0, #fff8e8);
}
.cert-tpl-status {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
}
.cert-tpl-status.active {
    background: #e8f7ef;
    color: #52c41a;
}
.cert-tpl-status.draft {
    background: #fff7e6;
    color: #faad14;
}

/* 已选证书展示卡片 */
.cert-selected-card {
    display: flex;
    gap: 16px;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.cert-selected-preview {
    flex-shrink: 0;
    width: 180px;
    padding: 16px 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cert-selected-mock-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}
.cert-selected-mock-content {
    font-size: 11px;
    color: var(--text-secondary, #888);
    line-height: 1.6;
}
.cert-selected-mock-content p {
    margin: 2px 0;
}
.cert-selected-mock-seal {
    margin-top: 8px;
    display: inline-block;
    align-self: center;
    font-size: 10px;
    color: var(--text-light, #aaa);
    border: 1px dashed var(--text-light, #ccc);
    border-radius: 4px;
    padding: 2px 8px;
}
.cert-selected-info {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cert-selected-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.cert-selected-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #333);
}
.cert-selected-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}
.cert-selected-meta span {
    font-size: 12px;
    color: var(--text-secondary, #888);
}
.cert-selected-meta i {
    margin-right: 4px;
    color: var(--text-light, #bbb);
}
.cert-selected-note {
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 8px;
    font-size: 12px;
    color: var(--primary-color, #667eea);
    margin-bottom: 10px;
}
.cert-selected-note i {
    margin-right: 6px;
}
.cert-selected-actions {
    display: flex;
    gap: 8px;
}
.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
}

/* 电子证书库选择弹窗 */
.cert-lib-dialog {
    max-width: 720px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.cert-lib-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 2px solid var(--border-color, #e8e8e8);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.cert-lib-item:hover {
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}
.cert-lib-item.selected {
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.03);
}
.cert-lib-item-preview {
    flex-shrink: 0;
    width: 130px;
    padding: 10px 8px;
    text-align: center;
    border-radius: 8px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cert-lib-item-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}
.cert-lib-item-desc {
    font-size: 10px;
    color: var(--text-secondary, #888);
    line-height: 1.4;
}
.cert-lib-item-info {
    flex: 1;
}
.cert-lib-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.cert-lib-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333);
}
.cert-lib-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cert-lib-item-meta span {
    font-size: 12px;
    color: var(--text-secondary, #888);
}
.cert-lib-item-meta i {
    margin-right: 3px;
    color: var(--text-light, #bbb);
}
.cert-lib-item-check {
    flex-shrink: 0;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.cert-lib-item-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color, #667eea);
    cursor: pointer;
}
.cert-lib-item-check .fa-check-circle {
    display: none;
    font-size: 20px;
    color: var(--primary-color, #667eea);
}
.cert-lib-item.selected .cert-lib-item-check .fa-check-circle {
    display: block;
}
.cert-lib-item.selected .cert-lib-item-check input[type="radio"] {
    display: none;
}

/* 项目卡片中的证书标记 */
.cert-stat-item.cert-badge {
    color: var(--primary-color, #667eea);
    font-weight: 600;
}
.cert-stat-item.cert-badge i {
    color: var(--primary-color, #667eea);
}

/* ==================== 项目编辑独立页面 ==================== */
.project-edit-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 20px 0;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
    margin-bottom: 24px;
}
.project-edit-toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.project-edit-toolbar-left h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary, #333);
}
.project-edit-toolbar-right {
    display: flex;
    gap: 12px;
}
.project-edit-content {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 40px;
}
.project-edit-card {
    background: var(--bg-card, #fff);
    border-radius: 14px;
    border: 1px solid var(--border-color, #e8e8e8);
    margin-bottom: 24px;
    overflow: hidden;
}
.project-edit-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
    background: var(--bg-hover, #f9f9fb);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #333);
}
.project-edit-card-header > i {
    color: var(--primary-color, #667eea);
    font-size: 16px;
}
.project-edit-card-header .project-edit-card-action {
    margin-left: auto;
}
.project-edit-card-body {
    padding: 24px;
}
.project-edit-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color, #e8e8e8);
    margin-top: 8px;
}

/* ==================== 阶段课程/试卷选择器 ==================== */
.stage-task-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.stage-task-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 36px;
    padding: 8px;
    border: 1px dashed var(--border-color, #e0e0e0);
    border-radius: 8px;
    background: var(--bg-hover, #fafafa);
}
.stage-task-empty {
    color: var(--text-light, #bbb);
    font-size: 13px;
    padding: 4px 8px;
}
.stage-task-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    cursor: default;
    transition: all 0.2s;
}
.stage-task-chip.course {
    background: rgba(102, 126, 234, 0.1);
    color: #5568d3;
    border: 1px solid rgba(102, 126, 234, 0.2);
}
.stage-task-chip.exam {
    background: rgba(240, 147, 251, 0.1);
    color: #c44fc7;
    border: 1px solid rgba(240, 147, 251, 0.2);
}
.stage-task-chip > i:first-child {
    font-size: 12px;
}
.chip-remove {
    cursor: pointer !important;
    opacity: 0.6;
    font-size: 11px !important;
    padding: 2px;
    border-radius: 50%;
    transition: all 0.2s;
}
.chip-remove:hover {
    opacity: 1;
    background: rgba(245, 87, 108, 0.15);
    color: #f5576c !important;
}
.chip-badge {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.6);
    margin-left: 2px;
}
.stage-task-btns {
    display: flex;
    gap: 8px;
}

/* ==================== 选择器弹窗 ==================== */
.picker-dialog {
    background: var(--bg-card, #fff);
    border-radius: 14px;
    width: 560px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.picker-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}
.picker-dialog-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.picker-dialog-search {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}
.picker-dialog-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px;
    max-height: 400px;
}
.picker-dialog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color, #e8e8e8);
}
.picker-selected-count {
    font-size: 13px;
    color: var(--text-secondary, #888);
    font-weight: 500;
}
.picker-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 4px;
}
.picker-item:hover {
    background: var(--bg-hover, #f5f5f8);
}
.picker-item input[type="checkbox"] {
    margin-top: 3px;
    zoom: 1.15;
}
.picker-item-info {
    flex: 1;
}
.picker-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #333);
    line-height: 1.4;
}
.picker-item-meta {
    font-size: 12px;
    color: var(--text-light, #aaa);
    margin-top: 2px;
}

/* ==================== 创建试卷选项 ==================== */
.create-paper-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.create-paper-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 2px solid var(--border-color, #e8e8e8);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.create-paper-option:hover {
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.03);
}
.create-paper-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}
.create-paper-info {
    flex: 1;
}

/* ==================== 角色管理 ==================== */

/* 弹窗内表单输入框宽度修正（覆盖 .filter-input 的 150px !important） */
.exam-wizard-dialog .filter-input,
.modal-overlay .filter-input {
    width: 100% !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
}

/* 内容卡片容器 */
.content-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
    border: 1px solid var(--border-color, #e8e8e8);
    overflow: hidden;
    margin-bottom: 20px;
}
.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}
.content-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #333);
    display: flex;
    align-items: center;
    gap: 8px;
}
.content-card-header h3 i {
    color: var(--primary-color, #667eea);
    font-size: 15px;
}
.content-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* 卡片内的表格容器去掉独立卡片样式 */
.content-card .data-table-container {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}
.content-card .data-table-container .data-table thead th {
    padding: 10px 15px;
}
.content-card .data-table-container .data-table tbody td {
    padding: 10px 15px;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f6fa;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 8px;
    padding: 6px 12px;
}
.search-box i {
    color: var(--text-light, #aaa);
    font-size: 13px;
    flex-shrink: 0;
}
.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 13px;
    color: var(--text-primary, #333);
    flex: 1;
    min-width: 0;
}
.search-box input::placeholder {
    color: var(--text-light, #aaa);
}

/* 统计卡片行 */
.role-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.role-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
    border: 1px solid var(--border-color, #e8e8e8);
}
.role-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.role-stat-icon i {
    font-size: 20px;
    color: #fff;
}
.role-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #333);
    line-height: 1.2;
}
.role-stat-label {
    font-size: 13px;
    color: var(--text-secondary, #888);
    margin-top: 2px;
}

/* 角色列表 - 单元格 */
.role-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.role-cell-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.role-cell-icon i {
    font-size: 16px;
    color: #fff;
}
.role-cell-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary, #333);
}

/* 权限数标签 */
.perm-count-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color, #667eea);
}

/* 数据权限范围标签 */
.scope-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.scope-badge.all {
    background: #e6f7ff;
    color: #1890ff;
}
.scope-badge.mid {
    background: #f6ffed;
    color: #52c41a;
}
.scope-badge.dept {
    background: #fff7e6;
    color: #fa8c16;
}
.scope-badge.self {
    background: #fff1f0;
    color: #f5222d;
}

/* 角色标签（管理员表格中） */
.role-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

/* ==================== 角色编辑弹窗 ==================== */

.role-form-section {
    margin-bottom: 24px;
}
.role-form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}
.role-form-section-title i {
    color: var(--primary-color, #667eea);
}

/* 数据权限范围选择 */
.role-data-scope-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.role-data-scope-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 12px;
    border: 2px solid var(--border-color, #e8e8e8);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: #fff;
}
.role-data-scope-item:hover {
    border-color: var(--primary-color, #667eea);
}
.role-data-scope-item.active {
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.06);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}
.role-data-scope-item i {
    font-size: 22px;
    color: var(--text-secondary, #888);
}
.role-data-scope-item.active i {
    color: var(--primary-color, #667eea);
}
.role-data-scope-item span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #333);
}
.role-data-scope-item small {
    font-size: 11px;
    color: var(--text-light, #aaa);
    line-height: 1.4;
}

/* ==================== 权限树 ==================== */

.perm-tree {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 10px;
    padding: 8px;
}

.perm-tree-module {
    border-bottom: 1px solid var(--border-color-light, #f0f0f0);
}
.perm-tree-module:last-child {
    border-bottom: none;
}

.perm-tree-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 8px;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 8px;
}
.perm-tree-module-header:hover {
    background: rgba(102, 126, 234, 0.04);
}
.perm-tree-module-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.perm-tree-toggle-icon {
    font-size: 11px;
    color: var(--text-light, #aaa);
    width: 14px;
    text-align: center;
    transition: transform 0.2s;
}
.perm-tree-module-icon {
    font-size: 16px;
    color: var(--primary-color, #667eea);
    width: 20px;
    text-align: center;
}
.perm-tree-module-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333);
}
.perm-tree-module-count {
    font-size: 12px;
    color: var(--text-light, #aaa);
    background: #f5f5f5;
    padding: 1px 8px;
    border-radius: 10px;
}
.perm-tree-module.all-checked .perm-tree-module-count {
    background: rgba(82, 196, 26, 0.15);
    color: #52c41a;
}
.perm-tree-module.partial-checked .perm-tree-module-count {
    background: rgba(250, 173, 20, 0.15);
    color: #faad14;
}

.perm-tree-module-check {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary, #888);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.perm-tree-module-check:hover {
    background: rgba(0, 0, 0, 0.04);
}
.perm-tree-module-check input {
    cursor: pointer;
}

.perm-tree-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 8px 12px 36px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
    max-height: 200px;
    opacity: 1;
}
.perm-tree-module.collapsed .perm-tree-actions {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.perm-action-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary, #666);
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
}
.perm-action-item:hover {
    border-color: var(--primary-color, #667eea);
    color: var(--primary-color, #667eea);
}
.perm-action-item input {
    cursor: pointer;
    accent-color: var(--primary-color, #667eea);
}
.perm-action-item input:checked + span {
    color: var(--primary-color, #667eea);
    font-weight: 600;
}

/* 系统设置页面 - 系统参数表单 */
.settings-form {
    max-width: 680px;
}
.settings-form .form-row {
    margin-bottom: 16px;
}
.settings-form .filter-input {
    width: 100% !important;
}

/* ==================== 系统参数 - 功能权限分配 ==================== */
.perm-assign-hint {
    font-size: 12px;
    color: var(--text-light, #8492a6);
    font-weight: 400;
}

.perm-assign-body {
    display: flex;
    gap: 0;
    min-height: 520px;
    border-top: 1px solid #eef1f6;
}

.perm-assign-roles {
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid #eef1f6;
    display: flex;
    flex-direction: column;
    background: #fafbfc;
}

.perm-assign-roles-header {
    padding: 14px 16px;
    border-bottom: 1px solid #eef1f6;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.perm-assign-roles-header > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #5a6a7d);
    display: flex;
    align-items: center;
    gap: 6px;
}
.perm-assign-roles-header > span i { color: var(--primary-color, #667eea); }

.perm-assign-search {
    width: 100% !important;
    padding: 6px 10px !important;
    border: 1px solid #d5dce6 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    outline: none !important;
    background: #fff !important;
    box-sizing: border-box !important;
}
.perm-assign-search:focus {
    border-color: var(--primary-color, #667eea) !important;
}

.perm-assign-roles-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.perm-assign-roles-empty {
    text-align: center;
    padding: 30px 10px;
    color: var(--text-light, #8492a6);
    font-size: 13px;
}

.perm-role-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
    border: 1px solid transparent;
}
.perm-role-item:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.perm-role-item.selected {
    background: #fff;
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 2px 12px rgba(102,126,234,0.18);
}

.perm-role-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}
.perm-role-item-info {
    flex: 1;
    min-width: 0;
}
.perm-role-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #2c3e50);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.perm-role-sys-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #fff3e0;
    color: #fa8c16;
    font-weight: 500;
}
.perm-role-dirty-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #fff1f0;
    color: #f5222d;
    font-weight: 500;
}
.perm-role-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    font-size: 11px;
    color: var(--text-light, #8492a6);
}
.perm-role-item-code {
    font-family: Monaco, Consolas, monospace;
}
.perm-role-item-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.perm-role-item-status.enabled {
    background: #52c41a;
}
.perm-role-item-status.disabled {
    background: #d9d9d9;
}
.perm-role-item-count {
    color: var(--text-light, #8492a6);
}

/* 右侧详情 */
.perm-assign-detail {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.perm-assign-detail-header {
    padding: 14px 20px;
    border-bottom: 1px solid #eef1f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff;
}
.perm-assign-detail-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #2c3e50);
}
.perm-assign-detail-title > i {
    color: var(--text-light, #8492a6);
}
.perm-assign-role-badge {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
}
.perm-assign-sys-tip {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 8px;
    background: #e6f7ff;
    color: #1890ff;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.perm-assign-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.perm-assign-stat {
    font-size: 12px;
    color: var(--text-secondary, #5a6a7d);
    padding: 4px 10px;
    background: #f5f7fa;
    border-radius: 12px;
    margin-right: 4px;
}

.perm-assign-tree-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.perm-assign-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: var(--text-light, #8492a6);
    gap: 12px;
}
.perm-assign-empty i {
    font-size: 32px;
    color: #d5dce6;
}
.perm-assign-empty p {
    font-size: 13px;
}

/* 权限分配树复用 .perm-tree 样式，稍作间距调整 */
.perm-assign-tree .perm-tree-module {
    margin-bottom: 8px;
}

@media (max-width: 900px) {
    .perm-assign-body {
        flex-direction: column;
    }
    .perm-assign-roles {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eef1f6;
        max-height: 280px;
    }
}

/* ====== 项目数据统计页 ====== */
#page-project-stats .stats-summary {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.ps-section {
    margin-bottom: 24px;
}
#page-project-stats .stats-table-container {
    overflow-x: auto;
}
.ps-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
}
.ps-badge.done { background: #e6f4ea; color: #1e7e34; }
.ps-badge.doing { background: #e8f0fe; color: #1a5fc7; }
.ps-badge.fail { background: #fce8e8; color: #c5221f; }
.ps-badge.todo { background: #f1f3f4; color: #5f6368; }

/* 考试考生管理弹窗 */
.candidate-manager {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.candidate-summary {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 10px 14px;
    background: var(--bg-hover, #f6f8fc);
    border-radius: 8px;
}
.candidate-summary b {
    color: var(--primary-color, #4f6cff);
    font-weight: 700;
}
.candidate-divider {
    margin: 0 8px;
    color: var(--text-light, #b0b8c4);
}
.candidate-table-wrap {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #eef1f6);
    border-radius: 8px;
}
.candidate-add {
    background: var(--bg-hover, #f6f8fc);
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px dashed var(--border-color, #eef1f6);
}
.candidate-add-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #2c3e50);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.candidate-add-title i {
    color: var(--primary-color, #4f6cff);
}
.candidate-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.candidate-add-form input {
    flex: 1 1 130px;
    min-width: 110px;
    padding: 8px 10px;
    border: 1px solid var(--border-color, #eef1f6);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    transition: border-color 0.2s;
}
.candidate-add-form input:focus {
    outline: none;
    border-color: var(--primary-color, #4f6cff);
}
.candidate-add-form input[name="name"],
.candidate-add-form input#candInputName {
    flex: 1 1 150px;
}
.candidate-add-form .btn {
    flex: 0 0 auto;
    padding: 8px 16px;
    font-size: 13px;
}
.candidate-add-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 12px;
    flex-wrap: wrap;
}
.candidate-add-hint {
    font-size: 12px;
    color: var(--text-light, #b0b8c4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.candidate-add-hint i {
    color: var(--primary-color, #4f6cff);
}
#candClearBtn:disabled {
    pointer-events: none;
}

/* ==================== 权限配置页面 ==================== */
.btn-warning {
    background: linear-gradient(135deg, #ff9a3c 0%, #ff7e1f 100%);
    color: #fff;
    border: none;
}
.btn-warning:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 158, 47, 0.35);
}
.data-table tbody tr.tr-highlight {
    background: #fff7e6;
}
.data-table tbody tr.tr-highlight:hover {
    background: #fff1d6;
}
.role-action-link {
    color: #ff7e1f;
    text-decoration: none;
    margin: 0 6px;
    font-size: 13px;
    transition: color 0.2s;
}
.role-action-link:hover {
    color: #e0660b;
    text-decoration: underline;
}
.role-action-link.role-action-danger {
    color: #e74c3c;
}
.role-action-link.role-action-danger:hover {
    color: #c0392b;
}
.role-actions {
    white-space: nowrap;
}
#rolePagination {
    padding: 14px 20px;
}
#rolePagination .page-nav {
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.page-btn {
    min-width: 32px;
    padding: 0 8px;
    height: 32px;
    white-space: nowrap;
}
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.page-size-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: 6px;
}
.page-go {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.page-go input {
    width: 50px;
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
}

/* 权限分配弹窗 - 自定义宽度 */
#modal.modal-permissions .modal-content {
    width: 720px;
    max-width: 92vw;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
}
#modal.modal-permissions .modal-body {
    overflow-y: auto;
    max-height: calc(86vh - 130px);
    padding: 18px 22px;
}
.permission-summary {
    background: linear-gradient(135deg, rgba(255, 158, 47, 0.08), rgba(255, 126, 31, 0.04));
    border: 1px solid rgba(255, 158, 47, 0.2);
    color: #b35a10;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}
.permission-summary strong {
    color: #ff7e1f;
    font-size: 15px;
    margin: 0 3px;
}
.permission-tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f7f9fc;
    border-radius: 8px;
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
}
.permission-tree-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.permission-tree-tip {
    font-size: 12px;
    color: var(--text-secondary);
}
.permission-tree {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.permission-group {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.permission-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fafbff;
    border-bottom: 1px solid var(--border-color);
}
.permission-group-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}
.permission-group-count {
    font-size: 12px;
    color: var(--text-secondary);
}
.permission-group-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 14px;
}
.permission-node {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    background: #fff;
    transition: all 0.2s;
    user-select: none;
}
.permission-node:hover {
    border-color: var(--primary-color, #4f6cff);
    color: var(--primary-color, #4f6cff);
}
.permission-node.checked {
    background: rgba(79, 108, 255, 0.08);
    border-color: var(--primary-color, #4f6cff);
    color: var(--primary-color, #4f6cff);
}
.permission-node input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* ===================== 操作日志 ===================== */
.op-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.op-summary-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.op-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.op-summary-icon.total { background: rgba(79, 108, 255, 0.12); color: #4f6cff; }
.op-summary-icon.today { background: rgba(246, 211, 101, 0.15); color: #f39c12; }
.op-summary-icon.success { background: rgba(67, 233, 123, 0.15); color: #2ecc71; }
.op-summary-icon.fail { background: rgba(245, 87, 108, 0.15); color: #e74c3c; }
.op-summary-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}
.op-summary-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 模块标签 */
.op-module-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}
.op-module-tag.m-course { background: rgba(79, 108, 255, 0.12); color: #4f6cff; }
.op-module-tag.m-exam { background: rgba(155, 89, 182, 0.14); color: #9b59b6; }
.op-module-tag.m-student { background: rgba(26, 188, 156, 0.15); color: #16a085; }
.op-module-tag.m-project { background: rgba(243, 156, 18, 0.15); color: #e67e22; }
.op-module-tag.m-perm { background: rgba(52, 152, 219, 0.14); color: #2980b9; }
.op-module-tag.m-question { background: rgba(22, 160, 133, 0.14); color: #1abc9c; }
.op-module-tag.m-cert { background: rgba(233, 30, 99, 0.12); color: #e91e63; }
.op-module-tag.m-sys { background: #eef0f4; color: #7f8c8d; }
.op-module-tag.m-login { background: rgba(149, 165, 166, 0.18); color: #7f8c8d; }
.op-module-tag.m-default { background: #f5f5f5; color: #999; }

/* 操作类型徽章 */
.op-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}
.op-type-badge.t-add { background: rgba(67, 233, 123, 0.15); color: #2ecc71; }
.op-type-badge.t-edit { background: rgba(52, 152, 219, 0.14); color: #2980b9; }
.op-type-badge.t-del { background: rgba(245, 87, 108, 0.15); color: #e74c3c; }
.op-type-badge.t-view { background: #eef0f4; color: #7f8c8d; }
.op-type-badge.t-login { background: rgba(243, 156, 18, 0.15); color: #e67e22; }
.op-type-badge.t-export { background: rgba(155, 89, 182, 0.14); color: #9b59b6; }
.op-type-badge.t-import { background: rgba(26, 188, 156, 0.15); color: #16a085; }
.op-type-badge.t-audit { background: rgba(241, 196, 15, 0.18); color: #c79a05; }
.op-type-badge.t-default { background: #f5f5f5; color: #999; }

/* 表格 */
.op-time { font-variant-numeric: tabular-nums; color: var(--text-secondary); font-size: 13px; }
.op-ip { font-family: monospace; color: var(--text-secondary); font-size: 13px; }
.op-action-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.op-row { cursor: pointer; }
.op-row:hover { background: rgba(79, 108, 255, 0.05); }
.op-detail-link {
    color: var(--primary-color, #4f6cff);
    font-weight: 500;
    text-decoration: none;
}
.op-detail-link:hover { text-decoration: underline; }

.op-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    color: var(--text-secondary);
}
.op-empty-box i { font-size: 42px; margin-bottom: 12px; opacity: 0.4; }
.op-empty-box p { font-size: 14px; margin: 0; }

/* 详情弹窗 */
#modal.modal-log-detail .modal-content { max-width: 760px; }
.op-detail { padding: 4px 2px; }
.op-detail-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.op-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 16px;
    background: #fafbfc;
    border: 1px solid #eef0f4;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.op-detail-item { display: flex; flex-direction: column; gap: 4px; }
.op-di-k { font-size: 12px; color: var(--text-secondary); }
.op-di-v { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.op-detail-section { margin-bottom: 16px; }
.op-detail-sec-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 3px solid var(--primary-color, #4f6cff);
}
.op-detail-desc {
    font-size: 14px;
    color: var(--text-primary);
    background: #fafbfc;
    border-radius: 8px;
    padding: 10px 12px;
}
.op-detail-params {
    background: #1e2533;
    border-radius: 8px;
    padding: 12px 14px;
    max-height: 200px;
    overflow: auto;
}
.op-detail-param {
    display: flex;
    gap: 10px;
    font-family: monospace;
    font-size: 13px;
    padding: 3px 0;
}
.op-dp-key { color: #7fb0ff; min-width: 110px; }
.op-dp-val { color: #e6edf3; word-break: break-all; }
.op-detail-ua {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-secondary);
    background: #fafbfc;
    border-radius: 8px;
    padding: 10px 12px;
    word-break: break-all;
}
.op-detail-fail {
    background: rgba(245, 87, 108, 0.1);
    color: #e74c3c;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
}
.op-detail-fail i { margin-right: 6px; }

/* 变更前后对比 */
.op-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.op-diff-col {
    border: 1px solid #eef0f4;
    border-radius: 8px;
    overflow: hidden;
}
.op-diff-head {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.op-diff-head.minus { background: #e74c3c; }
.op-diff-head.plus { background: #2ecc71; }
.op-diff-row {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
    border-top: 1px solid #f3f4f6;
}
.op-diff-k { color: var(--text-secondary); min-width: 72px; }
.op-diff-v { color: var(--text-primary); font-weight: 500; word-break: break-all; }

.page-ellipsis {
    padding: 0 6px;
    color: var(--text-secondary);
}

@media (max-width: 1100px) {
    .op-summary { grid-template-columns: repeat(2, 1fr); }
    .op-detail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .op-summary { grid-template-columns: 1fr; }
    .op-detail-grid { grid-template-columns: 1fr; }
    .op-diff { grid-template-columns: 1fr; }
}

/* ===================== 公告管理 ===================== */
.ann-row { cursor: pointer; }
.ann-row:hover { background: rgba(79, 108, 255, 0.05); }
.ann-title-cell { display: flex; align-items: center; gap: 6px; padding: 10px 14px; vertical-align: middle; }
.ann-title { color: var(--primary-color, #4f6cff); font-weight: 500; }
.ann-title:hover { text-decoration: underline; }
.ann-actions { white-space: nowrap; }
.ann-pin { color: #e67e22; margin-right: 2px; }
.ann-pin-tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #e67e22;
    background: rgba(243, 156, 18, 0.12);
    border-radius: 20px; padding: 2px 10px;
}
.ann-level-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot-normal { background: #95a5a6; }
.dot-important { background: #e67e22; }
.dot-urgent { background: #e74c3c; }

.ann-status-badge, .ann-level-badge, .ann-scope-tag {
    display: inline-block; padding: 2px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 500; white-space: nowrap;
}
.ann-status-badge.s-published { background: rgba(67, 233, 123, 0.15); color: #2ecc71; }
.ann-status-badge.s-pending   { background: rgba(243, 156, 18, 0.15); color: #e67e22; }
.ann-status-badge.s-recalled  { background: rgba(245, 87, 108, 0.15); color: #e74c3c; }
.ann-status-badge.s-expired   { background: #eef0f4; color: #95a5a6; }
.ann-status-badge.s-default   { background: #f5f5f5; color: #999; }
.ann-level-badge.l-normal    { background: #eef0f4; color: #7f8c8d; }
.ann-level-badge.l-important { background: rgba(243, 156, 18, 0.15); color: #e67e22; }
.ann-level-badge.l-urgent    { background: rgba(245, 87, 108, 0.15); color: #e74c3c; }
.ann-scope-tag.sc-all     { background: rgba(79, 108, 255, 0.12); color: #4f6cff; }
.ann-scope-tag.sc-dept    { background: rgba(155, 89, 182, 0.14); color: #9b59b6; }
.ann-scope-tag.sc-student { background: rgba(26, 188, 156, 0.15); color: #16a085; }
.ann-scope-tag.sc-default { background: #f5f5f5; color: #999; }

.ann-read-line { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.ann-read-num { font-size: 13px; color: var(--text-primary); }
.ann-progress { height: 6px; background: #eef0f4; border-radius: 6px; overflow: hidden; }
.ann-progress-bar { height: 100%; background: linear-gradient(90deg, #4f6cff, #764ba2); border-radius: 6px; }
.ann-attach {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-secondary);
    background: #fafbfc; border: 1px solid #eef0f4; border-radius: 8px;
    padding: 6px 12px;
}

.ann-form .form-group { margin-bottom: 14px; }
.ann-form textarea.filter-input {
    width: 100%; resize: vertical; font-family: inherit; line-height: 1.6;
}
.ann-form .form-row { display: flex; gap: 16px; }
.ann-form .form-row .form-group { flex: 1; margin-bottom: 0; }
@media (max-width: 640px) {
    .ann-form .form-row { flex-direction: column; gap: 14px; }
}

/* —— 公告弹窗加宽 —————————————————————————— */
#modal.modal-ann-form .modal-content { max-width: 820px; }
#modal.modal-ann-form .modal-body { padding: 22px 26px 8px; }
#modal.modal-ann-form .modal-footer { padding: 14px 26px; background: #fafbfc; border-top: 1px solid #eef0f4; }
#modal.modal-ann-form .modal-header { background: linear-gradient(135deg, #f6f8ff 0%, #f0f3ff 100%); border-bottom: 1px solid #e6ebff; }
#modal.modal-ann-form .modal-header h3 { display: flex; align-items: center; gap: 8px; }
#modal.modal-ann-form .modal-header h3::before { content: ""; width: 4px; height: 18px; background: linear-gradient(180deg, #4f6cff, #764ba2); border-radius: 2px; }

/* —— 公告列表摘要 ———————————————— */
.ann-title-cell { max-width: none; }
.ann-title-line { display: flex; align-items: center; gap: 6px; line-height: 1.5; padding: 1px 0; }
.ann-title-line .ann-title { font-weight: 600; font-size: 14px; color: var(--text-primary); line-height: 1.5; white-space: nowrap; }
.ann-snippet {
    margin-top: 5px;
    font-size: 12px; color: var(--text-secondary); line-height: 1.6;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* —— 公告表单分组卡片 ———————————————— */
.ann-form-section {
    border: 1px solid #eef0f4; border-radius: 10px; padding: 16px 18px; background: #fff;
    margin-bottom: 16px; transition: border-color .2s;
}
.ann-form-section:hover { border-color: #d8dde8; }
.ann-form-section-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px dashed #eef0f4;
}
.ann-form-section-title i { color: #4f6cff; }
.ann-form-section-title .ann-form-hint { margin-left: auto; font-size: 12px; color: var(--text-secondary); font-weight: 400; }
.ann-form-section .form-group { margin-bottom: 0; }
.ann-form-section .form-row { gap: 18px; }
.ann-form-section .form-group + .form-group { margin-top: 14px; }

/* —— 富文本编辑器 —————————————————————————— */
.ann-editor { border: 1px solid #e0e4ec; border-radius: 10px; overflow: hidden; background: #fff; transition: border-color .2s, box-shadow .2s; }
.ann-editor:focus-within { border-color: #4f6cff; box-shadow: 0 0 0 3px rgba(79, 108, 255, 0.08); }

.ann-editor-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
    padding: 6px 8px; background: #fafbfc; border-bottom: 1px solid #e0e4ec;
}
.ann-toolbar-group { display: flex; align-items: center; gap: 1px; padding: 0 4px; border-right: 1px solid #e8eaef; }
.ann-toolbar-group:last-child { border-right: none; }
.ann-tool-btn {
    width: 30px; height: 30px; border: none; background: transparent; border-radius: 6px;
    color: #4a5568; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; transition: background .15s, color .15s;
}
.ann-tool-btn:hover { background: #eef0f4; color: #4f6cff; }
.ann-tool-btn.active { background: #e6ebff; color: #4f6cff; }
.ann-tool-btn:disabled { color: #cbd0d8; cursor: not-allowed; background: transparent; }
.ann-tool-btn i { pointer-events: none; }
.ann-tool-select {
    height: 30px; border: 1px solid transparent; background: transparent; border-radius: 6px;
    padding: 0 6px; font-size: 13px; color: #4a5568; cursor: pointer; outline: none; min-width: 60px;
}
.ann-tool-select:hover { background: #eef0f4; }
.ann-tool-select:focus { background: #fff; border-color: #4f6cff; }
.ann-tool-divider { width: 1px; height: 18px; background: #e8eaef; margin: 0 4px; }
.ann-color-picker { position: relative; }
.ann-color-picker input[type="color"] {
    position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: none; padding: 0;
}
.ann-tool-btn.ann-color-btn { position: relative; }
.ann-color-swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid #cbd0d8; display: block; }

.ann-editor-content {
    min-height: 220px; max-height: 360px; overflow-y: auto;
    padding: 16px 20px; font-size: 14px; line-height: 1.8; color: #2d3748;
    outline: none; font-family: inherit;
}
.ann-editor-content:empty::before {
    content: attr(data-placeholder);
    color: #a0a8b8; pointer-events: none;
}
.ann-editor-content > *:first-child { margin-top: 0; }
.ann-editor-content > *:last-child { margin-bottom: 0; }
.ann-editor-content h1, .ann-editor-content h2, .ann-editor-content h3 { margin: 16px 0 8px; font-weight: 600; line-height: 1.4; }
.ann-editor-content h1 { font-size: 22px; }
.ann-editor-content h2 { font-size: 18px; }
.ann-editor-content h3 { font-size: 16px; }
.ann-editor-content p { margin: 8px 0; }
.ann-editor-content ul, .ann-editor-content ol { margin: 8px 0; padding-left: 28px; }
.ann-editor-content li { margin: 4px 0; }
.ann-editor-content blockquote {
    margin: 12px 0; padding: 8px 14px; border-left: 3px solid #4f6cff;
    background: #f6f8ff; color: #4a5568; border-radius: 0 6px 6px 0;
}
.ann-editor-content a { color: #4f6cff; text-decoration: underline; }
.ann-editor-content .ann-link {
    color: #4f6cff; text-decoration: underline; word-break: break-all;
}
.ann-editor-content code {
    background: #f1f3f7; padding: 1px 6px; border-radius: 4px; font-family: "SF Mono", Consolas, monospace; font-size: 13px;
}
.ann-editor-content pre {
    background: #1f2937; color: #e5e7eb; padding: 12px 16px; border-radius: 8px; overflow-x: auto; font-size: 13px;
}
.ann-editor-content pre code { background: transparent; padding: 0; color: inherit; }

.ann-editor-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 12px; background: #fafbfc; border-top: 1px solid #e0e4ec;
    font-size: 12px; color: var(--text-secondary);
}
.ann-editor-counter { font-variant-numeric: tabular-nums; }

/* —— 详情弹窗中渲染的富文本 ———————————— */
.ann-rich-content {
    font-size: 14px; line-height: 1.8; color: #2d3748; word-break: break-word;
}
.ann-rich-content > *:first-child { margin-top: 0; }
.ann-rich-content > *:last-child { margin-bottom: 0; }
.ann-rich-content h1, .ann-rich-content h2, .ann-rich-content h3 { margin: 14px 0 6px; font-weight: 600; }
.ann-rich-content h1 { font-size: 20px; }
.ann-rich-content h2 { font-size: 17px; }
.ann-rich-content h3 { font-size: 15px; }
.ann-rich-content p { margin: 8px 0; }
.ann-rich-content ul, .ann-rich-content ol { margin: 8px 0; padding-left: 26px; }
.ann-rich-content li { margin: 4px 0; }
.ann-rich-content blockquote {
    margin: 12px 0; padding: 8px 14px; border-left: 3px solid #4f6cff;
    background: #f6f8ff; color: #4a5568; border-radius: 0 6px 6px 0;
}
.ann-rich-content a, .ann-rich-content .ann-link { color: #4f6cff; text-decoration: underline; }
.ann-rich-content code { background: #f1f3f7; padding: 1px 6px; border-radius: 4px; font-family: "SF Mono", Consolas, monospace; font-size: 13px; }
.ann-rich-content pre { background: #1f2937; color: #e5e7eb; padding: 12px 16px; border-radius: 8px; overflow-x: auto; font-size: 13px; }
.ann-rich-content pre code { background: transparent; padding: 0; color: inherit; }
.ann-rich-content strong { font-weight: 700; }
.ann-rich-content em { font-style: italic; }
.ann-rich-content u { text-decoration: underline; }
.ann-rich-content s { text-decoration: line-through; }

