@layer components {
  .app-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: var(--color-white);
    z-index: 100;
    box-shadow: var(--shadow-sm);

    @media (min-width: 768px) {
      padding: var(--space-2) var(--space-8);
    }

    /* Mobile menu toggle button */
    .sidebar-toggle {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 2.5rem;
      height: 2.5rem;
      padding: 0;
      background: transparent;
      border: none;
      border-radius: var(--radius-md);
      cursor: pointer;
      color: var(--color-gray-600);
      flex-shrink: 0;

      &:hover {
        background: var(--color-gray-100);
        color: var(--color-gray-800);
      }

      svg {
        width: 1.5rem;
        height: 1.5rem;
      }

      /* Hide on desktop */
      @media (min-width: 768px) {
        display: none;
      }
    }

    .user-and-account {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: var(--space-2);
      #account-menu {
        .dropdown__header {
          flex-direction: column;
          align-items: flex-start;
          .current-user__email {
            font-size: var(--text-sm);
            color: var(--color-text-muted);
          }
          .current-user__name {
            font-weight: var(--font-bold);
          }
        }
      }
    }
  }

  /* Dark Mode */
  [data-theme="dark"] {
    .app-header {
      background: var(--color-surface);

      .sidebar-toggle {

        &:hover {
          background: var(--color-surface);
          color: var(--color-gray-800);
        }

        svg {
          width: 1.5rem;
          height: 1.5rem;
          path {
            stroke: var(--color-white);
          }
        }

        /* Hide on desktop */
        @media (min-width: 768px) {
          display: none;
        }
      }

      [data-controller="notifications-dropdown"],
      .theme-switcher {
        svg path {
          stroke: var(--color-white);
        }
      }
    }
  }
}