/* 成绩/考试通用样式 */

/* 页面头部 */
.page-header-simple {
    background: white;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header-simple .header-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.page-header-simple .header-sub {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 2px;
}

.page-header-simple .header-left {
    display: flex;
    flex-direction: column;
}

.page-header-simple .header-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}

.page-header-simple .stat-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.page-header-simple .stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.page-header-simple .stat-label {
    font-size: 12px;
    color: #9ca3af;
}

.page-header-simple .stat-divider {
    width: 1px;
    height: 24px;
    background: #e5e7eb;
}

.sync-btn {
    padding: 8px 16px;
    background: #374151;
    color: white;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sync-btn:active {
    background: #1f2937;
}

/* 数据内容区 */
.data-content {
    padding: 16px;
    padding-bottom: 80px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #d1d5db;
}

.empty-state p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 13px;
    color: #9ca3af;
}

/* 学期分组 */
.semester-section {
    margin-bottom: 24px;
}

.semester-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    padding-left: 4px;
}

/* 成绩表格 */
.grade-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 0.8fr 0.8fr 1fr;
    gap: 12px;
    padding: 12px 16px;
    background: #f9fafb;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 0.8fr 0.8fr 1fr;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.table-row:last-child {
    border-bottom: none;
}

.col-course {
    display: flex;
    flex-direction: column;
}

.course-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.col-credit {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
}

.col-gpa {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
}

.col-score {
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-value {
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
}

.score-excellent {
    color: #059669;
    background: #ecfdf5;
}

.score-good {
    color: #374151;
    background: #f3f4f6;
}

.score-pass {
    color: #d97706;
    background: #fffbeb;
}

.score-fail {
    color: #ef4444;
    background: #fef2f2;
}

.type-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 考试卡片 */
.exam-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
}

.exam-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.exam-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 13px;
    color: #9ca3af;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

/* 提示信息 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(17, 24, 39, 0.85);
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(4px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 375px) {
    .table-header,
    .table-row {
        gap: 8px;
        padding: 12px;
    }

    .exam-detail-grid {
        grid-template-columns: 1fr;
    }
}