/* ============================================
   DRi Vision - Header Styles
   ============================================ */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
}

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

.header__page-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.header__breadcrumb {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.header__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.header__icon-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.header__icon-btn svg {
  width: 18px;
  height: 18px;
}


.header__theme-btn {
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.header__theme-btn:hover {
  border-color: var(--border-light);
  background: var(--bg-surface-hover);
}

/* ---- User Section (moved from sidebar) ---- */
.header__user {
  position: relative;
  margin-left: 8px;
}

.header__user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.header__user-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-light);
}

.header__avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-xs);
  color: var(--text-on-accent);
  flex-shrink: 0;
  overflow: hidden;
}

.header__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header__user-name {
  font-size: var(--font-size-sm);
  font-weight: 500;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__user-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.header__user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 50;
  overflow: hidden;
}

.header__user-dropdown-info {
  padding: 12px 14px;
}

.header__user-dropdown-name {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
}

.header__user-dropdown-role {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.header__user-dropdown-divider {
  height: 1px;
  background: var(--border);
}

.header__user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.header__user-dropdown-item:hover {
  background: var(--bg-surface-hover);
}

.header__user-dropdown-item--danger:hover {
  color: #e57373;
}

.header__user-dropdown-item svg {
  width: 16px;
  height: 16px;
}
