.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--primary-red) 100%);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 150;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Logo ────────────────────────────────── */
.topbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.topbar-logo img {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.topbar-logo:hover {
  opacity: 0.8;
}

.topbar-app-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ── User block ──────────────────────────── */
.topbar-right {
  position: relative;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 0.75rem;
  transition: background 0.2s;
}

.topbar-user:hover {
  background: rgba(255, 255, 255, 0.15);
}

.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.topbar-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.topbar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  line-height: 1.2;
}

.topbar-user-email {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.2;
}

.topbar-chevron {
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.topbar-chevron--open {
  transform: rotate(180deg);
}

/* ── Dropdown ────────────────────────────── */
.topbar-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 180px;
  overflow: hidden;
  z-index: 300;
}

.topbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.topbar-dropdown-item:hover {
  background: var(--bg-light, #f3f4f6);
}

.topbar-logout {
  color: #dc2626;
}

.topbar-logout:hover {
  background: #fee2e2;
}
