@layer components {

  /* The plain pages' links (shared/_page_nav): houses, users, account, sign out. */
  .page-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    margin-bottom: 14px;
    font-size: 13px;
  }

  .page-nav__link,
  button.page-nav__link {
    padding: 0;
    font-size: 13px;
    color: var(--color-ink-muted);
    background: none;
    border: 0;
    text-decoration: none;
    cursor: pointer;

    &:hover,
    &.is-current {
      color: var(--color-ink);
    }
  }

  /* The language and sign out, at the far end. */
  .page-nav__end {
    display: flex;
    gap: 14px;
    margin-left: auto;
  }

  .page__aside {
    color: var(--color-ink-muted);
  }

  /* A card on the account and users pages: a title row, then a table. */
  .account-section {
    margin-bottom: 14px;
  }

  .account-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  /* A table in a card: rules run edge to edge, text keeps the card's padding (its end cells). */
  .card-table {
    width: calc(100% + 28px);
    margin: 0 -14px;
    font-size: 13px;
    border-collapse: collapse;

    & th,
    & td {
      padding: 6px 8px;
      text-align: left;
      border-bottom: 1px solid var(--color-line);
    }

    & :is(th, td):first-child {
      padding-left: 14px;
    }

    & :is(th, td):last-child {
      padding-right: 14px;
    }

    & thead th {
      font-size: 11px;
      font-weight: 600;
      color: var(--color-ink-muted);
    }

    & tbody tr:last-child td {
      border-bottom: 0;
    }

    & .table__num {
      text-align: right;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

    & .table__qty {
      white-space: nowrap;
    }

    /* Nested so it outweighs the cells' left alignment above. */
    & .card-table__actions {
      text-align: right;
      white-space: nowrap;
    }
  }

  .badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 11px;
    color: var(--color-ink);
    background: var(--color-primary-surface);
    border-radius: 999px;
  }

  .modal__hint {
    font-size: 12px;
    color: var(--color-ink-muted);
  }
}
