.app-header {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.header-search {
  position: relative;
  width: min(100%, 520px);
}

.header-search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
}

.header-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.topbar-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-primary);
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6d4b9, #ffad7f);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--white);
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 0.84rem;
  font-weight: 700;
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.user-toggle {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .app-header {
    padding: 0 16px;
  }

  .header-search {
    display: none;
  }

  .user-meta {
    display: none;
  }
}
