/* AI探究自学室教师端 - 基础样式 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* 左侧边栏 */
.sidebar {
    width: 280px;
    background: #ffffff;
    color: #333;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    border-right: 1px solid #e9ecef;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    background: #f8f9fa;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.sidebar-header p {
    font-size: 14px;
    color: #6c757d;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0 25px 25px 0;
    margin-right: 10px;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu a:hover {
    background: #f8f9fa;
    color: #667eea;
}

.sidebar-menu a.active {
    background: #667eea;
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.sidebar-menu .icon {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: #f8f9fa;
}

.content-header {
    background: #fff;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.content-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.content-header p {
    color: #6c757d;
    font-size: 14px;
}

.content-body {
    padding: 30px;
}

/* 工具栏 */
.toolbar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 300px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.search-box .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
}

/* 数据表格 */
.data-table {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

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

.table th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #495057;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* 状态切换开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

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

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

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

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

.status-badge.open {
    background: #d4edda;
    color: #155724;
}

.status-badge.closed {
    background: #f8d7da;
    color: #721c24;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #f8f9fa;
}

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
}

/* 创建任务模态弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #ffffff;
    margin: 50px auto;
    padding: 0;
    border-radius: 12px;
    width: 600px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.close {
    color: #999;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.char-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* 子任务标签 */
.subtask-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.tag:hover {
    background-color: #e9ecef;
}

.tag.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

/* 文件上传区域 */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

.upload-area:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background-color: #f0f2ff;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
    color: #999;
}

.upload-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* 开关按钮 */
.switch-container {
    display: flex;
    align-items: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    cursor: pointer;
}

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

.switch:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.switch:after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .switch:before {
    background-color: #667eea;
}

input:checked + .switch:after {
    transform: translateX(24px);
}

/* 发布选项标签 */
.publish-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
}

.tab {
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #666;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    min-height: 50px;
}

.tab-panel {
    display: none;
}

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

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* 按钮样式 */
.form-actions {
    margin-top: 30px;
    text-align: center;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a6fd8;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
}

.btn-loading i {
    margin-right: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .subtask-tags {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tag {
        margin-bottom: 4px;
    }
}

/* 通知消息样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #0d47a1;
}

.notification-success {
    background: #e8f5e8;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.notification-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #e65100;
}

.notification-error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 16px;
    flex-shrink: 0;
}

.notification-content span {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

/* 统计卡片样式 */
.stats-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stats-card .card-text {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0;
}

.stats-icon {
    font-size: 2.5rem;
    color: #667eea;
    opacity: 0.7;
}

/* 面包屑导航样式 */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #5a6fd8;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* 标签页样式 */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
}

.nav-tabs .nav-link {
    border: none;
    color: #495057;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #667eea;
    background-color: transparent;
    border-bottom-color: #667eea;
}

.nav-tabs .nav-link.active {
    color: #667eea;
    background-color: transparent;
    border-bottom-color: #667eea;
}

/* 按钮组样式 */
.btn-group .btn {
    border-radius: 4px;
    margin-right: 2px;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* 徽章样式 */
.badge {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
    border-radius: 20px;
}

/* 表格样式增强 */
.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.table td {
    vertical-align: middle;
    font-size: 0.875rem;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* 空状态样式 */
.text-center.py-5 {
    padding: 3rem 1rem;
}

.text-center.py-5 i {
    color: #dee2e6;
    margin-bottom: 1rem;
}

.text-center.py-5 h4 {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.text-center.py-5 p {
    color: #adb5bd;
    margin-bottom: 1.5rem;
}

/* 班级管理模态框额外样式 */
.modal-body .form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.modal-body .form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.modal-body .form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-body .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-body .btn-primary {
    background-color: #667eea;
    color: white;
}

.modal-body .btn-primary:hover {
    background-color: #5a6fd8;
}

.modal-body .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.modal-body .btn-secondary:hover {
    background-color: #545b62;
}

.modal-body .required {
    color: #e74c3c;
}

/* 主界面批量操作样式 */
.batch-actions-toolbar {
    animation: slideIn 0.3s ease-out;
}

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

.task-checkbox-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.task-checkbox-container:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.main-task-checkbox {
    margin: 0 !important;
    transform: scale(1.1) !important;
}

.main-task-checkbox:checked {
    accent-color: #667eea;
}

/* 回收站复选框样式 */
.task-checkbox {
    margin: 0 !important;
    transform: scale(1.2) !important;
    cursor: pointer !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
}

.task-checkbox:checked {
    accent-color: #dc3545;
}

/* 回收站全选复选框样式 */
.recycle-select-all-checkbox {
    margin: 0 !important;
    transform: scale(1.2) !important;
    cursor: pointer !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

.recycle-select-all-checkbox:checked {
    accent-color: #dc3545;
}

.task-card {
    position: relative;
    transition: all 0.3s ease;
}

.task-card.selected {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
    border: 2px solid #667eea;
}

.task-card.selected .task-checkbox-container {
    background: #667eea;
    color: white;
}

/* 批量操作工具栏样式增强 */
.batch-actions-toolbar .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
} 