/* Header styles */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: var(--header-padding);
  /*margin-bottom: var(--spacing-2xl);*/
}

.logo {
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
}

.logo-image {
  height: 36px;
  width: auto;
}

.logo:hover {
  transform: scale(var(--transform-scale-hover));
}

.logo a {
  text-decoration: none;
  color: inherit;
}

.logo a:visited {
  color: inherit;
}

.logo-primary {
  color: var(--primary);
}

/* Company logo styles */
.company-logo {
  max-width: var(--size-xs);
  height: auto;
}

/* Page header styles */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  min-height: 60px;
}

/* Sticky header on desktop */
@media (min-width: 769px) {
  .page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--white);
    padding-top: var(--spacing-lg);
  }
}

.page-title {
  margin: 0;
  color: var(--primary);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-light);
}

.page-actions {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

/* User switching dropdown styles */
.header-user-section {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.user-switch-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: var(--btn-padding-y-xs) var(--btn-padding-x-xs);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  background-color: var(--white);
  border: var(--border-width-thick) solid var(--primary);
  border-radius: var(--btn-border-radius);
  cursor: pointer;
  color: var(--primary);
  transition: var(--transition-fast);
  user-select: none;
}

.dropdown-trigger:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-white);
  transform: scale(var(--transform-scale-hover));
}

.dropdown-trigger.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-white);
}

.dropdown-arrow {
  transition: var(--transition-fast);
}

.dropdown-trigger.active .dropdown-arrow {
  transform: rotate(180deg);
}

.switched-user-indicator {
  color: var(--warning);
  font-weight: var(--font-weight-medium);
}

.current-user {
  color: var(--text-color);
  font-weight: var(--font-weight-medium);
  width: 50px;
}

.dropdown-menu {
  position: absolute;
  top: var(--width-full);
  right: 0;
  background: var(--white);
  border: var(--border-width-thin) solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-light);
  min-width: var(--size-200);
  max-height: var(--size-300);
  overflow-y: auto;
  z-index: var(--z-modal);
  display: none;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-loading {
  padding: var(--spacing-sm);
  text-align: center;
  color: var(--gray-600);
  font-size: var(--font-size-sm);
}

.dropdown-item {
  display: block;
  width: var(--width-full);
  padding: var(--spacing-sm);
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: var(--font-size-sm);
  border-bottom: var(--border-width-thin) solid var(--gray-100);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: var(--gray-100);
}

.dropdown-item.original-user {
  color: var(--primary);
  font-weight: var(--font-weight-medium);
}

/* Mobile header styles */
@media (max-width: 768px) {
  /* Hide entire header on mobile */
  .header {
    display: none;
  }
  
  .page-header {
    margin-bottom: 1rem;
  }
  
  .page-title {
    font-size: 1.75rem;
  }
}