.page-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.edit-profile-page {
    max-width: 940px;
    margin-left: auto;
    margin-right: auto;
}

.edit-profile-form {
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 0 0 34px;
    overflow: hidden;
    width: 100%;
}

.edit-profile-preview {
    position: relative;
    margin-bottom: 78px;
}

.edit-cover-preview {
    height: 220px;
    background: linear-gradient(135deg, #0d6078, #12a1bd);
    background-size: cover;
    background-position: center;
}

.edit-avatar-preview {
    position: absolute;
    left: 40px;
    bottom: -58px;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    border: 6px solid #fff;
    background: linear-gradient(135deg, var(--orange), var(--magenta), var(--cyan));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 42px;
    overflow: hidden;
}

.edit-avatar-preview img,
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*
 * Layout fix:
 * minmax(0, 1fr) + min-width:0 prevent fields from overflowing their grid columns.
 */
.edit-profile-form .form-grid {
    padding: 0 34px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 34px;
    width: 100%;
}

.edit-profile-form .form-grid-full {
    grid-column: 1 / -1;
}

.edit-profile-form label,
.edit-profile-form .country-select {
    min-width: 0;
    width: 100%;
}

.edit-profile-form input,
.edit-profile-form textarea,
.edit-profile-form .country-trigger {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.edit-profile-form input[type="file"] {
    padding: 18px 22px;
    line-height: 1.4;
}

.edit-profile-form textarea {
    min-height: 120px;
    padding: 18px 22px;
    resize: vertical;
}

.edit-profile-form small {
    color: var(--muted);
    font-weight: 500;
    font-size: 13px;
}

.profile-cover {
    background-size: cover;
    background-position: center;
}

.profile-avatar {
    overflow: hidden;
}

.profile-bio {
    max-width: 560px;
    color: #666;
    line-height: 1.6;
    margin-top: 10px;
}

.edit-profile-button {
    margin-top: 12px;
    width: fit-content;
}

@media (max-width: 900px) {
    .edit-profile-form .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .page-heading-row {
        flex-direction: column;
    }

    .edit-profile-form .form-grid {
        padding: 0 20px;
    }

    .edit-avatar-preview {
        left: 24px;
    }
}
