/* pages/admin.css
 *
 * Inner admin pages rendered inside the dashboard layout. Provides the
 * editorial page header (eyebrow + title + lede) and a couple of
 * table-cell modifiers. Body chrome (sidebar, header, account menu) is
 * inherited from pages/dashboard.css.
 */

.admin-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.admin-page__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.admin-page__eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--color-muted-foreground));
}

.admin-page__title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: hsl(var(--color-primary));
}

.admin-page__lede {
  margin: 0;
  font-size: var(--text-base);
  color: hsl(var(--color-muted-foreground));
  max-width: 56ch;
}

.admin-page__cell-email {
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

/* ---------- Pagination (Pagy series_nav + info_tag) ---------- */

.admin-page__pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.admin-page__pagination-info {
  margin: 0;
  font-size: var(--text-sm);
  color: hsl(var(--color-muted-foreground));
}

/* Style Pagy's `.pagy.series-nav` output. Pagy emits a flat list of
   `<a>` tags: page links (with href), the current page (no href,
   aria-current="page"), and prev/next (rel="prev"/"next"). */
nav.pagy.series-nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);

  a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding-inline: var(--space-2);
    border: 1px solid hsl(var(--color-border));
    border-radius: var(--radius-md);
    color: hsl(var(--color-foreground));
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: background-color var(--duration-fast) var(--ease-default),
                border-color var(--duration-fast) var(--ease-default);

    &:hover {
      background-color: hsl(var(--color-muted));
    }

    &:focus-visible {
      outline: 2px solid hsl(var(--color-ring));
      outline-offset: 2px;
    }

    &[aria-current="page"] {
      background-color: hsl(var(--color-primary));
      border-color: hsl(var(--color-primary));
      color: hsl(var(--color-primary-foreground));
      cursor: default;
    }

    &[aria-disabled="true"]:not([aria-current="page"]) {
      opacity: 0.4;
      pointer-events: none;
    }
  }
}
