/* 管理后台样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部导航栏 */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

/* 主导航栏 */
.main-header {
    background: url("https://cee.hutb.edu.cn/r/cms/jsjxy/default/images/header.jpg") no-repeat center center;
    background-size: cover;
    color: #fff;
    padding: 15px 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 15px;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #9E020B;
}

.detail-info {
    color: #9E020B;
    font-size: 1.2rem;
    margin-left: 10px;
    font-weight: bold;
}

/* 修改导航菜单样式 */
.nav {
    margin-left: auto;
}

.nav ul {
    display: flex;
}

.nav li {
    margin-left: 30px;
    position: relative;
}

.nav li a {
    padding: 10px 0;
    font-size: 1.1rem;
    transition: color 0.3s;
    color: #9E020B;
}

.nav li a:hover {
    color: #9E020B;
}

.nav li.active a {
    color: #9E020B;
    font-weight: bold;
}

.nav li.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #9E020B;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #9E020B;
    margin: 2px 0;
    transition: all 0.3s;
}

/* 管理后台布局 */
.admin-wrapper {
    display: flex;
    margin: 20px 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.admin-sidebar {
    width: 220px;
    background-color: #f0f0f0;
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background-color: #e0e0e0;
    border-left-color: #c7000b;
}

.sidebar-menu a.active {
    background-color: #e0e0e0;
    border-left-color: #c7000b;
    font-weight: bold;
}

.admin-content {
    flex: 1;
    padding: 10px 10px;
    overflow: auto;
    min-width: 0;
    width: auto;
}

/* 内容标签页 */
.content-tab {
    display: none;
}

.content-tab.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tab-header h2 {
    color: #333;
    font-size: 1.5rem;
}

/* 仪表盘 */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 学习进度容器样式 */
.learning-progress-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.learning-progress-container h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.progress-list {
    display: grid;
    gap: 15px;
}

.progress-item {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.completion-rate {
    color: #28a745;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    border-radius: 4px;
}

.progress-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-item:hover {
    background-color: #f0f0f0;
}

.unlearned-articles {
    margin-top: 15px;
    padding: 10px;
    border-top: 1px solid #eee;
}

.unlearned-articles h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

.unlearned-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.unlearned-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.unlearned-list li:last-child {
    border-bottom: none;
}

.article-title {
    color: #333;
    flex: 1;
    margin-right: 10px;
}

.article-category {
    color: #666;
    font-size: 12px;
    padding: 2px 8px;
    background-color: #f5f5f5;
    border-radius: 10px;
}

.no-unlearned {
    color: #28a745;
    text-align: center;
    padding: 10px;
}

.error {
    color: #dc3545;
    text-align: center;
    padding: 10px;
    transition: width 0.3s ease;
}

.progress-detail {
    font-size: 14px;
    color: #6c757d;
}

.stat-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
    color: #dc3545;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
}

.dashboard-charts {
    margin-bottom: 30px;
}

.chart-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.chart-container h3 {
    margin-bottom: 15px;
    color: #333;
}

.progress-chart {
    height: 300px;
}

.recent-activities {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.recent-activities h3 {
    margin-bottom: 15px;
    color: #333;
}

.activity-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-time {
    font-size: 12px;
    color: #6c757d;
}

.activity-content {
    margin-top: 5px;
}

/* 搜索和筛选 */
.search-filter {
    display: flex;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.search-filter input,
.search-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    min-width: 150px;
}

.search-filter input:focus,
.search-filter select:focus {
    outline: none;
    border-color: #c7000b;
}

/* 数据表格 */
.data-table {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f9f9f9;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 12px;
    margin: 0 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:hover {
    background-color: #f5f5f5;
}

.pagination button.active {
    background-color: #c7000b;
    color: white;
    border-color: #c7000b;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 按钮样式 */
.btn-primary {
    padding: 8px 16px;
    background-color: #c7000b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary:hover {
    background-color: #a50009;
}

.btn-secondary {
    padding: 8px 16px;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-search {
    padding: 8px 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-search:hover {
    background-color: #555;
}

.btn-danger {
    padding: 8px 16px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.edit-btn {
    background-color: #007bff;
    color: white;
}

.edit-btn:hover {
    background-color: #0069d9;
}

.delete-btn {
    background-color: #c7000b;
    color: white;
}

.delete-btn:hover {
    background-color: #A30009;
}

.view-btn {
    background-color: #28a745;
    color: white;
}

.view-btn:hover {
    background-color: #218838;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-modal {
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c7000b;
}

.form-hint {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 富文本编辑器 */
.quill-editor {
    height: 300px;
    margin-bottom: 20px;
}

.ql-toolbar {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.ql-container {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    height: 250px;
}

/* 用户身份管理 */
.user-info-display {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.current-identities {
    margin-bottom: 20px;
}

.identity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 5px;
}

.identity-info {
    flex: 1;
}

.identity-actions button {
    padding: 5px 10px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.identity-actions button:hover {
    background-color: #c82333;
}

/* 请假审批 */
.leave-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.leave-info p {
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .main-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
    
    .nav {
        width: 100%;
        display: none;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav ul {
        flex-direction: column;
    }
    
    .nav li {
        margin: 10px 0;
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* 管理后台移动端适配 */
    .admin-wrapper {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        padding: 10px 0;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .sidebar-menu li {
        margin: 2px;
    }
    
    .sidebar-menu a {
        padding: 8px 15px;
        border-left: none;
        border-bottom: 3px solid transparent;
        text-align: center;
    }
    
    .sidebar-menu a:hover,
    .sidebar-menu a.active {
        border-left-color: transparent;
        border-bottom-color: #c7000b;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    /* 表格响应式 */
    .data-table {
        overflow-x: auto;
    }
    
    /* 表单响应式 */
    .form-group {
        flex-direction: column;
    }
    
    .form-group label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
    }
    
    /* 卡片网格响应式 */
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* 按钮组响应式 */
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin: 5px 0;
        width: 100%;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-charts {
        flex-direction: column;
    }
    
    .chart-container {
        width: 100%;
        margin-bottom: 20px;
    }
}

.pagination-btn {
    margin: 0 5px;
    padding: 5px 10px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #333;
    transition: background-color 0.3s ease;
}

.pagination-btn:hover {
    background-color: #ddd;
}

.pagination-btn.active {
    background-color: #007bff;
    color: white;
}

.pagination-input {
    width: 50px;
    margin: 0 5px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.pagination-total {
    margin-left: 10px;
    font-size: 14px;
    color: #555;
}


/* 底部导航栏 */
.footer {
    background-image: url('../images/footer.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    color: #fff;
    position: relative;
    margin-top: 30px;
}

/* 友情链接部分 */
.footer-links {
    padding: 15px 0;
    position: relative;
    z-index: 2;
}

.links-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.links-title {
    font-weight: bold;
    color: #D7C1C1;
    margin-right: 10px;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.6;
    padding: 0;
    margin-bottom: 5px;
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.links-list a {
    color: #D7C1C1;
    margin: 0 10px 5px;
    transition: opacity 0.3s;
    display: inline-block;
    line-height: 1.6;
    padding: 0;
}

.links-list a:hover {
    opacity: 0.8;
}

/* 底部信息部分 */
.footer-info {
    padding: 30px 0;
    position: relative;
    z-index: 2;
    background-color: transparent;
}

.copyright {
    text-align: center;
    width: 100%;
    padding: 20px 0;
    font-size: 0.9rem;
    line-height: 1.8;
}