/* Shared row-style list for management pages (Shares, Sessions, CLI Tokens, Users) */
.item-list {
  margin: 1em 0;
  padding: 0;
  list-style: none;

  .item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
    padding: 0.75em 0;
    border-bottom: 0.0625rem solid var(--border-color);
    &:last-child { border-bottom: none; }

    @media screen and (min-width: 36em) {
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.5em 1em;
    }
  }

  .item-info {
    flex: 1;
    min-width: 0;

    h3 {
      font-size: 1em;
      font-weight: 900;
      margin: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

  .item-meta {
    font-size: 0.75em;
    color: var(--mid-color);

    code {
      font-family: monospace;
    }
  }

  .item-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.5em;

    form {
      display: contents;
    }

    a,
    button {
      font-family: inherit;
      font-size: 0.75em;
      font-weight: bold;
      cursor: pointer;
      text-decoration: none;
      white-space: nowrap;
      color: var(--fg-color);
      background: var(--bg-color);
      display: block;
      width: max-content;
      padding: 0.5em 1em;
      border-radius: 0.5em;
      border: 0.0625rem solid var(--border-color);

      &:hover {
        background: var(--bg-highlight-color);
      }
    }

    /* These are the destructive ones — Revoke, Delete, Block — so a finger
       gets the full 44px. A mouse keeps the denser row it already had. */
    @media (pointer: coarse) {
      a,
      button {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        min-height: 2.75rem;
      }
    }

    a.danger,
    button.danger {
      color: var(--danger-color);
    }
  }
}
