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

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #f4f7f9;
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    background-color: #ffffff;
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 15px; }
.header-left h1 { font-size: 1.3rem; color: #1f2f3d; transition: color 0.2s; }
.logo-area:hover h1 { color: #1890ff; }

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

.icon-btn { background: #f0f2f5; border: none; font-size: 1.1rem; padding: 6px 12px; border-radius: 6px; cursor: pointer; color: #606266; transition: 0.2s; }
.icon-btn:hover { background: #e4e7ed; color: #1890ff; }

.secondary-btn {
    background: #ffffff;
    border: 1px solid #dcdfe6;
    color: #606266;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.secondary-btn:hover {
    color: #1890ff;
    border-color: #c6e2ff;
    background-color: #ecf5ff;
}

.app-container { display: flex; flex: 1; overflow: hidden; }

.sidebar { 
    width: 280px; 
    background-color: #fff; 
    border-right: 1px solid #e0e6ed; 
    display: flex; 
    flex-direction: column; 
    transition: width 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
}
.sidebar.collapsed { width: 0; border-right: none; opacity: 0; }

.sidebar-header { padding: 24px; font-size: 1.1rem; }
.add-course-box { padding: 0 24px 24px; display: flex; gap: 12px; border-bottom: 1px solid #f0f2f5; }
.add-course-box input { flex: 1; padding: 8px 12px; border: 1px solid #dcdfe6; border-radius: 6px; outline: none; min-width: 0; }
#addCourseBtn { padding: 8px 20px; background-color: #1890ff; color: white; border: none; border-radius: 6px; cursor: pointer; flex-shrink: 0; }
.course-list { list-style: none; overflow-y: auto; }
.course-item { padding: 14px 20px; cursor: pointer; transition: all 0.2s; border-left: 4px solid transparent; }
.course-item:hover { background-color: #f5f7fa; }
.course-item.active { background-color: #e6f7ff; color: #1890ff; border-left-color: #1890ff; font-weight: 600; }

.main-content { flex: 1; padding: 24px; overflow-y: auto; }
.content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; background: #fff; padding: 20px 24px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }

.highlight-text { color: #1890ff; }

.edit-course-btn { 
    background: none; 
    border: none; 
    color: #909399; 
    cursor: pointer; 
    font-size: 0.95rem; 
    margin-left: 12px; 
    font-weight: normal; 
    transition: color 0.2s;
}
.edit-course-btn:hover { color: #1890ff; }

.primary-btn { background-color: #1890ff; color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; }
.danger-outline-btn { background: none; border: 1px solid #ff4d4f; color: #ff4d4f; padding: 9px 18px; border-radius: 8px; cursor: pointer; }

.table-section { background: #fff; padding: 24px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
.header-right { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.filter-box { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.filter-box select, .date-filter-input { padding: 6px 12px; border-radius: 20px; border: 1px solid #dcdfe6; outline: none; }
.date-filter-input { border-radius: 6px; }
.text-btn { background: none; border: none; color: #909399; cursor: pointer; font-size: 0.8rem; text-decoration: underline; }
.text-btn:hover { color: #1890ff; }

.table-actions { display: flex; gap: 10px; }
.export-btn { background-color: #67c23a; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }
.clear-btn { background-color: #fff; color: #f56c6c; border: 1px solid #fbc4c4; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }

.table-wrapper { width: 100%; overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }

th, td { 
    padding: 16px 12px; 
    text-align: left; 
    border-bottom: 1px solid #ebeef5; 
    white-space: nowrap; 
    vertical-align: middle; 
}
th { background-color: #f8f9fb; color: #909399; font-size: 0.9rem; font-weight: 600; }

td.progress-cell { 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.weekday-tag { color: #909399; font-size: 0.85rem; margin-left: 6px; }
.status-badge { padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; }
.status-completed { background: #f0f9eb; color: #67c23a; border: 1px solid #e1f3d8; }
.status-inprogress { background: #fdf6ec; color: #e6a23c; border: 1px solid #faecd8; }
.action-btns { display: flex; gap: 12px; align-items: center; }
.edit-link { color: #1890ff; cursor: pointer; font-size: 0.9rem; }
.delete-link { color: #ff4d4f; cursor: pointer; font-size: 0.9rem; }

.pagination-container { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 15px; border-top: 1px solid #f0f2f5; }
.pagination-left { display: flex; align-items: center; gap: 24px; }
.pagination-info { color: #606266; font-size: 0.9rem; }
.page-size-selector { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #606266; }
.page-size-selector select { padding: 4px 8px; border: 1px solid #dcdfe6; border-radius: 4px; }
.pagination-controls { display: flex; align-items: center; gap: 15px; }
.page-btn { padding: 6px 14px; border: 1px solid #dcdfe6; background: #fff; border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
.page-btn:disabled { background: #f5f7fa; color: #c0c4cc; cursor: not-allowed; }
.page-num-display { font-size: 0.9rem; color: #303133; font-weight: 500; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 1000; }
.modal-content { background: #fff; width: 480px; margin: 80px auto; border-radius: 12px; animation: slideDown 0.3s; }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { padding: 20px 24px; border-bottom: 1px solid #f0f2f5; display: flex; justify-content: space-between; }
.modal-body { padding: 24px; }
.modal-footer { padding: 15px 24px; border-top: 1px solid #f0f2f5; text-align: right; display: flex; justify-content: flex-end; gap: 12px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group select { width: 100%; padding: 10px; border: 1px solid #dcdfe6; border-radius: 6px; }
.save-btn { background: #1890ff; color: white; border: none; padding: 10px 24px; border-radius: 6px; cursor: pointer; }
.save-btn:disabled { background: #90c8ff; cursor: not-allowed; }
.cancel-btn { background: white; border: 1px solid #dcdfe6; padding: 10px 24px; border-radius: 6px; cursor: pointer; }

/* ================= 纯文字自适应欢迎页样式重排 ================= */
.empty-state { 
    flex: 1; 
    display: flex; 
    flex-direction: column;
    padding: 40px 60px;
    background-color: #ffffff; /* 改为清爽纯白底色，融入主工作区环境 */
    overflow-y: auto;
}
.welcome-container {
    max-width: 900px; /* 略微收窄大行宽，提高文本阅读舒适度 */
    margin: 0 auto;
    width: 100%;
}
.welcome-guide {
    text-align: left;
    color: #1890ff;
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ebeef5;
}
.info-sections {
    display: flex;
    flex-direction: column;
    gap: 35px;
}
.info-card {
    background: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}
.card-icon {
    display: inline-block;
    font-size: 1.4rem;
    margin-right: 8px;
    vertical-align: -2px;
}
.info-card h3 {
    display: inline-block;
    font-size: 1.2rem;
    color: #1f2f3d;
    margin-bottom: 20px;
    border-bottom: none;
    padding-bottom: 0;
}
.intro-list {
    list-style: none;
}
.intro-list li {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
}
.intro-list li::before {
    content: "•";
    color: #1890ff;
    font-weight: bold;
    position: absolute;
    left: 5px;
}
.step-list {
    list-style: none;
}
.step-list li {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
}
/* 用干净的悬浮数字小角标代替容器数字 */
.step-list li span {
    position: absolute;
    left: 0;
    top: 0;
    color: #909399;
    font-size: 0.9rem;
    font-weight: bold;
}
/* 强力锁定关键词，并提供平滑的浅蓝字重强调，在任何分辨率下都不允许断行 */
.step-list li strong, .intro-list li strong {
    white-space: nowrap;
    color: #1890ff;
    font-weight: 600;
}

.msg-modal-content { width: 340px; margin: 20vh auto; }
.msg-body { padding: 35px 24px 10px; text-align: center; }
.msg-icon { font-size: 48px; margin-bottom: 16px; }
.msg-text { font-size: 1rem; color: #303133; line-height: 1.6; margin: 0; }
.msg-footer { padding: 15px 24px 25px; display: flex; justify-content: center; gap: 15px; border-top: none; }

.custom-tooltip {
    position: absolute;
    background-color: rgba(31, 47, 61, 0.95);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    max-width: 400px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    pointer-events: none;
    z-index: 9999;
    display: none;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.5;
    letter-spacing: 0.5px;
}