/* Профиль пользователя в header */
.header-profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.header-profile:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.header-profile.authenticated {
  background-color: rgba(0, 0, 0, 0.03);
}

.header-profile__name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.header-profile .icon {
  width: 24px;
  height: 24px;
  fill: #666;
}

/* Dropdown профиля */
.header-profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 280px;
  max-height: 80vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header-profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown__header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.profile-dropdown__name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.profile-dropdown__email {
  font-size: 13px;
  color: #666;
}

.profile-dropdown__menu {
  padding: 10px 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

.profile-dropdown__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.2s ease;
  position: relative;
}

.profile-dropdown__item:hover {
  background-color: #f5f5f5;
}

.profile-dropdown__item .icon {
  width: 20px;
  height: 20px;
  fill: #666;
}

.profile-dropdown__item span:not(.badge) {
  flex: 1;
  font-size: 14px;
}

.profile-dropdown__item .badge {
  background-color: #e74c3c;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.profile-dropdown__item[data-action="logout"] {
  color: #e74c3c;
  border-top: 1px solid #eee;
  margin-top: 10px;
}

.profile-dropdown__item[data-action="logout"] .icon {
  fill: #e74c3c;
}

/* Форма редактирования профиля */
.profile-dropdown__details {
  padding: 16px;
  border-top: 1px solid #e1e3e5;
  background: #f9f9f9;
}

.profile-edit-form .form-group {
  margin-bottom: 12px;
}

.profile-edit-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  margin-bottom: 6px;
}

.profile-edit-form .form-control,
.profile-edit-form .form-control-disabled {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.profile-edit-form .form-control:focus {
  outline: none;
  border-color: #5d3891;
}

.profile-edit-form .form-control-disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.profile-edit-form .btn {
  width: 100%;
  margin-top: 8px;
}

/* Адаптив */
@media (max-width: 768px) {
  .header-profile__name {
    display: none;
  }

  .profile-dropdown__details {
    padding: 12px;
  }

  .header-profile-dropdown {
    right: -10px;
    min-width: 260px;
  }
}
