.profile-page {
    background: #f4f8fb;
    color: #203d50;
    min-height: calc(100vh - 160px);
    padding-bottom: 3.5rem;
}

.profile-banner {
    background: linear-gradient(120deg, #0068ad 0%, #0a99d3 58%, #25b6c9 100%);
    color: #fff;
    overflow: hidden;
    position: relative;
}

.profile-banner::after {
    background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 68%);
    content: '';
    height: 360px;
    pointer-events: none;
    position: absolute;
    right: -80px;
    top: -190px;
    width: 360px;
}

.profile-banner-inner {
    align-items: center;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin: 0 auto;
    max-width: 1120px;
    min-height: 255px;
    padding: 2.25rem 1.25rem;
    position: relative;
    z-index: 1;
}

.profile-avatar {
    background: #fff;
    border: 5px solid rgba(255, 255, 255, .88);
    border-radius: 50%;
    box-shadow: 0 12px 34px rgba(4, 49, 79, .25);
    height: 132px;
    object-fit: cover;
    width: 132px;
}

.profile-identity {
    min-width: 0;
}

.profile-name-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.profile-name-row h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    margin: 0;
}

.profile-role {
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    padding: .35rem .65rem;
}

.profile-handle {
    font-weight: 600;
    margin: .35rem 0 0;
    opacity: .82;
}

.profile-bio {
    line-height: 1.55;
    margin: .8rem 0;
    max-width: 650px;
    opacity: .94;
}

.profile-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.profile-counts span {
    font-size: .84rem;
    opacity: .9;
}

.profile-counts strong {
    font-size: 1rem;
    margin-right: .25rem;
}

.profile-actions {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    min-width: 150px;
}

.profile-actions .btn {
    border-radius: .65rem;
    font-weight: 700;
    white-space: nowrap;
}

.profile-content {
    margin: 0 auto;
    max-width: 1120px;
    padding: 0 1.25rem;
}

.profile-tabs {
    background: #fff;
    border: 1px solid #dce8ef;
    border-radius: .85rem;
    box-shadow: 0 4px 18px rgba(28, 70, 97, .06);
    display: flex;
    gap: .25rem;
    margin: -1.35rem 0 1.5rem;
    padding: .35rem;
    position: relative;
    z-index: 2;
}

.profile-tabs button {
    background: transparent;
    border: 0;
    border-radius: .58rem;
    color: #557082;
    font-weight: 700;
    min-width: 110px;
    padding: .7rem 1rem;
}

.profile-tabs button:hover,
.profile-tabs button:focus-visible {
    background: #edf8fe;
    color: #0068ad;
}

.profile-tabs button.is-active {
    background: #0071bc;
    color: #fff;
}

.profile-grid {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
}

.profile-side,
.profile-main,
.profile-posts {
    display: grid;
    gap: 1rem;
}

.profile-panel,
.profile-post,
.profile-empty,
.profile-private {
    background: #fff;
    border: 1px solid #dce8ef;
    border-radius: .85rem;
    box-shadow: 0 3px 13px rgba(28, 70, 97, .04);
}

.profile-panel {
    padding: 1.15rem;
}

.profile-panel h2,
.profile-empty h2,
.profile-private h2 {
    color: #26465d;
    font-size: 1.08rem;
    margin: 0 0 .85rem;
}

.profile-metrics {
    display: grid;
    gap: .7rem;
}

.profile-metrics > div {
    align-items: center;
    background: #f4f9fc;
    border-radius: .65rem;
    display: flex;
    justify-content: space-between;
    padding: .7rem .8rem;
}

.profile-metrics strong {
    color: #0071bc;
    font-size: 1.2rem;
}

.profile-metrics span {
    color: #657987;
    font-size: .78rem;
    text-align: right;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.profile-badges span {
    background: #eaf7fe;
    border-radius: 999px;
    color: #12658e;
    font-size: .76rem;
    font-weight: 700;
    padding: .42rem .62rem;
}

.profile-badges i {
    margin-right: .35rem;
}

.profile-activity-list {
    display: grid;
    gap: .7rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-activity-list li {
    align-items: center;
    display: flex;
    gap: .65rem;
}

.profile-activity-list > li > i {
    align-items: center;
    background: #eaf7fe;
    border-radius: 50%;
    color: #0071bc;
    display: flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.profile-activity-list strong,
.profile-activity-list small {
    display: block;
}

.profile-activity-list strong {
    font-size: .84rem;
}

.profile-activity-list small {
    color: #718592;
    margin-top: .1rem;
}

.profile-post {
    overflow: hidden;
    padding: 1rem;
}

.profile-post > header a {
    align-items: center;
    color: #1d3445;
    display: inline-flex;
    gap: .65rem;
    text-decoration: none;
}

.profile-post > header img {
    border-radius: 50%;
    height: 44px;
    object-fit: cover;
    width: 44px;
}

.profile-post > header strong,
.profile-post > header small {
    display: block;
}

.profile-post > header small {
    color: #70828e;
    margin-top: .1rem;
}

.profile-post > p {
    line-height: 1.6;
    margin: 1rem 0;
}

.profile-post > img {
    border-radius: .65rem;
    display: block;
    margin: .8rem 0;
    max-height: 680px;
    object-fit: cover;
    width: 100%;
}

.profile-post > footer {
    border-top: 1px solid #edf1f4;
    color: #718592;
    font-size: .82rem;
    margin-top: .9rem;
    padding-top: .7rem;
}

.profile-workout {
    align-items: center;
    background: #edf8fe;
    border: 1px solid #c8e9fa;
    border-radius: .65rem;
    color: #17506e;
    display: flex;
    gap: .75rem;
    margin: .8rem 0;
    padding: .85rem;
}

.profile-workout > i {
    color: #0071bc;
    font-size: 1.25rem;
}

.profile-workout strong,
.profile-workout small {
    display: block;
}

.profile-workout small {
    margin-top: .15rem;
}

.profile-empty,
.profile-private {
    color: #647986;
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.profile-empty > i,
.profile-private > i {
    color: #0071bc;
    font-size: 2rem;
}

.profile-empty h2,
.profile-private h2 {
    margin: .8rem 0 .45rem;
}

.profile-empty p,
.profile-private p {
    margin-bottom: 0;
}

.profile-private .btn {
    margin-top: 1rem;
}

.profile-about {
    line-height: 1.65;
}

.profile-section-heading {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
}

.profile-section-heading p {
    color: #657987;
    font-size: .88rem;
    margin: -.35rem 0 1rem;
}

.profile-session-list {
    display: grid;
    gap: .65rem;
}

.profile-session {
    align-items: center;
    border: 1px solid #dce8ef;
    border-radius: .65rem;
    color: #203d50;
    display: grid;
    gap: .8rem;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    padding: .8rem;
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
}

.profile-session:hover {
    border-color: #72bde4;
    color: #0068ad;
    transform: translateY(-1px);
}

.profile-session-date {
    background: #eaf7fe;
    border-radius: .5rem;
    color: #0068ad;
    font-size: .76rem;
    font-weight: 800;
    padding: .5rem;
    text-align: center;
}

.profile-session strong,
.profile-session small {
    display: block;
}

.profile-session small {
    color: #718592;
    margin-top: .2rem;
}

.profile-session-price {
    font-weight: 800;
}

.profile-follow-request {
    align-items: center;
    border-top: 1px solid #edf1f4;
    display: grid;
    gap: .35rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: .65rem 0;
}

.profile-follow-request:first-child {
    border-top: 0;
    padding-top: 0;
}

.profile-follow-request strong,
.profile-follow-request small {
    display: block;
    font-size: .8rem;
}

.profile-follow-request small {
    color: #718592;
}

.profile-edit-modal {
    max-height: calc(100vh - 2rem);
}

.profile-edit-modal .modal-content {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 24px 70px rgba(18, 57, 82, .26);
    max-height: calc(100vh - 2rem);
    overflow: hidden;
}

.profile-edit-modal .modal-content > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.profile-edit-modal .modal-header {
    background: linear-gradient(120deg, #0068ad, #0a99d3);
    border: 0;
    color: #fff;
    flex-shrink: 0;
    padding: 1.15rem 1.35rem;
}

.profile-edit-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: .9;
}

.profile-edit-eyebrow {
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .11em;
    margin: 0 0 .2rem;
    opacity: .8;
}

.profile-edit-modal .modal-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.35rem;
    -webkit-overflow-scrolling: touch;
}

.profile-edit-modal .modal-footer {
    background: #f8fbfd;
    border-color: #e2ebf0;
    flex-shrink: 0;
    padding: .9rem 1.35rem;
}

.profile-edit-section {
    border: 0;
    border-bottom: 1px solid #e5edf2;
    margin: 0 0 1.25rem;
    padding: 0 0 1.25rem;
}

.profile-edit-section legend {
    color: #24475d;
    float: none;
    font-family: 'Russo One', sans-serif;
    font-size: 1rem;
    margin-bottom: .75rem;
    width: auto;
}

.profile-edit-help {
    color: #6d818e;
    font-size: .85rem;
    margin: -.45rem 0 .75rem;
}

.profile-edit-modal .form-label {
    color: #38576a;
    font-size: .84rem;
    font-weight: 700;
}

.profile-edit-modal .form-control,
.profile-edit-modal .form-select,
.profile-edit-modal .input-group-text,
.profile-edit-modal .choices__inner {
    border-color: #cfdee7;
    border-radius: .55rem;
    min-height: 44px;
}

.profile-edit-modal .input-group .input-group-text {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.profile-edit-modal .input-group .form-control {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.profile-edit-modal .choices {
    margin-bottom: 0;
}

.profile-edit-modal .choices__list--multiple .choices__item {
    background: #0071bc;
    border-color: #0068ad;
}

@media (max-width: 820px) {
    .profile-banner-inner {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .profile-actions {
        flex-direction: row;
        grid-column: 1 / -1;
        min-width: 0;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-side .profile-panel:first-child:last-child,
    .profile-side .profile-panel:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .profile-edit-modal,
    .profile-edit-modal .modal-content {
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .profile-edit-modal {
        margin: .5rem;
    }

    .profile-edit-modal .modal-body,
    .profile-edit-modal .modal-header,
    .profile-edit-modal .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .profile-banner-inner {
        justify-items: center;
        min-height: 0;
        padding: 1.75rem 1rem 2.5rem;
        text-align: center;
    }

    .profile-avatar {
        height: 104px;
        width: 104px;
    }

    .profile-identity {
        grid-column: 1 / -1;
    }

    .profile-name-row,
    .profile-counts {
        justify-content: center;
    }

    .profile-name-row h1 {
        font-size: 2rem;
        width: 100%;
    }

    .profile-actions {
        justify-content: center;
        width: 100%;
    }

    .profile-actions .btn {
        flex: 1;
        min-width: 0;
    }

    .profile-content {
        padding: 0 1rem;
    }

    .profile-tabs {
        overflow-x: auto;
    }

    .profile-tabs button {
        flex: 1;
        min-width: 92px;
    }

    .profile-side {
        grid-template-columns: 1fr;
    }

    .profile-side .profile-panel:nth-child(3) {
        grid-column: auto;
    }

    .profile-session {
        grid-template-columns: 66px minmax(0, 1fr);
    }

    .profile-session-price {
        grid-column: 2;
    }

    .profile-follow-request {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .profile-follow-request .btn:last-child {
        grid-column: 2;
    }
}
