/* ==================== КОНТЕНТ ПРОФИЛЯ ==================== */
.profile__content {
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 20px;
  width: 100%;
  background: var(--color-white);
  border-radius: 40px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 1200px) {
  .profile__content {
    border-radius: 30px;
  }
}

@media (max-width: 1349px) {
  .profile__content {
    border-radius: 20px;
  }

  .profile__row {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .profile__content {
    border-radius: 20px;
  }
}

.profile__row {
  display: flex;
  gap: 20px;
  width: 100%;
}

@media (max-width: 1024px) {
  .profile__row {
    flex-direction: column;
    gap: 20px;
  }
}

.profile__column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;

}

.profile__column:first-child {
  flex: 2;
}

.profile__column:last-child {
  flex: 1;
  min-width: 280px;
}

@media (max-width: 1024px) {

  .profile__column:first-child,
  .profile__column:last-child {
    flex: 1;
    min-width: 100%;
  }
}

.profile__item {
  width: 100%;
  min-width: 0;
}

.profile__user {
  width: 100%;
  min-width: 0;
}

.user-profile {
  width: 100%;
  min-width: 0;
}

.profile__conts {
  padding: 20px;
  height: auto;
  height: 155px;
  background: #e9eff3a6;
  border-radius: 20px;

  @media (max-width: 767px) {
    padding: 16px;
  }
}

.profile__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
}


.profile__title {
  display: flex;
  align-items: center;
  color: #036;
  font-family: Raleway;
  font-size: 22px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.profile__redact {
  color: var(--color-info);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-fast);
  padding: 4px 8px;
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
}

.profile__redact:hover {
  color: #0099ff;
  background: rgba(0, 102, 204, 0.1);
}

.mt-0 {
  padding-bottom: 0 !important; 
  margin-bottom: 0 !important;
}

.profile__desp textarea {
  width: 100%;
  min-height: 55px;
  padding: 0px;
  border: 0px solid var(--color-border);
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  background: none;
  transition: all var(--transition-fast);
}

.profile__desp {
  position: relative;
}

.profile__desp-placeholder {
  color: #6e6e6e;
  font-size: 14px;
  line-height: 1.4;
  pointer-events: none;
  white-space: pre-wrap;
}

/* Если описания нет — показываем подсказку вместо textarea (textarea нужен для JS) */
.profile__desp--empty textarea[readonly] {
  min-height: 0;
  height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  resize: none;
}

/* Скрываем подсказку, когда textarea становится редактируемым/в фокусе */
.profile__desp textarea:focus + .profile__desp-placeholder,
.profile__desp textarea:not([readonly]) + .profile__desp-placeholder {
  display: none;
}

.profile__desp textarea:focus {
  outline: none;
  border-color: #66ccff;
  box-shadow: 0 0 0 3px rgba(102, 204, 255, 0.2);
  background: var(--color-white);
}

.profile__desp textarea[readonly] {
  cursor: default;
}

.profile__desp textarea[readonly]:focus {
  outline: none;
  border-color: inherit;
  box-shadow: none;
  background: inherit;
  cursor: default;
}

#saveBtn:disabled {
  background: #9ca3af !important;
  color: #f3f4f6 !important;
  cursor: not-allowed;
}

/* ==================== ОСНОВНОЙ КОНТЕНТ ПРОФИЛЯ ==================== */
.profile-main-content {
  display: flex;
  width: 100%;
  max-width: 818.6px;
  height: auto;
  min-height: 502px;
  padding: clamp(16px, 2.2vw, 36px);
  justify-content: space-between;
  align-items: stretch;
  gap: clamp(16px, 2vw, 33px);
  border-radius: 30px;
  background: #F1F5F7;
  box-sizing: border-box;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .profile-main-content {
    flex-direction: column;
    gap: 30px;
    padding: 25px;
    max-width: 100%;
    min-height: 0;
  }
}

@media (max-width: 1349px) {
  .profile-main-content {
    padding: 20px;
    border-radius: 20px;
    justify-content: space-between;
    align-items: stretch;
  }

  .profile-data {
    max-width: 350px;
  }
}

@media (max-width: 768px) {
  .profile-main-content {
    padding: 16px;
    border-radius: 20px;
  }
}

.profile-data {
  width: 100%;
  flex: 1;

  @media (max-width: 767px) {
    padding: 16px;
  }
}

.profile-level-progress {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

@media (max-width: 1024px) {
  .profile-level-progress {
    flex: 1;
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
  }
}

/* Заголовок профиля с аватаром */
.user-profile__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
}

@media (max-width: 1349px) {
  .user-profile__header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .user-profile__header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
}

.user-profile__image {
  margin-bottom: 0;
  flex-shrink: 0;
  position: relative;
  width: 80px;
  height: 80px;
}

@media (max-width: 1349px) {
  .user-profile__image {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 768px) {
  .user-profile__image {
    width: 100px;
    height: 100px;
  }
}

.user-profile__image img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-round);
  border: 3px solid var(--color-white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Кнопка удаления аватара */
.delete-avatar-btn {
  background: #ff4444 !important;
  color: var(--color-white) !important;
  border: none !important;
  border-radius: var(--radius-round) !important;
  width: 28px !important;
  height: 28px !important;
  cursor: pointer !important;
  font-size: 18px !important;
  line-height: 1 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 10;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.delete-avatar-btn--hidden {
  display: none !important;
}

.delete-avatar-btn:hover {
  background: #ff0000 !important;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .delete-avatar-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    font-size: 14px !important;
  }
}

.user-profile__image form {
  display: inline;
  position: relative;
}

/* Форма загрузки аватара — по размеру контейнера, инпут по размеру img */
.user-profile__image form[enctype="multipart/form-data"] {
  position: absolute;
  inset: 0;
  z-index: 5;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

.user-profile__image form[enctype="multipart/form-data"] input[type="file"] {
  cursor: pointer;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 10;
  margin: 0;
  padding: 0;
  font-size: 0;
}

/* Бейдж уровня */
.user-profile__level-info {
  margin-left: 0;
  flex-shrink: 0;
}

.level-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
  min-width: auto;
  text-align: left;
  box-shadow: none;
}

@media (max-width: 1349px) {
  .level-badge {
    align-items: center;
    text-align: center;
  }
}

.level-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-primary);
  margin: 0;
  line-height: 1.1;
}

.level {
  display: flex;
  width: 260px;
  height: 28px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  position: relative;
  border-radius: 40px;
  border: 1px solid #003366;
  background: transparent;
}

@media (max-width: 1349px) {
  .level {
    width: 110px;
    height: 26px;
  }
}

.level-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.korona {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.level-name {
  position: relative;
  width: fit-content;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  color: #003366;
  font-size: 13px;
  text-align: center;
  letter-spacing: 0;
  line-height: 1.1;
  white-space: nowrap;
}

.user-profile__name {
  color: #036;
  font-variant-numeric: lining-nums proportional-nums;
  font-family: Raleway;
  font-size: 22px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

@media (max-width: 1349px) {
  .user-profile__name {
    text-align: center;
    font-size: 20px;
  }
}

/* Информация профиля */
.info-profile__info-global {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.info-profile__elem {
  display: flex;
  gap: 0px;
  padding: 0px 0px;
  width: 100%;
  margin: 0;
  min-width: 0;
  overflow: visible;
}

.profile__desp textarea span {
  font-weight: 900;
}

@media (max-width: 1349px) {
  .info-profile__elem {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    justify-content: space-between;
  }
}

.ml-15 {
  margin-right: 15px;
}

.profile__role p {
  font-family: Inter;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.customer {
  color: #0033FF;
}

.performer {
  color: #009900;
}

.observer {
  color: #666666;
}

.info-profile__text {
  color: #000;
  font-variant-numeric: lining-nums proportional-nums;
  font-family: Raleway;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

@media (max-width: 1349px) {
  .info-profile__text {
    min-width: auto;
    flex-shrink: 0;
    font-size: 15px;
    color: var(--color-gray);
    padding-right: 12px;
    white-space: nowrap;
  }
}

.info-profile__value {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: visible;
  min-width: 50px;
}

.info-profile__number {
  font-size: 16px;
  color: #6E6E6E;
}

.info-profile__role {
  color: #00cdc2;
  display: block !important;
}

.info-profile__role span {
  color: #000;
  font-weight: 700;
}

.info-profile__phone {
  display: flex;

}

@media (max-width: 1349px) {
  .info-profile__value {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
  }

  .info-profile__text {
    flex-shrink: 0;
    padding-right: 12px;
  }
}

.info-profile__value span,
.email-value {
  flex: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 16px;
  color: var(--color-primary);
  margin: 0;
  line-height: normal;
  font-weight: 400;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1349px) {

  .info-profile__value span,
  .email-value {
    font-size: 15px;
    text-align: left;
    white-space: normal;
    word-break: break-all;
  }
}

.value-profile {
  display: flex;
  transition: all var(--transition-fast);
  align-items: center;
  width: auto;
  min-width: 0;
  flex: 1;
}

/* Режим просмотра: текст email с переносом на новую строку */
.value-profile__view {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.value-profile__email-text {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-primary);
  display: contents;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
  line-height: 1.4;
}

/* Режим редактирования: инпут */
.value-profile__edit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.value-profile__input {
  background: transparent;
  font-size: 16px;
  font-weight: 400;
  border: none;
  padding: 0;
  outline: none;
  font-family: inherit;
  flex: 1;
  min-width: 0;
}

.value-profile__save,
.value-profile__cancel {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
}

.value-profile__save {
  background: var(--color-primary);
  color: #fff;
  border: none;
}

.value-profile__cancel {
  background: transparent;
  color: var(--color-gray-dark);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Строка E-mail: при нехватке места блок значения переносится на новую строку */
.info-profile__elem--email {
  flex-wrap: wrap;
  align-items: start !important;
}

.info-profile__elem--email .info-profile__value {
  min-width: 0;
}

.edit-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.edit-button:hover {
  opacity: 1;
}

/* ==================== ПАНЕЛЬ ПРОГРЕССА УРОВНЯ ==================== */
.profile-level-panel {
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;

  @media (max-width: 767px) {
    padding: 16px;
  }
}

.profile-level-progress-row {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 1349px) {
  .profile-level-progress-row {
    flex-direction: row;
    gap: 15px;
  }

  .profile-level-progress {
    flex: 0 0 280px;
  }
}

@media (max-width: 768px) {
  .profile-level-progress-row {
    flex-direction: row;
    gap: 15px;
  }

  .level-indicators {
    width: 100% !important;
  }

  .profile-level-progress {
    flex: 0 0 280px;
    display: flex;
    margin: 0 auto;
    justify-content: center;
    flex-direction: row;
  }
}

@media (max-width: 480px) {
  .profile-level-progress-row {
    gap: 10px;
  }

  .profile-level-progress {
    flex: 0 0 250px;
  }
}

.profile-level-indicators {
  display: flex;
  flex-direction: column;
  gap: 50px;
  position: relative;
  padding: 0;
  align-items: center;
  width: 30px;
  flex-shrink: 0;
  justify-content: space-between;
  height: 206px;
}

@media (max-width: 768px) {
  .profile-level-indicators {
    gap: 60px;
    height: 280px;
  }
}

.profile-level-track {
  position: absolute;
  left: 8px;
  top: 15px;
  bottom: 15px;
  width: 14px;
  background: #e4e4f7;
  border-radius: 12px;
  z-index: 1;
}

.profile-level-fill {
  position: absolute;
  left: 8px;
  top: 15px;
  width: 14px;
  background: linear-gradient(30deg, #33ccff, #003366);
  border-radius: 12px;
  z-index: 2;
  transition: height 1.2s ease-out;
}

.profile-level-indicator {
  width: 30px;
  height: 30px;
  border-radius: 15px;
  background-color: var(--color-white);
  position: relative;
  z-index: 3;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.profile-level-indicator img {
  width: 13px;
  height: 15px;
  object-fit: contain;
}

/*.level-indicator.active {
  border: 2px solid #00cc33;
  background-color: var(--color-white);
  box-shadow: 0 0 0 2px rgba(0, 204, 51, 0.2);
}

.level-indicator.current {
  border: 3px solid #00cc33;
  background-color: var(--color-white);
  box-shadow: 0 0 0 3px rgba(0, 204, 51, 0.3);
  transform: scale(1.1);
}        */

.profile-level-content-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 35px;
  min-width: 250px;
  justify-content: space-between;
  height: 210px;
  padding: 5px 0 0 0;
}

@media (max-width: 768px) {
  .profile-level-content-panel {
    height: auto;
    gap: 30px;
    min-width: 0;
    padding: 0;
    margin-bottom: 20px;
  }
}

.profile-level-item {
  display: block;
  padding: 0;
  border-radius: 0;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  min-height: auto;
  flex: 1;
  position: relative;
  margin-bottom: 0;
  cursor: pointer;
}

.profile-level-item:hover {
  transform: translateX(5px);
}

.profile-level-item.active .profile-level-name-panel {
  color: var(--color-primary);
}

.profile-level-item.current .profile-level-name-panel {
  color: var(--color-primary);
  font-weight: 700;
}

.profile-level-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  gap: 5px;
}

.profile-level-name-panel {
  font-weight: 600;
  font-size: 14px;
  color: #020619;
  margin-bottom: 4px;
  letter-spacing: 0;
  line-height: 10px;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
  max-width: 100% !important;
}

.profile-level-desc {
  font-size: 13px;
  color: #a7adc9;
  line-height: 18px;
  margin-bottom: 0;
  font-weight: 500;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
  max-width: 100% !important;
}

.level-status {
  font-size: 12px;
  font-weight: 600;
  color: #00cc33;
  margin-top: 4px;
  text-transform: none;
  letter-spacing: 0;
  display: block;
  line-height: 1.3;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
  max-width: 100% !important;
}

.profile-level-links {
  margin-top: 0px;
  padding-top: 10px;
  padding-bottom: 25px;
  width: 100%;
}

.profile-level-link {
  color: #5369e0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-block;
  line-height: 1.4;
  max-width: 165px;
  word-break: break-word;
  box-sizing: border-box;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
}

/*.level-link:hover {
  color: var(--color-white);
  background: #5369e0;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(83, 105, 224, 0.3);
}*/

@media (max-width: 768px) {
  .profile-level-links {
    margin-top: 77px;
    padding-top: 15px;
  }

  .profile-level-link {
    font-size: 13px;
    padding: 6px 12px;
    width: 100%;
  }
}

/* ==================== ГАЛЕРЕЯ ДОКУМЕНТОВ И ПОРТФОЛИО ==================== */
.gallery-profile__gallery {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .gallery-profile__gallery {
    gap: 10px;
  }
}

.gallery-profile__images {
  cursor: pointer;
  position: relative;
  flex: 0 0 calc(24% - 10px);
  max-width: calc(24% - 10px);
}

@media (max-width: 768px) {
  .gallery-profile__images {
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
  }

  .gallery-profile__images:nth-child(3) {
    display: none;
  }
}

.gallery-profile__image {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 5/3;
  /* width: 127px;
  height: 102px;*/
}

.gallery-profile__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all var(--transition-fast);
}

.gallery-profile__image:hover img {
  transform: scale(1.05);
}

.gallery-profile__delete {
  transition: all var(--transition-fast);
  margin-top: 8px;
  text-align: center;
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.gallery-profile__delete:hover {
  color: var(--color-danger);
}

.gallery-profile__delete svg {
  display: none;
}

@media (max-width: 991px) {
  .gallery-profile__delete svg {
    display: inline-block;
  }
}

@media (max-width: 1200px) {
  .gallery-profile__delete {
    margin-top: 5px;
  }
}

@media (max-width: 991px) {
  .gallery-profile__delete span {
    display: none;
  }
}

.images-profile {
  cursor: pointer;
}

.images-profile__image {
  position: relative;
  display: flex;
  aspect-ratio: 4/3;
  text-decoration: none;
}

.images-profile__image::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.images-profile__image span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: 24px;
  z-index: 4;
  color: var(--color-white);
  font-weight: 600;
}

/* Загрузка файлов */
.doc-config {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 25px;
  border: 30px dashed #6E6E6E;
  border-radius: 30px;
  transition: all var(--transition-base);
  cursor: pointer;
  margin-top: 20px;
}

.doc-config:hover {
  border-color: var(--color-info);
  background: #f5f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.doc-config input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.doc-config__text {
  font-size: 14px;
  color: var(--color-gray);
  text-align: center;
  margin: 0;
  line-height: 1.4;
  max-width: 300px;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
}

.doc-config__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  color: var(--color-primary);
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-base);
  text-decoration: none;
}

.doc-config:hover .doc-config__link {
  transform: translateY(-2px);
}

.doc-config__link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: inherit;
}

.doc-config__link p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
}

/* ==================== КНОПКИ В ПРОФИЛЕ ==================== */
.btns-profile__row {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

@media (max-width: 768px) {
  .btns-profile__row {
    flex-direction: column;
    gap: 10px;
  }
}

.btns-profile__btn {
  flex: 1;
  min-width: 0;
  min-height: 75px;
}

@media (max-width: 768px) {
  .btns-profile__btn {
    width: 100%;
  }
}

.btns-profile__btn a {
  background-color: rgba(233, 239, 243, 0.85);
  display: flex;
  gap: 10px;
  overflow: hidden;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(16px, 0.1851851852vw + 15.3333333333px, 18px);
  padding: 18px 25px;
  line-height: 1;
  border-radius: 30px;
  transition: all var(--transition-base);
  width: 100%;
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .btns-profile__btn a {
    padding: 15px 20px;
    font-size: 16px;
  }
}

.btns-profile__btn a:hover {
  background-color: rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btns-profile__btn a svg {
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.btns-profile__btn a:hover svg {
  transform: translate(5px, -5px);
}



/* ==================== VIEWER ДЛЯ ИЗОБРАЖЕНИЙ ==================== */
.viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: var(--z-modal);
}

.viewer-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: var(--color-white);
  cursor: pointer;
  z-index: var(--z-tooltip);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
}

.viewer-close:hover {
  opacity: 0.8;
}

.arrow {
  position: absolute;
  top: 50%;
  font-size: 40px;
  color: var(--color-white);
  cursor: pointer;
  padding: 10px;
  transform: translateY(-50%);
  z-index: var(--z-tooltip);
  transition: opacity var(--transition-fast);
}

.arrow:hover {
  opacity: 0.8;
}

.arrow-left {
  left: 30px;
}

.arrow-right {
  right: 30px;
}

#viewer-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ==================== УВЕДОМЛЕНИЯ ==================== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-weight: 500;
  z-index: var(--z-tooltip);
  animation: slideIn 0.3s ease;
  max-width: calc(100% - 40px);
  word-break: break-word;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .notification {
    left: 20px;
    right: 20px;
    text-align: center;
  }
}

.notification-success {
  background-color: var(--color-success);
}

.notification-error {
  background-color: var(--color-danger);
}

.notification-info {
  background-color: var(--color-primary);
}

.notification-warning {
  background-color: var(--color-warning);
}

/* ==================== АНИМАЦИИ ==================== */
@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(-20px);
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ==================== РЕСПОНСИВНЫЕ СТИЛИ ==================== */
@media (max-width: 480px) {

  /* Хедер */
  .account-header__content {
    padding: 8px 10px;
  }

  .gif-link {
    width: 34px;
    height: 34px;
  }

  /* Компактный профиль */
  .profile-account__top.compact {
    padding: 6px 8px;
    gap: 8px;
  }

  .profile-account__logo img {
    width: 36px !important;
    height: 36px !important;
  }

  .profile-account__name {
    font-size: 12px;
    max-width: 100px;
  }

  .profile-account__role {
    font-size: 10px;
    max-width: 90px;
  }

  /* Основной контент */
  .profile__content {
    gap: 15px;
  }

  .profile-main-content {
    padding: 15px;
    gap: 20px;
  }

  .user-profile__header {
    gap: 15px;
  }

  .user-profile__image {
    width: 80px;
    height: 80px;
  }

  .user-profile__name {
    font-size: 18px;
    margin-bottom: 15px;
  }

  /* Панель прогресса */
  .profile-level-progress-row {
    flex-direction: column;
  }

  .profile-level-indicators {
    flex-direction: row;
    width: 100%;
    height: 30px;
    gap: 20px;
    justify-content: center;
  }

  .profile-level-track {
    top: 8px;
    left: 15px;
    right: 15px;
    width: auto;
    height: 14px;
  }

  .profile-level-fill {
    top: 8px;
    left: 15px;
    height: 14px;
  }

  .profile-level-indicator {
    width: 24px;
    height: 24px;
  }

  .profile-level-content-panel {
    height: auto;
    gap: 20px;
  }

  /* Галерея */
  .gallery-profile__images {
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
  }

  /* Формы */
  .doc-config {
    padding: 15px;
  }

  .doc-config__link {
    padding: 10px 16px;
    font-size: 12px;
  }
}

/* ==================== ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ ==================== */
/* Гарантируем, что профиль всегда поверх других элементов */
.profile-account {
  isolation: isolate;
}

/* Убираем возможные конфликты с другими стилями */
.profile-dropdown * {
  box-sizing: border-box;
}

/* Фикс для прокрутки на iOS */
.profile-dropdown {
  -webkit-overflow-scrolling: touch;
}

/* Гарантируем, что оверлей не кликабельный, когда меню закрыто */
.profile-overlay:not(.active) {
  pointer-events: none;
}

/* Гарантируем корректное отображение на устройствах с вырезом */
@supports (padding: max(0px)) {
  .profile-dropdown {
    padding-left: max(var(--spacing-lg), env(safe-area-inset-left));
    padding-right: max(var(--spacing-lg), env(safe-area-inset-right));
  }
}

/* Улучшаем доступность для пользователей, которые предпочитают уменьшенное движение */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 1. Уровни всегда горизонтальные (до 150px) */
@media (max-width: 150px) {
  .profile-level-progress-row {
    flex-direction: column !important;
    gap: 5px !important;
  }

  .profile-level-indicators {
    flex-direction: row !important;
    width: 100% !important;
    height: 30px !important;
    gap: 10px !important;
    justify-content: space-between !important;
    padding: 0 !important;
  }

  .profile-level-track {
    position: absolute !important;
    top: 50% !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    height: 6px !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
  }

  .profile-level-fill {
    position: absolute !important;
    top: 50% !important;
    left: 10px !important;
    height: 6px !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
  }

  .profile-level-indicator {
    width: 20px !important;
    height: 20px !important;
    z-index: 3 !important;
    position: relative !important;
  }

  .profile-level-indicator img {
    width: 12px !important;
    height: 12px !important;
  }

  .profile-level-content-panel {
    height: auto !important;
    gap: 10px !important;
    min-width: 0 !important;
    padding: 5px 0 !important;
  }

  .profile-level-name-panel {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .profile-level-desc {
    font-size: 8px !important;
    line-height: 1.1 !important;
    display: none !important;
    /* Скрываем на очень маленьких экранах */
  }

  .level-status {
    font-size: 8px !important;
  }

  .profile-level-links {
    margin-top: 10px !important;
    padding-top: 8px !important;
  }

  .profile-level-link {
    font-size: 8px !important;
    padding: 4px 8px !important;
  }
}

/* 2. Уровни горизонтальные (151-250px) */
@media (min-width: 151px) and (max-width: 250px) {
  .profile-level-progress-row {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .profile-level-indicators {
    flex-direction: row !important;
    width: 100% !important;
    height: 35px !important;
    gap: 15px !important;
    justify-content: space-between !important;
    padding: 0 5px !important;
  }

  .profile-level-track {
    position: absolute !important;
    top: 50% !important;
    left: 15px !important;
    right: 15px !important;
    width: auto !important;
    height: 8px !important;
    transform: translateY(-50%) !important;
  }

  .profile-level-fill {
    position: absolute !important;
    top: 50% !important;
    left: 15px !important;
    height: 8px !important;
    transform: translateY(-50%) !important;
  }

  .profile-level-indicator {
    width: 24px !important;
    height: 24px !important;
  }

  .profile-level-indicator img {
    width: 14px !important;
    height: 14px !important;
  }

  .profile-level-content-panel {
    height: auto !important;
    gap: 12px !important;
    padding: 8px 0 !important;
  }

  .profile-level-name-panel {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  .profile-level-desc {
    font-size: 9px !important;
    line-height: 1.2 !important;
  }

  .level-status {
    font-size: 9px !important;
  }

  .profile-level-links {
    margin-top: 15px !important;
    padding-top: 10px !important;
  }

  .profile-level-link {
    font-size: 9px !important;
    padding: 5px 10px !important;
  }
}

/* 3. Уровни горизонтальные (251-350px) */
@media (min-width: 251px) and (max-width: 350px) {
  .profile-level-progress-row {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .profile-level-indicators {
    flex-direction: row !important;
    width: 100% !important;
    height: 40px !important;
    gap: 20px !important;
    justify-content: space-between !important;
    padding: 0 10px !important;
  }

  .profile-level-track {
    position: absolute !important;
    top: 50% !important;
    left: 20px !important;
    right: 20px !important;
    width: auto !important;
    height: 10px !important;
    transform: translateY(-50%) !important;
  }

  .profile-level-fill {
    position: absolute !important;
    top: 50% !important;
    left: 20px !important;
    height: 10px !important;
    transform: translateY(-50%) !important;
  }

  .profile-level-indicator {
    width: 28px !important;
    height: 28px !important;
  }

  .profile-level-indicator img {
    width: 16px !important;
    height: 16px !important;
  }

  .profile-level-content-panel {
    height: auto !important;
    gap: 15px !important;
    padding: 10px 0 !important;
  }

  .profile-level-name-panel {
    font-size: 12px !important;
  }

  .profile-level-desc {
    font-size: 10px !important;
  }

  .profile-level-links {
    margin-top: 20px !important;
    padding-top: 12px !important;
  }

  .profile-level-link {
    font-size: 10px !important;
    padding: 6px 12px !important;
  }
}

/* 4. Уровни горизонтальные (351-450px) */
@media (min-width: 351px) and (max-width: 450px) {
  .profile-level-progress-row {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .profile-level-indicators {
    flex-direction: row !important;
    width: 100% !important;
    height: 45px !important;
    gap: 25px !important;
    justify-content: space-between !important;
    padding: 0 15px !important;
  }

  .profile-level-track {
    position: absolute !important;
    top: 50% !important;
    left: 25px !important;
    right: 25px !important;
    width: auto !important;
    height: 12px !important;
    transform: translateY(-50%) !important;
  }

  .profile-level-fill {
    position: absolute !important;
    top: 50% !important;
    left: 25px !important;
    height: 12px !important;
    transform: translateY(-50%) !important;
  }

  .profile-level-indicator {
    width: 32px !important;
    height: 32px !important;
  }

  .profile-level-indicator img {
    width: 18px !important;
    height: 18px !important;
  }

  .profile-level-content-panel {
    height: auto !important;
    gap: 18px !important;
    padding: 12px 0 !important;
  }
}

/* 5. Уровни горизонтальные (451-550px) */
@media (min-width: 451px) and (max-width: 550px) {
  .profile-level-progress-row {
    flex-direction: column !important;
    gap: 15px !important;
  }

  .profile-level-indicators {
    flex-direction: row !important;
    width: 100% !important;
    height: 50px !important;
    gap: 30px !important;
    justify-content: space-between !important;
    padding: 0 20px !important;
  }

  .profile-level-track {
    position: absolute !important;
    top: 50% !important;
    left: 30px !important;
    right: 30px !important;
    width: auto !important;
    height: 14px !important;
    transform: translateY(-50%) !important;
  }

  .profile-level-fill {
    position: absolute !important;
    top: 50% !important;
    left: 30px !important;
    height: 14px !important;
    transform: translateY(-50%) !important;
  }

  .profile-level-indicator {
    width: 36px !important;
    height: 36px !important;
  }

  .profile-level-content-panel {
    height: auto !important;
    gap: 20px !important;
    padding: 15px 0 !important;
  }
}

/* 6. Тексты не выходят за рамки экрана (все экраны) */
.user-profile__name,
.info-profile__text,
.info-profile__value span,
.email-value,
.profile__title,
.profile__redact,
.profile__desp textarea,
.gallery-profile__delete span,
.btns-profile__btn a span:not(.btns-profile__btn-text),
.dropdown-name,
.dropdown-role,
.dropdown-email,
.dropdown-nav-item span,
.dropdown-news-title,
.toggle-label span,
.profile-account__name,
.profile-account__role {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto !important;
  max-width: 100% !important;
}

/* Специальные стили для очень маленьких экранов */
@media (max-width: 350px) {
  .user-profile__name {
    font-size: 16px !important;
    line-height: 1.2 !important;
    margin-bottom: 10px !important;
  }

  .info-profile__elem {
    padding: 8px 10px !important;
  }

  .info-profile__text {
    font-size: 12px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .info-profile__value span,
  .email-value {
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  .profile__title {
    font-size: 14px !important;
  }

  .profile__redact {
    font-size: 12px !important;
    padding: 3px 6px !important;
  }

  .gallery-profile__delete span {
    display: none !important;
  }

  .doc-config__text {
    font-size: 11px !important;
    padding: 0 5px !important;
  }

  .doc-config__link p {
    font-size: 11px !important;
  }
}

/* 7. Скрытие header на экранах меньше 400px + кнопка "Назад" */
@media (max-width: 400px) {

  /* Скрываем header */
  .account-header {
    display: none !important;
  }

  /* Добавляем кнопку "Назад" */
  .back-button-container {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: var(--z-header);
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  .back-button {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--color-white);
    border-radius: 30px;
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
  }

  .back-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }

  .profile-content {
    padding-top: 70px !important;
  }
}

/* ==================== АДАПТАЦИЯ ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ ==================== */

/* 1. Адаптация для экранов 251-320px */
@media (max-width: 320px) {
  .back-button {
    padding: 6px 12px;
    font-size: 13px;
  }

  .back-button-container {
    top: 10px;
    left: 10px;
  }

  .profile-content {
    padding-top: 60px !important;
  }

  .page-container {
    top: 10px !important;
    left: 5px !important;
    right: 5px !important;
    bottom: 10px !important;
    border-radius: 15px !important;
  }

  .profile-content {
    padding: 10px 15px !important;
    padding-top: 60px !important;
    /* Учитываем кнопку "Назад" */
  }

  .page-title h1 {
    font-size: 18px !important;
    text-align: center;
    margin-bottom: 15px !important;
  }

  .profile__content {
    gap: 15px !important;
    border-radius: 15px !important;
  }

  .profile-main-content {
    flex-direction: column !important;
    padding: 15px !important;
    gap: 20px !important;
    border-radius: 15px !important;
  }

  /* Заголовок профиля */
  .user-profile__header {
    flex-direction: column !important;
    gap: 15px !important;
    text-align: center !important;
  }

  .user-profile__image {
    width: 80px !important;
    height: 80px !important;
  }

  .user-profile__image img {
    width: 80px !important;
    height: 80px !important;
  }

  .user-profile__name {
    font-size: 18px !important;
    margin-bottom: 15px !important;
    text-align: center !important;
  }

  /* Информация профиля */
  .info-profile__elem {
    padding: 10px 12px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
  }

  .info-profile__text {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 13px !important;
    margin-bottom: 2px !important;
  }

  .info-profile__value {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .info-profile__value span,
  .email-value {
    font-size: 13px !important;
    text-align: left !important;
    word-break: break-word !important;
  }

  /* Прогресс уровней - ГОРИЗОНТАЛЬНЫЙ ВАРИАНТ */
  .profile-level-progress-row {
    flex-direction: row !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .profile-level-indicators {
    flex-direction: column !important;
    height: 200px !important;
    width: 30px !important;
    justify-content: space-between !important;
    padding: 10px 0 !important;
  }

  .profile-level-track {
    position: absolute !important;
    left: 8px !important;
    top: 15px !important;
    bottom: 15px !important;
    width: 14px !important;
    height: auto !important;
  }

  .profile-level-fill {
    position: absolute !important;
    left: 8px !important;
    top: 15px !important;
    width: 14px !important;
  }

  .profile-level-indicator {
    width: 24px !important;
    height: 24px !important;
    z-index: 3 !important;
    position: relative !important;
  }

  .profile-level-indicator img {
    width: 14px !important;
    height: 14px !important;
  }

  .profile-level-content-panel {
    flex: 1 !important;
    min-width: 0 !important;
    height: 180px !important;
    padding: 5px 0 !important;
    gap: 20px !important;
    justify-content: space-between !important;
  }

  .profile-level-name-panel {
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  .profile-level-desc {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  .level-status {
    font-size: 11px !important;
  }

  .profile-level-links {
    margin-top: 15px !important;
    padding-top: 10px !important;
  }

  .profile-level-link {
    font-size: 12px !important;
    padding: 6px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Рассказ о себе */
  .profile__title {
    font-size: 16px !important;
  }

  .profile__redact {
    font-size: 13px !important;
  }

  .profile__desp textarea {
    min-height: 100px !important;
    padding: 12px !important;
    font-size: 13px !important;
  }

  /* Галерея */
  .gallery-profile__gallery {
    gap: 8px !important;
  }

  .gallery-profile__images {
    flex: 0 0 calc(50% - 4px) !important;
    max-width: calc(50% - 4px) !important;
  }

  .gallery-profile__image img {
    height: 80px !important;
    object-fit: cover !important;
  }

  /* Формы загрузки файлов */
  .doc-config {
    padding: 15px !important;
  }

  .doc-config__text {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .doc-config__link {
    padding: 10px 15px !important;
    font-size: 13px !important;
  }

  .doc-config__link p {
    font-size: 13px !important;
  }

  /* Кнопки внизу */
  .btns-profile__row {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .btns-profile__btn a {
    padding: 12px 15px !important;
    font-size: 14px !important;
  }

  /* Кнопка "Назад" */
  .back-button {
    padding: 6px 12px !important;
    font-size: 13px !important;
  }

  .back-button-container {
    top: 10px !important;
    left: 10px !important;
  }
}

/* 2. Адаптация для экранов 151-250px */
@media (min-width: 151px) and (max-width: 250px) {

  /* Еще более компактные стили */
  .page-container {
    top: 5px !important;
    left: 3px !important;
    right: 3px !important;
    bottom: 5px !important;
    border-radius: 12px !important;
  }

  .profile-content {
    padding: 8px 10px !important;
    padding-top: 50px !important;
  }

  .page-title h1 {
    font-size: 16px !important;
    margin-bottom: 10px !important;
  }

  .profile__content {
    gap: 12px !important;
    border-radius: 12px !important;
  }

  .profile-main-content {
    padding: 12px !important;
    gap: 15px !important;
  }

  .user-profile__image {
    width: 60px !important;
    height: 60px !important;
  }

  .user-profile__image img {
    width: 60px !important;
    height: 60px !important;
  }

  .user-profile__name {
    font-size: 16px !important;
    margin-bottom: 10px !important;
  }

  .profile-level-progress-row {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .profile-level-indicators {
    flex-direction: row !important;
    width: 100% !important;
    height: 30px !important;
    gap: 15px !important;
    justify-content: space-between !important;
    padding: 0 5px !important;
  }

  .profile-level-track {
    position: absolute !important;
    top: 50% !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    height: 8px !important;
    transform: translateY(-50%) !important;
  }

  .profile-level-fill {
    position: absolute !important;
    top: 50% !important;
    left: 10px !important;
    height: 8px !important;
    transform: translateY(-50%) !important;
  }

  .profile-level-indicator {
    width: 20px !important;
    height: 20px !important;
  }

  .profile-level-indicator img {
    width: 12px !important;
    height: 12px !important;
  }

  .profile-level-content-panel {
    height: auto !important;
    gap: 10px !important;
    padding: 8px 0 !important;
  }

  .profile-level-name-panel {
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  .profile-level-desc {
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  .level-status {
    font-size: 10px !important;
  }

  .profile-level-links {
    margin-top: 10px !important;
    padding-top: 8px !important;
  }

  .profile-level-link {
    font-size: 10px !important;
    padding: 5px 10px !important;
  }

  /* Информация профиля */
  .info-profile__elem {
    padding: 8px 10px !important;
    gap: 3px !important;
  }

  .info-profile__text {
    font-size: 12px !important;
  }

  .info-profile__value span,
  .email-value {
    font-size: 12px !important;
  }

  /* Галерея - одна колонка */
  .gallery-profile__images {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Скрываем "..." для дополнительных файлов */
  .images-profile {
    display: none !important;
  }

  .doc-config {
    padding: 12px !important;
  }

  .doc-config__text {
    font-size: 11px !important;
  }

  .doc-config__link {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  .btns-profile__btn a {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }

  .back-button {
    padding: 5px 10px !important;
    font-size: 12px !important;
  }
}

/* 3. Адаптация для экранов 0-150px (самые маленькие) */
@media (max-width: 150px) {
  .page-container {
    top: 3px !important;
    left: 2px !important;
    right: 2px !important;
    bottom: 3px !important;
    border-radius: 8px !important;
  }

  .profile-content {
    padding: 5px 8px !important;
    padding-top: 40px !important;
  }

  .page-title h1 {
    font-size: 14px !important;
    margin-bottom: 8px !important;
  }

  .profile__content {
    gap: 10px !important;
    border-radius: 8px !important;
  }

  .user-profile__image {
    width: 50px !important;
    height: 50px !important;
  }

  .user-profile__image img {
    width: 50px !important;
    height: 50px !important;
  }

  .user-profile__name {
    font-size: 14px !important;
    margin-bottom: 8px !important;
  }

  .level-badge .level {
    width: 90px !important;
    height: 24px !important;
  }

  .level-name {
    font-size: 11px !important;
  }

  /* Скрываем несущественные элементы */
  .profile-level-desc {
    display: none !important;
  }

  .gallery-profile__delete span {
    display: none !important;
  }

  .doc-config__text {
    font-size: 10px !important;
  }

  .doc-config__link p {
    display: none !important;
  }

  .doc-config__link svg {
    margin: 0 auto !important;
  }

  .back-button {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  .back-button svg {
    width: 12px !important;
    height: 12px !important;
  }
}

/* 4. Адаптация для экранов 251-350px */
@media (min-width: 251px) and (max-width: 350px) {

  /* Сохраняем горизонтальную компоновку для уровней */
  .profile-level-progress-row {
    flex-direction: row !important;
    gap: 8px !important;
  }

  .profile-level-indicators {
    flex-direction: column !important;
    height: 180px !important;
    width: 24px !important;
  }

  .profile-level-track {
    left: 5px !important;
    top: 10px !important;
    bottom: 10px !important;
    width: 12px !important;
  }

  .profile-level-fill {
    left: 5px !important;
    top: 10px !important;
    width: 12px !important;
  }

  .profile-level-indicator {
    width: 20px !important;
    height: 20px !important;
  }

  .profile-level-content-panel {
    height: 160px !important;
    padding: 0 !important;
    gap: 15px !important;
  }

  .profile-level-name-panel {
    font-size: 12px !important;
  }

  .profile-level-desc {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }
}

/* 5. Универсальные исправления для всех маленьких экранов */
@media (max-width: 320px) {
  .btns-profile__btn-text {
    hyphens: none !important;
    word-break: normal !important;
  }

  /* Убеждаемся, что тексты не выходят за границы */
  .user-profile__name,
  .info-profile__text,
  .info-profile__value span,
  .email-value,
  .profile__title,
  .profile__redact,
  .profile__desp textarea,
  .gallery-profile__delete span,
  .btns-profile__btn a span:not(.btns-profile__btn-text),
  .profile-level-name-panel,
  .profile-level-desc,
  .profile-level-link {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
    max-width: 100% !important;
    display: block !important;
  }



  /* Убираем лишние отступы */
  * {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Упрощаем галерею */
  .gallery-profile__images:nth-child(n + 4) {
    display: none !important;
  }

  /* Компактные формы */
  input,
  textarea,
  button,
  select {
    font-size: 16px !important;
    /* Предотвращаем увеличение в iOS */
    max-width: 100% !important;
  }

  /* Оптимизация для touch-устройств */
  button,
  .gif-link,
  .gallery-profile__image,
  .doc-config,
  .profile-level-link {
    min-height: 44px !important;
    /* Минимальный размер для касания */
    min-width: 44px !important;
  }

  /* Улучшаем видимость активных элементов */
  button:active,
  .gif-link:active,
  .profile-level-link:active {
    opacity: 0.7 !important;
    transform: scale(0.98) !important;
  }
}

/* 6. Исправление для горизонтальной ориентации на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
  .page-container {
    top: 5px !important;
    bottom: 5px !important;
  }

  .profile-content {
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
  }

  .profile-main-content {
    flex-direction: row !important;
    min-height: auto !important;
  }

  .profile-level-progress-row {
    flex-direction: row !important;
  }

  .profile-level-indicators {
    flex-direction: column !important;
    height: 150px !important;
  }
}

/* 7. Специальные стили для очень маленькой высоты */
@media (max-height: 400px) {

  .profile-main-content {
    padding: 10px !important;
  }

  .user-profile__header {
    flex-direction: row !important;
    align-items: center !important;
    margin-bottom: 10px !important;
  }

  .user-profile__image {
    width: 60px !important;
    height: 60px !important;
  }

  .info-profile__elem {
    padding: 6px 8px !important;
  }
}

/* ==================== СТИЛИ ДЛЯ ПЕРЕКЛЮЧАТЕЛЯ УВЕДОМЛЕНИЙ TELEGRAM ==================== */
/* Стили для чекбокса в стиле profile-toggle-slider */
.info-profile__value .profile-toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
  min-width: 50px;
  visibility: visible;
  opacity: 1;
}

.info-profile__value .profile-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.info-profile__value .profile-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
  display: block;
  visibility: visible;
  opacity: 1;
}

.info-profile__value .profile-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.info-profile__value .profile-toggle-switch input:checked+.profile-toggle-slider {
  background-color: var(--color-secondary);
}

.info-profile__value .profile-toggle-switch input:checked+.profile-toggle-slider:before {
  transform: translateX(24px);
}

.info-profile__value .profile-toggle-switch input:focus+.profile-toggle-slider {
  box-shadow: 0 0 0 3px rgba(0, 4, 227, 0.1);
}

/* Дополнительные стили для чекбоксов в подпунктах уведомлений */
.telegram-notifications-sub .profile-toggle-switch {
  position: relative;
  display: inline-block !important;
  width: 50px !important;
  height: 26px !important;
  flex-shrink: 0;
  min-width: 50px;
  visibility: visible !important;
  opacity: 1 !important;
}

.telegram-notifications-sub .profile-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  display: block !important;
  visibility: visible !important;
}

.telegram-notifications-sub .profile-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.telegram-notifications-sub .profile-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.telegram-notifications-sub .profile-toggle-switch input:checked+.profile-toggle-slider {
  background-color: var(--color-secondary);
}

.telegram-notifications-sub .profile-toggle-switch input:checked+.profile-toggle-slider:before {
  transform: translateX(24px);
}

.telegram-notifications-sub .profile-toggle-switch input:focus+.profile-toggle-slider {
  box-shadow: 0 0 0 3px rgba(0, 4, 227, 0.1);
}

/* Стили для дополнительных настроек уведомлений Telegram */
.info-profile__elem.telegram-notifications-sub {
  margin-left: var(--spacing-lg);
  padding-left: var(--spacing-lg);
  border-left: 2px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 100%;
  margin: 0;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  visibility: visible;
  transform: translate(0, 0) !important;
}

/* Текст и слайдер в одной строке: текст помещается полностью, 16px от слайдера */
.info-profile__elem.telegram-notifications-sub .info-profile__text {
  flex: 1;
  min-width: 0;
  white-space: normal;
  padding-right: 0;
  margin: 0;
  hyphens: none;
  word-break: normal;
}

.info-profile__elem.telegram-notifications-sub .info-profile__value {
  flex-shrink: 0;
}

/* На десктопе — шире блок под текст в подпунктах уведомлений */
@media (min-width: 769px) {
  .info-profile__elem.telegram-notifications-sub .info-profile__text {
    min-width: 320px;
    max-width: 100%;
  }
}

.info-profile__elem.telegram-notifications-sub[style*="display: none"] {
  display: none !important;
  visibility: hidden;
}

.info-profile__elem.telegram-notifications-sub:not([style*="display: none"]) {
  animation: fadeInSlide 0.3s ease forwards;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .info-profile__elem.telegram-notifications-sub {
    padding-left: var(--spacing-md);
    margin-top: 16px;
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr min-content;
  }

  .info-profile__switch {
    flex: unset !important;
  }

  .info-profile__elem.telegram-notifications-sub .info-profile__text {
    white-space: normal;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    hyphens: none !important;
    word-break: normal;
  }

  /* Больше расстояния между строками (Профиль сотрудника / кнопка VEXS-KPI и свитчи) */
  .info-profile__info-global {
    gap: 16px;
  }
}

/* Отступ сверху перед первым блоком подпунктов уведомлений (от «Профиль сотрудника» / кнопки VEXS-KPI) */
@media (max-width: 768px) {
  .info-profile__elem.telegram-notifications-sub:first-of-type {
    margin-top: 20px;
  }
}

/* Профиль сотрудника и кнопка — привязка к левому краю (без center) */
.info-profile__elem--employee-link {
  @media (max-width: 767px) {
    align-items: flex-start !important;
  }
}

/* В адаптиве кнопка «Перейти в VEXS-KPI» на следующей строке после «Профиль сотрудника» */
@media (max-width: 768px) {
  .info-profile__elem--employee-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.btn-edit {
  border-radius: 50px;
  background: none;
  border: 1px solid #6E6E6E;
  padding: 6px 12px;
  font-size: 14px;
  padding: 10px;
  color: #6E6E6E;
  cursor: pointer;
}

/* Стили для модального окна информации об уровнях */
#levelInfoModal {
  animation: fadeIn 0.3s ease-out;
}

#levelInfoModal>div {
  animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#levelInfoModal .level-info-modal-close:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #333 !important;
}

#levelInfoModal .btn.btn-black:hover {
  background: #004080 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.profile-level-indicators-horizontal {
  min-height: 50px;
  position: relative;
}

/* ==================== МОДАЛЬНОЕ ОКНО ИНФОРМАЦИИ О УРОВНЯХ ==================== */
.level-info-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999999 !important;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.level-info-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.level-info-modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(255, 255, 255, 0.1) inset;
  padding: 40px;
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease-out;
  z-index: 99999999 !important;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.level-info-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: none;
  border: none;
  color: #28293d;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100000000 !important;
  padding: 0;
}

.level-info-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.level-info-modal-close svg {
  width: 20px;
  height: 20px;
}

.level-info-modal-title {
  text-align: center;
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 700;
  color: #003366;
}

.level-info-requirements {
  margin-bottom: 20px;
}

/* Стили для горизонтального индикатора в модальном окне */
.level-info-modal-content .profile-level-indicators-horizontal {
  display: flex;
  flex-direction: row;
  gap: 20px;
  position: relative;
  padding: 20px 0;
  margin-bottom: 30px;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
}

.level-info-modal-content .profile-level-track-horizontal {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 14px !important;
  background: #e4e4f7;
  border-radius: 12px;
  transform: translateY(-50%);
  z-index: 1;
}

.level-info-modal-content .profile-level-fill-horizontal {
  position: absolute;
  top: 50%;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, #33ccff, #003366);
  border-radius: 12px;
  transform: translateY(-50%);
  z-index: 2;
  transition: width 1s ease-out;
}

.level-info-modal-content .profile-level-indicator-horizontal {
  width: 30px;
  height: 30px;
  border-radius: 15px;
  background-color: white;
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid #e4e4f7;
  transition: all 0.3s ease;
}

.level-info-modal-content .profile-level-indicator-horizontal.active {
  border-color: #33ccff;
  box-shadow: 0 0 0 2px rgba(51, 204, 255, 0.2);
}

.level-info-modal-content .profile-level-indicator-horizontal.current {
  border-color: #003366;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.3);
  transform: scale(1.1);
}

.level-info-current {
  text-align: center;
  margin: 0 0 25px 0;
  font-size: 16px;
  line-height: 1.6;
  color: #28293d;
}

.level-info-modal-btn {
  width: 100%;
  padding: 15px 25px;
  background: linear-gradient(90deg, rgb(0, 51, 102), rgb(51, 204, 255));
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
}

.level-info-modal-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .level-info-modal-content {
    padding: 30px 20px;
    max-width: 95%;
  }

  .level-info-modal-title {
    font-size: 20px;
  }

  .level-info-requirements p,
  .level-info-current {
    font-size: 14px;
  }
}

.profile-level-indicator-horizontal {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid #e4e4f7;
  transition: all 0.3s ease;
  width: 45px !important;
  height: 45px !important;
  border-radius: 50px !important;
}

.profile-level-indicator-horizontal.active {
  border-color: #33ccff;
  box-shadow: 0 0 0 2px rgba(51, 204, 255, 0.2);
}

.profile-level-indicator-horizontal.current {
  border-color: #003366;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.3);
  transform: scale(1.1);
}

.profile-level-indicator-horizontal img {
  position: relative;
  left: 2px;
}