/* AdminPortal css 03: Button system + typography scale.

   Rewritten flat. The previous system was a marketing-site clone: white pills
   with an animated four-stop neon sweep behind them, twin coloured side-glows,
   and a stray #687EF7 focus ring that matched nothing else in the palette. None
   of that survives a dense back-office at 48px per control.

   What replaced it:
     - one 34px default height, because these sit in table rows and card headers
     - solid, tokenised fills; no gradients, no glow, no transform on hover
     - a single focus treatment: 2px var(--ring), offset so it clears the border
   Dead variants removed: .hero-ctas (marketing), .btn-ghost, .btn-lg, .btn-icon,
   .text-display-*, .gradient-text - none were emitted by any .razor file. */

a.btn,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:active,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    /* Transparent rather than a surface colour: a default button has to read
       correctly on the page, on a card, and inside a table row, and those are
       three different backgrounds. The border carries the affordance. */
    background: transparent;
    color: var(--foreground);
    border: var(--hairline) solid var(--border-strong);
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn:hover,
a.btn:hover {
    background: var(--card-hover);
    border-color: var(--foreground-subtle);
}

.btn:focus-visible,
a.btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn:disabled:hover {
    background: transparent;
    border-color: var(--border-strong);
}

/* Primary: the one filled control on a screen. Ink is --primary-ink so it stays
   legible when light theme swaps the brand to a deep emerald. */
.btn-primary,
a.btn-primary,
a.btn-primary:link,
a.btn-primary:visited,
a.btn-primary:active {
    background: var(--primary);
    color: var(--primary-ink);
    border-color: var(--primary);
    font-weight: 600;
}

.btn-primary:hover,
a.btn-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    filter: brightness(1.08);
}

.btn-primary:disabled:hover {
    background: var(--primary);
    filter: none;
}

/* Secondary: outlined. Used where two actions sit side by side. */
.btn-secondary,
a.btn-secondary,
a.btn-secondary:link,
a.btn-secondary:visited {
    background: transparent;
    color: var(--foreground);
    border-color: var(--border-strong);
}

.btn-secondary:hover,
a.btn-secondary:hover,
a.btn-secondary:active {
    background: var(--card-hover);
    color: var(--foreground);
    border-color: var(--foreground-subtle);
}

/* Brand: a tinted affordance for the affirmative-but-not-primary action. */
.btn-brand,
a.btn-brand,
a.btn-brand:link,
a.btn-brand:visited,
a.btn-brand:active {
    background: var(--primary-subtle);
    /* -strong: the label sits on the 10% tint, where the light fill is 3.3:1. */
    color: var(--primary-strong);
    border-color: var(--primary);
    font-weight: 600;
}

.btn-brand:hover,
a.btn-brand:hover {
    background: var(--primary);
    color: var(--primary-ink);
    border-color: var(--primary);
}

/* Danger: destructive. Tinted at rest so a mis-click is less likely than with a
   solid red button, solid on hover so the intent is unambiguous once committed. */
.btn-danger,
a.btn-danger,
a.btn-danger:link,
a.btn-danger:visited,
a.btn-danger:active {
    background: var(--danger-subtle);
    color: var(--danger-strong);
    border-color: var(--danger);
    font-weight: 600;
}

.btn-danger:hover,
a.btn-danger:hover {
    background: var(--danger);
    color: var(--danger-ink);
    border-color: var(--danger);
}

/* Sizes */
.btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 0.75rem;
}

.btn-full {
    width: 100%;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--foreground);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1:focus {
    outline: none;
}

.text-body-lg {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--foreground-muted);
}

/* Any figure that changes while the page polls. Without tabular-nums the digits
   have different advance widths and the number visibly twitches on refresh. */
.tabular {
    font-variant-numeric: tabular-nums;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}
