/* ==========================================================================
   AIRH Top Bar — Futuristic Neumorphism
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  background: var(--color-bg-topbar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: none;
  z-index: var(--z-sticky);
  gap: var(--space-4);
  box-shadow: 0 4px 10px var(--neu-shadow-dark);
}

/* ---------------------------------------------------------------------------
   Left Section
   --------------------------------------------------------------------------- */
.topbar__left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}

.topbar__menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
}

.topbar__menu-btn:hover {
  box-shadow: var(--neu-inset-sm);
  color: var(--color-text-primary);
}

.topbar__page-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------------------
   Search — Neumorphic inset
   --------------------------------------------------------------------------- */
.topbar__search {
  position: relative;
  max-width: 280px;
  flex: 0 1 280px;
}

.topbar__search-input {
  width: 100%;
  height: 36px;
  padding: 0 var(--space-4) 0 var(--space-9);
  background: var(--color-bg-primary);
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  transition: all 0.25s ease;
  box-shadow: var(--neu-inset-sm);
}

.topbar__search-input::placeholder {
  color: var(--color-text-placeholder);
}

.topbar__search-input:hover {
  box-shadow: var(--neu-inset);
}

.topbar__search-input:focus {
  outline: none;
  box-shadow: var(--neu-inset), 0 0 0 2px var(--color-accent);
}

.topbar__search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--color-text-placeholder);
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Right Section
   --------------------------------------------------------------------------- */
.topbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.topbar__action-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.topbar__action-btn:hover {
  color: var(--color-text-primary);
  box-shadow: var(--neu-inset-sm);
}

.topbar__action-btn:active {
  box-shadow: var(--neu-pressed);
}

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

.topbar__notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 15px;
  height: 15px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 9px;
  font-weight: var(--weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid var(--color-bg-primary);
}

.topbar__divider {
  width: 0;
  height: 20px;
  margin: 0 var(--space-2);
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .topbar {
    padding: 0 var(--space-4);
  }

  .topbar__menu-btn {
    display: flex;
  }

  .topbar__search {
    display: none;
  }
}

@media (max-width: 639px) {
  .topbar__divider {
    display: none;
  }
}
