/* Member Center Styles */
.member-container {
    padding: 40px 0;
    background-color: #f8fafc;
}

.member-sidebar {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.sidebar-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #fff;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 15px;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.user-name {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.user-id {
    font-size: 0.8rem;
    opacity: 0.8;
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.menu-item i {
    width: 25px;
    margin-right: 15px;
    color: #888;
    transition: color 0.2s;
}

.menu-item:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.menu-item:hover i {
    color: var(--primary-color);
}

.menu-item.active {
    background-color: #e7effc;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 700;
}

.menu-item.active i {
    color: var(--primary-color);
}

.member-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    min-height: 600px;
}

.content-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 !important;
    color: var(--primary-color);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-paid {
    background-color: #def7ec;
    color: #03543f;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-canceled {
    background-color: #fde8e8;
    color: #9b1c1c;
}

.member-table thead th {
    background-color: #f8fafc;
    border-bottom: 2px solid #f1f5f9;
    padding: 15px;
    font-weight: 600;
    color: #4a5568;
}

.member-table tbody td {
    padding: 20px 15px;
    vertical-align: middle;
    color: #2d3748;
}

.extra-small {
    font-size: 0.7rem;
}

.favorite-card {
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.favorite-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

@media (max-width: 991.98px) {
    .member-container {
        padding: 20px 0;
    }

    .sidebar-header {
        padding: 20px;
        display: flex;
        align-items: center;
        text-align: left;
    }

    .user-avatar {
        width: 50px;
        height: 50px;
        margin: 0 15px 0 0;
        font-size: 1.2rem;
    }

    .user-name {
        font-size: 1rem;
        margin-bottom: 0;
    }

    .user-id {
        display: none;
    }

    .sidebar-menu {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        padding: 10px;
        gap: 5px;
        background: #f8fafc;
    }

    .sidebar-menu::-webkit-scrollbar {
        display: none;
    }

    .menu-item {
        background: #fff;
        border-radius: 8px;
        padding: 12px 5px;
        border: 1px solid #f1f5f9;
        flex-direction: column;
        align-items: center;
        text-align: center;
        font-size: 0.8rem;
        transition: all 0.2s;
        margin: 2px;
    }

    .menu-item i {
        margin-right: 0;
        margin-bottom: 5px;
        font-size: 1.2rem;
        color: var(--primary-color);
    }

    .menu-item.active {
        background-color: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
    }

    .menu-item.active i {
        color: #fff;
    }

    .menu-item:hover {
        background-color: #e7effc;
        color: var(--primary-color);
    }

    .member-content {
        padding: 20px;
        margin-top: 10px;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* Transform Table to Cards on Mobile */
    .member-table thead {
        display: none;
        /* Hide headers on mobile */
    }

    .member-table tbody td {
        display: block;
        width: 100%;
        padding: 10px 15px;
        border: none;
        text-align: right;
        position: relative;
    }

    .member-table tbody tr {
        display: block;
        border: 1px solid #f1f5f9;
        border-radius: 12px;
        margin-bottom: 20px;
        padding: 10px 0;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    }

    .member-table tbody td:first-child {
        text-align: left;
        border-bottom: 1px solid #f8fafc;
        padding-bottom: 15px;
    }

    .member-table tbody td:not(:first-child)::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        color: #718096;
    }

    /* Tracked Courses Mobile Layout */
    .favorite-card {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }

    .favorite-card .d-flex.align-items-center {
        width: 100%;
    }

    .favorite-card .course-thumbnail {
        width: 80px !important;
        height: 60px !important;
    }

    .favorite-card .d-flex.gap-2 {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
        padding-top: 15px;
        border-top: 1px dashed #eee;
    }

    .favorite-card .btn {
        flex: 1;
    }
}