body {
    height: auto !important;
    min-height: 100vh !important;
}

.vit-dashboard-profile {
    width: 100%;
    background-color: var(--bg-base-grey);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 0 auto;
    min-height: max-content;
    box-sizing: border-box;
    overflow-x: hidden;

    .container-back {
        width: 100%;
        max-width: 1360px;
        margin: 0 auto;
        display: flex;
        justify-content: flex-start;

        .vit-back-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            width: fit-content;
            padding: 8px 16px;
            background-color: var(--bg-base);
            border: 1px solid var(--bg-base-grey-dark);
            border-radius: 6px;
            color: var(--text-grey);
            text-decoration: none;
            font-size: 0.95rem;
            font-weight: 600;
            transition: var(--transition-all);

            span {
                font-size: 1.1rem;
                line-height: 1;
            }

            &:hover {
                background-color: var(--color-bg-btn-dark);
                color: var(--text-light);
                border-color: var(--color-bg-btn-dark);
                transform: translateX(-3px);

                span {
                    color: var(--text-light);
                }
            }
        }
    }

    .dashboard-container {
        width: 100%;
        max-width: 1360px;
        margin: 0 auto 40px auto;
        display: flex;
        align-items: flex-start;
        gap: 40px;
        box-sizing: border-box;

        .profile-sidebar {
            width: 320px;
            background-color: var(--bg-base);
            border-radius: 12px;
            border: 1px solid var(--bg-base-grey-dark);
            padding: 40px 30px;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            box-shadow: var(--box-shadow);
            flex-shrink: 0;
            position: sticky;
            top: 20px;
            box-sizing: border-box;

            .sidebar-top-wrapper {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                width: 100%;

                .avatar-wrapper {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin-bottom: 25px;
                    width: 100%;

                    img {
                        width: 150px;
                        height: 150px;
                        border-radius: 50%;
                        object-fit: cover;
                        border: 3px solid var(--bg-base-grey);
                        max-width: 100%;
                    }
                }

                .user-identity {
                    margin-bottom: 30px;
                    width: 100%;

                    h1 {
                        font-size: 2.2rem;
                        font-weight: 400;
                        color: var(--text-dark);
                        margin: 0 0 10px 0;
                        line-height: 1.1;
                        word-wrap: break-word;
                    }

                    .user-location {
                        font-size: 1.1rem;
                        font-weight: 350;
                        color: var(--text-dark);
                        margin: 0 0 5px 0;
                        display: flex;
                        align-items: center;
                        gap: 8px;

                        i {
                            color: var(--text-grey);
                            flex-shrink: 0;
                        }
                    }

                    .user-since {
                        font-size: 0.95rem;
                        font-weight: 350;
                        color: var(--text-grey);
                        margin: 0;
                    }
                }
            }

            .sidebar-actions {
                display: flex;
                flex-direction: column;
                gap: 15px;
                width: 100%;
                margin-bottom: 30px;

                .btn-outline-dark,
                .btn-flat-yellow {
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    gap: 10px;
                    width: 100%;
                    padding: 10px 15px;
                    border-radius: 8px;
                    font-weight: 400;
                    font-size: 1rem;
                    text-decoration: none;
                    transition: var(--transition-all);
                    text-align: center;
                    box-sizing: border-box;
                }

                .btn-outline-dark {
                    border: 1px solid var(--text-dark);
                    background: transparent;
                    color: var(--text-dark);

                    &:hover {
                        background: var(--text-dark);
                        color: var(--bg-base);
                        & i {
                            color: var(--text-light);
                        }
                    }
                }

                .btn-flat-yellow {
                    background-color: var(--bg-base-dark);
                    color: var(--text-light);

                    & i {
                        color: var(--text-light);
                    }

                    &:hover {
                        background-color: var(--color-bg-btn-hover);
                    }
                }
            }
        }

        .profile-main-content {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 30px;

            .dashboard-panel {
                background-color: var(--bg-base);
                border-radius: 12px;
                border: 1px solid var(--bg-base-grey-dark);
                padding: 40px;
                box-shadow: var(--box-shadow);
                width: 100%;
                box-sizing: border-box;

                .panel-header {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    border-bottom: 1px solid var(--bg-base-grey);
                    padding-bottom: 15px;
                    margin-bottom: 30px;
                    gap: 15px;

                    h2 {
                        font-size: 1.6rem;
                        font-weight: 400;
                        color: var(--text-dark);
                        margin: 0;
                        text-transform: uppercase;
                    }

                    .edit-link-simple {
                        font-size: 1rem;
                        font-weight: 350;
                        color: var(--text-grey);
                        text-decoration: none;
                        position: relative;
                        padding-bottom: 2px;
                        white-space: nowrap;

                        &::after {
                            content: "";
                            position: absolute;
                            bottom: 0;
                            left: 0;
                            width: 100%;
                            height: 2px;
                            background-color: var(--text-yellow);
                            transform: scaleX(0);
                            transform-origin: right;
                            transition: transform 0.3s ease;
                        }

                        &:hover {
                            color: var(--text-dark);
                        }

                        &:hover::after {
                            transform: scaleX(1);
                            transform-origin: left;
                        }
                    }
                }

                .panel-grid {
                    display: grid;
                    grid-template-columns: repeat(2, minmax(0, 1fr));
                    gap: 30px;

                    .info-block {
                        display: flex;
                        flex-direction: column;
                        gap: 5px;
                        min-width: 0;

                        &.full-width {
                            grid-column: 1 / -1;
                        }

                        label {
                            font-size: 0.9rem;
                            font-weight: 400;
                            color: var(--text-grey);
                            text-transform: uppercase;
                            letter-spacing: 0.5px;
                        }

                        span {
                            font-size: 1.3rem;
                            font-weight: 350;
                            color: var(--text-dark);
                            overflow-wrap: break-word;
                            word-wrap: break-word;

                            em {
                                color: var(--text-grey);
                                font-style: normal;
                            }
                        }
                    }
                }

                .empty-state-panel {
                    display: flex;
                    flex-direction: column;
                    align-items: flex-start;
                    gap: 15px;
                    padding: 20px 0;

                    i {
                        font-size: 2.5rem;
                        color: var(--bg-base-grey-dark);
                    }

                    p {
                        font-size: 1.1rem;
                        font-weight: 350;
                        color: var(--text-grey);
                        margin: 0;
                    }

                    .btn-outline-dark {
                        margin-top: 10px;
                        padding: 8px 20px;
                        border: 1px solid var(--text-dark);
                        background: transparent;
                        color: var(--text-dark);
                        border-radius: 6px;
                        text-decoration: none;
                        font-weight: 400;
                        transition: var(--transition-all);

                        &:hover {
                            background: var(--text-dark);
                            color: var(--bg-base);
                        }
                    }
                }
            }

            .danger-panel {
                border: 1px solid rgba(var(--text-danger-rgb), 0.3);
                background-color: #fffafb;

                .danger-content {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    flex-wrap: wrap;
                    gap: 20px;

                    .danger-text {
                        flex: 1;
                        min-width: 250px;

                        h2 {
                            font-size: 1.4rem;
                            font-weight: 400;
                            color: var(--text-danger);
                            margin: 0 0 5px 0;
                            text-transform: uppercase;
                        }

                        p {
                            font-size: 1rem;
                            font-weight: 350;
                            color: var(--text-grey);
                            margin: 0;
                        }
                    }

                    form {
                        flex-shrink: 0;

                        .btn-danger-solid {
                            background-color: var(--text-danger);
                            color: var(--text-light);
                            border: none;
                            padding: 10px 24px;
                            border-radius: 6px;
                            font-size: 1rem;
                            font-weight: 400;
                            cursor: pointer;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            gap: 8px;
                            transition: var(--transition-all);
                            white-space: nowrap;

                            & i {
                                color: var(--text-light);
                            }

                            &:hover {
                                background-color: darkred;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 1024px) {
    .vit-dashboard-profile {
        .dashboard-container {
            flex-direction: column;

            .profile-sidebar {
                width: 100%;
                position: static;
                padding: 30px;

                .sidebar-top-wrapper {
                    flex-direction: row;
                    align-items: center;
                    gap: 30px;
                    margin-bottom: 25px;

                    .avatar-wrapper {
                        margin: 0;
                        width: auto;
                    }

                    .user-identity {
                        margin: 0;
                        flex: 1;
                    }
                }

                .sidebar-actions {
                    flex-direction: row;
                    margin-bottom: 20px;

                    .btn-outline-dark,
                    .btn-flat-yellow {
                        width: auto;
                        flex: 1;
                    }
                }

                .sidebar-social {
                    justify-content: center;
                }
            }

            .profile-main-content {
                width: 100%;

                .dashboard-panel {
                    padding: 30px 20px;

                    .panel-header h2 {
                        font-size: 1.3rem;
                    }

                    .panel-grid {
                        grid-template-columns: 1fr;
                        gap: 20px;
                    }
                }
            }
        }
    }
}

@media (max-width: 768px) {
    .vit-dashboard-profile {
        padding: 30px 16px;

        .container-back {
            margin-bottom: 20px;
        }

        .dashboard-container {
            .profile-sidebar {
                padding: 30px 20px;

                .sidebar-top-wrapper {
                    flex-direction: column;
                    align-items: flex-start;
                    gap: 20px;
                }

                .sidebar-actions {
                    flex-direction: column;

                    .btn-outline-dark,
                    .btn-flat-yellow {
                        width: 100%;
                    }
                }

                .sidebar-social {
                    justify-content: flex-start;
                }
            }
        }
    }
}