/* Общие стили для header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.settings-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.2s;
}

.settings-link:hover {
  opacity: 0.7;
}

.header-back {
  font-size: 18px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.header-back:hover {
  opacity: 0.7;
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-on-light);
}

/* Аватар с выпадающим меню */
.header-user {
  position: relative;
  margin-left: 16px;
  flex-shrink: 0;
}

.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.header-user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

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

.header-user-name {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.header-user-logout {
  display: block;
  width: 100%;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-muted);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.header-user-logout:hover {
  background: var(--light-background);
  color: var(--primary);
}