/* ──────────────────────────────────────────────────────────────────────────
   TenFootTen Admin — shared styling
   Applied globally via index.html so every admin page gets a consistent,
   tight, scannable look without per-page changes.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Brand palette tweaks ─────────────────────────────────────────────────
   Override a few MudBlazor CSS variables so all admin pages share a tighter,
   slightly cooler look. Adjust here once instead of per-page. */
:root {
    --tf-admin-row-alt: rgba(0, 0, 0, 0.025);
    --tf-admin-row-hover: rgba(25, 118, 210, 0.08);
    --tf-admin-header-bg: var(--mud-palette-surface);
    --tf-admin-header-fg: var(--mud-palette-text-primary);
    --tf-admin-border: rgba(0, 0, 0, 0.08);
}

/* ── MudPaper containers ──────────────────────────────────────────────────
   Slightly softer corners + a subtle border so cards feel framed rather
   than floating. */
.mud-paper {
    border: 1px solid var(--tf-admin-border);
}

/* ── Page heading block ───────────────────────────────────────────────────
   Used by the AdminPageHeader component for consistent title + intro. */
.tf-admin-page-header {
    border-bottom: 1px solid var(--tf-admin-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.tf-admin-page-header h1,
.tf-admin-page-header h2,
.tf-admin-page-header h3,
.tf-admin-page-header h4 {
    margin: 0 0 0.25rem 0;
}

/* ── Toolbar row above tables ─────────────────────────────────────────── */
.tf-admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.tf-admin-toolbar .mud-input-control {
    min-width: 220px;
}

/* ── Tighter, more scannable MudTable ───────────────────────────────────── */
.mud-table-root {
    border-radius: 6px;
    overflow: hidden;
}

/* Header cells: small caps, slightly bolder, tinted background */
.mud-table-head .mud-table-cell {
    background: var(--tf-admin-header-bg) !important;
    color: var(--tf-admin-header-fg) !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 0.55rem !important;
    padding-bottom: 0.55rem !important;
    border-bottom: 2px solid var(--tf-admin-border) !important;
}

/* Body cells: tighter vertical padding for higher information density */
.mud-table-body .mud-table-cell {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
    font-size: 0.88rem;
    vertical-align: middle;
}

/* Striped rows — slightly stronger than MudBlazor default */
.mud-table-root.mud-table-bordered .mud-table-body .mud-table-row:nth-of-type(even) {
    background: var(--tf-admin-row-alt);
}

/* Hover */
.mud-table-root .mud-table-body .mud-table-row:hover {
    background: var(--tf-admin-row-hover) !important;
    cursor: default;
}

/* Action column — consistent spacing for icon buttons */
.tf-admin-actions {
    white-space: nowrap;
}

.tf-admin-actions .mud-icon-button {
    padding: 4px;
}

/* ── Count chips for parent → child navigation ────────────────────────── */
.tf-admin-count-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--mud-palette-primary);
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none !important;
    line-height: 1.4;
    transition: filter 120ms ease;
}

.tf-admin-count-chip:hover {
    filter: brightness(1.1);
    text-decoration: none;
}

.tf-admin-count-chip.tf-admin-count-zero {
    background: var(--mud-palette-action-disabled-background);
    color: var(--mud-palette-text-secondary);
    cursor: default;
}

.tf-admin-count-chip .mud-icon-root {
    font-size: 0.95rem;
}

/* ── Tip / instruction alerts above tables ────────────────────────────── */
.tf-admin-tip {
    margin-bottom: 1rem;
}

/* ── Compact search toolbar inside MudTable ───────────────────────────── */
.mud-table-toolbar {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    background: var(--tf-admin-header-bg);
    border-bottom: 1px solid var(--tf-admin-border);
}

/* ── Empty-state alerts ───────────────────────────────────────────────── */
.tf-admin-empty {
    margin-top: 0.75rem;
}
