/* -------- 个人中心主体（两栏布局） -------- */
.profile-wrapper {
    display: flex;
    gap: 2rem;
    padding: 2rem 0 3rem;
    max-width: 1360px;
    margin: 0 auto;
    align-items: flex-start;
}

/* ===== 左侧边栏 ===== */
.profile-sidebar {
    flex: 0 0 240px;
    background: #fff;
    border-radius: 1.2rem;
    padding: 1.8rem 0 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    height: fit-content;
    position: sticky;
    top: 76px;
}
.profile-avatar {
    text-align: center;
    padding: 0 1rem 1.2rem;
    border-bottom: 1px solid #f0f4fa;
}
.profile-avatar .avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e9edf4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    font-size: 2.8rem;
    color: #006ACD;
    background: rgba(0, 106, 205, 0.06);
}
.profile-avatar .user-name {
    font-weight: 600;
    color: #0b1a33;
    font-size: 1.05rem;
}
.profile-avatar .user-role {
    font-size: 0.8rem;
    color: #8a98a8;
}

.sidebar-nav {
    list-style: none;
    padding: 0.8rem 0.5rem 0;
    margin: 0;
}
.sidebar-nav li {
    padding: 0.45rem 1.2rem;
    margin: 0.1rem 0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #4b5a6a;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.sidebar-nav li i {
    font-size: 1.1rem;
    color: #8a98a8;
    width: 1.4rem;
    text-align: center;
}
.sidebar-nav li.active {
    background: rgba(0, 106, 205, 0.06);
    color: #006ACD;
    font-weight: 500;
}
.sidebar-nav li.active i {
    color: #006ACD;
}
.sidebar-nav li:hover:not(.active) {
    background: #f5f7fa;
    color: #1e293b;
}
.sidebar-nav li:hover:not(.active) i {
    color: #4b5a6a;
}
.sidebar-nav .divider {
    height: 1px;
    background: #f0f4fa;
    margin: 0.5rem 1.2rem;
    padding: 0;
}
.sidebar-nav .logout {
    color: #dc3545;
}
.sidebar-nav .logout i {
    color: #dc3545;
}
.sidebar-nav .logout:hover:not(.active) {
    background: rgba(220, 53, 69, 0.06);
    color: #dc3545;
}
.sidebar-nav .logout:hover:not(.active) i {
    color: #dc3545;
}

/* ===== 右侧内容区 ===== */
.profile-content {
    flex: 1;
    min-width: 0;
}

/* 内容面板（默认显示，切换隐藏） */
.content-panel {
    display: block;
}
.content-panel.hidden {
    display: none;
}

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(135deg, #e8f0fe 0%, #f8faff 100%);
    border-radius: 1.2rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.welcome-banner .greeting {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0b1a33;
}
.welcome-banner .greeting small {
    font-weight: 400;
    color: #6c7a8a;
    font-size: 0.95rem;
    margin-left: 0.5rem;
}
.welcome-banner .badge-date {
    background: #fff;
    padding: 0.3rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    color: #4b5a6a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 课程卡片 */
.course-card {
    background: #fff;
    border-radius: 1.2rem;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
}
.course-card .course-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #0b1a33;
    margin-bottom: 0.2rem;
}
.course-card .course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    font-size: 0.9rem;
    color: #6c7a8a;
    margin-top: 0.3rem;
}
.course-card .course-meta span i {
    margin-right: 4px;
    color: #8a98a8;
}
.course-card .course-progress-bar {
    margin: 1rem 0 1.2rem;
    background: #f0f4fa;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}
.course-card .course-progress-bar .fill {
    height: 100%;
    background: #006ACD;
    border-radius: 10px;
    width: 0%;
}
.course-card .course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    border-top: 1px solid #f0f4fa;
    padding-top: 1rem;
}
.course-card .course-footer .info-text {
    font-size: 0.9rem;
    color: #6c7a8a;
}
.course-card .course-footer .info-text strong {
    color: #0b1a33;
}
.btn-continue {
    background: #006ACD;
    color: #fff;
    border: none;
    padding: 0.4rem 1.8rem;
    border-radius: 30px;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-continue:hover {
    background: #0052a3;
    color: #fff;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: #fff;
    border-radius: 1.2rem;
    padding: 1.2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.stat-card .stat-num {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0b1a33;
}
.stat-card .stat-num .highlight {
    color: #006ACD;
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: #8a98a8;
    margin-top: 0.1rem;
}
.stat-card .stat-action {
    font-size: 0.85rem;
    color: #006ACD;
    font-weight: 500;
    margin-top: 0.3rem;
    cursor: default;
}

/* 课程进度表格 */
.table-wrap {
    background: #fff;
    border-radius: 1.2rem;
    padding: 1rem 0 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
}
.table-wrap .table-title {
    padding: 0 1.5rem 0.8rem;
    font-weight: 600;
    color: #0b1a33;
    font-size: 1rem;
    border-bottom: 1px solid #f0f4fa;
}
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table-wrap table th {
    text-align: left;
    padding: 0.8rem 1.5rem;
    color: #8a98a8;
    font-weight: 500;
    font-size: 0.8rem;
    border-bottom: 1px solid #f0f4fa;
}
.table-wrap table td {
    padding: 0.8rem 1.5rem;
    color: #1e293b;
    border-bottom: 1px solid #f5f7fa;
}
.table-wrap table tr:last-child td {
    border-bottom: none;
}
.table-wrap .tag-status {
    display: inline-block;
    padding: 0.1rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(0, 106, 205, 0.08);
    color: #006ACD;
}
.table-wrap .tag-status.learning {
    background: rgba(234, 179, 8, 0.10);
    color: #ca8a04;
}
.table-wrap .tag-status.done {
    background: rgba(34, 197, 94, 0.10);
    color: #16a34a;
}
.table-wrap .btn-go {
    background: transparent;
    border: 1px solid #006ACD;
    color: #006ACD;
    padding: 0.15rem 1.2rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}
.table-wrap .btn-go:hover {
    background: #006ACD;
    color: #fff;
}

/* ===== 个人设置面板 ===== */
.settings-panel {
    background: #fff;
    border-radius: 1.2rem;
    padding: 2rem 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.settings-panel .settings-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0b1a33;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.settings-panel .settings-title i {
    color: #006ACD;
}
.settings-panel .settings-sub {
    color: #8a98a8;
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f4fa;
}

.settings-group {
    margin-bottom: 2rem;
}
.settings-group .group-title {
    font-weight: 600;
    color: #0b1a33;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.settings-group .group-title i {
    color: #006ACD;
    font-size: 1.1rem;
}

.settings-row {
    display: flex;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f5f7fa;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.settings-row:last-child {
    border-bottom: none;
}
.settings-row .label {
    font-weight: 500;
    color: #4b5a6a;
    width: 100px;
    flex-shrink: 0;
    font-size: 0.95rem;
}
.settings-row .value {
    flex: 1;
    color: #1e293b;
    font-size: 0.95rem;
    min-width: 150px;
}
.settings-row .value input,
.settings-row .value select {
    border: 1px solid #e9edf4;
    border-radius: 10px;
    padding: 0.4rem 0.8rem;
    font-size: 0.95rem;
    width: 100%;
    max-width: 360px;
    transition: border 0.2s;
    background: #fafbfc;
}
.settings-row .value input:focus,
.settings-row .value select:focus {
    border-color: #006ACD;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 106, 205, 0.06);
}
.settings-row .value input[type="file"] {
    padding: 0.3rem 0;
    border: none;
    background: transparent;
}
.settings-row .value .helper-text {
    font-size: 0.8rem;
    color: #8a98a8;
    margin-top: 0.2rem;
}
.settings-row .action-btn {
    background: transparent;
    border: 1px solid #006ACD;
    color: #006ACD;
    padding: 0.2rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.settings-row .action-btn:hover {
    background: #006ACD;
    color: #fff;
}
.settings-row .action-btn.danger {
    border-color: #dc3545;
    color: #dc3545;
}
.settings-row .action-btn.danger:hover {
    background: #dc3545;
    color: #fff;
}
.settings-row .avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 106, 205, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #006ACD;
}

/* 保存按钮 */
.settings-save {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f4fa;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.settings-save .btn-primary {
    background: #006ACD;
    border: none;
    padding: 0.5rem 2.5rem;
    border-radius: 30px;
    font-weight: 500;
    transition: background 0.2s;
}
.settings-save .btn-primary:hover {
    background: #0052a3;
}
.settings-save .btn-secondary {
    background: transparent;
    border: 1px solid #e9edf4;
    padding: 0.5rem 2rem;
    border-radius: 30px;
    color: #4b5a6a;
    font-weight: 500;
    transition: all 0.2s;
}
.settings-save .btn-secondary:hover {
    background: #f5f7fa;
    border-color: #dde2eb;
}

/* 响应式 */
@media (max-width: 991.98px) {
    .profile-wrapper {
        flex-direction: column;
        padding: 1.5rem 1rem;
    }
    .profile-sidebar {
        flex: auto;
        position: static;
        display: flex;
        flex-wrap: wrap;
        padding: 1rem 1.2rem;
        gap: 0.2rem;
    }
    .profile-avatar {
        flex: 0 0 100%;
        border-bottom: none;
        padding-bottom: 0.6rem;
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    .profile-avatar .avatar-img {
        margin: 0;
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    .profile-avatar .user-name {
        font-size: 1rem;
    }
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 0.5rem 0 0;
        gap: 0.1rem;
    }
    .sidebar-nav li {
        padding: 0.3rem 0.8rem;
        font-size: 0.85rem;
        flex: 0 0 auto;
    }
    .sidebar-nav .divider {
        display: none;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .settings-panel {
        padding: 1.5rem;
    }
    .settings-row .label {
        width: 80px;
        font-size: 0.9rem;
    }
    .settings-row .value input,
    .settings-row .value select {
        max-width: 100%;
    }
}
@media (max-width: 575.98px) {
    .profile-wrapper {
        padding: 1rem 0.5rem;
    }
    .profile-sidebar {
        padding: 0.8rem;
    }
    .profile-avatar .avatar-img {
        width: 48px;
        height: 48px;
        font-size: 1.6rem;
    }
    .sidebar-nav li {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
    .welcome-banner {
        padding: 1rem 1.2rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .course-card {
        padding: 1.2rem;
    }
    .course-card .course-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .course-card .course-footer .btn-continue {
        width: 100%;
        text-align: center;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
    .stat-card {
        padding: 0.8rem 0.5rem;
    }
    .stat-card .stat-num {
        font-size: 1.2rem;
    }
    .table-wrap table th,
    .table-wrap table td {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    .table-wrap .btn-go {
        padding: 0.1rem 0.8rem;
        font-size: 0.7rem;
    }
    .settings-panel {
        padding: 1rem;
    }
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.8rem 0;
    }
    .settings-row .label {
        width: 100%;
        font-size: 0.85rem;
    }
    .settings-row .value {
        width: 100%;
        min-width: unset;
    }
    .settings-row .value input,
    .settings-row .value select {
        max-width: 100%;
    }
    .settings-save {
        flex-direction: column;
    }
    .settings-save .btn-primary,
    .settings-save .btn-secondary {
        width: 100%;
        text-align: center;
    }
}