.portal-profile-shell {
    margin-bottom: 3rem;
}

.portal-profile-hero {
    background: #f8fafc;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 .125rem .25rem rgba(15, 23, 42, .045);
}

.portal-profile-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.portal-profile-identity {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
}

.portal-profile-avatar {
    width: 104px;
    height: 104px;
    border-radius: 10px;
    border: 1px solid #dbe3ea;
    background: #eef3f8;
    color: #334155;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1.85rem;
    font-weight: 750;
    letter-spacing: .03em;
}

.portal-profile-avatar.is-portrait {
    height: 128px;
}

.portal-profile-avatar img,
img.portal-profile-avatar {
    object-fit: cover;
}

img.portal-profile-avatar.is-logo {
    object-fit: contain;
    padding: .3rem;
    background: #fff;
}

.portal-profile-title {
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.2;
    margin: 0 0 .2rem;
}

.portal-profile-name {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.portal-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
    align-items: center;
}

.portal-profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: .6rem .9rem;
    border-top: 1px solid #dbe3ea;
    margin-top: 1rem;
    padding-top: 1rem;
}

.portal-profile-detail-label {
    display: block;
    color: #64748b;
    font-size: .75rem;
    line-height: 1.1;
}

.portal-profile-detail-value {
    display: block;
    color: #1f2937;
    font-size: .93rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.portal-profile-card {
    border: 1px solid #dbe3ea;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 .125rem .25rem rgba(15, 23, 42, .035);
}

.portal-profile-card:not(.card) {
    padding: 1rem;
}

.portal-profile-card.card > .card-header {
    background: #f8fafc;
}

.portal-profile-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
    background: #f8fafc;
    padding: 1rem;
    margin-bottom: 1rem;
}

.portal-profile-section-title {
    color: #334155;
    font-size: .98rem;
    font-weight: 700;
    border-bottom: 1px solid #e5eaf0;
    padding-bottom: .55rem;
    margin-bottom: .85rem;
}

.portal-affiliation-toggle > summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
}

.portal-affiliation-action-card {
    border-color: #8bbcff;
    background: #eef6ff;
}

.portal-affiliation-toggle > summary::-webkit-details-marker {
    display: none;
}

.portal-affiliation-toggle[open] > summary {
    margin-bottom: .5rem;
}

.portal-status-summary > summary {
    cursor: pointer;
    list-style: none;
}

.portal-status-summary > summary::-webkit-details-marker {
    display: none;
}

@media (max-width: 767.98px) {
    .portal-profile-shell {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .portal-profile-hero {
        margin-left: -.25rem;
        margin-right: -.25rem;
    }

    .portal-profile-avatar {
        width: 78px;
        height: 78px;
        font-size: 1.45rem;
    }

    .portal-profile-avatar.is-portrait {
        width: 82px;
        height: 102px;
    }

    .portal-profile-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .portal-profile-actions .btn {
        flex: 1 1 auto;
    }

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