.profile,
.profile *,
.profile::before,
.profile::after,
.profile *::before,
.profile *::after {
    box-sizing: border-box;
}

body.no-scroll {
    overflow: hidden;
}

.profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

.profile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.profile-dialog {
    position: relative;
    top: 24px;
    right: 24px;
    width: calc(100% - 310px);
    max-width: 1100px;
    background-color: #fff;
    border-radius: 16px;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin-left: auto;
}

.profile-overlay.active .profile-dialog {
    transform: translateX(0);
    opacity: 1;
}

.profile-close {
    position: absolute;
    top: 16px;
    left: -32px;
    width: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3b82f6;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    color: #fff;
    padding: 4px 0;
}

.profile-close:hover {
    background-color: #2563eb;
}

.profile-close__icon {
    width: 20px;
    height: 20px;
    display: block;
}

.profile {
    height: calc(100vh - 48px);
    overflow: auto;
    display: grid;
    grid-template-columns: 288px 1fr;
    gap: 24px;
    align-items: flex-start;
    background-color: #f9fafb;
    border-radius: 16px;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.5;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.profile-left,
.profile-right {
    background-color: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px;
}

.profile-left__section + .profile-left__section {
    border-top: 1px solid #e5e7eb;
    padding-top: 24px;
    margin-top: 24px;
}

.profile-header {
    text-align: center;
}

.profile-header__avatar {
    overflow: hidden;
    width: 128px;
    height: 128px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3b82f6;
    border-radius: 50%;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    color: #fff;
    margin-right: auto;
    margin-bottom: 16px;
    margin-left: auto;
}

.profile-header__avatar > img {
    -o-object-fit: cover;
    object-fit: cover;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    display: block;
}

.profile-header__title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-top: 0;
    margin-bottom: 4px;
}

.profile-header__name,
.profile-header__surname {
    text-transform: capitalize;
}

.profile-header__position {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.profile-header__joined {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.profile-header__rolelist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.profile-header__role {
    display: inline-block;
    background: #3b82f6;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    padding: 4px 12px;
}

.profile-stats__info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.profile-stats__block {
    font-size: 12px;
    text-align: center;
    color: #4b5563;
}

.profile-stats__amount,
.profile-stats__percent {
    font-size: 24px;
    font-weight: 700;
}

.profile-stats__amount {
    color: #2563eb;
}

.profile-stats__percent {
    color: #16a34a;
}

.profile-stats__action {
    display: flex;
    gap: 8px;
}

.profile-stats__edit {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    background-color: #3b82f6;
    border-radius: 4px;
    color: #fff;
    padding: 8px 12px;
}

.profile-stats__edit:hover {
    background-color: #2563eb;
}

.profile-stats__options {
    background-color: #f3f4f6;
    border-radius: 4px;
    color: #4b5563;
    padding: 8px;
}

.profile-stats__options:hover {
    background-color: #e5e7eb;
}

.profile-stats__icon {
    width: 16px;
    height: 16px;
    display: block;
}

.profile-info:not(.edit-mode) .profile-info__contacts .profile-info__group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.profile-info__group + .profile-info__group {
    margin-top: 16px;
}

.profile-info__label {
    cursor: text;
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 8px;
}

.profile-info:not(.edit-mode) .profile-info__label {
    pointer-events: none;
}

.profile-info:not(.edit-mode) .profile-info__contacts .profile-info__label {
    display: none;
}

.profile-info__input {
    width: 100%;
    font-size: 14px;
    color: #1f2937;
}

.profile-info:not(.edit-mode) .profile-info__input {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
    caret-color: transparent;
    cursor: text;
    background: none;
    border: none;
    outline: none;
}

.edit-mode .profile-info__input {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 8px 12px;
}

.edit-mode .profile-info__input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
}

.profile-info__select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    padding: 8px 12px;
}

.profile-info:not(.edit-mode) .profile-info__select {
    display: none;
}

.profile-info__pseudoselect {
    font-size: 14px;
    color: #1f2937;
}

.edit-mode .profile-info__pseudoselect {
    display: none;
}

.profile-info:not(.edit-mode) .profile-info__action {
    display: none;
}

.profile-info__contacts {
    margin-top: 16px;
}

.profile-info:not(.edit-mode) .profile-info__contacts {
    border-top: 1px solid #e5e7eb;
    padding-top: 24px;
    margin-top: 24px;
}

.profile-info__icon {
    width: 16px;
    height: 16px;
    display: block;
    color: #9ca3af;
}

.edit-mode .profile-info__icon {
    display: none;
}

.profile-info__action {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 32px;
}

.profile-info__button {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-size: 14px;
    padding: 8px 12px;
}

.profile-info__button--save {
    background-color: #22c55e;
    color: #fff;
}

.profile-info__button--save:hover {
    background-color: #16a34a;
}

.profile-info__button--cancel {
    background-color: #d1d5db;
    color: #374151;
}

.profile-info__button--cancel:hover {
    background-color: #9ca3af;
}

.profile-info__svg {
    width: 16px;
    height: 16px;
    display: block;
}

.profile-programs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-programs__item + .profile-programs__item {
    border-top: 1px solid #e5e7eb;
    padding-top: 36px;
    margin-top: 36px;
}

.profile-program__inner {
    margin-top: 24px;
}

.profile-program-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.profile-program-header__logo {
    overflow: hidden;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    background-color: #3b82f6;
    border-radius: 50%;
    color: #fff;
}

.profile-program-header__logo > img {
    -o-object-fit: cover;
    object-fit: cover;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    display: block;
}

.profile-program-header__title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.profile-program-header__subtitle {
    font-size: 12px;
    color: #6b7280;
}

.profile-program-header__toggler {
    background-color: transparent;
    color: #9ca3af;
    margin-left: auto;
}

.profile-program-header__toggler:hover {
    color: #4b5563;
}

.profile-program.is-open .profile-program-header__toggler {
    transform: scaleY(-1);
}

.profile-program-header__chevron {
    width: 20px;
    height: 20px;
    display: block;
}

.profile-program-inner {
    display: none;
}

.profile-program.is-open .profile-program-inner {
    display: block;
}

.profile-program-inner__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-program-inner__item {
    padding-bottom: 32px;
}

.profile-program-inner__item:last-child {
    padding-bottom: 0;
}

.profile-program-inner__item:not(:last-child) {
    position: relative;
    z-index: 1;
}

.profile-program-inner__item:not(:last-child)::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background-color: #d1d5db;
}

.profile-program-item {
    display: flex;
    gap: 16px;
}

.profile-program-item__icon {
    position: relative;
    z-index: 2;
    overflow: hidden;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border-radius: 50%;
    outline: 10px solid #fff;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.profile-program-item--green .profile-program-item__icon {
    background-color: #22c55e;
}

.profile-program-item--yellow .profile-program-item__icon {
    background-color: #eab308;
}

.profile-program-item__status {
    margin-bottom: 4px;
}

.profile-program-item__state {
    font-size: 14px;
    font-weight: 500;
    color: #16a34a;
}

.profile-program-item__time {
    font-size: 12px;
    color: #6b7280;
    margin-left: 8px;
}

.profile-program-item__descr {
    font-size: 14px;
    color: #374151;
}

.lms-header-admin {
    cursor: pointer;
}