/* The admin app's additions to MudBlazor, OptimistTheme and _content/OYF.DRAFT.UI/css/ui.css. */

.app-title { font-family: "Barlow Condensed", Barlow, sans-serif; letter-spacing: .02em; }
.appbar-button { margin-left: 8px; padding: 8px 14px; min-height: 40px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.appbar-button:hover { background: rgba(32, 78, 172, .08); }
.drawer-club { padding: 16px 16px 8px; }
.drawer-sign-out { display: block; width: calc(100% - 32px); margin: 8px 16px; padding: 10px 12px; min-height: 44px; border: 0; border-radius: 8px; background: none; font: inherit; font-weight: 600; color: var(--mud-palette-text-primary); cursor: pointer; text-align: left; }

/* Navigation across the app bar on desktop; a drawer on phones (switched by CSS at 960px, so nothing flashes) */
.appbar-side { flex: 1 1 0; min-width: 0; display: flex; align-items: center; }
.appbar-side-end { justify-content: flex-end; }
.top-nav { flex: none; display: flex; align-items: center; gap: 2px; margin: 0 16px; }
.top-nav > a { padding: 8px 14px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 600; font-size: .9375rem; }
.top-nav > a:hover { background: rgba(32, 78, 172, .08); }
.top-nav > a.active { color: var(--mud-palette-primary); background: rgba(32, 78, 172, .10); }
.club-switcher { margin-right: 12px; }
.club-switcher .mud-button-root { text-transform: none; font-weight: 600; letter-spacing: 0; }
.club-name { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; font-weight: 600; color: var(--mud-palette-text-secondary); }
@media (max-width: 959.98px) { .desktop-only { display: none !important; } }
@media (min-width: 960px) { .phone-only { display: none !important; } }

/* Signed out: logo, heading and the one Sign in button */
.signed-out { max-width: 480px; margin: 48px auto; text-align: center; }
.signed-out-logo { max-width: 200px; height: auto; margin-bottom: 24px; }

/* Home: a shortcut card per page the person may open */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.shortcut { display: flex; gap: 12px; align-items: flex-start; padding: 16px; min-height: 88px; border: 1px solid var(--mud-palette-lines-default); border-radius: 12px;
    background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); text-decoration: none; transition: border-color .15s ease; }
.shortcut:hover { border-color: var(--mud-palette-primary); }
.shortcut-text { display: flex; flex-direction: column; gap: 2px; }
.shortcut-title { font-weight: 700; }
.shortcut-description { font-size: .875rem; color: var(--mud-palette-text-secondary); }
@media (prefers-reduced-motion: reduce) { .shortcut { transition: none; } }

/* Roster */
.roster-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.roster-filters > * { flex: 1 1 200px; min-width: 0; }
.roster-filters > :first-child { flex: 2 1 280px; }
.roster-toggles { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.roster-count { color: var(--mud-palette-text-secondary); font-variant-numeric: tabular-nums; }
.roster-row { cursor: pointer; }
.roster-link { color: var(--mud-palette-primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
.roster-link:hover { text-decoration: underline; }
.amount { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cleared { color: var(--mud-palette-success-darken); font-weight: 600; }
.not-cleared { color: var(--mud-palette-error); font-weight: 600; }

/* Registration detail */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 8px 0 0; }
.facts dt { color: var(--mud-palette-text-secondary); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.pre-line { white-space: pre-line; }
.muted { color: var(--mud-palette-text-secondary); }
.person-row { padding: 10px 0; }
.person-row + .person-row { border-top: 1px solid var(--mud-palette-lines-default); }
.ledger-summary { display: flex; gap: 24px; margin: 8px 0 12px; }
.ledger-table { width: 100%; border-collapse: collapse; }
.ledger-table th { text-align: left; font-weight: 600; color: var(--mud-palette-text-secondary); font-size: .8125rem; padding: 6px 0; border-bottom: 1px solid var(--mud-palette-lines-default); }
.ledger-table td { padding: 8px 0; border-bottom: 1px solid var(--mud-palette-lines-default); vertical-align: top; }
.ledger-table th.amount, .ledger-table td.amount { text-align: right; padding-left: 12px; }
.ledger-table tr.reversed td { color: var(--mud-palette-text-secondary); text-decoration: line-through; }

/* Money */
.line-action { width: 40px; text-align: right; padding-left: 4px !important; }
.split { display: flex; flex-direction: column; gap: 8px; }
.split-row { display: flex; align-items: center; gap: 12px; }
.split-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.split-name { font-weight: 600; }
.split-meta { font-size: .8125rem; color: var(--mud-palette-text-secondary); }
.split-amount { flex: none; width: 150px; }
.split-total { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--mud-palette-lines-default); }
.contact { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.contact + .contact { margin-top: 4px; }
.contact-name { font-weight: 600; }
.csv-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.csv-range > .mud-input-control { flex: 0 1 200px; }

/* Roster: selection, bulk actions */
.select-cell { width: 44px; padding-right: 0 !important; }
.bulk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; padding: 8px 12px; border-radius: 10px;
    background: rgba(32, 78, 172, .08); border: 1px solid rgba(32, 78, 172, .25); }
.bulk-count { font-weight: 700; margin-right: 8px; }
.bulk-list { margin: 0; padding-left: 20px; max-height: 200px; overflow: auto; }
.quick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 20px; }
.quick-actions-label { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mud-palette-text-secondary); margin-right: 4px; }
.ledger-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }

/* Money report */
.report-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.report-range > .mud-input-control { flex: 0 1 200px; }
.report-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.report-total { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; background: var(--mud-palette-surface); }
.report-total-label { font-size: .8125rem; font-weight: 600; color: var(--mud-palette-text-secondary); }
.report-total-amount { font-family: "Barlow Condensed", Barlow, sans-serif; font-size: 1.75rem; font-weight: 700; text-align: left; }
.report-total-detail { font-size: .8125rem; color: var(--mud-palette-text-secondary); }
.report-type { max-width: 220px; margin-bottom: 8px; }
.report-editor-title { font-size: 1rem; font-weight: 700; margin: 16px 0 8px; }
.report-editor-title:first-child { margin-top: 0; }
.report-group { display: flex; flex-direction: column; gap: 8px; }
.report-group-nested { margin-left: 16px; padding: 8px 12px; border-left: 3px solid var(--mud-palette-lines-default); }
.report-group-head, .report-rule, .report-group-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.report-match { flex: 0 0 110px; }
.report-rule > .report-field { flex: 1 1 220px; }
.report-rule > .report-operator { flex: 0 1 220px; }
.report-rule > .report-value { flex: 1 1 180px; }
.report-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; }
.report-column-section { border: 0; margin: 0; padding: 0; }
.report-column-section legend { font-size: .8125rem; font-weight: 600; color: var(--mud-palette-text-secondary); }
.report-column-order { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-left: 20px; margin: 8px 0 0; }
.report-column-order li span { margin-right: 2px; }
.report-group-by { max-width: 320px; }
.report-count { font-weight: 600; margin-bottom: 8px; }

/* Setup */
.row-actions { white-space: nowrap; text-align: right; }
.fee-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fee-row > .mud-input-control { flex: 0 1 240px; }

/* Program fees: one row per fee or discount */
.rule-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--mud-palette-lines-default); }
.rule-row > .rule-kind { flex: 1 1 200px; }
.rule-row > .rule-name { flex: 1 1 180px; }
.rule-row > .rule-amount { flex: 0 1 120px; }
.rule-row > .rule-date { flex: 0 1 150px; }
.rule-row > .rule-remove { margin-top: 6px; }

/* A waiver's text in the registration detail */
.waiver-text summary { cursor: pointer; color: var(--mud-palette-primary); font-weight: 600; font-size: .875rem; margin-top: 4px; min-height: 32px; display: flex; align-items: center; }
.waiver-body { white-space: pre-line; max-height: 280px; overflow: auto; padding: 12px; border: 1px solid var(--mud-palette-lines-inputs); border-radius: 8px; font-size: .9375rem; }

/* Roles and permissions */
.role-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 960px) { .role-layout { grid-template-columns: 260px 1fr; } }
.role-list { display: flex; flex-direction: column; padding: 8px 0; }
.role-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 16px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; }
.role-item:hover { background: rgba(32, 78, 172, .06); }
.role-item.active { background: rgba(32, 78, 172, .10); }
.role-item.active .role-name { color: var(--mud-palette-primary); }
.role-name { font-weight: 600; }
.role-meta { font-size: .8125rem; color: var(--mud-palette-text-secondary); }
.permission-grid { width: 100%; border-collapse: collapse; }
.permission-grid th, .permission-grid td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--mud-palette-lines-default); text-align: left; vertical-align: middle; }
.permission-grid thead th { font-size: .8125rem; color: var(--mud-palette-text-secondary); font-weight: 600; }
.permission-grid tbody th { font-weight: 600; white-space: nowrap; }
.change-list { margin: 0; padding-left: 20px; }
.change-list .added { color: var(--mud-palette-success-darken); }
.change-list .removed { color: var(--mud-palette-error); }

/* Announcements */
.announcement-row { padding: 12px 0; }
.announcement-row + .announcement-row { border-top: 1px solid var(--mud-palette-lines-default); }
.announcement-head { display: flex; align-items: flex-start; gap: 8px; }
.announcement-message { margin: 6px 0 0; white-space: pre-line; }

/* Teams */
.program-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.program-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--mud-palette-lines-default); border-radius: 12px;
    background: var(--mud-palette-surface); color: inherit; text-decoration: none; }
.program-tile:hover, .program-tile:focus-visible { border-color: var(--mud-palette-primary); }
.program-tile-name { font-weight: 700; font-size: 1.05rem; }
.program-tile-teams { color: var(--mud-palette-primary); font-weight: 600; }
.coach-type { max-width: 140px; flex: none; }
.season-picker { max-width: 320px; }
button.link-button { padding: 0; border: 0; background: none; font: inherit; color: var(--mud-palette-primary); text-align: start; justify-content: flex-start; cursor: pointer; }
button.link-button:hover, button.link-button:focus-visible { text-decoration: underline; }
.quick-view .mud-drawer-content { overflow-y: auto; }
.quick-view-close { display: flex; justify-content: flex-end; padding: 8px 8px 0; position: sticky; top: 0; background: var(--mud-palette-surface); z-index: 1; }
.quick-view-body { padding: 0 16px 24px; }
.quick-view-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }

/* Team builder: stats, a rail of teams, one panel */
.team-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.team-stats > div { padding: 8px 14px; border: 1px solid var(--mud-palette-lines-default); border-radius: 10px; background: var(--mud-palette-surface); min-width: 120px; }
.team-stats dt { font-size: .75rem; color: var(--mud-palette-text-secondary); }
.team-stats dd { margin: 0; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.team-stats dd span { font-size: .8125rem; font-weight: 400; color: var(--mud-palette-text-secondary); }
.team-stats .warn dd { color: var(--mud-palette-warning-darken); }
.builder { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 959.98px) { .builder { grid-template-columns: minmax(0, 1fr); } }
.team-rail { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 100px); overflow-y: auto;
    padding: 8px; border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; background: var(--mud-palette-surface); }
.rail-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px;
    background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.rail-item:hover { background: var(--mud-palette-action-default-hover); }
.rail-item:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
.rail-item.active { background: rgba(32, 78, 172, .1); color: var(--mud-palette-primary); }
.rail-name { font-weight: 600; }
.rail-meta { display: flex; align-items: center; gap: 4px; font-size: .8125rem; color: var(--mud-palette-text-secondary); font-variant-numeric: tabular-nums; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 2px; padding: 8px 4px 0 10px;
    border-top: 1px solid var(--mud-palette-lines-default); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mud-palette-text-secondary); }
.builder-panel { min-width: 0; padding: 16px; border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; background: var(--mud-palette-surface); }
.panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.panel-head h2 { margin-right: auto; }
.panel-sub { margin: 16px 0 4px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mud-palette-text-secondary); }
.panel-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.panel-tools > * { flex: 1 1 160px; min-width: 0; }
.panel-tools > .tool-search { flex: 2 1 220px; }
.selection-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 6px 12px; border-radius: 8px; background: rgba(32, 78, 172, .08); }
.people-grid .not-ready td { color: var(--mud-palette-text-secondary); }
.people-grid .col-age { width: 56px; font-variant-numeric: tabular-nums; }
.people-grid .col-name { white-space: nowrap; }
.panel-empty { margin: 4px 0 8px; color: var(--mud-palette-text-secondary); }
.family-count { display: inline-flex; align-items: center; gap: 2px; color: var(--mud-palette-primary); cursor: pointer; font-variant-numeric: tabular-nums; }
.assign-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.assign-tools > :first-child { flex: 1 1 260px; }
.grid-hint { margin: 0 0 4px; font-size: .8125rem; color: var(--mud-palette-text-secondary); }
.grid-reset { display: flex; justify-content: flex-end; margin: -4px 0 4px; }
.rail-continue { justify-content: flex-start; margin: 0 0 4px 2px; }
.continue-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.continue-row { display: flex; align-items: center; gap: 8px; }
.continue-meta { flex: none; white-space: nowrap; font-size: .8125rem; }
.people-grid .mud-table-container { overflow-x: auto; }
/* The row menu stays in view when a wide table scrolls sideways. */
.people-grid .row-actions { position: sticky; right: 0; z-index: 1; background: var(--mud-palette-surface); }
.people-grid th .column-header { gap: 2px; }

/* Notes */
.note-add { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-bottom: 8px; }
.note-add .mud-input-control { width: 100%; }
.note-list { list-style: none; margin: 0; padding: 0; }
.note { padding: 10px 0; border-top: 1px solid var(--mud-palette-lines-default); }
.note-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.note-meta { display: flex; align-items: center; gap: 2px; margin-top: 4px; font-size: .8125rem; color: var(--mud-palette-text-secondary); }
.note-meta span { margin-right: auto; }
.note-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }

/* Email */
.audience { display: flex; flex-direction: column; gap: 8px; }
.audience-count { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 4px; padding: 10px 12px; border-radius: 8px; background: rgba(32, 78, 172, .06); }
.audience-count strong { font-size: 1.1rem; }
.message-sample { display: block; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(32, 78, 172, .06); white-space: pre-wrap; max-height: 40vh; overflow-y: auto; }
.message-sample-subject { display: block; font-weight: 600; margin: 4px 0; }
.warn-text { color: var(--mud-palette-warning-darken); }
.message-list { list-style: none; margin: 0; padding: 0; }
.message-list > li + li { border-top: 1px solid var(--mud-palette-lines-default); }
.message-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 10px 4px; border: 0; background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.message-row:hover { background: var(--mud-palette-action-default-hover); }
.message-row:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
.message-subject { font-weight: 600; }
.message-body { white-space: pre-line; overflow-wrap: anywhere; }
.list-row { display: flex; align-items: center; gap: 8px; padding: 10px 4px; }
.chosen { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(32, 78, 172, .06); }

/* Registration forms */
.form-list { list-style: none; margin: 0; padding: 0; }
.form-list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.form-list-row + .form-list-row { border-top: 1px solid var(--mud-palette-lines-default); }
.form-list-name { font-weight: 600; }
.builder-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.builder-section { margin-bottom: 16px; padding: 12px 16px; border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; background: var(--mud-palette-surface); }
.builder-section.from-master { background: var(--mud-palette-background-gray, #F8FAFC); }
.builder-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.builder-section-title { font-weight: 700; font-size: 1.05rem; color: inherit; }
.builder-field { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; min-height: 40px; }
.builder-field + .builder-field { border-top: 1px solid var(--mud-palette-lines-default); }
.builder-field.selected { background: rgba(32, 78, 172, .08); }
.builder-field.from-master button.link-button { color: inherit; }
.builder-field.off { opacity: .55; text-decoration: line-through; }
.builder-field-type { font-size: .8125rem; white-space: nowrap; }
.builder-settings { position: sticky; top: 80px; display: flex; flex-direction: column; }
.field-settings { display: flex; flex-direction: column; gap: 12px; }
.version-list { margin: 0; padding-left: 18px; }
.preview-desktop { max-width: 960px; }
/* A phone-sized frame (390px, like an iPhone): the form lays itself out by its own width, as on a real phone. */
.preview-phone { width: 390px; max-width: 100%; height: 760px; margin: 0 auto; padding: 20px 16px; overflow-y: auto; border: 10px solid #1E293B;
    border-radius: 36px; background: var(--mud-palette-background); box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.school-types { border: 0; margin: 0; padding: 0; }
.school-types legend { font-size: .8125rem; color: var(--mud-palette-text-secondary); margin-bottom: 2px; }
.condition-editor { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.condition-rule { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--mud-palette-lines-default); border-radius: 8px; }
.condition-rule > :first-child { grid-column: 1 / -1; }
.preview-facts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--mud-palette-lines-default); }
.preview-facts > * { flex: 1 1 160px; }
.answers-section { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mud-palette-text-secondary); margin: 12px 0 4px; }
.answers-section:first-of-type { margin-top: 0; }
.answers-corrected { font-size: .8125rem; margin: 0 0 8px; }
.form-list-state { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 0 -6px; }
.add-section { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.add-section .muted { font-size: .8125rem; flex: 1 1 260px; }

/* The trail above each page (Home › Setup › Programs). */
.page-crumbs { padding: 0 0 8px; margin-top: -8px; font-size: .875rem; }
.page-crumbs .mud-breadcrumb-item > a { color: var(--mud-palette-primary); text-decoration: none; }
.page-crumbs .mud-breadcrumb-item > a:hover, .page-crumbs .mud-breadcrumb-item > a:focus-visible { text-decoration: underline; }
.page-crumbs [aria-current="page"] { color: var(--mud-palette-text-primary); font-weight: 600; }
.ready { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.waiver-club { max-width: 320px; }

/* Sign-in accounts: label/value pairs on the account page. */
.account-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.account-facts dt { color: var(--mud-palette-text-secondary); }
.account-facts dd { margin: 0; overflow-wrap: anywhere; }
.temporary-password, .invitation-link { font-size: 1.1rem; padding: 6px 10px; border-radius: 6px; background: var(--mud-palette-background-gray); overflow-wrap: anywhere; user-select: all; }

/* Home's season dashboard */
.season-dashboard { margin: 0 0 24px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dash-filters { display: flex; flex-wrap: wrap; gap: 12px; min-width: 0; }
.dash-filters .mud-input-control { min-width: 160px; }
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
/* Home's cards (SPEC-admin-home Amendment 1, Look and feel): white cards, an icon in its accent's tinted circle, big numbers. Each accent is
   text-safe on white and on its own tint (WCAG AA 4.5:1): blue #204EAC 7.6 / 6.6, red #C2280C 5.8 / 5.0, green #1B7A3D 5.4 / 4.7,
   amber #8A5200 6.4 / 5.7, slate #4B5563 7.6 / 6.6. The logo's bright orange #FF4D05 stays out: it fails with text. Light only (no dark mode here). */
.accent-blue { --accent: #204EAC; --accent-tint: #E8EEFA; }
.accent-red { --accent: #C2280C; --accent-tint: #FBE9E5; }
.accent-green { --accent: #1B7A3D; --accent-tint: #E6F4EA; }
.accent-amber { --accent: #8A5200; --accent-tint: #FDF1DC; }
.accent-slate { --accent: #4B5563; --accent-tint: #EEF0F3; }
.dash-tile, .dash-card { container-type: inline-size; border: 1px solid var(--mud-palette-lines-default); border-radius: var(--mud-default-borderradius); background: var(--mud-palette-surface); }
.dash-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; color: inherit; text-decoration: none; }
a.dash-tile { transition: box-shadow .15s ease, border-color .15s ease; }
a.dash-tile:hover, a.dash-tile:focus-visible { border-color: var(--accent, var(--mud-palette-primary)); box-shadow: 0 4px 14px rgba(31, 41, 55, .08); }
.tile-head, .card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-head { margin: 0 0 12px; }
.card-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: var(--accent); background: var(--accent-tint); }
.dash-value { font-family: var(--mud-typography-h4-family); font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.dash-tile.attention .dash-value { color: var(--accent); } /* something to act on: the number in its accent */
.dash-label { font-weight: 600; min-width: 0; }
.dash-note { font-size: .85rem; color: var(--mud-palette-text-secondary); font-variant-numeric: tabular-nums; }
.sparkline { display: block; width: 100%; height: 28px; margin-top: 6px; overflow: visible; }
.sparkline polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.card-open { margin-left: auto; display: inline-flex; padding: 4px; border-radius: 50%; color: var(--mud-palette-text-secondary); }
.card-open:hover, .card-open:focus-visible { color: var(--accent); background: var(--accent-tint); }
.dash-leagues, .dash-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dash-league-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.cap-numbers { color: var(--mud-palette-text-secondary); white-space: nowrap; }
/* Capacity bars: each fill is 3:1 or more on the track (non-text contrast): green #1B7A3D 4.4, amber #B26B00 3.4, red #C2280C 4.7. */
.cap-bar { height: 10px; border-radius: 5px; background: #E5E7EB; overflow: hidden; }
.cap-fill { display: block; height: 100%; border-radius: 5px; }
.cap-fill.ok { background: #1B7A3D; }
.cap-fill.near { background: #B26B00; }
.cap-fill.full { background: #C2280C; }
.dash-recent li { display: flex; flex-wrap: wrap; gap: 4px 8px; }
/* Amendment 1's new widgets (A5). The donut's segments and the legend's swatches use the accents above (each 3:1 or more on white:
   non-text contrast); every amount is in the legend's text, so the donut is for the eye only. */
.money-since { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.money-since > div { display: grid; gap: 2px; }
.money-donut { width: 84px; height: 84px; flex: none; }
.money-donut circle { stroke: var(--accent); }
.money-legend, .clearance-counts, .team-fill { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.money-legend li { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.money-legend li > span:last-child { margin-left: auto; padding-left: 12px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.clearance-link { display: flex; align-items: baseline; gap: 8px; }
.clearance-counts .dash-value { font-size: 1.75rem; min-width: 1.5ch; }
.team-fill { gap: 12px; }
.team-fill a { font-weight: 600; }
@container (max-width: 220px) { .money-donut { display: none; } }
.widget-content, .widget-content > .dash-tile, .widget-content > .dash-card { height: 100%; }
/* Each card lays out for its own width (a narrow tile is its number and label; a chart without room leaves its numbers in text). */
@container (max-width: 180px) { .dash-note, .sparkline, .dash-tile .card-icon { display: none; } .dash-value { font-size: 2rem; } }
@container (max-width: 220px) { .cap-bar { display: none; } .dash-league-label { flex-direction: column; gap: 0; margin: 0; } }
@container (max-width: 320px) { .trend-chart { display: none; } }
@media (prefers-reduced-motion: reduce) { a.dash-tile { transition: none; } }
/* Home (SPEC-admin-home, Amendment 1): the person's widgets on a 12-column grid, each --w columns wide and, when set, --h rows of 80px
   tall (scrolling inside); otherwise it fits its content. Widgets keep their order (no packing into gaps). The whole row below 960px. */
.home-welcome { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.home-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.home-widget { min-width: 0; grid-column: span var(--w, 12); }
.home-widget.fixed-height { height: calc(var(--h) * 80px + (var(--h) - 1) * 12px); overflow: auto; }
.home-widget > .dash-tile { height: 100%; }
.dash-card { padding: 16px 18px; }
.dash-card-title { margin: 0; font-size: 1.05rem; font-weight: 700; min-width: 0; }
.pin-choices .dash-card-title { margin: 0 0 10px; }
.customize-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 12px; }
.add-widgets, .customize-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.customize-actions { margin-left: auto; }
.home-widget.customizing { padding: 6px; border: 1px dashed var(--mud-palette-primary); border-radius: 10px; cursor: grab; }
.widget-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 0 0 6px; }
.widget-name { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: .875rem; }
/* Amendment 1, Rules 8 and 14: once wwwroot/js/home-resize.js has measured each widget (.packed), the grid has 80px rows and each widget
   spans its rows (--span: its height, else its content's), so smaller widgets flow beside a tall one, still in order (no dense packing).
   Until then, rows fit their content. The corner handle resizes with the mouse; the size buttons are the accessible path. No transitions. */
.home-grid.packed { grid-auto-rows: 80px; }
.home-grid.packed > .home-widget { grid-row: span var(--span, 1); }
/* Packed, a widget that fits its content is measured by how far its content reaches, so the content keeps its own height there (a card
   doesn't stretch to the row, or the measured rows could never shrink); a widget with a set height still fills it. */
.home-grid.packed > .home-widget:not(.fixed-height) .widget-content,
.home-grid.packed > .home-widget:not(.fixed-height) .widget-content > .dash-tile,
.home-grid.packed > .home-widget:not(.fixed-height) .widget-content > .dash-card { height: auto; }
.home-widget.customizing { position: relative; }
/* Moving by the card (home-resize.js): the card being dragged fades; the one it would land on is outlined. */
.widget-grip { display: inline-flex; color: var(--mud-palette-text-secondary); cursor: grab; }
.home-widget.dragging { opacity: .4; }
.home-widget.drop-target { outline: 2px solid var(--mud-palette-primary); outline-offset: 3px; }
.resize-handle { position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; cursor: nwse-resize; touch-action: none;
    border-right: 3px solid var(--mud-palette-primary); border-bottom: 3px solid var(--mud-palette-primary); border-bottom-right-radius: 6px; }
@media (max-width: 959.98px) { .resize-handle { cursor: ns-resize; } }
.pin-choices .mud-input-control { margin: 0; }
.pinned-views { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.pinned-views li { display: flex; align-items: center; gap: 4px; }
.pinned-views .mud-input-control { flex: 1 1 auto; margin: 0; }
.report-pin { margin-top: 12px; }
/* A live view (SPEC-admin-home Amendment 1, Rule 15): a pinned page inside its widget, scrolling there when the widget has a height. */
.live-view { display: flex; flex-direction: column; gap: 8px; min-height: 100%; }
.live-view-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.live-view-head .live-view-title { flex: 1 1 auto; min-width: 0; margin: 0; }
.pin-to-home { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.new-since ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.new-badge { padding: 0 6px; border-radius: 4px; font-size: .75rem; font-weight: 700; line-height: 1.5; color: var(--mud-palette-primary-text); background: var(--mud-palette-primary); }
@media (max-width: 959.98px) { .home-grid { grid-template-columns: minmax(0, 1fr); } .home-widget { grid-column: 1 / -1; } }
.trend-summary { font-size: 1.1rem; font-weight: 600; margin: 0 0 12px; }
.trend-chart { margin: 0 0 16px; }
.money-scroll { overflow-x: auto; }
.money-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-table tfoot th, .money-table tfoot td { font-weight: 700; }
.money-methods { margin: 12px 0 0; }

/* Add player / Add coach (SPEC-admin-manual-registration) */
.entry-steps { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; list-style: none; counter-reset: step; }
.entry-steps li { counter-increment: step; color: var(--mud-palette-text-secondary); }
.entry-steps li::before { content: counter(step) ". "; }
.entry-steps li.current { color: var(--mud-palette-primary); font-weight: 600; }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.entry-grid .entry-wide { grid-column: 1 / -1; }

/* Scheduled reports (SPEC-admin-scheduled-reports) */
.schedule-weekdays, .schedule-recipients { border: 0; padding: 0; margin-left: 0; margin-right: 0; }
.schedule-weekdays { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.schedule-weekdays legend { width: 100%; }
.schedule-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.schedule-card + .schedule-card { margin-top: 16px; }
/* Printing QR tags (Pages/PrintLabels, PrintLayout): pages at their real size, in inches; only .label-pages reach the printer. */
.print-toolbar { padding: 16px; max-width: 1100px; margin: 0 auto; display: grid; gap: 12px; }
.label-custom { border: 1px solid var(--mud-palette-lines-default); border-radius: 8px; padding: 8px 12px 12px; }
.label-pages { overflow-x: auto; }
.label-page { position: relative; background: #fff; overflow: hidden; }
.label-page .label { position: absolute; display: flex; align-items: center; justify-content: center; }
.label-page .label svg { width: var(--qr); height: var(--qr); }
@media screen {
    .label-pages { padding: 16px; background: var(--mud-palette-background-gray); }
    .label-page { margin: 0 auto 16px; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
    .label-page .label { outline: 1px dashed #c7ccd6; }
}
@media print {
    .no-print { display: none !important; }
    body { margin: 0; background: #fff; }
    .label-page:not(:last-child) { break-after: page; }
}

/* An item's page (Pages/EquipmentItem): who has it, with big buttons for a phone at the equipment shed, and its history. */
.equipment-held { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--mud-palette-lines-default); }
.equipment-history { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }

/* Scanning (Pages/EquipmentScan) and a blank tag's choices (Pages/TagLanding). */
.scan-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.scan-lines li { display: flex; align-items: center; gap: 8px; }
.tag-choices { display: grid; gap: 8px; }
.team-equipment { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.team-equipment li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.outstanding-coaches { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0; }

/* Setup → Audit log (SPEC-admin-audit) */
.audit-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.audit-filters .audit-search { grid-column: 1 / -1; }
.audit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.audit-row { cursor: pointer; }
.audit-when { white-space: nowrap; }
.audit-open { background: none; border: 0; padding: 0; font: inherit; color: var(--mud-palette-primary); text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.audit-area { font-size: .75rem; color: var(--mud-palette-text-secondary); }
.audit-change { margin-bottom: 16px; }
.audit-fields th[scope=row] { font-weight: 600; white-space: nowrap; }
.audit-fields td { overflow-wrap: anywhere; }
.audit-redacted, .audit-empty { color: var(--mud-palette-text-secondary); }
.audit-same-request { margin: 4px 0 0; padding-left: 20px; }
