.app-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.portal-back-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 0.75rem;
  transition: background 0.15s, color 0.15s;
}

.portal-back-link:hover {
  background: var(--color-primary);
  color: #fff;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.app-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.app-logo-ljn {
  height: 44px;
}

.app-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.nav-button {
  padding: 0.5rem 0.875rem;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: #333;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-button:hover {
  color: var(--color-primary);
  background: rgba(46, 139, 46, 0.08);
}

.nav-button.active {
  color: var(--color-primary);
  font-weight: 700;
}

.logout-button {
  color: var(--color-danger);
  margin-left: 0.5rem;
}

.logout-button:hover {
  background: rgba(220, 53, 69, 0.08);
  color: var(--color-danger-dark);
}

@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .app-title {
    font-size: 0.9rem;
  }

  .app-nav {
    flex-wrap: wrap;
    gap: 0.125rem;
  }

  .nav-button {
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem;
  }
}
