@layer components {
  .app-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 12px var(--main-padding);
  }

  .app-header__brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-ink);
    font-size: var(--text-large);
    font-weight: 900;
    letter-spacing: -0.02em;
    text-decoration: none;

    &:hover { color: var(--color-ink); }
  }

  .app-header__logo {
    display: inline-block;
    inline-size: 22px;
    block-size: 22px;
    border-radius: 6px;
    background: var(--color-blue);
    box-shadow: inset -7px -7px 0 var(--color-pink);
  }

  .app-header__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
  .app-header__account { display: flex; align-items: center; gap: var(--space-2); }

  /* Seletor de conta, como no design: selo com iniciais e cor da conta,
     papel e pessoas, avisos das outras contas e a marca na atual. */
  .account-switcher .btn { gap: 8px; }
  .account-switcher__caret { font-size: 9px; }
  .layer.layer--accounts { gap: 2px; padding: 8px; inline-size: min(300px, calc(100vw - 32px)); min-inline-size: 0; border-radius: 12px; }
  .account-switcher__list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
  .account-switcher__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    color: var(--color-ink);
    text-decoration: none;
  }
  .account-switcher__item:is(:hover, :focus-visible) { background: var(--color-hover); color: var(--color-ink); }
  .account-switcher__item--current, .account-switcher__item--current:hover { background: var(--color-drop); }
  .account-switcher__badge {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    inline-size: 28px;
    block-size: 28px;
    border-radius: 6px;
    background: var(--c);
    color: white;
    font-size: 11px;
    font-weight: 900;
  }
  .account-switcher__badge--small { inline-size: 18px; block-size: 18px; font-size: 10px; }
  .account-switcher__badge--image { object-fit: cover; background: var(--color-surface); }
  .account-switcher__name { display: flex; flex: 1; flex-direction: column; min-inline-size: 0; }
  .account-switcher__name strong { overflow: hidden; font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
  .account-switcher__role { color: var(--color-ink-muted); font-size: 12px; }
  .account-switcher__check { flex: none; color: var(--color-blue); }

  .account-switcher__pending {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-inline-size: 18px;
    block-size: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--color-danger);
    color: white;
    font-size: 11px;
    font-weight: 800;
  }

  .account-switcher__separator { margin: 6px 0 2px; border-block-start: 1px solid var(--color-line-soft); }
  .account-switcher__new summary { list-style: none; }
  .account-switcher__new summary::-webkit-details-marker { display: none; }
  .account-switcher__new[open] > summary, .account-switcher__new[open] ~ .account-switcher__links { display: none; }
  .account-switcher__create {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    color: var(--color-link-hover);
    font-weight: 700;
    cursor: pointer;
  }
  .account-switcher__create:is(:hover, :focus-visible) { background: var(--color-hover); }
  .account-switcher__plus {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 28px;
    block-size: 28px;
    border: 1.5px dashed var(--color-toast-link);
    border-radius: 6px;
  }
  .account-switcher__form { gap: 8px; padding: 6px 8px; }
  .account-switcher__form-title { font-size: 14px; font-weight: 800; }
  .account-switcher__address { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
  .account-switcher__slug { font-family: var(--font-mono); color: var(--color-ink); }
  .account-switcher__actions { display: flex; justify-content: flex-end; gap: 6px; }
  .account-switcher__links { display: flex; flex-direction: column; }
  .account-switcher__link { display: block; padding: 8px; border-radius: 6px; color: var(--color-ink); font-size: 14px; text-decoration: none; }
  .account-switcher__link:is(:hover, :focus-visible) { background: var(--color-hover); color: var(--color-ink); }
}
