/* 知音·艺学堂 — 课程设置 7Tab 样式 v1.0 */

/* ============ 页面容器 ============ */
.curriculum-settings-page {
    padding: 20px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.curriculum-settings-page .cs-header {
    margin-bottom: 24px;
}

.curriculum-settings-page .cs-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    color: #1a1a2e;
}

.curriculum-settings-page .cs-header p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

/* ============ Tab 导航 ============ */
.cs-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e8e8e8;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cs-tabs::-webkit-scrollbar { height: 4px; }
.cs-tabs::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.cs-tab {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    transition: all 0.2s;
    user-select: none;
    position: relative;
    top: 2px;
}

.cs-tab:hover {
    color: #149ebb;
    background: #f0f9fb;
}

.cs-tab.active {
    color: #149ebb;
    font-weight: 700;
    border-bottom-color: #149ebb;
}

/* ============ 工具栏 ============ */
.cs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

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

.cs-toolbar-count {
    font-size: 13px;
    color: #999;
}

.cs-toolbar-count strong {
    color: #333;
}

/* ============ 按钮 ============ */
.cs-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cs-btn-primary {
    background: #149ebb;
    color: #fff;
}

.cs-btn-primary:hover {
    background: #1089a4;
}

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

.cs-btn-edit {
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #dbeafe;
}

.cs-btn-edit:hover {
    background: #dbeafe;
}

.cs-btn-delete {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.cs-btn-delete:hover {
    background: #fee2e2;
}

/* ============ 表格 ============ */
.cs-table-wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}

.cs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cs-table thead {
    background: #f8fafc;
}

.cs-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
}

.cs-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
}

.cs-table tbody tr:hover {
    background: #f8fafc;
}

.cs-table tbody tr:last-child td {
    border-bottom: none;
}

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

.cs-status-badge.enabled {
    background: #ecfdf5;
    color: #059669;
}

.cs-status-badge.disabled {
    background: #fef2f2;
    color: #dc2626;
}

/* 操作按钮区 */
.cs-actions {
    display: flex;
    gap: 6px;
}

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

.cs-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.cs-empty h4 {
    margin: 0 0 8px;
    color: #555;
}

.cs-empty p {
    margin: 0 0 20px;
    font-size: 13px;
}

/* ============ 模态框 ============ */
.cs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: csFadeIn 0.2s ease;
}

@keyframes csFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cs-modal {
    background: #fff;
    border-radius: 16px;
    width: 520px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: csSlideUp 0.25s ease;
}

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

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

.cs-modal-header h3 {
    margin: 0;
    font-size: 17px;
    color: #1a1a2e;
}

.cs-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cs-modal-close:hover {
    background: #eee;
    color: #333;
}

.cs-modal-body {
    padding: 24px;
}

.cs-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
}

/* ============ 表单 ============ */
.cs-form-group {
    margin-bottom: 18px;
}

.cs-form-group:last-child {
    margin-bottom: 0;
}

.cs-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.cs-form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.cs-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.cs-form-input:focus {
    outline: none;
    border-color: #149ebb;
    box-shadow: 0 0 0 3px rgba(20, 158, 187, 0.1);
}

.cs-form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.cs-form-select:focus {
    outline: none;
    border-color: #149ebb;
    box-shadow: 0 0 0 3px rgba(20, 158, 187, 0.1);
}

.cs-form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    resize: vertical;
    min-height: 70px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}

.cs-form-textarea:focus {
    outline: none;
    border-color: #149ebb;
    box-shadow: 0 0 0 3px rgba(20, 158, 187, 0.1);
}

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

/* 按钮 */
.cs-modal-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cs-modal-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.cs-modal-btn-cancel:hover {
    background: #eee;
}

.cs-modal-btn-save {
    background: #149ebb;
    color: #fff;
}

.cs-modal-btn-save:hover {
    background: #1089a4;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .cs-form-row {
        grid-template-columns: 1fr;
    }

    .cs-modal {
        width: 100vw;
        max-width: 100vw;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
    }

    .cs-tab {
        padding: 10px 14px;
        font-size: 12px;
    }

    .cs-table {
        font-size: 12px;
    }

    .cs-table th,
    .cs-table td {
        padding: 8px 10px;
    }
}
