/* 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;
    }

    h3.monospace {
      font-family: monospace;
      font-size: 0.875em;
    }
  }

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

  .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);
      }
    }

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