@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/*
 * Root + body font-size pinned to 16px to match Radzen's
 * `:root:has(.rz-layout) { font-size: var(--rz-root-font-size) /* 16px */ }`
 * override. Without this, parent-portal pages (which use ParentLayout, NOT
 * RadzenLayout) would inherit a different root font-size from staff pages
 * and every rem-based size — including the shared header tokens — would
 * compute 25% larger on the parent side. Keeping both at 16px guarantees
 * staff and parent render typography at identical pixel sizes.
 */
:root {
    font-size: 16px;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    font-size: 1rem;
}

/* Page chrome — same typography as dashboard (all staff/parent pages use .app-main-padding) */
.app-main-padding h1 {
    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 1.2;
    font-weight: 700;
    font-family: inherit;
}

.app-main-padding h2 {
    font-size: clamp(1.15rem, 3.2vw, 1.65rem);
    line-height: 1.25;
    font-weight: 700;
    font-family: inherit;
}

.app-page-header {
    margin-bottom: 1.5rem;
}

.app-page-subtitle {
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--rz-text-secondary-color, #6c757d);
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/*
 * Header Radzen menu: hide submenu expand icon next to hamburger.
 * Must live in global app.css — Radzen's inner DOM does not receive Blazor scoped-layout attributes,
 * so MainLayout.razor.css ::deep rules often never match the chevron element.
 */
.header-toolbar-row .rz-menu.header-app-menu .rz-navigation-item-icon-children,
.header-toolbar-row .rz-menu.header-app-menu .rzi.rz-navigation-item-icon-children {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

/* Fallback: any second material icon in the root menu trigger link */
.header-toolbar-row .rz-menu.header-app-menu > li.rz-navigation-item > .rz-navigation-item-wrapper > .rz-navigation-item-link > i.rzi ~ i.rzi {
    display: none !important;
}

/*
 * Staff nav flyout: Radzen sets overflow:hidden on .rz-navigation-menu, which
 * clips long menus on phones when Admin tasks has many nested items. Keep the
 * panel within the viewport and allow vertical scroll.
 */
.header-toolbar-row .rz-menu.header-app-menu > .rz-navigation-item > .rz-navigation-menu {
    max-height: calc(100vh - var(--parent-hero-inner, 4.25rem) - (2 * var(--parent-hero-vpad, 0.6rem)) - 0.5rem);
    max-height: calc(100dvh - var(--parent-hero-inner, 4.25rem) - (2 * var(--parent-hero-vpad, 0.6rem)) - 0.5rem);
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/*
 * Hamburger trigger — chip look + a guaranteed ≥44px tap target.
 * Global (NOT MainLayout.razor.css): RadzenMenu renders its <ul> from inside
 * the Radzen package and none of its ancestors carry MainLayout's scoped-CSS
 * attribute, so the old ::deep versions of these rules never matched and the
 * hamburger rendered with Radzen's default (small, plain) link styling.
 * The bordered chip mirrors .header-profile-trigger on the right so both
 * header controls read as tappable.
 */
.header-toolbar-row .rz-menu.header-app-menu > .rz-navigation-item > .rz-navigation-item-wrapper > .rz-navigation-item-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Fixed box (not min-*) so the glyph centres in a true circle rather than a
       padding-stretched rounded square. 2.75rem keeps the ≥44px tap target. */
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    box-sizing: border-box;
    /* Pill radius and border weight copied from .header-profile-trigger so the
       left and right header controls actually read as the same control family. */
    border-radius: 999px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.header-toolbar-row .rz-menu.header-app-menu > .rz-navigation-item > .rz-navigation-item-wrapper:hover > .rz-navigation-item-link,
.header-toolbar-row .rz-menu.header-app-menu > .rz-navigation-item > .rz-navigation-item-wrapper:focus-within > .rz-navigation-item-link {
    background: rgba(255, 255, 255, 0.26);
    color: #fff !important;
}

/* The menu glyph itself — larger than Radzen's default so it reads clearly on
   the gradient, but sized to leave an even ring inside the 2.75rem circle. */
.header-toolbar-row .rz-menu.header-app-menu > .rz-navigation-item > .rz-navigation-item-wrapper > .rz-navigation-item-link > .rzi {
    font-size: 1.5rem;
    line-height: 1;
    width: auto;
    margin: 0;
    color: inherit !important;
}

/* Icon-only root trigger: collapse the empty Text="" span so it adds no
   phantom gap inside the chip. */
.header-toolbar-row .rz-menu.header-app-menu > .rz-navigation-item > .rz-navigation-item-wrapper .rz-navigation-item-text:empty {
    display: none;
}

/* Flyout items: comfortable touch rows on coarse pointers (phones/tablets). */
@media (pointer: coarse) {
    .header-toolbar-row .rz-menu.header-app-menu .rz-navigation-menu .rz-navigation-item-link {
        min-height: 2.75rem;
        align-items: center;
    }
}

/*
 * Right-side header controls (location selector, env badge, bell, account
 * chip). Class lives on a plain div in MainLayout.razor; styles are here so
 * the phone breakpoint can tighten the spacing.
 */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    flex-shrink: 0;
    min-width: 0;
}

@media (max-width: 576px) {
    .header-controls {
        gap: 0.5rem;
    }

    /* When the phone header wraps to two rows (see the flex-wrap rule near
       .header-profile-trigger), keep the rows compact: the RadzenRow's
       inline gap style would otherwise open a 1rem band between them. */
    .header-toolbar-row.rz-row {
        gap: 0.4rem 0.5rem !important;
    }
}

/*
 * Royals Hub brand gradient on the Radzen top header — pink → purple to match
 * the "Royals Have Arrived" marketing flyer. Lives in app.css (global) for the
 * same reason as the rules above: <RadzenHeader>'s rendered .rz-header element
 * does NOT carry the MainLayout scoped-CSS attribute, so MainLayout.razor.css
 * ::deep selectors can't reliably target it.
 * The 135deg angle makes the gradient visible across the header's short height.
 */
.rz-header,
header.rz-header {
    background: linear-gradient(135deg, #d72c8d 0%, #b51b85 45%, #6a1779 100%) !important;
    background-color: #b51b85 !important; /* fallback if gradient is overridden */
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/*
 * Royals crown logo in the header. Bigger + a soft white halo so the dark
 * blue crown pops on the pink/purple gradient. The drop-shadow filter follows
 * the PNG's alpha channel, so the halo wraps the crown's silhouette instead
 * of forming a rectangular box. Global (not scoped) for the same reason as
 * the .rz-header rule above — <RadzenImage>'s rendered <img> may not carry
 * the MainLayout scoped-CSS attribute.
 */
/*
 * Royals brand header tokens — SINGLE SOURCE OF TRUTH for both the staff
 * RadzenHeader (.header-toolbar-row) and the parent portal hero
 * (.parent-portal-hero-top). Keeping the sizing here means tweaking one
 * value updates BOTH headers — they stay pixel-identical so switching
 * between Staff view and Family dashboard is seamless.
 *
 * Names retain the historical `--parent-hero-*` prefix to avoid a noisy
 * rename across the codebase; treat them as shared header tokens.
 */
:root {
    --parent-hero-vpad: 0.6rem;
    /* Horizontal padding inside the staff RadzenHeader and parent portal
       hero. 1.5rem gives the right-side account/access-control chip
       enough breathing room from the viewport edge so the chevron and
       rounded chip border don't feel cropped. */
    --parent-hero-hpad: 1.5rem;
    --parent-hero-inner: 4.25rem;
    --parent-hero-title-size: 1.65rem;
    --parent-hero-subtitle-size: 1rem;
    /* Body padding for the routed page (.app-main-padding). The parent
       portal hero negates this with negative margins so its purple strip
       runs edge-to-edge, exactly like the staff RadzenHeader. */
    --app-main-pad: 1rem;
    /* Parent-portal side gutter. Kept separate from --app-main-pad so the staff
       pages and the parent portal can carry different phone gutters (parent
       wants roomier cards; staff wants more width for dense dashboards). The
       parent hero's negative margin and ParentLayout's wrapper both read this. */
    --parent-page-pad: 1rem;
    /* Shared content width for staff home dashboard and parent portal pages. */
    --portal-page-max-width: 72rem;
}

@media (min-width: 576px) {
    :root {
        --app-main-pad: 1rem;
    }
}

@media (min-width: 992px) {
    :root {
        --app-main-pad: 1.5rem;
        --parent-page-pad: 1.5rem;
    }
}

@media (max-width: 576px) {
    :root {
        --parent-hero-vpad: 0.5rem;
        /* Keep the header chips clear of the rounded screen edges; matches
           the body's --app-main-pad so the gradient strip and the page
           content share the same side gutter. */
        --parent-hero-hpad: 1.25rem;
        --parent-hero-inner: 3.25rem;
        /* Staff pages get a much tighter side gutter on phones so the dense
           dashboard (welcome line, quick actions, TODAY cards) uses nearly the
           full width. The parent portal keeps its roomier 1.5rem gutter via
           --parent-page-pad. */
        --app-main-pad: 0.5rem;
        --parent-page-pad: 1.5rem;
        --parent-hero-title-size: 1.3rem;
        --parent-hero-subtitle-size: 0.85rem;
    }
}

.header-toolbar-row.rz-row {
    padding: var(--parent-hero-vpad) var(--parent-hero-hpad) !important;
    /* Clear the iPhone status bar / notch. env() resolves to 0 in ordinary
       browsers, so this only kicks in inside the Capacitor shell or an
       installed PWA (viewport-fit=cover), where the gradient runs full-bleed
       behind the status bar. This MUST live on this same !important
       declaration: a separate non-!important rule (like the old
       body.capacitor-native one) loses to the padding shorthand above and
       the inset silently never applies — which put the hamburger under the
       iPhone status bar. */
    padding-top: max(var(--parent-hero-vpad), calc(env(safe-area-inset-top, 0px) + 0.35rem)) !important;
    min-height: calc(var(--parent-hero-inner) + 2 * var(--parent-hero-vpad));
    box-sizing: border-box;
}

header.rz-header,
.rz-header {
    /* Strip Radzen's default fixed header height so .header-toolbar-row's
       min-height (driven by --parent-hero-inner) determines the actual size. */
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
}

/* Staff header brand — same proportions as the parent portal hero.
   Logo height is driven by --parent-hero-inner, which is redefined on
   :root inside the (max-width: 576px) media query, so we don't need a
   separate logo media query here. */
.header-brand-logo {
    height: var(--parent-hero-inner, 3rem) !important;
    width: auto !important;
    flex-shrink: 0;
    align-self: center;
    object-fit: contain;
    filter:
        drop-shadow(0 0 4px rgba(255, 255, 255, 0.9))
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.45));
}

.header-brand-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
    border-radius: 6px;
}

.header-brand-logo-link:hover,
.header-brand-logo-link:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.header-brand-logo-link:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

input[type='checkbox'] {
    transform: scale(2);
}

.sort-th {
    cursor: pointer;
}

.player-name-cell {
    cursor: pointer;
    color: #0366d6;
}

.player-name-cell:hover {
    text-decoration: underline;
}

.player-name-cell .player-name-line {
    text-decoration: inherit;
}

.player-name-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
    max-width: 22rem;
}

.player-name-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Tags under the player name: reuse session-chip look; Radzen/Bootstrap table rules load after app.css in prod — override inherited link/cell color and preserve pill. */
.player-name-cell .player-name-tags .player-tag-under-name.session-chip,
.table td.player-name-cell .player-name-tags .player-tag-under-name.session-chip {
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.25;
    color: #1a365d !important;
    text-decoration: none !important;
    background: #e8f4f8 !important;
    border: 1px solid #b8d4e3 !important;
    border-radius: 4px;
    box-sizing: border-box;
}

.player-name-cell:hover .player-tag-under-name.session-chip {
    text-decoration: none !important;
    color: #1a365d !important;
}

.player-session-mismatch-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    white-space: nowrap;
    text-decoration: none;
}

.player-name-cell:hover .player-session-mismatch-badge {
    text-decoration: none;
}

.player-issues-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.player-issue-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rz-base-200, #e9ecef);
}

.player-issue-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.player-issue-head {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.player-issue-badge {
    flex-shrink: 0;
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    border: 1px solid transparent;
}

.player-issue-badge--high {
    color: #b71c1c;
    background: #ffebee;
    border-color: #ef9a9a;
}

.player-issue-badge--medium {
    color: #e65100;
    background: #fff3e0;
    border-color: #ffcc80;
}

.player-issue-badge--low {
    color: #546e7a;
    background: #eceff1;
    border-color: #b0bec5;
}

.player-issue-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rz-text-color, #212529);
    line-height: 1.35;
}

.player-issue-description {
    margin: 0.35rem 0 0 0;
    padding-left: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--rz-text-secondary-color, #6c757d);
}

.player-issues-sublist {
    margin: 0.4rem 0 0 0;
    padding-left: 1.15rem;
    list-style-type: disc;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--rz-text-secondary-color, #6c757d);
}

.player-issues-sublist li {
    margin-bottom: 0.2rem;
}

.player-issues-panel {
    min-height: 0;
}

.player-attendance-table-wrap {
    max-height: 220px;
    overflow: auto;
    border: 1px solid var(--rz-base-300, #dee2e6);
    border-radius: 6px;
}

/* Player details dialog (DialogPlayerInfo) */
/* Each section is a softly-rounded card with a subtle border and a tinted
 * legend that stays inside the card rather than cutting through the border. */
.player-details-card .rz-fieldset {
    border: 1px solid var(--rz-base-300, #e6e8ef);
    border-radius: 16px;
    background: linear-gradient(180deg, #fafbfd 0%, #f5f6fa 100%);
    padding: 0.5rem 1.1rem 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    margin-bottom: 0;
    overflow: hidden;
}

.player-details-card .rz-fieldset > legend,
.player-details-card legend.rz-fieldset-legend,
.player-details-card fieldset > legend {
    font-weight: 700 !important;
    color: #1f2330;
    background: transparent;
    padding: 0.45rem 0.4rem 0.45rem 0;
    margin: 0;
    border: 0;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.player-details-card .rz-fieldset > legend .rz-icon,
.player-details-card .rz-fieldset > legend i,
.player-details-card .rz-fieldset > legend .material-icons,
.player-details-card .rz-fieldset > legend .material-symbols-outlined {
    color: var(--rz-primary, #4f46e5);
    font-size: 1.4rem;
    line-height: 1;
}

.player-details-card .rz-fieldset .rz-fieldset-content,
.player-details-card .rz-fieldset .rz-fieldset-content-wrapper {
    background: transparent;
    padding-top: 0.25rem;
}

.player-details-card .player-subsection-title {
    font-weight: 700;
    color: #1f2330;
}

.player-details-card .player-feedback-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.65rem;
}

.player-details-card .subscription-status-attention {
    color: #c62828;
    font-weight: 700;
}

.player-details-card .player-attendance-table-wrap thead th {
    font-weight: 700;
}

.player-details-card .player-details-tab-nav {
    margin-bottom: 1rem;
}

.billing-admin-tab-body {
    margin-top: 0.25rem;
}

.portal-section-nav.billing-admin-tab-nav {
    margin-bottom: 1rem;
}

/* Billing admin palette — shared by stat tiles, status badges, and tabs. */
:root {
    --billing-active: #15803d;
    --billing-active-bg: #f0fdf4;
    --billing-cancelled: #dc2626;
    --billing-cancelled-bg: #fef2f2;
    --billing-missing: #e11d48;
    --billing-missing-bg: #fff1f2;
    --billing-manual: #2563eb;
    --billing-manual-bg: #eff6ff;
    --billing-admin: #0e7490;
    --billing-admin-bg: #ecfeff;
    --billing-players: #1d4ed8;
    --billing-players-bg: #eff6ff;
    --billing-suspended: #c2410c;
    --billing-suspended-bg: #fff7ed;
}

.billing-period-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.billing-period-stat {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    background: #fff;
    border-left-width: 4px;
    border-left-style: solid;
}

.billing-period-stat-btn {
    display: block;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.billing-period-stat-btn:hover {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.billing-period-stat-btn:focus-visible {
    outline: 2px solid var(--billing-active, #2b8a3e);
    outline-offset: 2px;
}

.billing-period-stat--selected {
    box-shadow: inset 0 0 0 2px currentColor;
}

.billing-period-stat--selected.billing-period-stat--players {
    box-shadow: inset 0 0 0 2px var(--billing-players);
}

.billing-period-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.billing-period-stat-label {
    margin-top: 0.2rem;
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color, #64748b);
}

.billing-period-stat--players {
    border-left-color: var(--billing-players);
    background: var(--billing-players-bg);
}

.billing-period-stat--players .billing-period-stat-value {
    color: var(--billing-players);
}

.billing-period-stat--active {
    border-left-color: var(--billing-active);
    background: var(--billing-active-bg);
}

.billing-period-stat--active .billing-period-stat-value {
    color: var(--billing-active);
}

.billing-period-stat--cancelled {
    border-left-color: var(--billing-cancelled);
    background: var(--billing-cancelled-bg);
}

.billing-period-stat--cancelled .billing-period-stat-value {
    color: var(--billing-cancelled);
}

.billing-period-stat--suspended {
    border-left-color: var(--billing-suspended);
    background: var(--billing-suspended-bg);
}

.billing-period-stat--suspended .billing-period-stat-value {
    color: var(--billing-suspended);
}

.billing-period-stat--missing {
    border-left-color: var(--billing-missing);
    background: var(--billing-missing-bg);
}

.billing-period-stat--missing .billing-period-stat-value {
    color: var(--billing-missing);
}

.billing-period-stat--manual {
    border-left-color: var(--billing-manual);
    background: var(--billing-manual-bg);
}

.billing-period-stat--manual .billing-period-stat-value {
    color: var(--billing-manual);
}

.billing-period-stat--admin {
    border-left-color: var(--billing-admin);
    background: var(--billing-admin-bg);
}

.billing-period-stat--admin .billing-period-stat-value {
    color: var(--billing-admin);
}

.billing-coverage-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 0.375rem;
    white-space: nowrap;
    border: 1px solid transparent;
    border-left-width: 3px;
}

.billing-coverage-badge--active {
    color: var(--billing-active);
    background-color: var(--billing-active-bg);
    border-color: rgba(21, 128, 61, 0.22);
    border-left-color: var(--billing-active);
}

.billing-coverage-badge--cancelled {
    color: var(--billing-cancelled);
    background-color: var(--billing-cancelled-bg);
    border-color: rgba(220, 38, 38, 0.22);
    border-left-color: var(--billing-cancelled);
}

.billing-coverage-badge--missing {
    color: var(--billing-missing);
    background-color: var(--billing-missing-bg);
    border-color: rgba(225, 29, 72, 0.22);
    border-left-color: var(--billing-missing);
}

.billing-coverage-badge--suspended {
    color: var(--billing-suspended);
    background-color: var(--billing-suspended-bg);
    border-color: rgba(194, 65, 12, 0.22);
    border-left-color: var(--billing-suspended);
}

.billing-coverage-badge--manual {
    color: var(--billing-manual);
    background-color: var(--billing-manual-bg);
    border-color: rgba(37, 99, 235, 0.22);
    border-left-color: var(--billing-manual);
}

.billing-coverage-badge--admin {
    color: var(--billing-admin);
    background-color: var(--billing-admin-bg);
    border-color: rgba(14, 116, 144, 0.22);
    border-left-color: var(--billing-admin);
}

.billing-payment-type-hint {
    color: var(--rz-text-secondary-color, #64748b);
    font-style: italic;
}

.billing-period-table .billing-grid-filter-row th {
    padding: 0.35rem 0.45rem;
    vertical-align: middle;
    background: #f8fafc;
}

.billing-column-filter {
    min-width: 5rem;
    font-size: 0.8125rem;
}

.billing-date-cell {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.billing-lapse-cell {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.billing-lapse-due {
    font-weight: 600;
    color: #b45309;
}

.billing-clear-filters {
    display: flex;
    justify-content: flex-end;
}

.associate-orphan-dialog-table-wrap {
    max-height: min(50vh, 420px);
    overflow: auto;
}

.associate-orphan-subscription-cell {
    min-width: 9rem;
}

.disassociate-subscription-option-body {
    border: 1px solid var(--rz-border-color, #dee2e6);
    border-radius: 0.375rem;
    padding: 0.75rem;
    background: var(--rz-base-background-color, #fff);
}

@media (max-width: 768px) {
    .billing-period-stats {
        grid-template-columns: 1fr;
    }
}

.player-details-tab-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-details-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(420px, 60vh);
    padding: 2rem 1rem;
}

.player-photo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px dashed var(--rz-base-400, #b0b0b0);
    background: var(--rz-base-200, #f1f1f1);
    color: var(--rz-text-tertiary-color, #888);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.player-photo-placeholder .rz-icon {
    font-size: 2rem;
    line-height: 1;
}

/* Real cricclubs-sourced headshot. Same circle as the placeholder but with a solid
   border so a busy uploaded photo still reads as a contained avatar. object-fit cover
   keeps cropping consistent across portrait/landscape uploads. */
.player-photo-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--rz-base-400, #b0b0b0);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--rz-base-100, #fafafa);
}

/* Edit-screen layout for the cricclubs photo block: avatar on the left, sync button
   and "last refreshed" caption stacked on the right. Tight vertical spacing so it
   fits the existing field rhythm of the Player Information fieldset without making
   the form feel taller than its neighbors. */
.cricclubs-photo-edit-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.cricclubs-photo-edit-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cricclubs-photo-edit-meta-sub {
    font-size: 0.6875rem;
    color: var(--rz-text-secondary-color, #6b6b6b);
}

.player-header-name {
    min-width: 0;
}

.player-header-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.6rem;
}

.player-header-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.player-header-cricclubs-link {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.82rem;
}

.player-details-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 0.75rem;
    align-items: stretch;
}

.player-details-top-grid .rz-fieldset {
    margin-bottom: 0 !important;
    height: 100%;
}

.parent-player-card {
    cursor: pointer;
}

.parent-player-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Parent portal — Royals brand hero + page headers
 *
 * Visually identical to the staff RadzenHeader (.rz-header): same gradient,
 * same flat (non-rounded) edges, and edge-to-edge full-bleed width.
 *
 * Horizontal full-bleed: negative left/right margins of --app-main-pad cancel
 * .app-main-padding's horizontal padding so the strip runs edge-to-edge.
 *
 * Vertical: NO negative top margin. ParentLayout's .app-main-padding wrapper
 * carries the .app-main-padding--flush-top modifier which sets padding-top
 * to 0, so the hero is naturally flush with the page top — no need to
 * margin-pull it above the container, which previously caused the logo and
 * title to clip at the viewport top on parent pages.
 */
.parent-portal-hero {
    position: relative;
    margin: 0 calc(-1 * var(--parent-page-pad)) 1rem;
    border-radius: 0;
    overflow: visible;
    background: linear-gradient(135deg, #d72c8d 0%, #b51b85 45%, #6a1779 100%);
    color: #fff;
    z-index: 20;
}

/* Parent-only: remove the page chrome's top padding so the hero sits flush
   with the viewport top, matching the staff RadzenHeader's position.

   The horizontal padding (the page side gutter) must live HERE on ParentLayout's
   own wrapper. MainLayout's `.app-main-padding` padding rule is scoped CSS and
   does NOT reach this ParentLayout-rendered element, so without this the parent
   body content sits flush against the screen edge while the hero's negative
   margins break out to run edge-to-edge. */
.app-main-padding.app-main-padding--flush-top {
    padding-top: 0;
    padding-left: var(--parent-page-pad);
    padding-right: var(--parent-page-pad);
}

.parent-portal-hero-top {
    /*
     * Sizing comes from the shared --parent-hero-* tokens defined on :root
     * near the top of this file. Those same tokens drive the staff
     * RadzenHeader (.header-toolbar-row.rz-row), so the two headers stay
     * pixel-identical and the transition between Family dashboard and
     * Staff view is seamless.
     */
    display: grid;
    /* Wide screens: one row — logo, brand, player picker, account actions. */
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "logo brand player actions";
    align-items: center;
    column-gap: 0.75rem;
    padding: var(--parent-hero-vpad) var(--parent-hero-hpad);
    /* Status-bar/notch clearance — same treatment as the staff header
       (.header-toolbar-row.rz-row above): unconditional env() so it works in
       the Capacitor shell AND an installed PWA, not just when
       body.capacitor-native is set. */
    padding-top: max(var(--parent-hero-vpad), calc(env(safe-area-inset-top, 0px) + 0.35rem));
    min-height: calc(var(--parent-hero-inner) + 2 * var(--parent-hero-vpad));
    box-sizing: border-box;
}

.parent-portal-hero-top--with-player {
    /* Player picker stays one line; extra padding keeps the pill inside the gradient. */
    padding-bottom: calc(var(--parent-hero-vpad) + 0.1rem);
}

.parent-portal-hero-playerrow {
    grid-area: player;
    justify-self: start;
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

/*
 * Left-side cluster in the hero — holds the Royals Hub brand and the
 * player picker side-by-side, mirroring how the staff RadzenHeader keeps
 * the menu + logo + brand grouped on the left. Sits in the LEFT grid
 * column; the account chip stays in the right column.
 */
.parent-portal-hero-start {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 0;
    grid-area: brand;
    overflow: visible;
    position: relative;
    z-index: 1;
}

/*
 * Royals Hub brand box (logo + stacked title/subtitle).
 *
 * NOTE: no `overflow: hidden` — title/subtitle already truncate via
 * `text-overflow: ellipsis`, and clipping the whole brand box could chop
 * letter ascenders when the hero is sized tightly.
 */
.parent-portal-hero-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 1 auto;
    min-width: 0;
}

/*
 * Shared brand-box container — the staff RadzenHeader's .header-brand and
 * the parent hero's .parent-portal-hero-brand-text both stack the title
 * and subtitle vertically, centered against the logo. One rule, two
 * selectors, so they cannot drift in size or alignment.
 */
.header-brand,
.parent-portal-hero-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: var(--parent-hero-inner, 4.25rem);
    line-height: 1.15;
    color: #fff;
}

/*
 * Action cluster on the right side of the hero — currently just the
 * account menu, mirroring how the staff RadzenHeader pins its
 * AccessControl chip flush right. Kept as a flex container so it can
 * grow if we ever add another right-side chip without restructuring.
 * Sits in the RIGHT grid column, aligned to the end so chips never drift
 * into the middle of the header.
 */
.parent-portal-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    grid-area: actions;
    justify-self: end;
    flex-shrink: 0;
    min-width: 0;
    position: relative;
    z-index: 30;
    isolation: isolate;
    pointer-events: auto;
}

.parent-hero-profile-menu {
    position: relative;
    z-index: 40;
    flex-shrink: 0;
}

.parent-hero-profile-menu .header-profile-trigger {
    position: relative;
    z-index: 1202;
}

.parent-hero-profile-menu .header-profile-trigger > * {
    pointer-events: none;
}

.parent-hero-profile-menu .header-profile-dropdown {
    z-index: 1203;
}

.parent-portal-impersonation-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.24rem 0.58rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    max-width: min(280px, 34vw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    flex-shrink: 1;
    min-width: 0;
}

.parent-account-menu-impersonation-status {
    padding: 0.35rem 1rem 0.5rem;
    font-size: 0.82rem;
    line-height: 1.35;
    color: #92400e;
    background: #fffbeb;
    border-top: 1px solid #fde68a;
    border-bottom: 1px solid #fde68a;
}

.parent-account-menu-action--emphasis {
    font-weight: 700;
    color: #92400e;
}

.parent-account-menu-divider {
    height: 1px;
    margin: 0.35rem 0;
    background: var(--rz-base-200, #e5e7eb);
}

.parent-player-menu {
    position: relative;
    z-index: 25;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(16rem, 42vw);
    align-self: center;
}

.parent-player-menu .parent-account-menu-dropdown {
    left: 0;
    right: auto;
    z-index: 1210;
}

.parent-player-menu-trigger {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    flex-shrink: 1;
    align-self: center;
}

.parent-player-menu-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    line-height: 1.15;
    text-align: left;
}

.parent-player-menu-meta {
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.88;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.parent-player-menu-trigger .parent-account-menu-label {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.parent-player-menu-trigger:disabled {
    cursor: default;
    opacity: 1;
    -webkit-appearance: none;
    appearance: none;
}

.parent-player-menu-dropdown {
    min-width: 15rem;
    padding: 0.35rem 0;
}

.parent-player-menu-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--rz-text-color, #212529);
}

.parent-player-menu-option:hover {
    background: var(--rz-base-100, #f5f5f5);
}

.parent-player-menu-option--active {
    background: rgba(181, 27, 133, 0.08);
}

.parent-player-menu-option-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
    line-height: 1.15;
}

.parent-player-menu-option-name {
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.parent-player-menu-option .parent-player-menu-meta {
    color: var(--rz-text-secondary-color, #6c757d);
    opacity: 1;
}

.parent-player-menu-avatar--small {
    width: 1.75rem;
    height: 1.75rem;
}

.parent-player-menu-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rz-base-200, #e9ecef);
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-player-menu-avatar-placeholder .rz-icon {
    font-size: 1.15rem;
}

.parent-player-menu-check {
    flex-shrink: 0;
    color: var(--rz-primary, #b51b85);
    font-size: 1.1rem !important;
}

.parent-account-menu {
    position: relative;
    flex-shrink: 0;
    z-index: 12;
}

.parent-account-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.parent-account-menu-trigger {
    position: relative;
    z-index: 1202;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: min(14rem, 42vw);
    padding: 0.35rem 0.55rem 0.35rem 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
}

.parent-account-menu-trigger > * {
    pointer-events: none;
}

.parent-account-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.22);
}

.parent-account-menu-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.parent-account-menu-initials {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.parent-account-menu-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.parent-account-menu-chevron {
    font-size: 1.1rem !important;
    opacity: 0.85;
}

.parent-account-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 1203;
    min-width: 14rem;
    padding: 0.5rem 0;
    border-radius: 10px;
    background: #fff;
    color: var(--rz-text-color, #212529);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.parent-account-menu-dropdown-name {
    padding: 0.35rem 1rem 0.15rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.parent-account-menu-dropdown-email {
    padding: 0 1rem 0.5rem;
    font-size: 0.82rem;
    color: var(--rz-text-secondary-color, #6c757d);
    word-break: break-word;
}

.parent-account-menu-action,
.parent-account-menu-logout {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    cursor: pointer;
}

.parent-account-menu-action:hover,
.parent-account-menu-logout:hover {
    background: var(--rz-base-100, #f5f5f5);
}

.parent-account-menu-logout {
    color: var(--rz-danger, #d32f2f);
    border-top: 1px solid var(--rz-base-200, #e0e0e0);
    margin-top: 0.25rem;
}

.parent-account-card {
    margin-top: 0.5rem;
}

.parent-account-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 28rem;
}

.parent-account-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.parent-account-field .player-info-label {
    display: block;
}

.parent-account-grid {
    margin-top: 0.25rem;
}

.parent-account-children {
    margin: 0;
    padding-left: 1.25rem;
}

.parent-account-children a {
    color: var(--rz-primary, #b51b85);
    text-decoration: none;
    font-weight: 600;
}

.parent-account-children a:hover {
    text-decoration: underline;
}

.parent-portal-hero-logo {
    grid-area: logo;
    height: var(--parent-hero-inner, 3rem);
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    align-self: center;
    filter:
        drop-shadow(0 0 4px rgba(255, 255, 255, 0.9))
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.45));
}

/*
 * Shared brand typography — the SAME rule applies to BOTH the staff
 * RadzenHeader (.header-brand-*) and the parent portal hero
 * (.parent-portal-hero-*). Combining them as comma-separated selectors
 * guarantees the two headers compute to identical font-size, weight,
 * letter-spacing, etc. — they cannot drift apart.
 *
 * font-family: inherit forces both to use whatever the body cascade
 * resolves to (Roboto under Radzen's layout), so neither side accidentally
 * falls back to Helvetica Neue from the html/body declaration.
 */
.header-brand-title,
.parent-portal-hero-title {
    font-family: inherit;
    font-size: var(--parent-hero-title-size, 1.65rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-brand-subtitle,
.parent-portal-hero-subtitle {
    font-family: inherit;
    font-size: var(--parent-hero-subtitle-size, 1rem);
    font-weight: 500;
    line-height: 1.3;
    opacity: 0.92;
    margin-top: 0.15rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Parent subtitle is rendered as flex spans ("Family dashboard · Tab")
   instead of a single text node, so it needs a few extra layout rules
   on top of the shared typography above. */
.parent-portal-hero-subtitle {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0.25rem;
    min-width: 0;
    max-width: 100%;
}

.parent-portal-hero-subtitle-prefix,
.parent-portal-hero-subtitle-sep {
    flex-shrink: 0;
}

.parent-portal-hero-subtitle-tab {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.parent-portal-hero-subtitle-sep {
    opacity: 0.75;
}

.parent-hub-photo.player-photo-img,
.parent-hub-photo.player-photo-placeholder {
    width: 4.5rem;
    height: 4.5rem;
    flex-shrink: 0;
}

.parent-hub-photo.parent-hub-photo--compact.player-photo-img,
.parent-hub-photo.parent-hub-photo--compact.player-photo-placeholder {
    width: 2.5rem;
    height: 2.5rem;
}

.parent-hub-photo.parent-hub-photo--compact.player-photo-placeholder .rz-icon {
    font-size: 1.5rem;
}

.parent-page-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.parent-page-header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    filter:
        drop-shadow(0 0 2px rgba(255, 255, 255, 0.85))
        drop-shadow(0 0 6px rgba(181, 27, 133, 0.35));
}

.parent-page-header-title {
    font-size: clamp(1.2rem, 3.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.parent-page-header-subtitle {
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--rz-text-secondary-color, #6c757d);
    margin: 0.25rem 0 0;
}

@media (max-width: 768px) {
    .parent-portal-hero-top {
        min-height: 0;
        row-gap: 0.5rem;
    }

    .parent-portal-impersonation-badge {
        max-width: min(200px, 42vw);
    }

    .parent-portal-hero-start {
        flex: 1 1 auto;
        max-width: 100%;
        min-width: 0;
        gap: 0.5rem;
    }

    .parent-portal-hero-brand {
        max-width: 100%;
        min-width: 0;
    }

    .parent-portal-hero-brand-text {
        min-height: 1.3rem;
    }

    .parent-portal-hero-subtitle {
        display: none;
    }
}

@media (max-width: 576px) {
    /* --parent-hero-* tokens are overridden globally on :root at this
       breakpoint, so both the parent hero and the staff RadzenHeader
       resize together. Keep only the rules unique to the parent hero. */
    /* Larger badge on phones — it spans the brand row and the player row,
       reading as a single tall logo down the left edge of the two-row header. */
    .parent-portal-hero-logo {
        height: 3.75rem;
        align-self: center;
    }

    /* Two-row header on phones: logo down the left spanning both rows, brand +
       account actions on top, the player picker on its own full-width row below.
       Declutters the cramped single row and lets the brand title + child name
       show in full. */
    .parent-portal-hero-top {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "logo brand actions"
            "logo player player";
        column-gap: 0.6rem;
        row-gap: 0.4rem;
        align-items: center;
    }

    .parent-portal-hero-playerrow {
        justify-self: stretch;
        width: 100%;
    }

    /* Account chip collapses to just its avatar on the top row to keep it tidy
       next to the brand; the full name still shows in the dropdown. */
    .parent-hero-profile-menu .header-profile-trigger > span:not(.profile-initials) {
        display: none;
    }

    .parent-hero-profile-menu .header-profile-trigger {
        padding-left: 0.2rem;
        padding-right: 0.2rem;
    }

    .parent-player-menu {
        max-width: 100%;
    }

    .parent-player-menu-meta {
        font-size: 0.68rem;
    }
}

/* Shared page loading — the .spinner element IS the full-screen overlay.
   Wrappers like .page-loading-viewport / .parent-page-loading-overlay are kept
   as benign passthroughs so existing markup continues to work. */
:root {
    --page-loading-backdrop: rgba(15, 23, 42, 0.42);
    --page-loading-backdrop-blur: blur(2px);
}

.page-loading-backdrop {
    display: none;
}

.page-loading-viewport,
.page-loading-viewport--in-layout,
.parent-page-loading-overlay,
.parent-page-loading-overlay--shown {
    display: contents;
}

.parent-page-body,
.parent-page-body--loading {
    position: relative;
    min-height: 16rem;
}

.parent-portal-shell {
    position: relative;
}

.parent-carousel {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    min-height: 200px;
    max-height: min(52vw, 320px);
}

.parent-carousel--loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rz-base-100, #f5f5f5);
    min-height: 120px;
}

.parent-carousel-link {
    display: block;
    width: 100%;
    height: 100%;
}

.parent-carousel-media {
    width: 100%;
    height: min(52vw, 320px);
    object-fit: cover;
    display: block;
}

.parent-carousel-dots {
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.35rem;
}

.parent-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.parent-carousel-dot--active {
    background: #fff;
}

.parent-upsell-card {
    border-left: 4px solid var(--rz-primary, #b51b85);
}

.parent-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.parent-quick-link-card {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--rz-base-200, #e0e0e0);
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    background: var(--rz-base-background-color, #fff);
}

.parent-quick-link-card:hover {
    border-color: var(--rz-primary, #b51b85);
    color: var(--rz-primary, #b51b85);
}

.parent-quick-link {
    font-size: 0.9rem;
}

.parent-events-list {
    list-style: none;
    padding: 0;
}

.parent-events-list li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--rz-base-200, #e8e8e8);
}

.parent-events-list li:last-child {
    border-bottom: none;
}

.parent-events-section .rz-card-body {
    padding-top: 1rem;
}

.parent-games-section .rz-card-body {
    padding-top: 1rem;
}

.parent-games-section-head,
.parent-events-section-head {
    margin-bottom: 0.85rem;
}

.parent-games-section-title,
.parent-events-section-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.parent-games-section-desc,
.parent-events-section-desc {
    margin-top: 0.2rem;
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-portal-page-width > .parent-page-body > .staff-dashboard.parent-dashboard {
    max-width: none;
    margin-inline: 0;
}

.parent-dashboard {
    margin-top: 0.75rem;
}

.parent-dashboard .staff-dashboard-widget-stack {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.parent-dashboard-updates-body {
    padding: 0;
}

.parent-dashboard-alerts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.parent-dashboard-nested-section {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.parent-dashboard-nested-section .staff-dashboard-section-bar {
    padding-left: 0.65rem;
}

.parent-dashboard-nested-section .staff-dashboard-section-body {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

.parent-dashboard-nested-section .staff-dashboard-section-title {
    font-size: 0.82rem;
}

.parent-dashboard-aside .staff-dashboard-section-title {
    margin-bottom: 0.75rem;
}

@media (max-width: 991px) {
    .parent-dashboard .staff-dashboard-layout--with-aside {
        grid-template-columns: minmax(0, 1fr);
    }

    .parent-dashboard-aside {
        order: -1;
    }
}

.parent-dashboard-section .staff-dashboard-section-toggle-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.parent-dashboard-section-desc {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-dashboard-section-actions {
    flex: 0 0 auto;
    padding-right: 0.35rem;
}

.parent-dashboard-section-card.rz-card {
    border: none;
    box-shadow: none;
    background: transparent;
}

.parent-dashboard-section-card .rz-card-body {
    padding: 0.85rem 0.95rem 1rem;
}

/* --- Parent dashboard polish: cleaner container, clearer hierarchy, softer tiles --- */
.parent-dashboard {
    margin-top: 1rem;
}

.parent-dashboard .staff-dashboard-widget-stack {
    border-color: rgba(16, 24, 40, 0.08);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 4px 12px rgba(16, 24, 40, 0.04);
}

/* Top-level "Updates" bar reads as the card's header. */
.parent-dashboard-updates > .staff-dashboard-section-bar {
    background: linear-gradient(180deg, rgba(181, 27, 133, 0.04) 0%, #fff 100%);
    border-bottom: 1px solid rgba(16, 24, 40, 0.06);
}

.parent-dashboard-updates > .staff-dashboard-section-bar .staff-dashboard-section-title {
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    color: #1f2937;
}

/* Nested section titles: a touch larger and darker than the default 0.82rem. */
.parent-dashboard-nested-section .staff-dashboard-section-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #344054;
}

.parent-dashboard-nested-section + .parent-dashboard-nested-section {
    border-top-color: rgba(16, 24, 40, 0.08);
}

.parent-dashboard-nested-section .staff-dashboard-section-body {
    padding-bottom: 1rem;
}

/* "Today" tiles: clean white cards with a soft shadow instead of flat grey. */
.parent-dashboard .staff-dashboard-today-grid {
    gap: 1.1rem;
}

.parent-dashboard .staff-dashboard-today-block {
    background: #fff;
    border-color: rgba(16, 24, 40, 0.08);
    border-radius: 0.85rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    padding: 1rem 1.05rem;
}

.parent-dashboard .staff-dashboard-today-block-title {
    font-size: 0.98rem;
}

/* Upcoming games now spans the full Today card; drop the inner tile chrome. */
.parent-dashboard .staff-dashboard-today-block--full {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Reshape the games list into responsive tiles so it reads well full-width. */
.parent-dashboard-today-games .parent-upcoming-games-dashboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Right column stacks Coach feedback above Membership. */
.parent-dashboard-aside-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.parent-dashboard-feedback-aside .staff-dashboard-session-buttons--stacked {
    margin-bottom: 0.6rem;
}

@media (max-width: 991px) {
    /* Phone stack order: the main column (Updates → Today → Last week's
       highlights) comes first, then the aside (Coach feedback → Membership),
       so Membership sits last. */
    .parent-dashboard-aside-col {
        order: 1;
    }
}

/* Section quick links read as gentle inline actions. */
.parent-dashboard .parent-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-weight: 600;
    font-size: 0.83rem;
    color: var(--rz-primary, #b51b85);
    text-decoration: none;
}

.parent-dashboard .parent-quick-link:hover {
    text-decoration: underline;
}

/* Highlights badge / empty state breathing room. */
.parent-dashboard .parent-weekend-highlights .staff-dashboard-highlight-item + .staff-dashboard-highlight-item {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(16, 24, 40, 0.06);
}

.parent-dashboard .staff-dashboard-weekend-panel-empty {
    font-size: 0.875rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-feedback-section-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.65rem;
}

.parent-attendance-card--section {
    margin: 0;
    box-shadow: none;
}

.portal-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    margin-left: 0.15rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--rz-text-secondary-color, #555);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
}

.portal-tab-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.15rem;
    padding: 0.08rem 0.35rem;
    border-radius: 999px;
    background: rgba(181, 27, 133, 0.12);
    color: var(--rz-primary, #b51b85);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.parent-attendance-card {
    display: flex;
    align-items: center;
    gap: 0.85rem 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.parent-attendance-card:hover {
    border-color: rgba(181, 27, 133, 0.22);
    box-shadow: 0 2px 8px rgba(181, 27, 133, 0.08);
    text-decoration: none;
    color: inherit;
}

.parent-attendance-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    flex-shrink: 0;
    color: var(--rz-primary, #b51b85);
    background: color-mix(in srgb, var(--rz-primary, #b51b85) 10%, white);
}

.parent-attendance-card-icon .rz-icon {
    font-size: 1.35rem !important;
}

.parent-attendance-card-body {
    flex: 1;
    min-width: 0;
}

.parent-attendance-card-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-attendance-card-meta {
    margin-top: 0.1rem;
    font-size: 0.75rem;
    color: var(--rz-text-tertiary-color, #868e96);
}

.parent-attendance-card-value {
    margin-top: 0.15rem;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--rz-text-color, #212529);
}

.parent-attendance-card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rz-primary, #b51b85);
    white-space: nowrap;
}

.parent-attendance-card-action-icon {
    font-size: 1.1rem !important;
}

/* Parent portal — player details tab */
.parent-player-details-card .rz-card-body {
    padding-top: 1rem;
}

.parent-player-details-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.parent-player-details-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rz-text-color, #212529);
}

.parent-player-details-desc {
    margin-top: 0.2rem;
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-player-details-edit {
    flex-shrink: 0;
}

.parent-player-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.parent-player-details-tile {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
    min-width: 0;
}

.parent-player-details-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    flex-shrink: 0;
    color: var(--rz-primary, #b51b85);
    background: color-mix(in srgb, var(--rz-primary, #b51b85) 10%, white);
}

.parent-player-details-tile-icon .rz-icon {
    font-size: 1.15rem !important;
}

.parent-player-details-tile-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.parent-player-details-tile-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-player-details-tile-value {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--rz-text-color, #212529);
    word-break: break-word;
}

.parent-player-details-tile-value--empty {
    font-weight: 500;
    color: var(--rz-text-tertiary-color, #868e96);
    font-style: italic;
}

.parent-player-details-tile-value--link {
    color: var(--rz-primary, #b51b85);
    text-decoration: none;
}

.parent-player-details-tile-value--link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .parent-player-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    .parent-player-details-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .parent-attendance-card {
        flex-wrap: wrap;
    }

    .parent-attendance-card-action {
        width: 100%;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }
}

.parent-events-empty {
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.9rem;
}

.parent-upcoming-games-dashboard {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Time-chip row: a date/time chip on the left, match + venue on the right. */
.parent-upcoming-games-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.parent-upcoming-games-row:hover,
.parent-upcoming-games-row:focus-visible {
    color: inherit;
    background: #f8f9ff;
    border-color: rgba(79, 70, 229, 0.35);
    outline: none;
}

.parent-upcoming-games-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    min-width: 4.1rem;
    padding: 0.35rem 0.4rem;
    border-radius: 8px;
    background: #eef2ff;
    color: var(--rz-primary, #4f46e5);
    text-align: center;
}

/* Today stands out with a filled chip. */
.parent-upcoming-games-row--today .parent-upcoming-games-chip {
    background: var(--rz-primary, #4f46e5);
    color: #fff;
}

.parent-upcoming-games-chip-day {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.parent-upcoming-games-chip-time {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.parent-upcoming-games-row-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.parent-upcoming-games-row-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1f2933;
}

.parent-upcoming-games-row-venue {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    font-size: 0.76rem;
    line-height: 1.3;
    color: #6b7280;
}

.parent-upcoming-games-row-venue-icon {
    flex: 0 0 auto;
    font-size: 0.9rem !important;
    margin-top: 0.05rem;
}

.parent-upcoming-games-row-venue-text {
    min-width: 0;
}

.parent-events-cards {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.parent-events-groups {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.parent-events-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.parent-events-group-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rz-primary, #b51b85);
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(181, 27, 133, 0.15);
}

.parent-event-result {
    font-weight: 600;
    color: var(--rz-text-color, #1f2933);
}

.parent-events-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    background: none;
    border: none;
    padding: 0.15rem 0;
    margin: 0 0 0.15rem;
    cursor: pointer;
    text-align: left;
    border-bottom: 1px solid rgba(181, 27, 133, 0.15);
}

.parent-events-group-toggle .parent-events-group-title {
    border-bottom: none;
    padding-bottom: 0;
    flex: 1 1 auto;
}

.parent-events-group-caret {
    color: var(--rz-primary, #b51b85);
    font-size: 1.15rem;
}

.parent-events-group-count {
    flex: 0 0 auto;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: rgba(181, 27, 133, 0.1);
    color: var(--rz-primary, #b51b85);
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Live tournament calendar subscription control (per tournament group). */
.parent-cal-subscribe {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0 0 0.55rem;
}

.parent-cal-subscribe-ready {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.parent-cal-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(181, 27, 133, 0.2);
    background: rgba(181, 27, 133, 0.06);
    color: var(--rz-primary, #b51b85);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
    cursor: pointer;
}

.parent-cal-subscribe-btn:hover:not([disabled]) {
    background: rgba(181, 27, 133, 0.12);
    text-decoration: none;
}

.parent-cal-subscribe-btn[disabled] {
    opacity: 0.6;
    cursor: default;
}

.parent-cal-subscribe-btn--add {
    background: var(--rz-primary, #b51b85);
    color: #fff;
    border-color: var(--rz-primary, #b51b85);
}

.parent-cal-subscribe-btn--add:hover {
    color: #fff;
    filter: brightness(1.05);
}

.parent-cal-subscribe-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    border: none;
    background: none;
    color: var(--rz-primary, #b51b85);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.parent-cal-subscribe-link--muted {
    color: rgba(0, 0, 0, 0.5);
}

.parent-cal-subscribe-menu-wrap {
    position: relative;
    display: inline-block;
}

.parent-cal-subscribe-caret {
    font-size: 1rem !important;
    margin-left: 0.1rem;
}

/* Invisible full-viewport catcher so a click anywhere closes the menu. */
.parent-cal-subscribe-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: default;
}

.parent-cal-subscribe-menu {
    position: absolute;
    z-index: 41;
    top: calc(100% + 0.3rem);
    left: 0;
    min-width: 13rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.6rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    padding: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.parent-cal-subscribe-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: none;
    background: none;
    border-radius: 0.4rem;
    color: rgba(0, 0, 0, 0.82);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
}

.parent-cal-subscribe-menu-item:hover {
    background: rgba(181, 27, 133, 0.08);
    color: var(--rz-primary, #b51b85);
    text-decoration: none;
}

.parent-cal-subscribe-menu-icon {
    font-size: 1.05rem !important;
    color: var(--rz-primary, #b51b85);
    flex: 0 0 auto;
}

.parent-cal-subscribe-icon {
    font-size: 0.95rem !important;
}

.parent-cal-subscribe-hint {
    font-size: 0.72rem;
    color: rgba(0, 0, 0, 0.55);
    line-height: 1.35;
}

.parent-cal-subscribe-error {
    font-size: 0.72rem;
    color: #c0392b;
}

.parent-event-highlights {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Per-player game contribution line (batting / bowling / fielding) */
.parent-event-playerline {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.parent-event-playerline-icon {
    font-size: 1.05rem;
    color: #6c757d;
    margin-top: 0.1rem;
}

.parent-event-playerline-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
}

.parent-event-playerline-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2b2f36;
}

.parent-event-playerline-dnp {
    font-size: 0.82rem;
    font-style: italic;
    color: #8a8f98;
}

.parent-event-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
}

.parent-event-stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #8a8f98;
    font-weight: 600;
}

.parent-event-stat-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2b2f36;
}

.parent-event-stat-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.parent-event-highlight-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.parent-event-highlight-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(16, 122, 87, 0.1);
    color: #0f7a57;
    font-size: 0.76rem;
    font-weight: 600;
}

.parent-event-highlight-chip-icon {
    font-size: 0.95rem;
}

.parent-event-highlight-message {
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--rz-text-secondary-color, #52606d);
    font-style: italic;
}

.parent-event-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
    background: linear-gradient(180deg, rgba(181, 27, 133, 0.03) 0%, #fff 2.5rem);
}

/* Brief flash when a schedule-change deep link (?sf=) scrolls to this game. */
.parent-event-card--focused {
    border-color: rgba(181, 27, 133, 0.55);
    box-shadow: 0 0 0 3px rgba(181, 27, 133, 0.18);
    animation: parent-event-focus-pulse 1.2s ease-out;
}

@keyframes parent-event-focus-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(181, 27, 133, 0.45);
    }

    100% {
        box-shadow: 0 0 0 3px rgba(181, 27, 133, 0.18);
    }
}

.parent-event-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.parent-event-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rz-primary, #b51b85);
    text-decoration: none;
    line-height: 1.35;
}

.parent-event-title:hover {
    text-decoration: underline;
}

.parent-event-live {
    margin-left: 0.35rem;
    vertical-align: middle;
    font-size: 0.65rem;
}

.parent-event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

@media (min-width: 640px) {
    .parent-event-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem 1rem;
    }
}

.parent-event-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6c757d);
    line-height: 1.35;
}

.parent-event-meta-icon {
    font-size: 1rem !important;
    color: var(--rz-primary, #b51b85);
    opacity: 0.85;
}

.parent-event-ground-link {
    color: var(--rz-text-color, #212529);
    text-decoration: none;
}

.parent-event-ground-link:hover {
    color: var(--rz-primary, #b51b85);
    text-decoration: none;
}

/* Underline only the venue text on hover so the "·" separator (rendered as the
   meta-item ::after) is not covered by the link underline. */
.parent-event-ground-link:hover span {
    text-decoration: underline;
}

.parent-event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.parent-event-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(181, 27, 133, 0.18);
    background: rgba(181, 27, 133, 0.05);
    color: var(--rz-primary, #b51b85);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
}

.parent-event-action:hover {
    background: rgba(181, 27, 133, 0.1);
    text-decoration: none;
}

.parent-event-action-icon {
    font-size: 0.95rem !important;
}

.parent-session-list {
    list-style: none;
    padding: 0;
}

.parent-session-list-item {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--rz-base-200, #e8e8e8);
}

.parent-one-on-one-page {
    position: relative;
    z-index: 0;
}

.parent-one-on-one-card {
    margin-top: 0;
    overflow: hidden;
}

.parent-one-on-one-card .rz-card-body {
    padding: 0.35rem 0.5rem 0.75rem;
}

.parent-one-on-one-alert {
    margin-bottom: 0.75rem;
    margin-left: 0.35rem;
    margin-right: 0.35rem;
}

.parent-one-on-one-widget {
    position: relative;
    width: 100%;
    overflow: hidden;
    isolation: isolate;
    --parent-one-on-one-iframe-crop: 9.25rem;
    --parent-one-on-one-viewport-height: 24rem;
    height: var(--parent-one-on-one-viewport-height);
}

.parent-one-on-one-widget iframe {
    display: block;
    width: 100% !important;
    border: 0;
}

.parent-one-on-one-widget iframe.parent-one-on-one-widget-frame {
    margin-top: calc(-1 * var(--parent-one-on-one-iframe-crop));
    height: calc(var(--parent-one-on-one-viewport-height) + var(--parent-one-on-one-iframe-crop)) !important;
    min-height: calc(var(--parent-one-on-one-viewport-height) + var(--parent-one-on-one-iframe-crop)) !important;
}

@media (min-width: 768px) {
    .parent-one-on-one-widget {
        --parent-one-on-one-viewport-height: 28rem;
        --parent-one-on-one-iframe-crop: 9.5rem;
    }
}

@media (max-width: 576px) {
    .parent-one-on-one-widget {
        --parent-one-on-one-viewport-height: 22rem;
        --parent-one-on-one-iframe-crop: 8.75rem;
    }
}

.parent-oneonone-balance-card .rz-card-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
}

.parent-oneonone-balance {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.parent-oneonone-balance-count {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.parent-oneonone-balance-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--rz-primary, #1b5e20);
}

.parent-oneonone-balance-label {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.parent-oneonone-balance-meta {
    font-size: 0.85rem;
    color: #6b7280;
}

.parent-oneonone-balance-note {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    font-style: italic;
    color: #9333ea;
}

.parent-oneonone-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.parent-oneonone-package-group {
    margin-bottom: 1rem;
}

.parent-oneonone-package-group:last-child {
    margin-bottom: 0;
}

.parent-oneonone-package-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #4c1d95;
    margin-bottom: 0.5rem;
}

.parent-oneonone-package-count {
    font-weight: 400;
    font-size: 0.78rem;
    color: #6b7280;
}

.parent-oneonone-package-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #f3e8ff;
    color: #6b21a8;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.parent-oneonone-balance-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.parent-oneonone-price {
    font-size: 0.85rem;
    color: #6b7280;
}

.parent-oneonone-section-title {
    margin: 0 0 0.6rem;
}

.parent-oneonone-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.parent-oneonone-booking {
    padding: 0.25rem 0;
}

@media (max-width: 576px) {
    .parent-oneonone-balance-actions {
        align-items: flex-start;
        width: 100%;
    }
}

/* Parent attendance section */
.parent-attendance-page {
    position: relative;
}

.parent-attendance-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.parent-attendance-stat {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
    min-width: 0;
}

.parent-attendance-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.parent-attendance-stat-icon .rz-icon {
    font-size: 1.15rem !important;
}

.parent-attendance-stat--present .parent-attendance-stat-icon {
    color: #15803d;
    background: #dcfce7;
}

.parent-attendance-stat--absent .parent-attendance-stat-icon {
    color: #b45309;
    background: #fef3c7;
}

.parent-attendance-stat--walkin .parent-attendance-stat-icon {
    color: var(--rz-primary, #b51b85);
    background: color-mix(in srgb, var(--rz-primary, #b51b85) 12%, white);
}

.parent-attendance-stat-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.parent-attendance-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.35;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-attendance-stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1;
    color: var(--rz-text-color, #212529);
    font-variant-numeric: tabular-nums;
}

.parent-attendance-log-card .rz-card-body {
    padding-top: 1rem;
}

.parent-attendance-log-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.parent-attendance-log-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rz-text-color, #212529);
}

.parent-attendance-log-desc {
    margin-top: 0.15rem;
    font-size: 0.82rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-attendance-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.parent-attendance-filter {
    min-height: 2.25rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--rz-base-300, #dee2e6);
    border-radius: 999px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6c757d);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.parent-attendance-filter:hover,
.parent-attendance-filter:focus-visible {
    border-color: color-mix(in srgb, var(--rz-primary, #b51b85) 35%, #dee2e6);
    outline: none;
}

.parent-attendance-filter--active {
    border-color: var(--rz-primary, #b51b85);
    background: color-mix(in srgb, var(--rz-primary, #b51b85) 10%, white);
    color: var(--rz-primary, #b51b85);
}

.parent-attendance-empty {
    margin: 0;
    padding: 1.25rem 0.5rem;
    text-align: center;
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.92rem;
}

.parent-attendance-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.parent-attendance-row {
    display: grid;
    grid-template-columns: minmax(7.5rem, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem 0.85rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    background: #fff;
}

.parent-attendance-row-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6c757d);
    white-space: nowrap;
}

.parent-attendance-row-main {
    min-width: 0;
}

.parent-attendance-row-session {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--rz-text-color, #212529);
    word-break: break-word;
}

.parent-attendance-status {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.parent-attendance-status--present {
    color: #166534;
    background: #dcfce7;
}

.parent-attendance-status--absent {
    color: #6b7280;
    background: #f3f4f6;
}

.parent-attendance-status--walkin {
    color: #92400e;
    background: #fef3c7;
}

@media (max-width: 768px) {
    .parent-attendance-stats {
        grid-template-columns: 1fr;
    }

    .parent-attendance-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "date status"
            "session session";
    }

    .parent-attendance-row-date {
        grid-area: date;
    }

    .parent-attendance-row-main {
        grid-area: session;
    }

    .parent-attendance-status {
        grid-area: status;
    }
}

/* Legacy attendance stats (staff or older markup) */
.attendance-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.attendance-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    min-height: 118px;
    background: var(--rz-base-100, #f5f5f5);
    border-radius: 8px;
    border: 1px solid var(--rz-base-200, #e0e0e0);
}
.attendance-stat-card .rz-text-caption {
    display: block;
    min-height: 2.6em;
    line-height: 1.3;
}
.attendance-stat-card .rz-text-h4 {
    margin-top: 0.25rem;
    line-height: 1;
    font-weight: 600;
}

/* Parent portal — coach feedback */
.parent-feedback-section .rz-card-body {
    padding-top: 1rem;
}

.parent-feedback-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.parent-feedback-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rz-text-color, #212529);
}

.parent-feedback-section-desc {
    margin-top: 0.2rem;
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-feedback-section-link {
    flex-shrink: 0;
    font-weight: 600;
    text-decoration: none;
    color: var(--rz-primary, #b51b85);
}

.parent-feedback-section-link:hover {
    text-decoration: underline;
}

.parent-feedback-request-actions {
    flex-shrink: 0;
    text-align: right;
}

.parent-feedback-request-status,
.parent-feedback-request-hint {
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-feedback-request-status {
    max-width: 16rem;
}

@media (max-width: 576px) {
    .parent-feedback-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .parent-feedback-request-actions {
        text-align: left;
    }

    .parent-feedback-request-status {
        max-width: 100%;
    }
}

.parent-tournaments-section .rz-card-body {
    padding-top: 1rem;
}

.parent-tournaments-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.parent-tournaments-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rz-text-color, #212529);
}

.parent-tournaments-section-desc {
    margin-top: 0.2rem;
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-tournaments-section--page .parent-tournaments-section-title {
    font-size: 1.35rem;
}

.parent-tournaments-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--rz-text-color, #212529);
    margin-bottom: 1.25rem;
}

.parent-tournaments-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 992px) {
    .parent-tournaments-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) min(22rem, 36%);
        align-items: start;
        gap: 1.5rem 2rem;
    }
}

.parent-tournaments-main,
.parent-tournaments-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.parent-tournaments-block--aside {
    position: sticky;
    top: 1rem;
}

.parent-tournaments-aside-empty {
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-tournament-respond-player {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.parent-tournament-respond-player-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rz-text-color, #0f172a);
}

.parent-tournament-respond-player-prompt {
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6c757d);
    line-height: 1.4;
}

.parent-tournament-respond-details {
    margin: 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 10px;
    background: var(--rz-base-50, #f8fafc);
}

.parent-tournament-respond-detail-row {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 0.35rem 0.75rem;
    padding: 0.35rem 0;
}

.parent-tournament-respond-detail-row:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.parent-tournament-respond-detail-row dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--rz-text-secondary-color, #64748b);
}

.parent-tournament-respond-detail-row dd {
    margin: 0;
    font-size: 0.92rem;
    color: var(--rz-text-color, #212529);
    line-height: 1.35;
}

.parent-tournament-respond-tournament {
    font-size: 1rem;
    line-height: 1.4;
}

.parent-tournament-respond-deadline {
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-tournament-respond-notes-toggle {
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.parent-tournament-respond-notes-toggle:hover {
    text-decoration: underline;
}

.parent-tournaments-block {
    margin-top: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--rz-base-200, #e2e8f0);
}

.parent-tournaments-block:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.parent-tournaments-block--availability {
    margin-bottom: 0.25rem;
}

.parent-dashboard-availability {
    margin-bottom: 1rem;
}

.parent-tournaments-main > .parent-tournaments-block:first-child {
    border-top: 0;
    padding-top: 0;
}

.parent-tournament-invite-dashboard--tab {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.parent-tournament-invite-tab-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(181, 27, 133, 0.22);
    border-radius: 10px;
    background: rgba(181, 27, 133, 0.04);
}

.parent-tournament-invite-tab-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.parent-tournament-invite-tab-row .rz-button {
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.parent-tournament-invite-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.parent-tournament-invite-details--compact {
    gap: 0.2rem;
}

.parent-tournament-invite-details-tournament {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--rz-text-color, #212529);
}

.parent-tournament-invite-details-team {
    font-size: 0.88rem;
    line-height: 1.35;
    color: var(--rz-text-color, #212529);
}

.parent-tournament-invite-details-schedule {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.84rem;
    line-height: 1.35;
    color: var(--rz-text-secondary-color, #495057);
}

.parent-tournament-invite-details-icon {
    font-size: 0.95rem;
    color: var(--rz-text-tertiary-color, #6c757d);
}

.parent-tournament-invite-details-deadline {
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-tournament-invite-details-sep {
    color: var(--rz-text-tertiary-color, #adb5bd);
}

.parent-events-cards--compact {
    gap: 0.5rem;
}

.parent-event-card--compact {
    padding: 0.65rem 0.75rem;
    background: #fff;
}

.parent-event-meta--compact {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    margin-top: 0.2rem;
    font-size: 0.84rem;
}

.parent-event-meta--compact .parent-event-meta-icon {
    font-size: 0.95rem !important;
    color: var(--rz-text-tertiary-color, #94a3b8);
}

.parent-event-meta--compact .parent-event-ground-link .parent-event-meta-icon {
    color: var(--rz-primary, #b51b85);
}

.parent-event-meta--compact .parent-event-calendar-link .parent-event-meta-icon {
    color: var(--rz-primary, #b51b85);
}

.parent-event-meta--compact .parent-event-meta-item:not(:last-child)::after {
    content: "·";
    margin-left: 0.5rem;
    color: var(--rz-text-tertiary-color, #adb5bd);
    pointer-events: none;
}

.parent-event-meta--compact .parent-event-calendar-links::after {
    content: none;
}

.parent-event-calendar-links {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.parent-event-calendar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--rz-primary, #b51b85);
    font-weight: 600;
    text-decoration: none;
}

.parent-event-calendar-link:hover {
    text-decoration: underline;
}

.parent-event-calendar-sep {
    color: var(--rz-text-tertiary-color, #adb5bd);
}

.parent-tournament-invite-player {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.parent-tournament-invite-photo {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
    background: var(--rz-base-100, #f1f5f9);
}

.parent-tournament-invite-photo--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--rz-primary, #6366f1);
    font-size: 1.1rem;
}

.parent-tournament-invite-player-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rz-text-secondary-color, #64748b);
}

.parent-tournament-invite-player-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rz-text-color, #0f172a);
}

.parent-tournament-invite-dashboard-card .rz-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.parent-tournament-invite-dialog-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rz-base-200, #e2e8f0);
}

.parent-tournament-invite-dialog-item .rz-button {
    flex: 0 0 auto;
    margin-top: 0.15rem;
}

.parent-tournament-invite-player-text {
    flex: 1 1 auto;
    min-width: 0;
}

.parent-tournament-invite-dialog-item:last-of-type {
    border-bottom: 0;
}

.parent-tournament-invite-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--rz-text-color, #0f172a);
}

.parent-tournament-invite-dashboard--compact {
    margin-bottom: 1.25rem;
}

.parent-tournaments-upcoming-section {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rz-base-200, #e2e8f0);
}

.parent-tournaments-subsection-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: var(--rz-text-color, #0f172a);
}

.parent-feedback-section--page .parent-feedback-section-title {
    font-size: 1.25rem;
}

.parent-highlights-section .rz-card-body {
    padding-top: 1rem;
}

.parent-weekend-highlights {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.parent-highlights-section-head {
    margin-bottom: 0.85rem;
}

.parent-highlights-section-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.parent-highlights-section-desc {
    margin-top: 0.2rem;
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-highlights-cards {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.parent-highlight-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.9rem 0.95rem;
    background: linear-gradient(180deg, rgba(181, 27, 133, 0.03) 0%, #fff 2.5rem);
}

.parent-highlight-card--focused {
    border-color: rgba(25, 118, 210, 0.55);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.18);
}

.parent-highlight-card-head {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.parent-highlight-match-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rz-primary, #b51b85);
    text-decoration: none;
    line-height: 1.35;
}

.parent-highlight-match-title:hover {
    text-decoration: underline;
}

.parent-highlight-match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
}

.parent-highlight-match-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.parent-highlight-meta-icon {
    font-size: 1rem !important;
    color: var(--rz-primary, #b51b85);
    opacity: 0.85;
}

.parent-highlight-match-result {
    font-weight: 600;
    color: var(--rz-text-color, #212529);
}

.parent-highlight-milestones {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.parent-highlight-milestone {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.025);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.parent-highlight-milestone-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #fff;
    flex-shrink: 0;
}

.parent-highlight-milestone-copy {
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--rz-text-color, #212529);
}

.parent-highlight-milestone--century .parent-highlight-milestone-badge {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.parent-highlight-milestone--fifty .parent-highlight-milestone-badge {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.parent-highlight-milestone--wickets .parent-highlight-milestone-badge {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.parent-highlight-milestone--mom .parent-highlight-milestone-badge {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.parent-highlight-milestone--default .parent-highlight-milestone-badge {
    background: linear-gradient(135deg, #b51b85 0%, #8b1a72 100%);
}

.parent-highlight-message {
    margin-top: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-left: 3px solid var(--rz-primary, #b51b85);
    border-radius: 0 10px 10px 0;
    background: rgba(181, 27, 133, 0.05);
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--rz-text-color, #212529);
}

.parent-highlight-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pfh-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pfh-list--parent-portal {
    gap: 1rem;
}

.pfh-card {
    border: 1px solid var(--rz-base-300, #e5e7eb);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.pfh-card-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.5rem;
    margin-top: 0.15rem;
}

.pfh-card--parent {
    padding: 1rem 1.05rem 1.05rem;
    border: 1px solid rgba(181, 27, 133, 0.12);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(181, 27, 133, 0.04) 0%, #fff 3.5rem);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    gap: 0.85rem;
}

.pfh-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.pfh-card-head-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.pfh-card-head-icon {
    font-size: 1.2rem !important;
    color: var(--rz-primary, #1b6ec2);
}

.pfh-card-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    flex-shrink: 0;
    color: var(--rz-primary, #b51b85);
    background: color-mix(in srgb, var(--rz-primary, #b51b85) 12%, white);
}

.pfh-card-avatar .rz-icon {
    font-size: 1.2rem !important;
}

.pfh-card-date {
    font-weight: 600;
    font-size: 0.92rem;
    color: #111827;
}

.pfh-card--parent .pfh-card-date {
    font-size: 1rem;
}

.pfh-card-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: #6b7280;
}

.pfh-coach-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--rz-primary, #b51b85);
    background: color-mix(in srgb, var(--rz-primary, #b51b85) 10%, white);
}

.pfh-author-email {
    color: #9ca3af;
}

.pfh-source-chip {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.45rem;
    background: #eef2ff;
    color: #3730a3;
    border-radius: 999px;
    white-space: nowrap;
}

/* Read receipts on feedback cards (staff view only).
   Colour here is semantic — green/amber/grey/red carry the state — so it deliberately sits
   outside the brand palette used by .pfh-coach-badge and friends. */
.pfh-card-head-chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Which tone a stored note was generated at. Neutral by design — it's provenance, not a
   judgement about the note, and Direct shouldn't look like a warning after the fact. */
.pfh-tone-chip {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 999px;
    white-space: nowrap;
    cursor: default;
}

.fb-read-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    border: 1px solid transparent;
    font-variant-numeric: tabular-nums;
    cursor: default;
}

.fb-read-chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

.fb-read-chip--seen {
    color: #0e7a52;
    background: #e7f4ee;
    border-color: rgba(14, 122, 82, 0.22);
}

.fb-read-chip--wait {
    color: #8a5b12;
    background: #fbf0df;
    border-color: rgba(138, 91, 18, 0.25);
}

.fb-read-chip--cold {
    color: #6b6470;
    background: #f0ecef;
    border-color: rgba(107, 100, 112, 0.22);
}

.fb-read-chip--alert {
    color: #a8232c;
    background: #fbeaeb;
    border-color: rgba(168, 35, 44, 0.22);
}

.fb-read-chip--muted {
    color: #8a8a8a;
    background: #f4f4f4;
    border-color: rgba(138, 138, 138, 0.2);
}

.fb-comment-receipt {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    cursor: default;
}

.fb-comment-receipt--seen {
    color: #0e7a52;
}

.fb-comment-receipt--wait {
    color: #9ca3af;
}

/* ---- "What's new" panel + authoring ------------------------------------------------- */

.whatsnew { display: flex; flex-direction: column; gap: 1rem; }

.whatsnew-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: 26rem;
    overflow-y: auto;
}

.whatsnew-empty { margin: 0; font-size: 0.9rem; color: #6b7280; }

.whatsnew-entry { display: flex; flex-direction: column; gap: 0.4rem; }

.whatsnew-entry-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.whatsnew-entry-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 650;
    color: #111827;
}

.whatsnew-entry-body {
    margin: 0;
    font-size: 0.89rem;
    line-height: 1.55;
    color: #4b5563;
}

.whatsnew-shot {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 0.15rem;
}

.whatsnew-aud,
.pu-aud-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.whatsnew-aud--staff,
.pu-aud-chip--staff { color: #1c6ea8; background: #e6f0f8; }

.whatsnew-aud--parents,
.pu-aud-chip--parents { color: #0e7a52; background: #e7f4ee; }

.whatsnew-aud--everyone,
.pu-aud-chip--everyone { color: #8a5b12; background: #fbf0df; }

.whatsnew-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.whatsnew-foot-note { font-size: 0.76rem; color: #9ca3af; }

/* authoring */
.pu-editor {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.pu-editor-grid {
    display: grid;
    grid-template-columns: minmax(240px, 2fr) minmax(220px, 1fr);
    gap: 0.85rem;
    align-items: start;
}

@media (max-width: 760px) {
    .pu-editor-grid { grid-template-columns: 1fr; }
}

.pu-field { display: flex; flex-direction: column; gap: 0.3rem; }

.pu-label { font-size: 0.78rem; font-weight: 700; color: #374151; }

.pu-hint { font-size: 0.75rem; color: #9ca3af; font-weight: 400; }

.pu-aud-options { display: flex; gap: 0.3rem; flex-wrap: wrap; }

.pu-aud-option {
    padding: 0.35rem 0.75rem;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
}

.pu-aud-option:hover { border-color: #9ca3af; }

.pu-aud-option--on {
    border-color: var(--rz-primary, #b51b85);
    color: var(--rz-primary, #b51b85);
    background: color-mix(in srgb, var(--rz-primary, #b51b85) 8%, white);
}

.pu-shot-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.pu-shot-preview {
    max-width: 220px;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.pu-editor-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

.pu-row-title { font-weight: 650; }

.pu-row-body { font-size: 0.82rem; color: #6b7280; }

/* "Since last time" — explicit links back to earlier notes for the same player. Sits above
   the four sections because what carried over frames everything below it. */
.pfh-continuity {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    margin: 0.5rem 0;
    border-left: 3px solid #cbd5e1;
    border-radius: 0 8px 8px 0;
    background: #f8fafc;
}

.pfh-continuity-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pfh-continuity-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #1f2937;
    line-height: 1.5;
}

.pfh-continuity-status {
    flex: none;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    white-space: nowrap;
}

.pfh-continuity-status--improved {
    color: #0e7a52;
    background: #e7f4ee;
}

.pfh-continuity-status--resolved {
    color: #0e7a52;
    background: #e7f4ee;
}

.pfh-continuity-status--persisting {
    color: #8a5b12;
    background: #fbf0df;
}

.pfh-continuity-status--regressed {
    color: #a8232c;
    background: #fbeaeb;
}

.pfh-continuity-note {
    flex: 1 1 12rem;
    min-width: 0;
}

.pfh-continuity-date {
    font-size: 0.76rem;
    color: #94a3b8;
    white-space: nowrap;
}

.pfh-continuity-link {
    font-size: 0.76rem;
    color: var(--rz-primary, #b51b85);
    background: none;
    border: 0;
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}

.pfh-continuity-link:hover {
    text-decoration: none;
}

.pfh-continuity-remove {
    font-size: 0.72rem;
    color: #9ca3af;
    background: none;
    border: 0;
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
}

.pfh-continuity-remove:hover:not(:disabled) {
    color: #a8232c;
}

.pfh-continuity-remove:disabled {
    cursor: default;
    opacity: 0.5;
}

.pfh-summary {
    margin: 0;
    font-size: 0.95rem;
    color: #1f2937;
    line-height: 1.55;
}

.pfh-summary--lead {
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    border-left: 3px solid var(--rz-primary, #b51b85);
    background: rgba(255, 255, 255, 0.85);
    font-size: 0.96rem;
}

.pfh-sections {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pfh-sections--staff {
    gap: 0.55rem;
}

.pfh-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pfh-block-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4b5563;
}

.pfh-list--parent-portal .pfh-block {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    border: 1px solid transparent;
}

.pfh-list--parent-portal .pfh-block-title {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.88rem;
}

.pfh-block-icon {
    font-size: 1rem !important;
}

.pfh-list--parent-portal .pfh-block--strengths {
    background: #ecfdf3;
    border-color: rgba(25, 135, 84, 0.14);
}

.pfh-list--parent-portal .pfh-block--strengths .pfh-block-title {
    color: #146c43;
}

.pfh-list--parent-portal .pfh-block--strengths .pfh-block-icon {
    color: #198754;
}

.pfh-list--parent-portal .pfh-block--focus {
    background: #fff8eb;
    border-color: rgba(253, 126, 20, 0.16);
}

.pfh-list--parent-portal .pfh-block--focus .pfh-block-title {
    color: #b45309;
}

.pfh-list--parent-portal .pfh-block--focus .pfh-block-icon {
    color: #d97706;
}

.pfh-list--parent-portal .pfh-block--action {
    background: #f7f2fb;
    border-color: rgba(181, 27, 133, 0.14);
}

.pfh-list--parent-portal .pfh-block--action .pfh-block-title {
    color: #8b1a72;
}

.pfh-list--parent-portal .pfh-block--action .pfh-block-icon {
    color: var(--rz-primary, #b51b85);
}

.pfh-bullets {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.pfh-sections--staff .pfh-bullets {
    padding-left: 1.1rem;
    list-style: disc;
}

.pfh-bullets li {
    position: relative;
    font-size: 0.9rem;
    color: #1f2937;
    line-height: 1.45;
    margin-bottom: 0.35rem;
}

.pfh-bullets li:last-child {
    margin-bottom: 0;
}

.pfh-list--parent-portal .pfh-bullets li {
    padding-left: 1.1rem;
}

.pfh-list--parent-portal .pfh-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.55;
}

.pfh-list--parent-portal .pfh-block--strengths .pfh-bullets li::before {
    color: #198754;
}

.pfh-list--parent-portal .pfh-block--focus .pfh-bullets li::before {
    color: #d97706;
}

.pfh-list--parent-portal .pfh-block--action .pfh-bullets li::before {
    color: var(--rz-primary, #b51b85);
}

.feedback-content-view {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pfh-edit-input {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    font-size: inherit;
    font-family: inherit;
    line-height: 1.45;
    resize: vertical;
    padding: 0.45rem 0.55rem;
    color: #1f2937;
}

textarea.pfh-summary.pfh-edit-input {
    margin: 0;
}

.pfh-block .pfh-edit-input {
    min-height: 4.5rem;
}

.pf-feedback-preview {
    margin: 0;
    width: 100%;
    flex: 0 0 auto;
}

.pf-feedback-preview.pfh-card--parent {
    padding: 0.65rem 0.75rem 0.75rem;
    gap: 0.55rem;
}

.pf-feedback-preview .pfh-card-avatar {
    width: 2rem;
    height: 2rem;
}

.pf-feedback-preview .pfh-card-date {
    font-size: 0.92rem;
}

.pf-feedback-preview .pfh-edit-input {
    min-height: 2.25rem;
}

.pf-feedback-preview .pfh-block .pfh-edit-input {
    min-height: 2.5rem;
}

.pf-feedback-preview .feedback-content-view {
    gap: 0.55rem;
}

.pf-feedback-preview .pfh-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.pf-feedback-preview .pfh-block--action,
.pf-feedback-preview .pfh-sections-media {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .pf-feedback-preview .pfh-sections {
        grid-template-columns: 1fr;
    }
}

.pf-feedback-preview .fba-carousel {
    margin-top: 0.35rem;
}

.pf-feedback-preview .fba-carousel-viewport {
    height: min(11rem, 42vw);
    max-height: 11rem;
}

.pf-feedback-preview .fba-carousel-viewport .fba-media--image,
.pf-feedback-preview .fba-carousel-viewport .fba-media--video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.pfh-feedback-media {
    margin-top: 0.1rem;
}

.pfh-list--parent-portal .pfh-block--media {
    background: #f8fafc;
    border-color: rgba(100, 116, 139, 0.14);
}

.pfh-list--parent-portal .pfh-block--media .pfh-block-title {
    color: #475569;
}

.pfh-list--parent-portal .pfh-block--media .pfh-block-icon {
    color: #64748b;
}

.pfh-feedback-media-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #6b7280;
}

.pfh-feedback-media .pf-media-compact,
.pfh-feedback-media .fba-upload {
    border-top: none;
    padding-top: 0;
}

.pf-feedback-preview > .fba-carousel,
.pf-feedback-preview > .fba-upload,
.pf-feedback-preview > .pf-hint {
    margin-top: 0.15rem;
}

/* Feedback attachment gallery — global styles (used in parent portal + staff). */
.pfh-card--parent,
.pfh-card--parent .fba-carousel,
.parent-feedback-section.rz-card,
.parent-feedback-section .rz-card-body {
    min-width: 0;
    max-width: 100%;
}

.pfh-card--parent {
    overflow-x: clip;
}

.fba-carousel {
    position: relative;
    margin-top: 0.75rem;
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #111827;
}

.fba-carousel-viewport {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: min(220px, 58vw);
    max-height: 220px;
    padding: 0;
    overflow: hidden;
    background: #111827;
}

.fba-media-frame {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    box-sizing: border-box;
    overflow: hidden;
}

.fba-media,
.fba-media--image,
.fba-media--video {
    display: block;
    box-sizing: border-box;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 8px;
    background: #111827;
    object-fit: contain;
    object-position: center;
}

.fba-media--placeholder {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #1f2937 0%, #374151 50%, #1f2937 100%);
    background-size: 200% 100%;
    animation: fba-media-shimmer 1.2s ease-in-out infinite;
}

.fba-video-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
}

.fba-media--video {
    min-width: 0;
    min-height: 6rem;
}

.fba-media--tap-play {
    cursor: pointer;
}

.fba-video-wrap--paused::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.55);
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 54% center;
    background-size: 1.35rem 1.35rem;
}

@keyframes fba-media-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.fba-media-error {
    margin: 0;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #fca5a5;
    text-align: center;
    background: #111827;
}

.fba-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 999px;
    padding: 0;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    cursor: pointer;
}

.fba-carousel-nav:hover {
    background: rgba(17, 24, 39, 0.9);
}

.fba-carousel-nav--prev {
    left: 0.5rem;
}

.fba-carousel-nav--next {
    right: 0.5rem;
}

.fba-carousel-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.fba-carousel-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1 1 auto;
}

.fba-carousel-counter {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.02em;
}

.fba-carousel-filename {
    display: block;
    font-size: 0.8rem;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fba-carousel-dots {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.fba-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: #d1d5db;
    cursor: pointer;
}

.fba-carousel-dot--active {
    background: #4b5563;
}

.fba-carousel-delete {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #b91c1c;
    font-size: 0.8rem;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
}

.fba-carousel-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (min-width: 768px) {
    .fba-carousel-viewport {
        height: 18rem;
        max-height: 18rem;
    }
}

.pfh-transcript-wrap {
    border-top: 1px dashed #e5e7eb;
    padding-top: 0.45rem;
    margin-top: 0.2rem;
}

.pfh-transcript-toggle {
    border: none;
    background: transparent;
    color: #1b6ec2;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
}

.pfh-transcript {
    margin: 0.4rem 0 0;
    padding: 0.5rem 0.6rem;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 6px;
    font-size: 0.82rem;
    white-space: pre-wrap;
    font-family: inherit;
    color: #374151;
}
.attendance-filter-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fa
{
    float: right;
}

:root {
    /* One spinner image size, used in every loading overlay. */
    --spinner-art-size: 7rem;
    --spinner-sm-size: 3.25rem;
}

/* The .spinner element IS the loading overlay — full-screen, dimmed, centered.
   So <div class="spinner"></div> by itself produces the same large loader
   everywhere, regardless of page or wrapper. */
.spinner {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--page-loading-backdrop);
    backdrop-filter: var(--page-loading-backdrop-blur);
    -webkit-backdrop-filter: var(--page-loading-backdrop-blur);
    overflow: visible;
    pointer-events: all;
    perspective: 1200px;
}

/* The actual rotating logo — same size in every overlay. */
.spinner__img,
.spinner:empty::before {
    display: block;
    width: var(--spinner-art-size);
    height: var(--spinner-art-size);
    max-width: 90vmin;
    max-height: 90vmin;
    object-fit: contain;
    object-position: center;
    transform-origin: center center;
    transform-style: preserve-3d;
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    animation: spinner-turn 1.6s linear infinite;
}

.spinner:empty::before {
    content: "";
    background: url('/spinner-logo.png?v=5') center / contain no-repeat;
}

/* .spinner-page / .spinner-fullpage are legacy aliases — same look. */
.spinner.spinner-page,
.spinner.spinner-fullpage {
    /* No-op: full-screen behavior comes from .spinner itself. */
}

/* Small inline spinner — flows in document, no overlay/backdrop. */
.spinner.spinner-sm {
    position: static;
    inset: auto;
    z-index: auto;
    display: inline-flex;
    width: var(--spinner-sm-size);
    height: var(--spinner-sm-size);
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: auto;
    perspective: none;
    margin: 0;
    vertical-align: middle;
}

.spinner.spinner-sm .spinner__img,
.spinner.spinner-sm:empty::before {
    width: 100%;
    height: 100%;
}

.coach-myday-loading {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
    overflow: visible;
}

/* True 3D coin flip around the Y axis (parent .spinner provides perspective). */
@keyframes spinner-turn {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

/* Spinner is the same size on every device by request. */

@media (prefers-reduced-motion: reduce) {
    .spinner__img,
    .spinner:empty::before {
        animation: none;
    }
}

/* Header profile dropdown */
/* Staff account pill — matches .parent-account-menu-trigger from the parent portal. */
.header-profile-trigger {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: min(14rem, 42vw);
    padding: 0.35rem 0.55rem 0.35rem 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: none !important;
    outline: none !important;
    appearance: none;
    -webkit-appearance: none;
}

.header-profile-trigger:focus {
    outline: none !important;
    box-shadow: none !important;
}

.header-profile-trigger:hover {
    background: rgba(255, 255, 255, 0.22) !important;
}

.header-profile-trigger img {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.header-profile-trigger .profile-initials {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.header-profile-trigger span {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Phones: collapse the staff account chip to just its avatar so the header's
   right-side controls (location, env badge, bell, account) fit without the
   name running off the edge of the gradient. Full name still shows in the
   dropdown. Mirrors the parent hero's avatar-only chip. */
@media (max-width: 576px) {
    .header-profile-trigger > span:not(.profile-initials) {
        display: none;
    }

    .header-profile-trigger {
        max-width: none;
        gap: 0;
        padding: 0.3rem;
    }

    /* Two-row staff header: the brand (menu + logo + "Royals Connection" title)
       takes the full first row, and the compact controls (location, env badge,
       bell, account avatar) wrap onto a right-aligned second row. Without this
       the brand title gets squeezed to nothing once the controls collapse to
       icons and everything tries to share one row. */
    .header-toolbar-row.rz-row {
        flex-wrap: wrap;
    }

    /* !important: the brand RadzenColumn carries an inline `flex: 1`
       (flex-basis 0), which otherwise beats this rule — the header then
       never wraps and the brand title gets crushed to a few characters
       between the controls on one row. */
    .header-toolbar-row.rz-row > :first-child {
        flex: 1 1 100% !important;
        max-width: 100%;
        min-width: 0;
    }

    .header-toolbar-row.rz-row > :last-child {
        margin-left: auto;
    }
}

.header-profile-wrapper {
    position: relative;
}

.header-profile-dropdown {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 16rem;
    max-width: min(20rem, 92vw);
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
    padding: 0;
    z-index: 1201;
    overflow: hidden;
}

.profile-menu-header {
    padding: 0.95rem 1rem 0.85rem;
    border-bottom: 1px solid var(--rz-base-200, #e9ecef);
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.profile-menu-name {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rz-text-color, #111827);
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-email {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--rz-text-secondary-color, #6b7280);
    word-break: break-word;
}

.profile-menu-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    line-height: 1.4;
    border-bottom: 1px solid transparent;
}

.profile-menu-callout-icon {
    flex-shrink: 0;
    margin-top: 0.05rem;
    font-size: 1rem !important;
}

.profile-menu-callout--warn {
    color: #92400e;
    background: #fffbeb;
    border-bottom-color: #fde68a;
}

.profile-menu-callout--warn .profile-menu-callout-icon {
    color: #d97706;
}

.profile-menu-callout--info {
    color: #1e40af;
    background: #eff6ff;
    border-bottom-color: #dbeafe;
}

.profile-menu-actions {
    padding: 0.35rem 0;
}

.profile-menu-section {
    padding: 0.65rem 1rem 0.75rem;
    border-bottom: 1px solid var(--rz-base-200, #e9ecef);
}

.profile-menu-section-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rz-text-secondary-color, #6b7280);
}

.profile-menu-select {
    width: 100%;
    margin-bottom: 0.5rem;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--rz-text-color, #374151);
    cursor: pointer;
    text-decoration: none;
}

.profile-menu-item .rz-icon {
    flex-shrink: 0;
    font-size: 1.15rem !important;
    color: var(--rz-text-secondary-color, #6b7280);
}

.profile-menu-item:hover,
.profile-menu-item:focus-visible {
    background: var(--rz-base-100, #f3f4f6);
    outline: none;
}

.profile-menu-item--emphasis {
    color: var(--rz-primary, #1b6ec2);
}

.profile-menu-item--emphasis .rz-icon {
    color: var(--rz-primary, #1b6ec2);
}

.profile-menu-item--compact {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.profile-menu-footer {
    border-top: 1px solid var(--rz-base-200, #e9ecef);
    padding: 0.25rem 0;
}

.profile-menu-item--danger {
    color: #b42318;
}

.profile-menu-item--danger .rz-icon {
    color: #b42318;
}

.profile-menu-item--danger:hover,
.profile-menu-item--danger:focus-visible {
    background: #fef2f2;
}

/* Legacy dropdown class aliases — older markup or tests */
.header-profile-dropdown .dropdown-name {
    padding: 0.95rem 1rem 0.35rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--rz-text-color, #111827);
}

.header-profile-dropdown .dropdown-impersonation-status {
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    color: #92400e;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}

.header-profile-dropdown .dropdown-action-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--rz-text-color, #374151);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.7rem 1rem;
    cursor: pointer;
    text-align: left;
}

.header-profile-dropdown .dropdown-action-btn:hover {
    background: var(--rz-base-100, #f3f4f6);
}

.header-profile-dropdown a,
.header-profile-dropdown .dropdown-logout {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    color: #b42318 !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-top: 1px solid var(--rz-base-200, #e9ecef);
}

.header-profile-dropdown a:hover,
.header-profile-dropdown .dropdown-logout:hover {
    background: #fef2f2;
    color: #b42318 !important;
}

.header-profile-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
}

/* Player info modal */
.player-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
}

.player-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.player-info-item-full {
    grid-column: 1 / -1;
}

.player-info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rz-text-tertiary-color);
}

.player-info-value {
    font-size: 0.9rem;
    font-weight: 500;
}

.player-info-parents {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.player-info-parent {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.player-info-parent .player-info-detail {
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color);
}

/* Portal sign-in state for a guardian slot. Colour separates "they've been in recently"
   from "this feedback has had no chance of being read". */
.player-info-parent .parent-signin {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: default;
}

.player-info-parent .parent-signin--recent {
    color: #0e7a52;
}

.player-info-parent .parent-signin--stale {
    color: #8a5b12;
}

.player-info-parent .parent-signin--wait {
    color: #8a5b12;
}

.player-info-parent .parent-signin--none {
    color: #9ca3af;
}

/* Player table sessions and notes */
.sessions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem 0;
}

.session-chip {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    background: #e8f4f8;
    border: 1px solid #b8d4e3;
    border-radius: 999px;
    white-space: nowrap;
}

.tag-chip {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    background: #f0f4e8;
    border: 1px solid #c5d4a8;
    border-radius: 4px;
    white-space: nowrap;
}

.session-empty {
    color: #999;
    font-style: italic;
}

.notes-cell {
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 280px;
    padding: 0.35rem 0;
}

.notes-cell .notes-issues {
    margin-bottom: 0.3rem;
}

.notes-cell .notes-text {
    max-height: 4.2em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Players list — header + filter panel */
.players-page-heading-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.players-page-heading-titles {
    min-width: 0;
}

.players-page-heading-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}

.players-list-summary {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6c757d);
    white-space: nowrap;
}

.players-heading-add-btn {
    white-space: nowrap;
}

.players-filter-panel {
    border: 1px solid var(--rz-base-300, #dee2e6);
    border-radius: 10px;
    margin-bottom: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.players-filter-panel--collapsed {
    padding: 0.55rem 1rem 0.65rem;
}

.players-filter-panel--expanded {
    padding: 1rem 1.25rem 1.25rem;
}

.players-filter-panel-head {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.players-filter-panel--expanded .players-filter-panel-head {
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--rz-base-200, #e9ecef);
}

.players-filter-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.25rem 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: inherit;
    font: inherit;
}

.players-filter-toggle:focus-visible {
    outline: 2px solid var(--rz-primary, #1b6ec2);
    outline-offset: 2px;
    border-radius: 4px;
}

.players-filter-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

.players-filter-active-dot {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rz-primary, #1b6ec2);
    background: rgba(27, 110, 194, 0.1);
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
}

.players-filter-chevron {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.players-filter-chevron::after {
    display: block;
    content: "\25b6";
    font-size: 0.55rem;
    line-height: 1;
    opacity: 0.55;
    transition: transform 0.15s ease;
}

.players-filter-panel--expanded .players-filter-chevron::after {
    transform: rotate(90deg);
}

.players-filter-panel-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rz-text-secondary-color, #6c757d);
    margin: 0;
}

.players-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(10rem, 1fr) minmax(11rem, 1.15fr);
    gap: 1rem 1.25rem;
    align-items: end;
}

@media (max-width: 991px) {
    .players-filter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.players-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.players-filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--rz-text-secondary-color, #6c757d);
    margin: 0;
}

/* Normalize Radzen control height inside filter row */
.players-filter-field .players-filter-control,
.players-filter-field .players-filter-control.rz-textbox,
.players-filter-field .rz-dropdown {
    width: 100%;
    min-height: 2.5rem;
}

.players-table-below-filters {
    margin-top: 0.25rem;
    background: #fff;
}

/* Staff players grid — uniform row height and cleaner layout */
.players-grid-table {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.players-grid-table thead th {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
    border-bottom: 1px solid #c7d2fe;
    white-space: nowrap;
}

.players-grid-table tbody tr {
    height: 3.25rem;
    transition: background-color 0.12s ease;
}

.players-grid-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.players-grid-table tbody tr:hover {
    background: #eff6ff;
}

.players-grid-table tbody td {
    height: 3.25rem;
    max-height: 3.25rem;
    padding: 0.35rem 0.7rem;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    border-top: none;
    border-left: none;
    border-right: none;
    overflow: hidden;
}

.players-grid-table .player-name-block {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
    max-width: none;
    overflow: hidden;
}

.players-grid-table .player-name-line {
    flex-shrink: 0;
    font-weight: 600;
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.players-grid-table .player-name-tags {
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
}

.players-grid-table .player-name-tags .session-chip {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.players-grid-table .players-chip-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.3rem;
    overflow: hidden;
    min-width: 0;
}

.players-grid-table .players-chip-row .session-chip {
    flex-shrink: 1;
    min-width: 0;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 999px;
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
}

.players-grid-table .players-chip-more {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
}

.players-grid-table .notes-cell {
    max-width: none;
    padding: 0;
    overflow: hidden;
}

.players-grid-table .notes-cell .notes-text {
    max-height: 2.6em;
    -webkit-line-clamp: 2;
}

.players-grid-table .notes-cell .notes-issues {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.15rem;
}

.players-grid-table .notes-cell .player-session-mismatch-badge {
    flex-shrink: 1;
    min-width: 0;
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Frozen-pane scroll container — same pattern as the OneOnOneSchedule matrix.
 * Owns BOTH scroll axes so position:sticky thead pins to a single, well-defined
 * scroll ancestor. Browsers won't reliably stick across separate scroll contexts. */
.players-table-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-height: calc(100vh - 240px);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.players-table-scroll .players-table-below-filters {
    margin-bottom: 0;
    min-width: 56rem;
}

/* Floating header — light indigo background to match the OneOnOneSchedule matrix. */
.players-table-scroll .players-table-below-filters thead th {
    position: sticky;
    top: 0;
    z-index: 6;
    background: #eef2ff;
    box-shadow: inset 0 -1px 0 #c7d2fe;
}

/* Column widths */
.players-photo-header,
.players-photo-cell {
    width: 56px;
    min-width: 56px;
    text-align: center;
}

.players-name-header     { width: 22%; }
.players-age-header      { width: 4rem; }
.players-level-header    { width: 5rem; }
.players-sessions-header { width: 14%; }
.players-teams-header    { width: 14%; }
.players-notes-header    { width: 22%; }

.players-photo-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px dashed var(--rz-base-400, #b0b0b0);
    background: var(--rz-base-200, #f1f1f1);
    color: var(--rz-text-tertiary-color, #888);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.players-photo-thumb .rz-icon {
    font-size: 1.4rem;
    line-height: 1;
}

/* When .players-photo-thumb is itself an <img> (real cricclubs photo), drop the
   dashed border in favor of a solid one and rely on object-fit to crop. */
.players-photo-thumb.players-photo-thumb-img {
    border-style: solid;
    background: var(--rz-base-100, #fafafa);
    object-fit: cover;
    display: inline-block;
}

.players-level-cell {
    font-variant-numeric: tabular-nums;
}

/* Soft variant for tournament-team chips so they read distinctly from session chips. */
.players-team-chip {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.players-grid-table .players-photo-cell {
    padding-inline: 0.45rem;
}

@media (max-width: 768px) {
    .players-table-scroll .players-table-below-filters {
        font-size: 0.85rem;
        min-width: 50rem;
    }

    .players-photo-header,
    .players-photo-cell {
        width: 44px;
        min-width: 44px;
    }

    .players-photo-thumb {
        width: 30px;
        height: 30px;
    }

    .players-photo-thumb .rz-icon {
        font-size: 1.15rem;
    }

    .players-table-scroll .players-table-below-filters th,
    .players-table-scroll .players-table-below-filters td {
        padding: 0.35rem 0.45rem;
    }

    .players-table-scroll .players-table-below-filters .rz-button {
        padding: 0.2rem 0.4rem;
        min-height: 2rem;
        font-size: 0.72rem;
    }

    .players-table-scroll .player-name-block {
        max-width: none;
    }

    .players-table-scroll .notes-cell {
        max-width: 11rem;
        font-size: 0.82rem;
    }

    .players-table-scroll .sessions-cell .session-chip {
        font-size: 0.65rem;
        padding: 0.12rem 0.35rem;
    }

    .players-heading-add-btn {
        padding-inline: 0.65rem;
        font-size: 0.88rem;
    }
}

@media (max-width: 576px) {
    .players-filter-panel--collapsed {
        padding: 0.45rem 0.75rem 0.55rem;
    }

    .players-filter-panel--expanded {
        padding: 0.75rem 0.85rem 1rem;
    }
}

/* Sessions list — header, filter, and grid table */
.sessions-page-heading-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.sessions-page-heading-titles {
    min-width: 0;
}

.sessions-page-heading-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}

.sessions-list-summary {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6c757d);
    white-space: nowrap;
}

.sessions-heading-action-btn {
    white-space: nowrap;
}

.sessions-filter-panel {
    border: 1px solid var(--rz-base-300, #dee2e6);
    border-radius: 10px;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sessions-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.sessions-filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--rz-text-secondary-color, #6c757d);
    margin: 0;
}

.sessions-filter-field .sessions-filter-control,
.sessions-filter-field .sessions-filter-control.rz-textbox {
    width: 100%;
    min-height: 2.5rem;
}

.sessions-empty-state {
    border: 1px dashed var(--rz-base-300, #dee2e6);
    border-radius: 10px;
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--rz-text-secondary-color, #6c757d);
    background: #f8fafc;
}

.sessions-table-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-height: calc(100vh - 240px);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.sessions-table-scroll .sessions-table-below-filters {
    margin-bottom: 0;
    min-width: 52rem;
}

.sessions-grid-table {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.sessions-grid-table thead th {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
    border-bottom: 1px solid #c7d2fe;
    white-space: nowrap;
    vertical-align: bottom;
    padding: 0.65rem 0.7rem;
}

.sessions-table-scroll .sessions-table-below-filters thead th {
    position: sticky;
    top: 0;
    z-index: 6;
    background: #eef2ff;
    box-shadow: inset 0 -1px 0 #c7d2fe;
}

.sessions-grid-table tbody tr {
    transition: background-color 0.12s ease;
}

.sessions-grid-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.sessions-grid-table tbody tr:hover {
    background: #eff6ff;
}

.sessions-grid-table tbody td {
    padding: 0.55rem 0.7rem;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.sessions-actions-header {
    width: 5.5rem;
    min-width: 5.5rem;
}

.sessions-actions-cell {
    width: 5.5rem;
    min-width: 5.5rem;
}

.sessions-row-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sessions-row-action-btn.rz-button {
    min-width: 2rem;
    padding: 0.2rem 0.35rem;
}

.sessions-row-action-btn--danger.rz-button {
    color: #b91c1c;
}

.sessions-row-action-btn--danger.rz-button:hover {
    background: #fef2f2;
    color: #991b1b;
}

.sessions-name-header { width: 18%; }
.sessions-day-header  { width: 8rem; }
.sessions-time-header { width: 10rem; }
.sessions-level-header { width: 5.5rem; }
.sessions-count-header { width: 5rem; text-align: center; }
.sessions-coaches-header { width: 20%; }
.sessions-attendance-header { width: 11rem; }

.sessions-attendance-sub {
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #64748b;
}

.sessions-name-cell {
    font-weight: 600;
    max-width: 14rem;
}

.sessions-name-link {
    display: inline-block;
    max-width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: #1d4ed8;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sessions-name-link:hover {
    text-decoration: underline;
}

.sessions-name-link:focus-visible {
    outline: 2px solid var(--rz-primary, #1b6ec2);
    outline-offset: 2px;
    border-radius: 4px;
}

.sessions-day-chip {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
}

.sessions-level-chip {
    font-size: 0.72rem;
    font-weight: 700;
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #5b21b6;
}

.sessions-time-cell {
    font-variant-numeric: tabular-nums;
    color: #334155;
    white-space: nowrap;
}

.sessions-count-cell {
    text-align: center;
}

.sessions-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1e3a8a;
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

.sessions-coaches-cell {
    font-size: 0.88rem;
    line-height: 1.4;
    color: #334155;
    max-width: 16rem;
}

.sessions-attendance-cell {
    white-space: nowrap;
}

.sessions-attendance-stats {
    display: inline-flex;
    align-items: stretch;
    gap: 0.3rem;
}

.sessions-attendance-stat {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    min-width: 2.1rem;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.sessions-attendance-stat--avg {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.sessions-attendance-stat-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1;
}

.sessions-attendance-stat-value {
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    line-height: 1.1;
}

.sessions-attendance-stat--avg .sessions-attendance-stat-value {
    color: #047857;
}

@media (max-width: 768px) {
    .sessions-table-scroll .sessions-table-below-filters {
        font-size: 0.85rem;
        min-width: 46rem;
    }

    .sessions-table-scroll .sessions-table-below-filters th,
    .sessions-table-scroll .sessions-table-below-filters td {
        padding: 0.4rem 0.45rem;
    }

    .sessions-heading-action-btn {
        padding-inline: 0.65rem;
        font-size: 0.88rem;
    }

    .sessions-filter-panel {
        padding: 0.75rem 0.85rem;
    }
}

/* Add / Edit session (AddSession.razor) */
.session-form-page {
    max-width: var(--portal-page-max-width, 72rem);
    margin-inline: auto;
    padding-bottom: 1rem;
}

.session-form-header {
    margin-bottom: 1.25rem;
}

.session-form-header-main {
    margin-bottom: 0.75rem;
}

.session-form-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.65rem;
    padding: 0.2rem 0;
    border: none;
    background: transparent;
    color: #1d4ed8;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.session-form-back:hover {
    text-decoration: underline;
}

.session-form-back:focus-visible {
    outline: 2px solid var(--rz-primary, #1b6ec2);
    outline-offset: 2px;
    border-radius: 4px;
}

.session-form-title {
    margin: 0 0 0.25rem;
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    font-weight: 700;
    line-height: 1.2;
}

.session-form-subtitle {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--rz-text-secondary-color, #6c757d);
}

.session-form-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #c7d2fe;
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.session-form-preview-time {
    font-size: 0.9rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #334155;
}

.session-form-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    padding: 1.15rem 1.25rem 1.25rem;
    margin-bottom: 1rem;
}

.session-form-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.session-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #475569;
}

.session-form-section-head .session-form-section-title {
    margin-bottom: 0;
}

.session-form-section-icon {
    font-size: 1.05rem !important;
    color: #6366f1;
}

.session-form-roster-count {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6c757d);
    white-space: nowrap;
}

.session-form-grid {
    display: grid;
    gap: 1rem 1.25rem;
}

.session-form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.session-form-grid--schedule {
    grid-template-columns: minmax(9rem, 0.75fr) minmax(14rem, 1.5fr) minmax(9rem, 0.75fr);
    align-items: end;
}

.session-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.session-form-label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--rz-text-secondary-color, #6c757d);
    margin: 0;
}

.session-form-control,
.session-form-control.rz-textbox,
.session-form-field .rz-dropdown {
    min-height: 2.5rem;
}

.session-form-time-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
}

.session-form-time-sep {
    font-size: 0.82rem;
    font-weight: 600;
    color: #94a3b8;
    padding: 0 0.1rem;
}

.session-roster-picker {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Player add/edit form — shared field layout */
.player-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-form-grid {
    display: grid;
    gap: 1rem 1.25rem;
}

.player-form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.player-form-label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--rz-text-secondary-color, #64748b);
    margin: 0;
}

.player-form-sublabel {
    margin-top: 0.35rem;
}

.player-form-hint {
    font-size: 0.78rem;
    color: var(--rz-text-secondary-color, #64748b);
    margin: 0;
    line-height: 1.35;
}

.player-form-inline-action {
    margin-top: 0.15rem;
}

.player-form-control,
.player-form-field .form-control,
.player-form-field .rz-dropdown,
.player-form-field .rz-textbox,
.player-form-field .rz-datepicker,
.player-form-field .rz-numeric,
.player-form-field .rz-mask {
    width: 100% !important;
    min-height: 2.5rem;
}

.player-form-field .rz-dropdown {
    display: block;
}

.player-form-field .rz-datepicker {
    display: block;
}

@media (max-width: 576px) {
    .player-form-grid--two {
        grid-template-columns: 1fr;
    }
}

/* Player edit — session checkbox picker (grouped by day) */
.player-session-picker {
    margin-top: 0.15rem;
    padding: 0.85rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 10px;
    background: var(--rz-base-50, #f8fafc);
    max-height: min(420px, 55vh);
    overflow-y: auto;
}

.player-session-picker-day-group + .player-session-picker-day-group {
    margin-top: 0.65rem;
}

.player-session-picker-day {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rz-text-secondary-color, #64748b);
}

.player-session-picker-body {
    align-items: center;
    gap: 0.45rem 0.65rem;
}

.player-session-picker-time {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--rz-text-color, #1e293b);
    white-space: nowrap;
}

.player-session-picker-name {
    font-size: 0.82rem;
    color: var(--rz-text-secondary-color, #64748b);
}

.player-session-picker .session-roster-picker-list {
    margin: 0;
}

/* Player edit — unified tag combobox */
.player-tag-combo {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.75rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 10px;
    background: #fff;
}

.player-tag-combo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.player-tag-combo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding-right: 0.25rem;
}

.player-tag-combo-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    cursor: pointer;
    line-height: 1;
}

.player-tag-combo-remove:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
}

.player-tag-combo-remove .rzi {
    font-size: 0.85rem !important;
}

.player-tag-combo-input-wrap {
    position: relative;
}

.player-tag-combo-input-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.65rem 0 0.75rem;
    border: 1px solid var(--rz-base-300, #cbd5e1);
    border-radius: 8px;
    background: #fff;
    min-height: 2.5rem;
}

.player-tag-combo-input-row:focus-within {
    border-color: var(--rz-primary, #b51b85);
    box-shadow: 0 0 0 2px rgba(181, 27, 133, 0.12);
}

.player-tag-combo-icon {
    flex-shrink: 0;
    font-size: 1.05rem !important;
    color: var(--rz-text-secondary-color, #94a3b8);
    pointer-events: none;
}

.player-tag-combo-input-row .player-tag-combo-input,
.player-tag-combo-input-row .rz-textbox {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.player-tag-combo-input-row .player-tag-combo-input input,
.player-tag-combo-input-row .rz-textbox input {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0.45rem 0 !important;
    min-height: 2.35rem;
    width: 100% !important;
}

.player-tag-combo-input-row .player-tag-combo-input input:focus,
.player-tag-combo-input-row .rz-textbox input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.player-tag-combo-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 20;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    max-height: 14rem;
    overflow-y: auto;
}

.player-tag-combo-suggestion {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.5rem 0.85rem;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 0.9rem;
    color: var(--rz-text-color, #1e293b);
    cursor: pointer;
}

.player-tag-combo-suggestion:hover,
.player-tag-combo-suggestion:focus-visible {
    background: var(--rz-base-100, #f1f5f9);
    outline: none;
}

.player-tag-combo-suggestion--create .player-tag-combo-suggestion {
    color: var(--rz-primary, #b51b85);
    font-weight: 600;
}

.player-tag-combo-suggestion--create {
    border-top: 1px solid var(--rz-base-100, #f1f5f9);
    margin-top: 0.15rem;
    padding-top: 0.15rem;
}


.session-roster-picker-search {
    position: relative;
}

.session-roster-picker-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rz-text-secondary-color, #6b7280);
    pointer-events: none;
    z-index: 1;
}

.session-roster-picker-search-input input,
.session-roster-picker-search .rz-textbox {
    padding-left: 2.35rem !important;
    min-height: 2.5rem;
}

.session-roster-picker-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.session-roster-picker-showing {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6c757d);
}

.session-roster-picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.session-roster-picker-action {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
}

.session-roster-picker-action:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #93c5fd;
}

.session-roster-picker-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.session-roster-picker-action--muted {
    color: #64748b;
}

.session-roster-picker-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    max-height: min(28rem, 55vh);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.session-roster-picker-item + .session-roster-picker-item {
    border-top: 1px solid #f1f5f9;
}

.session-roster-picker-item--selected {
    background: #f8fbff;
}

.session-roster-picker-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
}

.session-roster-picker-label:hover {
    background: #f8fafc;
}

.session-roster-picker-item--selected .session-roster-picker-label:hover {
    background: #eff6ff;
}

.session-roster-picker-label .rz-chkbox {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.session-roster-picker-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    min-width: 0;
}

.session-roster-picker-name {
    font-weight: 600;
    color: #0f172a;
}

.session-roster-picker-meta {
    font-size: 0.86rem;
    color: #64748b;
}

.session-roster-picker-level {
    font-size: 0.68rem;
    padding: 0.1rem 0.45rem;
}

.session-form-roster-empty {
    margin-top: 0.85rem;
    padding: 1.25rem 1rem;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.92rem;
    text-align: center;
}

.session-form-footer {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
}

.session-form-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.session-form-save.rz-button {
    min-width: 9rem;
}

@media (max-width: 991px) {
    .session-form-grid--two,
    .session-form-grid--schedule {
        grid-template-columns: 1fr;
    }

    .session-form-field--time {
        grid-column: auto;
    }
}

@media (max-width: 576px) {
    .session-form-section {
        padding: 0.95rem 0.85rem 1rem;
    }

    .session-form-footer-inner {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .session-form-save.rz-button,
    .session-form-cancel.rz-button {
        width: 100%;
    }
}

/* Staff home dashboard + parent portal page content (same max width). */
.staff-dashboard,
.parent-portal-page-width {
    max-width: var(--portal-page-max-width, 72rem);
    margin-inline: auto;
    width: 100%;
}

.staff-dashboard-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.staff-dashboard-title {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
}

.staff-dashboard-header-date {
    margin-top: 0.2rem;
    font-size: 0.9rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.staff-dashboard-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.staff-dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1100px) {
    .staff-dashboard-layout--with-aside {
        display: grid;
        grid-template-columns: minmax(0, 1fr) min(22rem, 34%);
        align-items: start;
        gap: 1.75rem 2rem;
    }
}

.staff-dashboard-main,
.staff-dashboard-aside {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.staff-dashboard-widget-stack {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.staff-dashboard-section {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.staff-dashboard-section:last-child {
    border-bottom: none;
}

.staff-dashboard-section--expanded {
    background: rgba(0, 0, 0, 0.012);
}

.staff-dashboard-section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 0;
}

.staff-dashboard-section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0;
    padding: 0 0.35rem 0 0.15rem;
    min-height: 3rem;
}

.staff-dashboard-section-toggle {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0.5rem;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.5rem 0.65rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    color: inherit;
    text-align: left;
}

.staff-dashboard-section-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
}

.staff-dashboard-section-toggle:focus {
    outline: none;
}

.staff-dashboard-section-toggle:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(27, 110, 194, 0.45);
}

.staff-dashboard-section-toggle-text {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.staff-dashboard-section-toggle-spacer {
    flex: 1;
    min-width: 0.35rem;
}

.staff-dashboard-section-toggle .staff-dashboard-badge {
    margin-right: 0;
    flex-shrink: 0;
}

.staff-dashboard-section-chevron {
    width: 1.25rem;
    font-size: 1.2rem !important;
    color: #64748b;
    flex-shrink: 0;
}

.staff-dashboard-section-body {
    padding: 0 0.85rem 0.85rem;
}

.staff-dashboard-section-card.rz-card {
    box-shadow: none;
}

.staff-dashboard-section-card.rz-card > .rz-card-body,
.staff-dashboard-section-card.rz-card .rz-card-body {
    padding: 0.85rem 0.95rem;
}

.staff-dashboard-text-action {
    flex-shrink: 0;
    border: none;
    background: transparent;
    padding: 0.35rem 0.65rem;
    margin-right: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rz-primary, #1b6ec2);
    cursor: pointer;
    white-space: nowrap;
    border-radius: 6px;
}

.staff-dashboard-text-action:hover {
    background: rgba(27, 110, 194, 0.08);
}

.staff-dashboard-text-action:focus {
    outline: none;
}

.staff-dashboard-text-action:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(27, 110, 194, 0.45);
}

.staff-dashboard-updates-kind {
    font-size: 0.82rem;
    font-weight: 600;
    color: #92400e;
    letter-spacing: 0.02em;
}

.staff-dashboard-quick-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .staff-dashboard-quick-grid {
        grid-template-columns: 1fr 1fr;
        /* align-items defaults to stretch on CSS grid, which is what we want here so
           that the two Quick-actions cards share the row's height regardless of how
           much content each one has. The cards' internal flex layout (below) keeps
           the head pinned to the top and the action buttons pinned to the bottom. */
        align-items: stretch;
    }
}

.staff-dashboard-card.rz-card {
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    /* Stretch the card to fill the grid cell, then lay its body out as a column so
       any element marked with margin-top:auto (the .staff-dashboard-session-buttons
       wrapper) drops to the bottom — keeping action buttons aligned across cards
       even when one card has more descriptive text than the other. */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.staff-dashboard-card.rz-card > .rz-card-body,
.staff-dashboard-card.rz-card .rz-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.staff-dashboard-card .staff-dashboard-session-buttons {
    margin-top: auto;
}

.staff-dashboard-card--primary.rz-card {
    border: 1px solid rgba(27, 110, 194, 0.25);
    background: linear-gradient(165deg, rgba(232, 244, 252, 0.65) 0%, #fff 48%);
}

.staff-dashboard-card-head {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.staff-dashboard-card-head--compact {
    align-items: center;
    margin-bottom: 0.75rem;
}

.staff-dashboard-card-head--compact .staff-dashboard-card-icon {
    font-size: 1.35rem !important;
}

.staff-dashboard-today-card .staff-dashboard-card-head {
    margin-bottom: 0;
}

.staff-dashboard-today-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .staff-dashboard-today-grid {
        grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    }
}

.staff-dashboard-today-block {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 0.65rem;
    background: rgba(0, 0, 0, 0.015);
}

/* Size to content, capped — a hard height here left ~10rem of empty tile on the
   common day with no open parent requests, and grid's default align-items:stretch
   pushed that same dead space into the Attendance tile beside it. The cap keeps a
   busy queue from stretching the row; .staff-dashboard-feedback-widget-body
   scrolls inside it. */
.staff-dashboard-today-block--feedback {
    max-height: 17.5rem;
}

.staff-dashboard-feedback-new-btn {
    flex-shrink: 0;
}

.staff-dashboard-feedback-requests-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.staff-dashboard-feedback-requests-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.staff-dashboard-feedback-widget-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.15rem;
}

/* Reserves roughly one row while the queue loads. Was min-height:100%, which
   resolved against the old fixed-height tile; with an auto-height parent that
   collapses to nothing and the tile jumps when items arrive. */
.staff-dashboard-feedback-widget-placeholder {
    min-height: 2.25rem;
}

.staff-dashboard-today-block--feedback .fb-request-queue {
    margin-bottom: 0;
}

.staff-dashboard-today-block-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.staff-dashboard-today-icon {
    font-size: 1.2rem !important;
    color: var(--rz-primary, #1b6ec2);
}

.staff-dashboard-today-block-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.staff-dashboard-today-empty {
    font-size: 0.875rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.staff-dashboard-today-block .staff-dashboard-session-buttons {
    margin-top: 0;
}

.staff-dashboard-session-buttons--stacked {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.staff-dashboard-session-btn--block.rz-button {
    width: 100%;
    justify-content: flex-start;
}

.staff-dashboard-card-icon {
    font-size: 1.75rem !important;
    color: var(--rz-primary, #1b6ec2);
    flex-shrink: 0;
}

.staff-dashboard-card-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.staff-dashboard-card-desc {
    font-size: 0.875rem;
}

.staff-dashboard-hint {
    font-size: 0.82rem;
}

.staff-dashboard-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: rgba(27, 110, 194, 0.12);
    color: var(--rz-primary, #1b6ec2);
    margin-right: 0.35rem;
}

.staff-dashboard-badge--new {
    background: rgba(181, 27, 133, 0.12);
    color: var(--rz-primary, #b51b85);
}

.staff-dashboard-session-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.staff-dashboard-session-btn.rz-button {
    justify-content: flex-start;
    text-align: left;
    min-height: 2.75rem;
}

.staff-dashboard-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
}

.staff-dashboard-subscription-activity-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.staff-dashboard-aside .staff-dashboard-subscription-activity-panel {
    max-height: 14rem;
    overflow: auto;
    min-height: 0;
    padding: 0.75rem 0.85rem;
}

.staff-dashboard-aside .staff-dashboard-subscription-activity-item + .staff-dashboard-subscription-activity-item {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
}

.staff-dashboard-aside .staff-dashboard-subscription-activity-item-meta {
    font-size: 0.78rem;
}

.staff-dashboard-aside .staff-dashboard-subscription-activity-heading {
    margin-bottom: 0.55rem;
    font-size: 0.88rem;
}

.staff-dashboard-aside .staff-dashboard-subscription-activity-footer {
    margin-top: 0.75rem;
}

.staff-dashboard-subscription-activity-panel {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.65rem;
    padding: 0.85rem 0.95rem;
    min-height: 0;
}

.staff-dashboard-subscription-activity-panel--new {
    border-top: 3px solid #198754;
}

.staff-dashboard-subscription-activity-panel--cancelled {
    border-top: 3px solid #dc3545;
}

.staff-dashboard-subscription-activity-panel--suspended {
    border-top: 3px solid #fd7e14;
}

.staff-dashboard-subscription-activity-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.staff-dashboard-subscription-activity-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 0.8rem;
    font-weight: 700;
}

.staff-dashboard-subscription-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.staff-dashboard-subscription-activity-item + .staff-dashboard-subscription-activity-item {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.staff-dashboard-subscription-activity-item-primary {
    font-weight: 600;
    line-height: 1.35;
}

.staff-dashboard-subscription-activity-item-meta {
    margin-top: 0.15rem;
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.82rem;
    line-height: 1.4;
}

.staff-dashboard-subscription-activity-empty {
    margin: 0;
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.85rem;
}

.staff-dashboard-subscription-activity-loading {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.staff-dashboard-subscription-activity-footer {
    display: flex;
    justify-content: flex-end;
}

.staff-dashboard-schedule-alerts-card.rz-card {
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-left: 4px solid #f59e0b;
    background: linear-gradient(165deg, rgba(255, 251, 235, 0.92) 0%, #fff 52%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.staff-dashboard-schedule-alerts-card.rz-card > .rz-card-body,
.staff-dashboard-schedule-alerts-card.rz-card .rz-card-body {
    padding: 0.95rem 1rem 1rem;
}

.staff-dashboard-schedule-alerts-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.16);
}

.staff-dashboard-schedule-alerts-head-text {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-width: 0;
}

.staff-dashboard-schedule-alerts-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1.35rem;
    color: #d97706;
}

.staff-dashboard-schedule-alerts-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #78350f;
}

.staff-dashboard-schedule-alerts-subtitle {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    color: #78716c;
}

.staff-dashboard-schedule-alerts-count {
    flex-shrink: 0;
    background: rgba(245, 158, 11, 0.15);
    color: #92400e;
}

.staff-dashboard-schedule-alerts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.staff-dashboard-schedule-alert-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 0.8rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
}

.staff-dashboard-schedule-alert-main {
    flex: 1;
    min-width: 0;
}

.staff-dashboard-alert-dismiss {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #78716c;
    cursor: pointer;
}

.staff-dashboard-alert-dismiss:hover,
.staff-dashboard-alert-dismiss:focus-visible {
    background: rgba(0, 0, 0, 0.06);
    color: #44403c;
    outline: none;
}

.staff-dashboard-alert-dismiss .rz-icon {
    font-size: 1rem !important;
}

.staff-dashboard-schedule-alert-match {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.staff-dashboard-schedule-alert-age {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.staff-dashboard-schedule-alert-link {
    font-weight: 600;
    font-size: 0.92rem;
}

.staff-dashboard-schedule-alert-change {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.07);
    font-size: 0.84rem;
}

.staff-dashboard-schedule-alert-item .staff-dashboard-schedule-alert-change:first-of-type {
    margin-top: 0.55rem;
}

.staff-dashboard-schedule-alert-change + .staff-dashboard-schedule-alert-change {
    margin-top: 0.35rem;
    padding-top: 0;
    border-top: none;
}

.staff-dashboard-schedule-alert-change-label {
    min-width: 4.75rem;
    font-weight: 600;
    color: #57534e;
}

.staff-dashboard-schedule-alert-change-from {
    color: #78716c;
    text-decoration: line-through;
    text-decoration-color: rgba(120, 113, 108, 0.45);
}

.staff-dashboard-schedule-alert-change-arrow {
    font-size: 0.95rem;
    color: #d97706;
}

.staff-dashboard-schedule-alert-change-to {
    font-weight: 600;
    color: #1c1917;
}

/* Games card — completed (left) vs upcoming (right). */
.staff-dashboard-weekend-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

@media (max-width: 900px) {
    .staff-dashboard-weekend-split {
        grid-template-columns: 1fr;
    }
}

.staff-dashboard-weekend-panel {
    min-width: 0;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.65rem;
    background: rgba(0, 0, 0, 0.018);
}

.staff-dashboard-weekend-panel--results {
    border-left: 3px solid rgba(34, 197, 94, 0.55);
}

.staff-dashboard-weekend-panel--upcoming {
    border-left: 3px solid rgba(27, 110, 194, 0.55);
}

.staff-dashboard-weekend-panel-title {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-text-secondary-color, #6c757d);
}

.staff-dashboard-weekend-panel-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--rz-text-secondary-color, #6c757d);
    font-style: italic;
}

/* Completed game row — W/L in left column; all match info in right column. */
.staff-dashboard-weekend-game {
    padding: 0.55rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.staff-dashboard-weekend-list > .staff-dashboard-weekend-game:first-child {
    border-top: none;
}

.staff-dashboard-weekend-game--has-outcome {
    display: grid;
    grid-template-columns: 3.25rem 1fr;
    column-gap: 0.65rem;
    align-items: start;
}

.staff-dashboard-weekend-game--has-outcome > .tt-fixture-outcome {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
}

.staff-dashboard-weekend-game-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.staff-dashboard-weekend-game--has-outcome .staff-dashboard-weekend-game-info {
    grid-column: 2;
    grid-row: 1;
}

.staff-dashboard-weekend-game-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
    min-width: 0;
}

.staff-dashboard-weekend-game-summary .staff-dashboard-weekend-team-block {
    min-width: 0;
    width: 100%;
}

.staff-dashboard-weekend-group .tt-tournament-name {
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}

.staff-dashboard-weekend-group:first-child .tt-tournament-name {
    margin-top: 0;
}

.staff-dashboard-weekend-group .tt-age-group-name {
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.staff-dashboard-weekend-result {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rz-text-color, #212529);
}

.staff-dashboard-weekend-scorecard {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c41e98;
    text-decoration: none;
}

.staff-dashboard-weekend-scorecard:hover {
    text-decoration: underline;
}

.staff-dashboard-weekend-highlights {
    margin: 0.15rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color, #495057);
}

.staff-dashboard-weekend-highlights li {
    margin-bottom: 0.15rem;
}

.staff-dashboard-weekend-highlight-player {
    list-style: none;
    margin-left: -1.1rem;
    padding-left: 0;
}

.staff-dashboard-weekend-highlight-milestones {
    margin: 0.1rem 0 0.25rem;
    padding-left: 1.1rem;
}

.staff-dashboard-weekend-highlight-milestones li {
    margin-bottom: 0.05rem;
}

.staff-dashboard-games-highlights {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 1rem;
    margin-bottom: 0.25rem;
}

.staff-dashboard-games-highlights--standalone {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.staff-dashboard-highlights-card {
    overflow: hidden;
}

.staff-dashboard-highlights-loading {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0 1rem;
}

.staff-dashboard-highlights-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.staff-dashboard-highlight-item {
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.65);
}

.staff-dashboard-highlight-player-block {
    margin: 0;
}

.staff-dashboard-highlight-player-block .tt-highlight-parent-message {
    margin-top: 0.35rem;
}

.staff-dashboard-highlight-item--focused {
    border-color: rgba(25, 118, 210, 0.55);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.18);
    background: rgba(227, 242, 253, 0.85);
}

.fb-card--focused,
.pfh-card.fb-card--focused {
    outline: 2px solid #1b6ec2;
    outline-offset: 2px;
}

.fb-pending-requests-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.fb-pending-requests-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.fb-request-queue {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.fb-request-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
}

.fb-request-row-main {
    min-width: 0;
}

.fb-request-row-meta {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.fb-request-row-action {
    flex-shrink: 0;
    white-space: nowrap;
}

.fb-request-player-name,
.fb-request-row-title button.fb-request-player-link {
    display: inline;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
    cursor: pointer;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
}

.fb-request-row-title button.fb-request-player-link:hover {
    text-decoration: underline;
    color: #1b6ec2;
}

.staff-dashboard-highlight-milestone {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem 0.65rem;
}

.staff-dashboard-highlight-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    background: #6c757d;
}

.staff-dashboard-highlight-badge.century,
.staff-dashboard-highlight-badge.fifty {
    background: #198754;
}

.staff-dashboard-highlight-badge.five-wickets,
.staff-dashboard-highlight-badge.three-wickets {
    background: #0d6efd;
}

.staff-dashboard-highlight-badge.potm {
    background: #fd7e14;
}

.staff-dashboard-highlight-copy {
    font-size: 0.95rem;
    font-weight: 500;
}

.staff-dashboard-highlight-match {
    margin-top: 0.35rem;
    line-height: 1.45;
}

.staff-dashboard-highlight-sep {
    margin: 0 0.25rem;
    opacity: 0.55;
}

.tt-highlight-new-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: linear-gradient(135deg, #c41e98 0%, #9e1570 100%);
    color: #fff;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.staff-dashboard-highlight-comments {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.staff-dashboard-highlight-comment {
    padding: 0.55rem 0.65rem;
    border-radius: 0.4rem;
    background: rgba(0, 0, 0, 0.03);
}

.staff-dashboard-highlight-comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
}

.staff-dashboard-highlight-comment-role {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(0, 0, 0, 0.08);
}

.staff-dashboard-highlight-comment-role--coach {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.staff-dashboard-highlight-comment-role--admin {
    background: rgba(111, 66, 193, 0.12);
    color: #6f42c1;
}

.staff-dashboard-highlight-comment-role--parent {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.staff-dashboard-highlight-comment-author {
    font-weight: 600;
    color: var(--rz-text-color, #212529);
}

.staff-dashboard-highlight-comment-time {
    color: var(--rz-text-secondary-color, #6c757d);
}

.staff-dashboard-highlight-comment-delete {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #dc3545;
    font-size: 0.75rem;
    padding: 0;
    cursor: pointer;
}

.staff-dashboard-highlight-comment-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.staff-dashboard-highlight-comment-body {
    font-size: 0.88rem;
    white-space: pre-wrap;
}

.staff-dashboard-highlight-add-comment {
    margin-top: 0.55rem;
    border: 0;
    background: transparent;
    color: #0d6efd;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
}

.staff-dashboard-highlight-compose {
    margin-top: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.staff-dashboard-highlight-textarea {
    resize: vertical;
    min-height: 3rem;
}

.staff-dashboard-highlight-compose-actions {
    display: flex;
    gap: 0.45rem;
}

.staff-dashboard-highlight-comment-role--management {
    background: rgba(214, 122, 0, 0.14);
    color: #b5560a;
}

/* Shared comment-thread tag picker + mention chips (used everywhere comments appear) */
/* Inline "@" mention autocomplete */
.comment-compose-field {
    position: relative;
}

.comment-mention-suggest {
    list-style: none;
    margin: 0.15rem 0 0;
    padding: 0.25rem;
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    max-height: 12rem;
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.4rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.comment-mention-suggest-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.3rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.comment-mention-suggest-item:hover {
    background: rgba(13, 110, 253, 0.1);
}

.comment-mention-suggest-icon {
    font-size: 1.05rem;
    color: #6c757d;
}

.comment-mention-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.35rem;
}

.comment-mention-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

/* Past-game comments section (parent portal) — inline, matching highlight/feedback comments */
.parent-event-comments {
    margin-top: 0.6rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 0.5rem;
}

/* Staff-side grouped comment threads on the fixture detail page */
.tt-fixture-comment-threads {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tt-fixture-comment-thread {
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tt-fixture-comment-thread-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.tt-fixture-comment-thread-icon {
    font-size: 1.1rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-fixture-comment-thread-parent {
    font-weight: 600;
}

.tt-fixture-comment-thread-player {
    color: var(--rz-text-secondary-color, #6c757d);
}

/* One row per fixture; collapses on narrow screens. */
.staff-dashboard-weekend-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.staff-dashboard-weekend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.85rem;
    align-items: flex-start;
    padding: 0.55rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.staff-dashboard-weekend-row:first-child {
    border-top: none;
}

.staff-dashboard-weekend-team-block {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 11rem;
    flex: 0 0 auto;
}

.staff-dashboard-weekend-team {
    font-weight: 600;
    color: var(--rz-text-color, #212529);
    text-decoration: none;
}

.staff-dashboard-weekend-team:hover {
    text-decoration: underline;
}

.staff-dashboard-weekend-team-tournament {
    font-size: 0.78rem;
    line-height: 1.15;
    color: var(--rz-text-secondary-color, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.staff-dashboard-weekend-detail {
    display: block;
    width: 100%;
    line-height: 1.45;
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #495057);
}

.staff-dashboard-weekend-detail--empty {
    color: var(--rz-text-secondary-color, #6c757d);
    font-style: italic;
}

.staff-dashboard-weekend-time {
    font-variant-numeric: tabular-nums;
}

/* Add / Edit attendance (AddSessionLog.razor) */
.attendance-log-page {
    padding-top: 0.15rem;
    padding-bottom: 0.5rem;
}

.attendance-log-alert {
    margin-bottom: 1rem;
}

.attendance-log-header {
    margin-bottom: 1rem;
}

.attendance-log-header-main {
    margin-bottom: 0.65rem;
}

.attendance-log-session-title {
    margin: 0 0 0.2rem;
    font-size: clamp(1.25rem, 4vw, 1.55rem);
    font-weight: 700;
    line-height: 1.25;
}

.attendance-log-session-meta {
    color: var(--rz-text-secondary-color, #6b7280);
    font-size: 0.92rem;
}

.attendance-log-header--picker {
    max-width: 28rem;
}

.attendance-log-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.attendance-log-search {
    position: relative;
    flex: 1 1 12rem;
    min-width: 0;
}

.attendance-log-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rz-text-secondary-color, #6b7280);
    pointer-events: none;
    z-index: 1;
}

.attendance-log-search-input input,
.attendance-log-search .rz-textbox {
    padding-left: 2.35rem !important;
    min-height: 2.75rem;
}

.attendance-log-mark-all {
    flex: 0 0 auto;
    min-height: 2.75rem;
    white-space: nowrap;
}

.attendance-log-progress {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid #bfdbfe;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
    text-align: center;
}

.attendance-log-progress-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
}

.attendance-log-progress-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 0;
}

.attendance-log-progress-divider {
    width: 1px;
    align-self: stretch;
    min-height: 3rem;
    background: #cbd5e1;
}

.attendance-log-progress-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.15rem;
    line-height: 1;
}

.attendance-log-progress-selected {
    font-size: clamp(2rem, 8vw, 2.75rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #16a34a;
}

.attendance-log-progress-expected {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--rz-text-secondary-color, #6b7280);
}

.attendance-log-progress-total {
    font-size: clamp(2rem, 8vw, 2.75rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #1d4ed8;
    line-height: 1;
}

.attendance-log-progress-sep {
    font-size: clamp(1.35rem, 4.5vw, 1.85rem);
    font-weight: 600;
    color: var(--rz-text-secondary-color, #9ca3af);
}

.attendance-log-progress-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.attendance-log-progress-walkins {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1d4ed8;
    text-align: center;
}

.attendance-player-section {
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--rz-base-300, #dee2e6);
    border-radius: 14px;
    background: #fff;
}

.attendance-player-section--in-session {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 2.5rem);
}

.attendance-player-section--other {
    background: #fafafa;
}

.attendance-player-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.attendance-player-section-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rz-text-color, #111827);
}

.attendance-player-section-count {
    flex-shrink: 0;
    min-width: 1.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--rz-base-200, #e9ecef);
    color: var(--rz-text-secondary-color, #6b7280);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.attendance-player-section--in-session .attendance-player-section-count {
    background: #dbeafe;
    color: #1d4ed8;
}

.attendance-player-section-count--progress {
    min-width: 3.25rem;
    font-variant-numeric: tabular-nums;
}

.attendance-player-section-empty {
    margin: 0;
    padding: 0.35rem 0 0.15rem;
    color: var(--rz-text-secondary-color, #6b7280);
    font-size: 0.9rem;
}

.attendance-player-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.attendance-player-card {
    border: 1px solid var(--rz-base-300, #dee2e6);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.attendance-player-card--present {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 2.5rem);
}

.attendance-player-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
}

.attendance-player-card-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    min-width: 0;
    flex: 1 1 auto;
}

.attendance-player-name {
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    padding: 0;
    border: 0;
    background: transparent;
    max-width: 100%;
    white-space: normal;
    line-height: 1.3;
}

.attendance-present-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.85rem;
    min-width: 7.5rem;
    max-width: 11rem;
    padding: 0.55rem 0.85rem;
    border: 2px solid var(--rz-base-400, #ced4da);
    border-radius: 999px;
    background: #fff;
    color: var(--rz-text-secondary-color, #6b7280);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.attendance-present-btn--on {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.attendance-present-btn:focus-visible {
    outline: 2px solid var(--rz-primary, #1b6ec2);
    outline-offset: 2px;
}

.attendance-log-footer {
    width: 100%;
}

.attendance-log-footer--pinned {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--rz-base-300, #dee2e6);
    box-shadow: 0 -4px 20px rgba(16, 24, 40, 0.12);
    backdrop-filter: blur(10px);
}

.attendance-log-footer-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    max-width: 42rem;
    margin: 0 auto;
}

.attendance-log-footer-count {
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.82rem;
    color: var(--rz-text-secondary-color, #6b7280);
    line-height: 1.25;
}

.attendance-log-footer-stat--total {
    color: var(--rz-text-color, #111827);
}

.attendance-log-footer-stat--walkins {
    color: var(--rz-text-secondary-color, #6b7280);
}

@media (min-width: 480px) {
    .attendance-log-footer-count {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0.65rem;
    }
}

.attendance-log-cancel {
    flex-shrink: 0;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    text-decoration: none;
}

.attendance-log-save {
    flex: 0 1 auto;
    min-width: 9.5rem;
    min-height: 2.85rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    .attendance-log-page {
        max-width: 42rem;
        margin: 0 auto;
    }

    .attendance-present-btn {
        min-width: 8.5rem;
    }
}

@media (min-width: 992px) {
    .attendance-player-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

/* Attendance log list (SessionLogManagement.razor) */
.attendance-list-page {
    padding-top: 0.15rem;
    padding-bottom: 1.5rem;
}

.attendance-list-spinner {
    margin-bottom: 0.75rem;
}

.attendance-list-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.attendance-list-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
}

.attendance-list-summary {
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color, #6b7280);
    white-space: nowrap;
}

.attendance-list-add-btn {
    flex-shrink: 0;
}

.attendance-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.attendance-list-search {
    flex: 1 1 14rem;
    min-width: 0;
}

.attendance-list-sort {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 0 1 auto;
    min-width: 9.5rem;
}

.attendance-list-sort-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6b7280);
    margin: 0;
}

.attendance-list-sort-select {
    min-height: 2.75rem;
    font-size: 0.9rem;
    border-radius: 8px;
    border-color: var(--rz-base-300, #dee2e6);
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.attendance-list-empty {
    margin: 1.5rem 0 0;
    text-align: center;
    color: var(--rz-text-secondary-color, #6b7280);
}

.attendance-list-day-group {
    margin-bottom: 1.5rem;
}

.attendance-list-day-header {
    margin-bottom: 0.65rem;
}

.attendance-list-day-heading {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    color: var(--rz-text-color, #1f2937);
}

.attendance-list-day-summary {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--rz-text-secondary-color, #6b7280);
}

.attendance-list-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.attendance-list-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rz-base-300, #dee2e6);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.attendance-list-card-main {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    width: 100%;
    padding: 0.9rem 1rem 0.75rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.attendance-list-card-main:hover,
.attendance-list-card-main:focus-visible {
    background: var(--rz-base-50, #f8fafc);
    outline: none;
}

.attendance-list-card-head {
    margin-bottom: 0.45rem;
}

.attendance-list-card-date {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6b7280);
    margin-bottom: 0.15rem;
}

.attendance-list-card-logged,
.attendance-list-card-time {
    display: block;
    font-size: 0.78rem;
    color: var(--rz-text-secondary-color, #6b7280);
}

.attendance-list-card-session {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rz-text-color, #111827);
}

.attendance-list-card-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    font-size: 0.82rem;
    color: var(--rz-text-secondary-color, #6b7280);
    font-variant-numeric: tabular-nums;
}

.attendance-list-card-stat strong {
    color: var(--rz-text-color, #111827);
}

.attendance-list-card-stat--total strong {
    color: var(--rz-primary, #1b6ec2);
}

.attendance-list-card-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--rz-base-200, #e9ecef);
    background: var(--rz-base-50, #f8fafc);
}

.attendance-list-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    border: 0;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.attendance-list-card-btn .rz-icon {
    font-size: 1.1rem !important;
}

.attendance-list-card-btn--edit {
    color: var(--rz-primary, #1b6ec2);
    border-right: 1px solid var(--rz-base-200, #e9ecef);
}

.attendance-list-card-btn--edit:hover,
.attendance-list-card-btn--edit:focus-visible {
    background: rgba(27, 110, 194, 0.08);
    outline: none;
}

.attendance-list-card-btn--delete {
    color: #b42318;
}

.attendance-list-card-btn--delete:hover,
.attendance-list-card-btn--delete:focus-visible {
    background: rgba(180, 35, 24, 0.08);
    outline: none;
}

@media (min-width: 768px) {
    .attendance-list-page {
        max-width: 42rem;
        margin: 0 auto;
    }

    .attendance-list-toolbar {
        align-items: flex-end;
    }

    .attendance-list-sort {
        min-width: 11rem;
    }
}

@media (min-width: 992px) {
    .attendance-list-cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .attendance-list-day-group .attendance-list-cards {
        display: flex;
        flex-direction: column;
    }
}

/* Legacy table helpers — kept for any older markup references */
.attendance-sessions-preview {
    max-width: 16rem;
    max-height: 5.5rem;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.82rem;
    line-height: 1.35;
}

/* Tracked Tournaments (cricclubs feature) */
.tt-list-header {
    margin-bottom: 0.35rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.tt-list-header-text {
    min-width: 0;
}

.tt-list-header-settings {
    flex: 0 0 auto;
}

/* Tournament settings dialog */
.tt-settings-dialog {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tt-settings-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tt-settings-divider {
    margin: 0.25rem 0;
    border: 0;
    border-top: 1px solid var(--rz-border, #e2e8f0);
}

.tt-settings-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.4rem 1rem;
}

.tt-settings-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.tt-settings-toggle-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    background: var(--rz-base-200, #eef2f7);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--rz-text-color, #1e293b);
}

.tt-settings-toggle-desc {
    font-size: 0.9rem;
    color: var(--rz-text-secondary-color, #64748b);
}

.tt-settings-prompt {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.4;
    resize: vertical;
}

.tt-settings-prompt-state {
    display: inline-block;
    margin-left: 0.25rem;
    font-weight: 600;
}

.tt-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.tt-settings-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.tt-list-page-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 3.5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--rz-text-color, #1e293b);
}

.tt-list-page {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tt-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 0.85rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 12px;
}

.tt-list-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tt-list-toolbar-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--rz-text-secondary-color, #64748b);
    cursor: pointer;
    user-select: none;
}

.tt-list-search {
    position: relative;
    width: 100%;
    max-width: none;
    margin-bottom: 1.15rem;
}

.tt-list-search--field {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.85rem;
    background: #fff;
    border: 1px solid var(--rz-base-300, #cbd5e1);
    border-radius: 10px;
    box-shadow: none;
}

.tt-list-search--field::before {
    content: "";
    flex: 0 0 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    position: static;
    transform: none;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E");
}

.tt-list-search-icon {
    display: none;
}

.tt-list-search--field .tt-list-search-field.rz-textbox,
.tt-list-search--field input.rz-textbox {
    flex: 1 1 auto;
    width: 100% !important;
    min-width: 0;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding-inline: 0 !important;
    padding-block: 0.65rem !important;
}

.tt-list-search--field .tt-list-search-field.rz-textbox:focus,
.tt-list-search--field input.rz-textbox:focus {
    outline: none !important;
    box-shadow: none !important;
}

.tt-list-search--field:focus-within {
    border-color: rgba(181, 27, 133, 0.45);
    box-shadow: 0 0 0 3px rgba(181, 27, 133, 0.08);
}

.tt-list-search .rz-textbox {
    width: 100% !important;
}

.tt-list-search:not(.tt-list-search--field) .rz-textbox,
.tt-list-search:not(.tt-list-search--field) input.rz-textbox {
    padding-inline-start: 2.75rem !important;
    border-radius: 10px !important;
    border-color: var(--rz-base-300, #cbd5e1) !important;
    background: #fff !important;
}

.tt-list-search:not(.tt-list-search--field)::before {
    content: "";
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.1rem;
    height: 1.1rem;
    pointer-events: none;
    z-index: 2;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E");
}

.tt-section-title {
    margin-top: 1.25rem;
    margin-bottom: 0.25rem;
    font-size: clamp(1.05rem, 2.8vw, 1.35rem);
    font-weight: 700;
}

.tt-page-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0;
}

.tt-page-title-text {
    margin-right: 0.15rem;
}

.tt-kind-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.25;
    white-space: nowrap;
}

.tt-kind-badge--long-term {
    background: #334155;
    color: #fff;
}

.tt-kind-badge--short-term {
    background: #0369a1;
    color: #fff;
}

.tt-planning-intro {
    margin: 0 0 0.75rem;
    font-size: 0.925rem;
    line-height: 1.45;
}

.tt-planning-section {
    padding: 1rem 1.1rem 1.05rem;
    background: #fff;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.tt-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.25;
    white-space: nowrap;
}

.tt-status-badge--draft {
    background: #e2e8f0;
    color: #475569;
}

.tt-status-badge--inviting {
    background: #0284c7;
    color: #fff;
}

.tt-status-badge--finalizing {
    background: #d97706;
    color: #fff;
}

.tt-status-badge--linked {
    background: #15803d;
    color: #fff;
}

.tt-card-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
}

.tt-card-main {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    pointer-events: none;
}

.tt-tournament-group {
    margin-bottom: 1.75rem;
    padding: 1rem 1.1rem 1.15rem;
    background: #fff;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.tt-tournament-group-header {
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid var(--rz-base-200, #e2e8f0);
}

.tt-tournament-group .tt-tournament-name {
    margin: 0;
}

.tt-age-group-block {
    margin-top: 0.85rem;
}

.tt-age-group-block:first-of-type {
    margin-top: 0.35rem;
}

.tt-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.tt-recent-highlights-group .tt-tournament-name {
    margin-top: 0;
}

.tt-recent-highlights-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tt-recent-highlights-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color, #6c757d);
    margin: 1rem 0 0.65rem;
}

.tt-recent-highlights-group .tt-recent-highlights-date:first-of-type {
    margin-top: 0.35rem;
}

.tt-tournament-name {
    font-size: clamp(1.4rem, 3.5vw, 1.75rem);
    margin: 1.25rem 0 0.6rem 0;
    font-weight: 700;
    color: var(--rz-text-color, #1f1f1f);
    letter-spacing: -0.01em;
}

.tt-age-group-name {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rz-text-secondary-color, #64748b);
    margin: 0 0 0.55rem 0;
    padding-left: 0.1rem;
}

/* Shared pill tab nav (parent portal + tournaments). */
.portal-tab-nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    margin: 0 0 1.35rem;
    padding: 0.35rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.portal-tab-nav::-webkit-scrollbar {
    display: none;
}

.portal-tab-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    padding: 0.55rem 0.95rem;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.portal-tab-link-icon {
    font-size: 1.05rem !important;
    opacity: 0.85;
}

.portal-tab-link:hover:not(.portal-tab-link--active) {
    color: var(--rz-primary, #b51b85);
    background: rgba(255, 255, 255, 0.75);
}

/* Hover underline should sit under the tab label only — never the leading icon
   (or the count/badge pills, which are later spans). */
.portal-tab-link:hover {
    text-decoration: none;
}

.portal-tab-link:hover span:first-of-type {
    text-decoration: underline;
}

.portal-tab-link--active,
.portal-tab-link--active:hover,
.portal-tab-link--active:focus {
    color: #fff !important;
    background: linear-gradient(135deg, #c41e98 0%, #9e1570 100%) !important;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(181, 27, 133, 0.4);
}

.portal-tab-link--active .portal-tab-link-icon,
.portal-tab-link--active ::deep .rzi,
.portal-tab-link--active ::deep i {
    color: #fff !important;
    opacity: 1;
}

.tt-detail-tab-label {
    color: var(--rz-primary, #b51b85);
    font-weight: 600;
}

.tt-card {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    margin-bottom: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tt-card--interactive:hover {
    border-color: rgba(181, 27, 133, 0.25);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.tt-card-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    text-decoration: none;
}

.tt-card-name {
    pointer-events: auto;
    font-weight: 600;
    font-size: 1rem;
    color: var(--rz-primary, #b51b85);
    text-decoration: none;
}

.tt-card-name:hover {
    text-decoration: underline;
    color: #9e1570;
}

.tt-card-actions {
    position: relative;
    z-index: 3;
    flex-shrink: 0;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.tt-card-meta {
    font-size: 0.78rem;
    color: var(--rz-text-secondary-color, #64748b);
    margin-top: 0.15rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
}

.tt-card-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-top: 0.15rem;
}

.tt-card-form-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-text-secondary-color, #94a3b8);
}

.tt-card-form .tt-streak {
    margin: 0;
}

.tt-list-empty {
    padding: 1.25rem 1rem;
    text-align: center;
    background: var(--rz-base-50, #f8fafc);
    border: 1px dashed var(--rz-base-300, #cbd5e1);
    border-radius: 10px;
}

.tt-card-action-btn.rz-button {
    min-width: 2.15rem !important;
    width: 2.15rem !important;
    height: 2.15rem !important;
    padding: 0 !important;
    border-radius: 8px !important;
}

.tt-card-action-btn--danger.rz-button {
    opacity: 0.92;
}

@media (max-width: 640px) {
    .tt-card {
        flex-direction: column;
        align-items: stretch;
    }

    .tt-card-actions {
        justify-content: flex-end;
        padding-top: 0.35rem;
        border-top: 1px solid var(--rz-base-100, #f1f5f9);
    }
}

.tt-card-warning {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #b94a48;
}

.tt-refresh-status-success-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.tt-refresh-status-success-title {
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.tt-refresh-status-info-btn {
    flex: 0 0 auto;
    line-height: 1;
    padding: 0.1rem 0.25rem !important;
    color: inherit !important;
    opacity: 0.85;
}

.tt-refresh-status-info-btn:hover,
.tt-refresh-status-info-btn[aria-expanded="true"] {
    opacity: 1;
}

.tt-refresh-status-updates li + li {
    margin-top: 0.2rem;
}

.tt-refresh-status-error-title {
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.tt-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-source-link {
    color: var(--rz-primary, #2e7d32);
    text-decoration: none;
}
.tt-source-link:hover { text-decoration: underline; }

.tt-roster-stat {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Player name + C / VC / WK badges (roster, setup, opportunities). */
.tt-player-name-line {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.55rem;
    max-width: 100%;
}

.tt-player-name {
    margin-right: 0.1rem;
}

.tt-player-name-link {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: var(--rz-primary, #2e7d32);
    cursor: pointer;
    text-align: left;
}

.tt-player-name-link:hover {
    text-decoration: underline;
}

.player-profile-link {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: var(--rz-primary, #2e7d32);
    cursor: pointer;
    text-align: left;
}

.player-profile-link:hover {
    text-decoration: underline;
}

.messaging-player-link {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
    display: inline;
}

.messaging-player-link:hover {
    text-decoration: underline;
}

.schedule-mapping-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.35;
    flex-shrink: 0;
    white-space: nowrap;
}

.schedule-mapping-badge-unmapped {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fb923c;
}

.schedule-matrix-player-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.35rem;
    max-width: 100%;
}

.tt-player-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    padding: 0.14rem 0.45rem;
    border-radius: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
    flex-shrink: 0;
}

.tt-player-badge--captain {
    background: #0d6efd;
}

.tt-player-badge--vc {
    background: #6f42c1;
}

.tt-player-badge--wk {
    background: #198754;
}

.tt-roster-photo-header,
.tt-roster-photo-cell {
    width: 48px;
    min-width: 48px;
    text-align: center;
    padding-right: 0.25rem;
}

.tt-roster-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--rz-base-400, #b0b0b0);
    background: var(--rz-base-100, #fafafa);
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.tt-roster-thumb-placeholder {
    border-style: dashed;
    background: var(--rz-base-200, #f1f1f1);
    color: var(--rz-text-tertiary-color, #888);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tt-roster-thumb-placeholder .rz-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.tt-link-source {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-schedule-note {
    margin: 0.25rem 0 0.75rem 0;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-left: 3px solid #2e7d32;
    border-radius: 4px;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-fixture-group {
    margin: 0.5rem 0 1rem 0;
}

.tt-fixture-group-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.4rem 0 0.3rem 0;
    color: var(--rz-text-color, #2d2d2d);
}

.tt-fixture-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border: 1px solid #e4e6ea;
    border-radius: 6px;
    background: #fff;
    margin-bottom: 0.4rem;
}

.tt-fixture-scheduled {
    border-left: 3px solid #2e7d32;
}

.tt-fixture-result {
    border-left: 3px solid #6c757d;
}

.tt-fixture-has-outcome {
    grid-template-columns: 3.75rem auto 1fr auto;
}

.tt-fixture-outcome {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 6px;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    align-self: center;
    user-select: none;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.tt-fixture-outcome.tt-fixture-outcome-win {
    background: #2e7d32;
}

.tt-fixture-outcome.tt-fixture-outcome-loss {
    background: #c62828;
}

.tt-fixture-outcome.tt-fixture-outcome-neutral {
    background: #757575;
    font-size: 1.65rem;
}

.tt-fixture-outcomes-stacked {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    align-self: center;
}

.tt-fixture-outcomes-stacked .tt-fixture-outcome {
    width: 2.85rem;
    height: 2.85rem;
    font-size: 1.55rem;
}

.tt-fixture-card--pool-derby.tt-fixture-has-outcome {
    grid-template-columns: 3.25rem auto 1fr auto;
}

.tt-fixture-matchup-derby {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tt-fixture-team-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    font-size: 0.9rem;
}

.tt-fixture-team-row--winner .tt-fixture-team-name {
    color: var(--rz-text-color, #212529);
}

.tt-fixture-team-name {
    font-weight: 600;
}

.tt-fixture-inline-outcome {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.2rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    flex-shrink: 0;
}

.tt-fixture-inline-outcome-win {
    background: #2e7d32;
}

.tt-fixture-inline-outcome-loss {
    background: #c62828;
}

.tt-fixture-inline-outcome-neutral {
    background: #757575;
}

.tt-fixture-team-score {
    font-size: 0.82rem;
    color: var(--rz-text-secondary-color, #6c757d);
    font-variant-numeric: tabular-nums;
}

.tt-fixture-date {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--rz-text-secondary-color, #6c757d);
    min-width: 5.5rem;
}

.tt-fixture-time {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--rz-text-secondary-color, #6c757d);
    margin-top: 0.1rem;
}

.tt-back-nav {
    margin-bottom: 0.5rem;
}

.tt-back-link {
    font-size: 0.9rem;
    color: var(--rz-primary, #0d6efd);
    text-decoration: none;
}

.tt-back-link:hover {
    text-decoration: underline;
}

.tt-leadership {
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.92rem;
    margin: 0.15rem 0 0.35rem 0;
}

.tt-leadership-sep {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.tt-streak {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin: 0.2rem 0 0.6rem 0;
    flex-wrap: wrap;
}

.tt-streak-card {
    margin: 0.25rem 0 0.1rem 0;
}

.tt-streak-card .tt-streak-ball {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.72rem;
}

.tt-card-inactive {
    opacity: 0.85;
    background: var(--rz-base-200, #f8f9fa);
    border-style: dashed;
}

.tt-setup-dialog {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: min(640px, 92vw);
    max-height: min(80vh, 720px);
}

.tt-plan-create-dialog {
    min-width: min(680px, 94vw);
}

.tt-plan-create-nav {
    margin-bottom: 0.75rem;
}

.tt-plan-create-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.tt-plan-section {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.tt-plan-section--extract {
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 12px;
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}

.tt-plan-section-title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-base-600, #475569);
}

.tt-plan-section-hint {
    margin: -0.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--rz-base-500, #64748b);
    line-height: 1.4;
}

.tt-plan-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.tt-plan-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.tt-plan-field .form-label {
    margin-bottom: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--rz-base-700, #334155);
}

.tt-plan-dates-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.tt-plan-extract-actions {
    display: grid;
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: stretch;
}

.tt-plan-extract-btn {
    white-space: nowrap;
}

.tt-plan-file-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.25rem;
    padding: 0 0.75rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    color: var(--rz-base-700, #334155);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.tt-plan-file-picker:hover {
    border-color: var(--rz-base-300, #cbd5e1);
    background: var(--rz-base-50, #f8fafc);
}

.tt-plan-file-picker span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt-plan-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.tt-plan-extract-status {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--rz-base-500, #64748b);
}

.tt-plan-warnings {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8125rem;
    color: #b45309;
}

.tt-plan-age-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tt-plan-age-head,
.tt-plan-age-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.5rem 2rem;
    gap: 0.5rem;
    align-items: center;
}

.tt-plan-age-head {
    padding: 0 0.1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-base-400, #94a3b8);
}

.tt-plan-age-spacer {
    width: 2rem;
    height: 1px;
}

.tt-plan-review {
    padding: 0.5rem 0.15rem;
}

.tt-plan-review-name {
    margin: 0 0 0.35rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--rz-base-900, #0f172a);
}

.tt-plan-review-meta {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--rz-base-500, #64748b);
}

.tt-plan-review-groups {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.tt-plan-review-groups li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 8px;
    background: var(--rz-base-50, #f8fafc);
    font-size: 0.875rem;
}

.tt-plan-review-groups strong {
    color: var(--rz-base-800, #1e293b);
}

.tt-plan-review-groups span {
    color: var(--rz-base-600, #475569);
}

.tt-plan-review-notes {
    margin: 1rem 0 0;
    padding: 0.65rem 0.75rem;
    border-left: 3px solid var(--rz-base-300, #cbd5e1);
    font-size: 0.875rem;
    color: var(--rz-base-700, #334155);
    white-space: pre-wrap;
}

.tt-plan-create-actions {
    justify-content: space-between;
    align-items: center;
}

.tt-plan-create-actions-right {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .tt-plan-create-dialog {
        min-width: 0;
    }

    .tt-plan-dates-row,
    .tt-plan-extract-actions {
        grid-template-columns: 1fr;
    }

    .tt-plan-age-head,
    .tt-plan-age-row {
        grid-template-columns: minmax(0, 1fr) 4.5rem 2rem;
    }
}

.tt-plan-squads-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.tt-plan-squad-nav {
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 10rem);
    overflow-y: auto;
    padding: 0.65rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 12px;
    background: var(--rz-base-50, #f8fafc);
}

.tt-plan-squad-nav-group + .tt-plan-squad-nav-group {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--rz-base-200, #e2e8f0);
}

.tt-plan-squad-nav-age {
    padding: 0 0.35rem 0.45rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rz-base-500, #64748b);
}

.tt-plan-squad-nav-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    margin-bottom: 0.35rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.tt-plan-squad-nav-item:hover {
    background: #fff;
    border-color: var(--rz-base-200, #e2e8f0);
}

.tt-plan-squad-nav-item--active {
    background: #fff;
    border-color: var(--rz-primary, #6366f1);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.tt-plan-squad-nav-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rz-base-900, #0f172a);
    line-height: 1.25;
}

.tt-plan-squad-nav-meta {
    font-size: 0.75rem;
    color: var(--rz-base-500, #64748b);
}

.tt-plan-squad-nav-item--active .tt-plan-squad-nav-name {
    color: var(--rz-primary, #6366f1);
}

.tt-plan-squad-main {
    min-width: 0;
}

.tt-plan-squad-mobile-picker {
    margin-bottom: 0.75rem;
}

.tt-plan-squad-mobile-picker .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.tt-plan-squad-card {
    min-width: 0;
}

.tt-import-roster-text {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.45;
    resize: vertical;
    min-height: 12rem;
}

.tt-plan-squad-card-title-wrap {
    min-width: 0;
}

.tt-plan-squad-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tt-plan-squad-rename-btn {
    border: none;
    background: transparent;
    color: var(--rz-base-500, #6c757d);
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
}

.tt-plan-squad-rename-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--rz-base-700, #495057);
}

.tt-plan-squad-rename {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.tt-plan-squad-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.65rem;
    font-size: 0.8125rem;
    color: var(--rz-base-600, #5c6670);
}

.tt-plan-squad-summary-item strong {
    color: var(--rz-base-900, #212529);
    font-weight: 600;
}

.tt-plan-squad-leadership {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--rz-base-200, #e2e8f0);
}

.tt-plan-squad-leadership-field {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.tt-plan-squad-leadership-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-base-500, #64748b);
}

.tt-plan-squad-leadership-select {
    min-width: 11rem;
    max-width: 16rem;
    font-size: 0.8125rem;
    padding: 0.35rem 1.65rem 0.35rem 0.55rem;
    border: 1px solid var(--rz-base-300, #cbd5e1);
    border-radius: 8px;
    background: #fff;
    color: var(--rz-base-900, #212529);
}

.tt-squad-cell--role-reserve {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tt-squad-role-reserve-badge {
    display: inline-flex;
    align-items: center;
    min-height: 2.125rem;
    padding: 0 0.65rem;
    border-radius: 6px;
    background: rgba(108, 117, 125, 0.12);
    color: var(--rz-base-700, #495057);
    font-size: 0.8125rem;
    font-weight: 600;
}

.tt-squad-grid-row.tt-squad-slot--reserve {
    background: rgba(108, 117, 125, 0.04);
}

.tt-squad-board-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tt-squad-add-reserve {
    background: rgba(108, 117, 125, 0.08);
}

.tt-plan-squad-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--rz-base-200, #e2e8f0);
}

.tt-plan-squad-card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--rz-base-900, #0f172a);
}

.tt-plan-squad-card-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    color: var(--rz-base-500, #64748b);
}

.tt-plan-squad-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.tt-plan-invite-expiry {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-right: 0.25rem;
    font-size: 0.8125rem;
    color: var(--rz-base-600, #475569);
}

.tt-plan-invite-expiry-label {
    white-space: nowrap;
}

.tt-plan-invite-expiry-input {
    border: 1px solid var(--rz-base-300, #cbd5e1);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8125rem;
    background: #fff;
}

.tt-plan-squad-empty {
    padding: 2rem 1rem;
    border: 1px dashed var(--rz-base-300, #cbd5e1);
    border-radius: 12px;
    text-align: center;
    color: var(--rz-base-500, #64748b);
    background: var(--rz-base-50, #f8fafc);
}

@media (max-width: 991px) {
    .tt-plan-squads-layout {
        grid-template-columns: 1fr;
    }

    .tt-plan-squad-nav {
        display: none;
    }
}

.tt-squad-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.tt-squad-board--unified {
    max-width: none;
}

.tt-squad-board-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.tt-squad-board-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--rz-base-500, #64748b);
    line-height: 1.4;
    max-width: 36rem;
}

.tt-squad-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    flex-shrink: 0;
}

.tt-squad-sort-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-base-500, #64748b);
}

.tt-squad-sort-select {
    appearance: none;
    width: 8.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
    padding: 0.35rem 1.65rem 0.35rem 0.55rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 0.45rem center;
    color: var(--rz-base-800, #1e293b);
    cursor: pointer;
}

.tt-squad-sort-select:focus {
    outline: none;
    border-color: var(--rz-primary, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

/* Shared column template for header + rows */
.tt-squad-grid-head,
.tt-squad-grid-row {
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr) 4.25rem 6.5rem 4.5rem;
    gap: 0.65rem;
    align-items: center;
}

.tt-squad-grid-head {
    padding: 0 0.85rem 0.4rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rz-base-400, #94a3b8);
}

.tt-squad-grid-row {
    padding: 0.4rem 0.85rem;
    margin-bottom: 0.35rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tt-squad-grid-row:hover {
    border-color: var(--rz-base-300, #cbd5e1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.tt-squad-grid-row.tt-squad-slot--filled {
    background: linear-gradient(to right, #fff, #fafbff);
}

.tt-squad-grid-row.tt-squad-slot--drop-target {
    border-color: var(--rz-primary, #6366f1);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.tt-squad-cell--player {
    position: relative;
    min-width: 0;
}

.tt-squad-cell--row-actions,
.tt-squad-cell--staff-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
}

.tt-squad-cell--status {
    display: flex;
    justify-content: flex-start;
}

.tt-squad-role-select {
    appearance: none;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    padding: 0.45rem 1.65rem 0.45rem 0.55rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 8px;
    background: var(--rz-base-50, #f8fafc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 0.45rem center;
    color: var(--rz-base-800, #1e293b);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt-squad-role-select:focus {
    outline: none;
    border-color: var(--rz-primary, #6366f1);
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.tt-squad-role-select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.tt-squad-slot-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    color: var(--rz-base-900, #0f172a);
}

.tt-squad-slot-input:focus {
    outline: none;
    border-color: var(--rz-primary, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.tt-squad-slot-input::placeholder {
    color: var(--rz-base-400, #94a3b8);
    font-weight: 400;
}

.tt-squad-player-chip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 2.125rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    cursor: grab;
    user-select: none;
}

.tt-squad-player-chip:active {
    cursor: grabbing;
}

.tt-squad-player-name {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rz-base-900, #0f172a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt-squad-player-age {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--rz-base-500, #64748b);
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: var(--rz-base-100, #f1f5f9);
}

.tt-squad-player-warn {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #b45309;
}

.tt-squad-parent-note {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.25rem;
    padding: 0.3rem 0.45rem;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.18);
    font-size: 0.75rem;
    line-height: 1.35;
    color: #1e40af;
}

.tt-squad-parent-note-icon {
    flex: 0 0 auto;
    margin-top: 0.1rem;
    font-size: 0.7rem;
    opacity: 0.85;
}

.tt-squad-parent-note-text {
    flex: 1 1 auto;
    min-width: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.tt-squad-leadership-btn {
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0 0.35rem;
    border: 1px solid var(--rz-base-300, #cbd5e1);
    border-radius: 6px;
    background: #fff;
    color: var(--rz-base-600, #475569);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.tt-squad-leadership-btn:hover:not(:disabled) {
    border-color: var(--rz-base-400, #94a3b8);
    background: var(--rz-base-50, #f8fafc);
}

.tt-squad-leadership-btn--active.tt-squad-leadership-btn--captain {
    border-color: #b45309;
    background: #fef3c7;
    color: #92400e;
}

.tt-squad-leadership-btn--active.tt-squad-leadership-btn--vc {
    border-color: #0369a1;
    background: #e0f2fe;
    color: #075985;
}

.tt-squad-leadership-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tt-squad-tag {
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
    background: var(--rz-base-100, #f1f5f9);
    color: var(--rz-base-600, #475569);
}

.tt-squad-tag--guest {
    background: #ede9fe;
    color: #5b21b6;
}

.tt-squad-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tt-squad-status--empty {
    background: var(--rz-base-100, #f1f5f9);
    color: var(--rz-base-500, #64748b);
}

.tt-squad-status--proposed {
    background: #fef3c7;
    color: #92400e;
}

.tt-squad-status--invited {
    background: #ede9fe;
    color: #5b21b6;
}

.tt-squad-status--available {
    background: #dcfce7;
    color: #166534;
}

.tt-squad-status--declined {
    background: #fee2e2;
    color: #991b1b;
}

.tt-squad-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--rz-base-500, #64748b);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.tt-squad-icon-btn:hover:not(:disabled) {
    background: var(--rz-base-100, #f1f5f9);
    color: var(--rz-base-800, #1e293b);
}

.tt-squad-icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.tt-squad-icon-btn--danger:hover:not(:disabled) {
    background: #fef2f2;
    color: #dc2626;
}

.tt-squad-icon-btn--confirm {
    color: #16a34a;
}

.tt-squad-icon-btn--confirm:hover:not(:disabled) {
    background: #f0fdf4;
    color: #15803d;
}

.tt-squad-board-footer {
    margin-top: 0.65rem;
    padding-left: 0.15rem;
}

.tt-squad-add-role {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border: 1px dashed var(--rz-base-300, #cbd5e1);
    border-radius: 8px;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--rz-base-600, #475569);
    cursor: pointer;
    transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.tt-squad-add-role:hover:not(:disabled) {
    border-color: var(--rz-primary, #6366f1);
    color: var(--rz-primary, #6366f1);
    background: rgba(99, 102, 241, 0.04);
}

.tt-squad-add-role:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .tt-squad-board-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .tt-squad-grid-head {
        display: none;
    }

    .tt-squad-grid-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "role role"
            "player player"
            "status actions";
        gap: 0.45rem 0.5rem;
        padding: 0.65rem;
    }

    .tt-squad-cell--role { grid-area: role; }
    .tt-squad-cell--player { grid-area: player; }
    .tt-squad-cell--row-actions { display: none; }
    .tt-squad-cell--status { grid-area: status; }
    .tt-squad-cell--staff-actions { grid-area: actions; }
}

.tt-squad-workspace-status {
    min-width: 0;
}

.tt-squad-status-table {
    overflow: visible;
}

.tt-squad-workspace-assign .tt-squad-board {
    max-width: none;
}

@media (max-width: 1100px) {
    .tt-squad-workspace {
        grid-template-columns: 1fr;
    }
}

.tt-squad-board {
    max-width: none;
}

.tt-squad-board--unified .tt-squad-board-slots,
.tt-squad-board-slots {
    overflow: visible;
}

.tt-squad-board--dragging .tt-squad-board-slots,
.tt-squad-board--dragging .tt-squad-player-pool {
    scroll-behavior: auto;
}

.tt-squad-board--dragging .tt-squad-grid-row:not(.tt-squad-slot--filled) {
    border-color: var(--rz-base-300, #cbd5e1);
}

.tt-squad-slot-assignment--draggable {
    /* alias for drag JS */
}

.tt-squad-slot--clickable {
    cursor: pointer;
    border-color: var(--rz-primary, #6366f1);
}

.tt-squad-slot--clickable:hover {
    background: rgba(99, 102, 241, 0.04);
}

.tt-squad-slot-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 20;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--rz-base-300, #cbd5e1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.tt-squad-slot-suggestion {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.65rem;
    border: 0;
    background: transparent;
    font-size: 0.875rem;
}

.tt-squad-slot-suggestion:hover,
.tt-squad-slot-suggestion:focus {
    background: rgba(99, 102, 241, 0.08);
}

.tt-squad-player-pool,
.tt-assign-player-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 320px;
    overflow: auto;
}

.tt-squad-player-chip {
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--rz-base-200, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    cursor: grab;
    user-select: none;
    font-size: 0.875rem;
}

.tt-squad-player-chip--selected {
    border-color: var(--rz-primary, #6366f1);
    background: rgba(99, 102, 241, 0.08);
}

.tt-squad-player-chip--assigned {
    opacity: 0.45;
    cursor: not-allowed;
}

.tt-assign-drop-zone {
    padding: 1rem;
    border: 2px dashed var(--rz-base-300, #cbd5e1);
    border-radius: 10px;
    text-align: center;
    background: var(--rz-base-50, #f8fafc);
}

.tt-assign-drop-zone--active {
    border-color: var(--rz-primary, #6366f1);
    background: rgba(99, 102, 241, 0.06);
}

.tt-highlight-matches {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tt-highlight-match {
    border: 1px solid #e4e6ea;
    border-radius: 10px;
    background: #fafbfc;
    overflow: hidden;
}

.tt-highlight-match-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(196, 30, 152, 0.08) 0%, rgba(158, 21, 112, 0.04) 100%);
    border-bottom: 1px solid #e4e6ea;
}

.tt-highlight-match-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.tt-highlight-match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-highlight-match-result {
    font-weight: 500;
    color: var(--rz-text-color, #212529);
}

.tt-highlight-player-block {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e8eaed;
    background: #fff;
}

.tt-highlight-player-block:last-child {
    border-bottom: none;
}

.tt-highlight-player-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tt-highlight-player-name {
    font-weight: 700;
    font-size: 1rem;
}

.tt-highlight-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tt-highlight-milestone-facts {
    margin: 0.5rem 0 0.65rem;
    padding-left: 1.15rem;
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-highlight-parent-message {
    margin: 0 0 0.5rem;
    padding: 0.65rem 0.85rem;
    border-left: 3px solid #c41e98;
    background: #fdf6fb;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--rz-text-color, #212529);
}

.tt-highlight-send-btn {
    margin-top: 0.15rem;
}

.tt-highlight-send-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-highlight-scorecard-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c41e98;
    text-decoration: none;
}

.tt-highlight-scorecard-link:hover {
    text-decoration: underline;
}

.tt-highlight-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tt-highlight-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem 1rem;
    align-items: start;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e4e6ea;
    border-radius: 8px;
    background: #fff;
}

.tt-highlight-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff;
    background: linear-gradient(135deg, #c41e98 0%, #9e1570 100%);
}

.tt-highlight-badge--century { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }
.tt-highlight-badge--fifty { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.tt-highlight-badge--wickets { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.tt-highlight-badge--mom { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }

.tt-highlight-player {
    font-weight: 600;
}

.tt-highlight-meta {
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-setup-panel {
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 0.25rem;
}

.tt-setup-roster-table-wrap {
    max-height: 42vh;
    overflow: auto;
    border: 1px solid var(--rz-base-300, #dee2e6);
    border-radius: 6px;
}

.tt-setup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
    border-top: 1px solid var(--rz-base-300, #dee2e6);
}

.tt-add-url-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tt-add-wizard-summary {
    padding: 0.5rem 0.75rem;
    background: var(--rz-base-200, #f8f9fa);
    border-radius: 6px;
    font-size: 0.9rem;
}

/* The dialog body scrolls, and the summary + step tabs live inside it — so scrolling used to
   slice the tab strip in half behind the title. Pin both to the top of the scroll area. */
.tt-add-wizard-summary {
    position: sticky;
    top: 0;
    z-index: 3;
}

.tt-add-wizard-nav {
    flex-wrap: nowrap;
    position: sticky;
    /* Sits directly beneath the summary bar, which is ~2.1rem tall including its padding. */
    top: 2.1rem;
    z-index: 2;
    background: var(--rz-base-background-color, #fff);
    padding-bottom: 0.25rem;
}

.tt-add-wizard-nav .portal-tab-link:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tt-add-age-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tt-add-age-suggest {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tt-shared-roster-option {
    display: grid;
    /* Checkbox column then text, so the hint lines up under the label instead of being
       hand-indented — and the label never butts straight against the checkbox. */
    grid-template-columns: auto 1fr;
    column-gap: 0.5rem;
    row-gap: 0.2rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--rz-base-300, #dee2e6);
    border-radius: 6px;
    background: var(--rz-base-100, #fff);
}

.tt-shared-roster-label {
    margin-bottom: 0;
    line-height: 1.3;
}

.tt-shared-roster-hint {
    grid-column: 2;
    line-height: 1.35;
}

.tt-shared-roster-note {
    margin-top: -0.25rem;
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    color: var(--rz-base-600, #6c757d);
}

.tt-league-highlights-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 1rem;
}

.tt-league-nav {
    margin-bottom: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(181, 27, 133, 0.12);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(181, 27, 133, 0.04) 0%, rgba(13, 110, 253, 0.04) 100%);
}

.tt-league-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.85rem;
}

.tt-league-nav-link {
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
}

.tt-league-nav-link--primary {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #c41e98 0%, #9e1570 100%);
    color: #fff !important;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(181, 27, 133, 0.25);
}

.tt-league-nav-link--primary:hover {
    filter: brightness(0.95);
    text-decoration: none;
}

.tt-shared-league-banner {
    padding: 0.55rem 0.75rem;
    border-left: 3px solid rgba(13, 110, 253, 0.45);
    background: rgba(13, 110, 253, 0.05);
    border-radius: 0.35rem;
}

.tt-fixture-squad {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-primary, #0d6efd);
    margin-bottom: 0.1rem;
}

.tt-add-team-picker-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
}

/* Club-wide sibling-team picker in the add-team wizard (step 2). */
.tt-club-teams {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 0.85rem;
}

.tt-club-series {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.35rem;
    padding: 0.4rem 0.6rem;
}

.tt-club-series-summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    list-style-position: outside;
}

.tt-club-series[open] > .tt-club-series-summary {
    margin-bottom: 0.4rem;
}

/* One row shape for both states. The leading slot is a fixed width whether or not it holds a
   checkbox, so already-tracked names line up with selectable ones instead of being padded by a
   guess at the checkbox's width. */
.tt-club-team-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
    min-height: 1.75rem;
    padding-left: 0.5rem;
}

.tt-club-team-row--pick {
    cursor: pointer;
}

.tt-club-team-lead {
    flex: 0 0 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.tt-club-team-label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    line-height: 1.35;
    min-width: 0;
}

/* Radzen renders the badge with its own line-height; pin it so it sits on the text baseline
   rather than riding above it. */
.tt-club-team-label .badge {
    line-height: 1;
    padding: 0.25em 0.45em;
    font-size: 0.7rem;
    vertical-align: middle;
}

.tt-club-teams-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tt-league-highlights-link {
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
}

.tt-highlight-match-team {
    font-weight: 600;
    color: var(--rz-primary, #0d6efd);
}

.opp-grid-team {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--rz-primary, #0d6efd);
    line-height: 1.2;
}

.tt-streak-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.tt-streak-win {
    background: #2e7d32;
}

.tt-streak-loss {
    background: #c62828;
}

.tt-streak-neutral {
    background: #757575;
}

a.tt-streak-ball.tt-streak-link {
    text-decoration: none;
    color: #fff;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

a.tt-streak-ball.tt-streak-link:hover {
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.tt-streak-upcoming {
    background: #fff;
    border: 2px dashed #bdbdbd;
    box-shadow: none;
}

a.tt-streak-ball.tt-streak-upcoming:hover {
    border-color: var(--rz-primary, #0d6efd);
    background: #f0f6ff;
    transform: translateY(-1px) scale(1.06);
}

.tt-fixture-ground {
    font-size: 0.78rem;
    color: var(--rz-text-secondary-color, #6c757d);
    margin-top: 0.1rem;
}

.tt-fixture-vs {
    font-weight: 600;
}

.tt-fixture-round {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    margin-left: 0.35rem;
    vertical-align: middle;
    line-height: 1.2;
}

.tt-fixture-round-semi {
    background: #fef3c7;
    color: #92400e;
}

.tt-fixture-round-final {
    background: #fce7f3;
    color: #9d174d;
}

.tt-fixture-result-text {
    font-size: 0.82rem;
    color: var(--rz-text-secondary-color, #6c757d);
    margin-top: 0.15rem;
}

.tt-fixture-score {
    margin-top: 0.15rem;
    font-size: 0.82rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tt-fixture-scorecard {
    font-size: 0.8rem;
    color: var(--rz-primary, #2e7d32);
    text-decoration: none;
    white-space: nowrap;
}
.tt-fixture-scorecard:hover { text-decoration: underline; }

.tt-fixture-detail-link {
    display: inline-block;
    margin-top: 0.55rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--rz-primary, #0d6efd);
    text-decoration: none;
}

.tt-fixture-detail-link:hover {
    text-decoration: underline;
}

.tt-back-sep {
    margin: 0 0.45rem;
    color: var(--rz-text-secondary-color, #6c757d);
    opacity: 0.6;
}

.tt-fixture-detail-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tt-fixture-detail-heading {
    margin-bottom: 0.85rem;
}

.tt-fixture-detail-age {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.35rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tt-fixture-detail-title {
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 700;
    line-height: 1.25;
}

.tt-fixture-detail-vs {
    color: var(--rz-text-secondary-color, #6c757d);
    font-weight: 600;
}

.tt-fixture-detail-subtitle {
    margin-top: 0.35rem;
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.92rem;
}

.tt-fixture-detail-status {
    font-weight: 600;
}

.tt-fixture-detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.65rem 1rem;
}

.tt-fixture-detail-meta {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 8px;
    background: #fff;
}

.tt-fixture-detail-meta-icon {
    margin-top: 0.1rem;
    color: var(--rz-primary, #0d6efd);
}

.tt-fixture-detail-meta-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-fixture-detail-meta-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.tt-fixture-detail-alert {
    margin-bottom: 1rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    background: linear-gradient(165deg, rgba(255, 251, 235, 0.92) 0%, #fff 52%);
}

.tt-fixture-detail-alert-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.45rem;
    color: #78350f;
    font-size: 0.88rem;
}

.tt-fixture-detail-alert-when {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 500;
    color: #92400e;
}

.tt-fixture-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 900px) {
    .tt-fixture-detail-grid {
        grid-template-columns: 1fr;
    }
}

.tt-fixture-detail-panel {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tt-fixture-detail-panel--wide {
    grid-column: 1 / -1;
}

.tt-fixture-detail-panel--future {
    border-style: dashed;
    background: #fafafa;
}

.tt-fixture-detail-panel-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.tt-fixture-detail-panel-icon {
    color: var(--rz-primary, #0d6efd);
}

.tt-fixture-detail-panel-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tt-fixture-detail-panel-foot {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.tt-fixture-detail-ground-name {
    font-size: 1rem;
    font-weight: 700;
}

.tt-fixture-detail-ground-address {
    font-size: 0.88rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-fixture-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-top: 0.85rem;
}

.tt-fixture-detail-actions--inline {
    margin-top: 0;
}

.tt-fixture-detail-cricclubs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.tt-fixture-detail-cricclubs-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-fixture-detail-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--rz-primary, #0d6efd);
    text-decoration: none;
}

.tt-fixture-detail-action:hover {
    text-decoration: underline;
}

.tt-fixture-detail-action-icon {
    font-size: 1rem;
}

.tt-fixture-detail-dl {
    display: grid;
    gap: 0.55rem;
}

.tt-fixture-detail-dl dt {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rz-text-secondary-color, #6c757d);
    margin: 0;
}

.tt-fixture-detail-dl dd {
    margin: 0.1rem 0 0;
    font-size: 0.92rem;
}

.tt-fixture-detail-inline-link {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--rz-primary, #0d6efd);
    text-decoration: none;
    white-space: nowrap;
}

.tt-fixture-detail-inline-link:hover {
    text-decoration: underline;
}

.tt-fixture-detail-future-note {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.tt-fixture-detail-soon {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tt-fixture-detail-alert .staff-dashboard-schedule-alert-change:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.tt-fixture-detail-alert .staff-dashboard-schedule-alert-change + .staff-dashboard-schedule-alert-change {
    margin-top: 0.35rem;
}

/* Player tournament chips (used on DialogPlayerInfo + ParentPlayerDetail) */
.tt-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.25rem 0 0.5rem 0;
}

.tt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #eef5ee;
    color: #1f5532;
    border: 1px solid #c8e0c8;
    text-decoration: none;
    font-size: 0.82rem;
}
.tt-chip:hover { text-decoration: underline; }

.tt-chip-next {
    display: block;
    font-size: 0.78rem;
    color: var(--rz-text-secondary-color, #6c757d);
    margin-top: 0.15rem;
}

/* ===== Opportunities tab (COI v1.6) ===== */
.opp-section {
    font-size: 0.92rem;
}

.opp-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rz-base-300, #e9ecef);
    margin-bottom: 1rem;
}

.opp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.85rem;
}

.opp-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.opp-sep {
    opacity: 0.55;
}

.opp-dim {
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.85rem;
}

.opp-warn {
    color: #b26500;
    font-weight: 600;
}

.opp-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.25rem 0 0.25rem 0;
}

.opp-section-help {
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.85rem;
    margin: 0 0 0.6rem 0;
}

.opp-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--rz-base-300, #e9ecef);
    border-radius: 4px;
}

.opp-rank-table {
    margin-bottom: 0;
    font-size: 0.88rem;
}

.opp-rank-table th, .opp-rank-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.opp-rank-table th.num, .opp-rank-table td.num {
    text-align: right;
}

.opp-academy {
    margin-left: 0.4rem;
    font-size: 0.78rem;
    color: var(--rz-text-secondary-color, #6c757d);
    font-style: italic;
}

.opp-toi-pill {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.2;
    min-width: 2.4rem;
    text-align: center;
}

.opp-band-zero          { background: #f1f3f5; color: #6c757d; border: 1px solid #dee2e6; }
.opp-band-minimal       { background: #fdecea; color: #842029; border: 1px solid #f5c2c7; }
.opp-band-oneaxis-partial { background: #fff3cd; color: #664d03; border: 1px solid #ffecb5; }
.opp-band-oneaxis       { background: #d1ecf1; color: #055160; border: 1px solid #bee5eb; }
.opp-band-twoaxis-partial { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.opp-band-twoaxis       { background: #b9deb1; color: #0f4922; border: 1px solid #93c98a; }

.opp-quad {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}
.opp-quad-workhorse              { background: #b9deb1; color: #0f4922; }
.opp-quad-usage_red_flag         { background: #fdecea; color: #842029; }
.opp-quad-efficient_low_attendance { background: #d1ecf1; color: #055160; }
.opp-quad-attendance_limited     { background: #f1f3f5; color: #6c757d; }
.opp-quad-unclassified           { background: #f1f3f5; color: #6c757d; }

/* Game-by-game grid */
.opp-grid-table {
    margin-bottom: 0;
    font-size: 0.84rem;
    border-collapse: separate;
    border-spacing: 0;
}

.opp-grid-table th, .opp-grid-table td {
    text-align: center;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--rz-base-300, #e9ecef);
}

.opp-grid-table th.num, .opp-grid-table td.num {
    text-align: right;
}

.opp-grid-table .sticky-col {
    position: sticky;
    left: 0;
    background: var(--rz-base-100, #fff);
    text-align: left;
    font-weight: 600;
    z-index: 1;
    border-right: 1px solid var(--rz-base-300, #e9ecef);
}

.opp-grid-table tbody tr:nth-child(even) .sticky-col {
    background: var(--rz-base-200, #f8f9fa);
}

.opp-grid-match {
    font-size: 0.78rem;
    font-weight: 600;
    min-width: 5.5rem;
    line-height: 1.2;
}

.opp-grid-opponent {
    font-weight: 400;
    color: var(--rz-text-secondary-color, #6c757d);
    font-size: 0.75rem;
}

.opp-grid-cell {
    font-weight: 600;
}

.opp-grid-absent {
    color: #adb5bd;
    font-weight: 400;
}

.opp-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
    align-items: center;
}

.opp-legend-swatch {
    font-size: 0.75rem !important;
    min-width: 3.2rem;
}

/* AI analysis section */
.opp-ai-byline {
    margin: 0 0 0.5rem 0;
    font-size: 0.82rem;
}

.opp-ai-summary {
    background: var(--rz-base-200, #f8f9fa);
    border-left: 3px solid var(--rz-primary, #2e7d32);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.opp-ai-heading {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1rem 0 0.35rem 0;
    padding-left: 0.5rem;
    border-left: 3px solid transparent;
}

.opp-ai-red     { border-left-color: #c62828; color: #842029; }
.opp-ai-green   { border-left-color: #2e7d32; color: #0f4922; }
.opp-ai-neutral { border-left-color: #6c757d; color: #495057; }
.opp-ai-action  { border-left-color: #0d6efd; color: #084298; }

.opp-ai-list {
    margin: 0 0 0.5rem 1.2rem;
    padding: 0;
    line-height: 1.5;
}

.opp-ai-list li {
    margin-bottom: 0.25rem;
}

/* =========================================================================
 * PIN kiosk gate. Rendered as a sibling of @Body so it sits *on top of* the
 * routed page without unmounting it — that's what keeps unsaved form input
 * intact across an idle lock/unlock cycle.
 * ======================================================================= */
.pin-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.pin-gate-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    padding: 1.75rem 2rem 2rem;
    width: min(420px, 96vw);
    text-align: center;
}

.pin-gate-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.pin-gate-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
    margin: 0.5rem 0 0.25rem;
}

.pin-gate-subtitle {
    color: #4b5563;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.pin-gate-cells {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.pin-gate-cell {
    width: 3rem;
    height: 3.5rem;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 1.75rem;
    text-align: center;
    font-weight: 700;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
    -moz-appearance: textfield;
}

.pin-gate-cell:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
    background: #ffffff;
}

.pin-gate-cell.pin-gate-cell--error {
    border-color: #dc2626;
    background: #fef2f2;
    color: #b91c1c;
    animation: pinShake 0.32s ease-in-out;
}

.pin-gate-cell::-webkit-outer-spin-button,
.pin-gate-cell::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pin-gate-error {
    color: #b91c1c;
    font-size: 0.9rem;
    margin: 0.5rem 0 0.85rem;
    min-height: 1.2em;
}

.pin-gate-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.pin-gate-key {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #111827;
    padding: 0.85rem 0;
    cursor: pointer;
    transition: background 0.1s ease, transform 0.05s ease;
}

.pin-gate-key:hover { background: #e5e7eb; }
.pin-gate-key:active { transform: scale(0.96); background: #d1d5db; }
.pin-gate-key--ghost { background: transparent; border-color: transparent; cursor: default; }
.pin-gate-key--ghost:hover { background: transparent; }
.pin-gate-key--ghost:active { transform: none; background: transparent; }
.pin-gate-key--action { color: #2563eb; }

.pin-gate-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 0.9rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.pin-gate-footer a {
    color: #2563eb;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    cursor: pointer;
}

/* A real, visible button on the PIN gate so an admin can decisively end the
   kiosk session (vs. PIN-switching to another staff member). It's outlined
   rather than primary-filled so it doesn't compete with the keypad. */
.pin-gate-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #b91c1c;
    background: #fff;
    border: 1px solid #b91c1c;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
}

.pin-gate-logout:hover:not(:disabled),
.pin-gate-logout:focus-visible:not(:disabled) {
    background: #b91c1c;
    color: #fff;
    outline: none;
}

.pin-gate-logout:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@keyframes pinShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Header notification bell (staff RadzenHeader + parent portal hero) */
.messaging-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: background 120ms ease, transform 80ms ease;
}

.messaging-bell-btn:hover,
.messaging-bell-btn:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    outline: none;
}

.messaging-bell-btn:active {
    transform: scale(0.96);
}

.messaging-bell-btn--active {
    background: rgba(255, 255, 255, 0.22);
}

.messaging-bell-icon {
    font-size: 1.35rem;
    color: inherit;
}

.messaging-bell-badge {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.85);
    pointer-events: none;
}

.messaging-bell-host {
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.messaging-bell-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: transparent;
}

.messaging-bell-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 1210;
    width: min(22rem, calc(100vw - 1.5rem));
    max-height: min(24rem, 70vh);
    overflow: auto;
    border-radius: 0.75rem;
    background: #fff;
    color: #1e293b;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

/* On phones the bell sits inboard of the avatar, so a right:0 anchor pushed
   the 22rem panel off the left edge of the screen (the "★ NOTIFICATIONS" row
   was clipped). Pin it to the viewport instead: fixed, full width minus a
   small gutter, dropping just below the shared header row (whose height is
   --parent-hero-inner + 2 * --parent-hero-vpad, plus the notch inset). */
@media (max-width: 576px) {
    .messaging-bell-dropdown {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px)
            + var(--parent-hero-inner, 3.25rem)
            + (2 * var(--parent-hero-vpad, 0.5rem))
            + 0.35rem);
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        max-height: min(70vh, 30rem);
    }
}

.messaging-bell-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.messaging-bell-dropdown-clearall {
    flex-shrink: 0;
    padding: 0.1rem 0.35rem;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #dc2626;
    cursor: pointer;
    border-radius: 0.35rem;
}

.messaging-bell-dropdown-clearall:hover,
.messaging-bell-dropdown-clearall:focus-visible {
    background: rgba(220, 38, 38, 0.08);
    outline: none;
}

.messaging-bell-dropdown-loading,
.messaging-bell-dropdown-empty {
    padding: 0.75rem 1rem 1rem;
    font-size: 0.9rem;
    color: #64748b;
}

.messaging-bell-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    border-top: 1px solid #f1f5f9;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.messaging-bell-dropdown-item:hover,
.messaging-bell-dropdown-item:focus-visible {
    background: #f8fafc;
    outline: none;
}

.messaging-bell-dropdown-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.messaging-bell-dropdown-thread {
    font-size: 0.8rem;
    font-weight: 600;
    color: #7c3aed;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.messaging-bell-dropdown-time {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.messaging-bell-dropdown-author {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.messaging-bell-dropdown-preview {
    font-size: 0.85rem;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.messaging-bell-dropdown-footer {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7c3aed;
    cursor: pointer;
    text-align: center;
}

.messaging-bell-dropdown-footer:hover,
.messaging-bell-dropdown-footer:focus-visible {
    background: #f1f5f9;
    outline: none;
}

.messaging-bell-dropdown-item--highlight .messaging-bell-dropdown-thread::before {
    content: "★ ";
    color: #d97706;
}

.portal-notification-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: min(22rem, calc(100vw - 2rem));
    padding: 0.85rem 0.95rem;
    border-radius: 0.75rem;
    background: #fff;
    color: #1e293b;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(25, 118, 210, 0.25);
}

.portal-notification-toast-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.portal-notification-toast-detail {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.35;
}

.portal-notification-toast-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-shrink: 0;
}

.portal-notification-toast-view {
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    background: #1976d2;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.portal-notification-toast-dismiss {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    align-self: flex-end;
}

/* Parent-side arrival dialog. Deliberately blocking — see PortalNotificationModal.razor. */
.portal-notification-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.portal-notification-modal {
    position: relative;
    width: min(26rem, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.75rem 1.5rem 1.4rem;
    border-radius: 1rem;
    background: #fff;
    color: #1e293b;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

.portal-notification-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.65rem;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.portal-notification-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    border-radius: 999px;
    background: rgba(25, 118, 210, 0.12);
    color: #1976d2;
}

.portal-notification-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
}

.portal-notification-modal-body {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.45;
    margin: 0;
    white-space: pre-wrap;
}

.portal-notification-modal-more {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0.75rem 0 0;
}

.portal-notification-modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.portal-notification-modal-view,
.portal-notification-modal-dismiss {
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.portal-notification-modal-view {
    border: none;
    background: #1976d2;
    color: #fff;
}

.portal-notification-modal-dismiss {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
}

.portal-admin-subnav {
    border-bottom: 1px solid #e2e8f0;
}

.portal-admin-subnav-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
}

.portal-admin-subnav-link {
    display: inline-block;
    padding: 0.5rem 0.25rem;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-weight: 600;
    text-decoration: none;
}

.portal-admin-subnav-link:hover,
.portal-admin-subnav-link:focus-visible {
    color: #7c3aed;
    outline: none;
}

.portal-admin-subnav-link--active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
}

.portal-user-parent-of {
    margin-top: 0.15rem;
    font-size: 0.8125rem;
    color: var(--rz-text-secondary-color, #6c757d);
}

.portal-admin-tab-spinner {
    margin-top: 0.5rem;
}

.portal-admin-tab-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 14rem;
    padding: 2rem 1rem;
}

.portal-admin-tab-loading--page {
    min-height: 10rem;
}

.portal-admin-tab-loading__img {
    width: var(--spinner-sm-size);
    height: var(--spinner-sm-size);
    object-fit: contain;
    animation: spinner-turn 1.6s linear infinite;
}

.portal-admin-section-nav a.portal-tab-link {
    text-decoration: none;
}

/* Parent invite worklist — invite column */
.parent-invite-col-header,
.parent-invite-col {
    width: 16rem;
    min-width: 16rem;
}

.parent-invite-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.parent-invite-picks {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 0;
    width: 100%;
}

.parent-invite-pick {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.8125rem;
    line-height: 1.3;
    max-width: 100%;
    min-width: 0;
}

.parent-invite-pick label {
    margin: 0;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    white-space: normal;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.35rem;
}

.parent-invite-pick .rz-chkbox {
    margin-top: 0.05rem;
}

.parent-invite-role {
    display: inline-block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #6d28d9;
    background: #f3e8ff;
    border-radius: 0.35rem;
    padding: 0.05rem 0.4rem;
}

.parent-invite-contact-name {
    color: #1e293b;
    font-weight: 600;
}

.parent-invite-pick .rz-chkbox {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.parent-invite-pick .rz-chkbox-box {
    width: 1.05rem;
    height: 1.05rem;
}

.parent-invite-btn {
    flex-shrink: 0;
    align-self: flex-start;
}

.parent-invite-btn .rz-button-text {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 600;
}

.parent-invite-hint {
    align-self: flex-start;
    white-space: nowrap;
}

/* Scheduled job run log dialog */
.scheduled-job-log-dialog {
    min-width: min(720px, 92vw);
}

.scheduled-job-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.scheduled-job-log-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.scheduled-job-log-meta {
    font-size: 0.8125rem;
    color: #64748b;
}

.scheduled-job-log-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.scheduled-job-log-badge-running {
    color: #1864ab;
    background: #d0ebff;
}

.scheduled-job-log-badge-success {
    color: #2b8a3e;
    background: #d3f9d8;
}

.scheduled-job-log-badge-failed {
    color: #c92a2a;
    background: #ffe3e3;
}

.scheduled-job-log-panel {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid #343a40;
    background: #1a1d21;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.8125rem;
    line-height: 1.45;
    scroll-behavior: smooth;
}

.scheduled-job-log-line {
    display: grid;
    grid-template-columns: 4.25rem 3.25rem minmax(0, 1fr);
    column-gap: 0.65rem;
    row-gap: 0.1rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.scheduled-job-log-line:last-child {
    border-bottom: none;
}

.scheduled-job-log-time {
    color: #868e96;
    text-align: right;
    white-space: nowrap;
}

.scheduled-job-log-level {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    padding-top: 0.1rem;
}

.scheduled-job-log-message {
    color: #dee2e6;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.scheduled-job-log-info .scheduled-job-log-level {
    color: #74c0fc;
}

.scheduled-job-log-warn .scheduled-job-log-level {
    color: #ffd43b;
}

.scheduled-job-log-warn .scheduled-job-log-message {
    color: #ffe066;
}

.scheduled-job-log-error .scheduled-job-log-level {
    color: #ff8787;
}

.scheduled-job-log-error .scheduled-job-log-message {
    color: #ffa8a8;
}

.scheduled-job-log-empty {
    color: #868e96;
    font-style: italic;
    padding: 0.5rem 0;
}

.dictation-textarea {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.dictation-field-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dictation-badge {
    font-size: 0.78rem;
    color: #1f2937;
    padding: 0.15rem 0.5rem;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 999px;
}

.dictation-badge--warn {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.dictation-error {
    margin: 0;
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
}

/* Player feedback wizard — fixed viewport shell; body scrolls, footer always visible. */
.player-feedback-dialog-host.rz-dialog {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    max-height: min(90dvh, 90vh) !important;
    height: min(90dvh, 90vh) !important;
}

.player-feedback-dialog-host .rz-dialog-titlebar {
    flex: 0 0 auto !important;
}

.player-feedback-dialog-host .rz-dialog-content {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.feedback-dialog-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    gap: 0.65rem;
    overflow: hidden;
}

.feedback-dialog-shell__header,
.feedback-dialog-shell__footer {
    flex: 0 0 auto;
}

.feedback-dialog-shell__body {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.feedback-dialog-shell__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.65rem;
    padding-bottom: max(0.15rem, env(safe-area-inset-bottom, 0px));
    background: #fff;
    flex-shrink: 0;
}

.pf-wizard-nav {
    flex-wrap: nowrap;
}

.pf-wizard-nav .portal-tab-link:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pf-section--search {
    min-height: 0;
}

.pf-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    flex-shrink: 0;
}

.pf-meta-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.pf-panel {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 0;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}

.pf-panel--structured {
    background: #fff;
}

.pf-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pf-toolbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.pf-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pf-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.pf-sublabel {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0;
}

.pf-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}

.pf-hint--inline {
    align-self: center;
}

/* Tone picker — how directly the generated note states a concern. Four discrete options
   rather than a slider because Verbatim isn't "more Direct", it turns rewriting off. */
.pf-tone {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.pf-tone-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.01em;
}

.pf-tone-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    padding: 0.25rem;
}

@media (max-width: 640px) {
    .pf-tone-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pf-tone-option {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    align-items: flex-start;
    text-align: left;
    padding: 0.4rem 0.55rem;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.pf-tone-option:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.7);
}

.pf-tone-option:focus-visible {
    outline: 2px solid var(--rz-primary, #b51b85);
    outline-offset: 1px;
}

.pf-tone-option:disabled {
    cursor: default;
    opacity: 0.55;
}

.pf-tone-name {
    font-size: 0.82rem;
    font-weight: 650;
    color: #374151;
    line-height: 1.3;
}

.pf-tone-sub {
    font-size: 0.68rem;
    color: #9ca3af;
    line-height: 1.3;
}

.pf-tone-option--on {
    background: #fff;
    border-color: var(--rz-primary, #b51b85);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.pf-tone-option--on .pf-tone-name {
    color: var(--rz-primary, #b51b85);
}

/* Regenerate strip on the review step. */
.pf-regen {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}

.pf-regen-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pf-regen-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
}

.pf-regen-current {
    font-size: 0.75rem;
    color: #6b7280;
}

.pf-regen-current strong {
    color: var(--rz-primary, #b51b85);
}

.pf-regen-hint {
    margin: 0;
}

.pf-readonly {
    padding: 0.45rem 0.55rem;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    color: #155e75;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pf-search-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pf-search-input {
    flex: 1;
    min-width: 0;
}

.pf-search-busy {
    font-size: 0.78rem;
    color: #6b7280;
    white-space: nowrap;
}

.pf-suggestions {
    max-height: min(36vh, 320px);
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
}

.pf-suggestion-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.65rem;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
    cursor: pointer;
    font-size: 0.88rem;
}

.pf-suggestion-item:last-child {
    border-bottom: none;
}

.pf-suggestion-item:hover:not(:disabled) {
    background: #eef2ff;
}

.pf-selected-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.55rem;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    color: #155e75;
    border-radius: 6px;
}

.pf-selected-name {
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-selected-player--step {
    margin-top: 0.35rem;
}

.pf-mic-badge {
    font-size: 0.72rem;
    color: #1f2937;
    padding: 0.1rem 0.45rem;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 999px;
    align-self: flex-start;
}

.pf-mic-badge--warn {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.pf-transcript {
    width: 100%;
    resize: vertical;
    min-height: 8rem;
}

.pf-structured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.pf-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 0;
}

.pf-field--summary,
.pf-field--action {
    grid-column: 1 / -1;
}

.pf-grow {
    flex: 1;
    min-height: 3.5rem;
    resize: vertical;
    width: 100%;
}

.pf-media-compact {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-shrink: 0;
    padding-top: 0.35rem;
    border-top: 1px solid #e5e7eb;
}

.pf-media-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pf-media-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pf-media-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    font-size: 0.72rem;
    color: #3730a3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-media-chip-remove {
    border: none;
    background: transparent;
    color: #6366f1;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.pf-error {
    margin: 0;
}

.pf-actions-spacer {
    flex: 1 1 auto;
}

.fba-upload-button {
    display: inline-flex;
    margin: 0;
    cursor: pointer;
    width: fit-content;
}

.fba-upload-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.fba-upload-button-face {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 600;
}

.fba-upload-button-face--sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
}

.fba-upload-button:hover .fba-upload-button-face {
    background: #f9fafb;
    border-color: #9ca3af;
}

.pf-panel--extracting {
    position: relative;
}

.pf-extracting-overlay {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
    font-size: 0.82rem;
    font-weight: 600;
}

.pf-review {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pf-review-hero {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #fdf2f8 0%, #f5f3ff 55%, #eff6ff 100%);
    border: 1px solid rgba(181, 27, 133, 0.12);
}

.pf-review-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: #fff;
    color: var(--rz-primary, #b51b85);
    box-shadow: 0 4px 14px rgba(181, 27, 133, 0.12);
    flex-shrink: 0;
}

.pf-review-hero-icon .rzi {
    font-size: 1.35rem !important;
}

.pf-review-hero-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.pf-review-hero-sub {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: #6b7280;
}

.pf-review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
    gap: 0.85rem;
    align-items: start;
}

.pf-review-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.pf-review-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.pf-review-block {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.pf-review-block-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
}

.pf-review-block-icon {
    font-size: 1rem !important;
}

.pf-review-block--summary {
    background: #fafafa;
    border-color: #e5e7eb;
}

.pf-review-block--strengths {
    background: #ecfdf3;
    border-color: rgba(25, 135, 84, 0.18);
}

.pf-review-block--strengths .pf-review-block-head {
    color: #146c43;
}

.pf-review-block--strengths .pf-review-block-icon {
    color: #198754;
}

.pf-review-block--focus {
    background: #fff8eb;
    border-color: rgba(217, 119, 6, 0.18);
}

.pf-review-block--focus .pf-review-block-head {
    color: #b45309;
}

.pf-review-block--focus .pf-review-block-icon {
    color: #d97706;
}

.pf-review-block--action {
    background: #f7f2fb;
    border-color: rgba(181, 27, 133, 0.16);
}

.pf-review-block--action .pf-review-block-head {
    color: #8b1a72;
}

.pf-review-block--action .pf-review-block-icon {
    color: var(--rz-primary, #b51b85);
}

.pf-review-block--media {
    position: sticky;
    top: 0;
}

.pf-review-media-hint {
    margin: 0;
    font-size: 0.75rem;
    color: #6b7280;
}

.pf-review-aside .pf-media-compact {
    border-top: none;
    padding-top: 0;
}

.pf-review-input {
    width: 100%;
    resize: vertical;
    min-height: 4.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    line-height: 1.45;
}

.pf-review-block--summary .pf-review-input {
    min-height: 5rem;
}

@media (max-width: 860px) {
    .pf-meta-row,
    .pf-structured-grid,
    .pf-review-layout,
    .pf-review-columns {
        grid-template-columns: 1fr;
    }

    .pf-review-block--media {
        position: static;
    }

    .pf-field--summary,
    .pf-field--action {
        grid-column: auto;
    }
}

/* Public welcome / start page (site root for signed-out users). */
.welcome-shell {
    min-height: 100vh;
    min-height: 100dvh;
}

.welcome-start {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    box-sizing: border-box;
    text-align: center;
    color: #fff;
    background: linear-gradient(160deg, #d72c8d 0%, #b51b85 42%, #6a1779 100%);
}

.welcome-start-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    max-width: 28rem;
}

.welcome-start-badge {
    width: min(10rem, 42vw);
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.22));
}

.welcome-start-brand {
    margin: 0;
    font-size: clamp(1.1rem, 3.5vw, 1.35rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.92;
}

.welcome-start-tagline {
    margin: 0;
    font-size: clamp(1.65rem, 5.5vw, 2.35rem);
    font-weight: 700;
    line-height: 1.25;
    text-wrap: balance;
}

.welcome-start-access-message {
    margin: 0;
    max-width: 28rem;
    font-size: 1.05rem;
    line-height: 1.5;
    opacity: 0.95;
}

.welcome-start-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: #6a1779;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.welcome-start-login:hover,
.welcome-start-login:focus-visible {
    color: #4f1258;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
}

.welcome-start-login:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

/* Stacked recovery actions on the "Could not finish signing in" screen. */
.welcome-start-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

/* Secondary (ghost) button — transparent on the gradient, white outline. */
.welcome-start-login--ghost {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    box-shadow: none;
}

.welcome-start-login--ghost:hover,
.welcome-start-login--ghost:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: none;
}

/* Tertiary escape hatch — subtle underlined text link. */
.welcome-start-textlink {
    color: #fff;
    opacity: 0.85;
    font-size: 0.95rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.welcome-start-textlink:hover,
.welcome-start-textlink:focus-visible {
    color: #fff;
    opacity: 1;
}

/* Busy/loading state (AuthShell): branded status row + gentle badge pulse so the
   screen reads as "working" instead of an empty gradient with a faint logo. */
.welcome-start-status {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.35rem 0 0;
    font-size: 1.02rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    opacity: 0.95;
}

.welcome-start-status__ring {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.32);
    border-top-color: #fff;
    animation: welcome-start-spin 0.8s linear infinite;
}

.welcome-start--busy .welcome-start-badge {
    animation: welcome-start-badge-pulse 2.4s ease-in-out infinite;
}

/* Subtle entrance shared by every welcome/auth screen for a calmer load-in. */
.welcome-start-inner {
    animation: welcome-start-rise 0.45s ease both;
}

@keyframes welcome-start-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes welcome-start-badge-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.96;
    }

    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

@keyframes welcome-start-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .welcome-start-status__ring,
    .welcome-start--busy .welcome-start-badge,
    .welcome-start-inner {
        animation: none;
    }
}

/* Capacitor native shell — safe areas for notch / home indicator.
   NOTE: no padding-top here. Padding the body top pushes the whole white
   body (background included) below the notch, leaving a white band above the
   purple header. Instead the top inset lives on the headers themselves (below)
   so their gradient fills full-bleed behind the status bar. */
html.capacitor-native,
body.capacitor-native {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

/* The headers own the top inset: their purple gradient renders edge-to-edge
   behind the status bar, and their content is padded clear of the notch.
   The actual inset rules live on .header-toolbar-row.rz-row and
   .parent-portal-hero-top (search for safe-area-inset-top near the top of
   this file) — they are unconditional env() rules so they also cover an
   installed PWA, where body.capacitor-native is never set. Do NOT re-add a
   capacitor-only padding-top for .header-toolbar-row here: the base rule's
   `padding: ... !important` shorthand beats it and the inset never applies. */

body.capacitor-native .app-main-padding {
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

/* The full-screen welcome/auth shell uses min-height:100dvh, but the body's
   safe-area top padding (above) pushes that box below the notch and overflows
   the bottom — which dropped the logo/text toward the lower third. Pin the shell
   to the true viewport so its flex-centered content sits at the real screen
   center, while still padding content clear of the notch / home indicator. */
body.capacitor-native .welcome-start {
    position: fixed;
    inset: 0;
    min-height: 0;
    height: auto;
    z-index: 1;
    overflow-y: auto;
    padding-top: max(2rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

body.capacitor-native .parent-bottom-nav {
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
}

/* Notifications inbox (received messages) */
.notifications-inbox-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.notifications-inbox-bulk {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.notifications-inbox-bulk .rzi {
    font-size: 1.05rem;
}

.notifications-inbox-bulk:hover:not(:disabled),
.notifications-inbox-bulk:focus-visible:not(:disabled) {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.2);
    outline: none;
}

.notifications-inbox-bulk:disabled {
    opacity: 0.5;
    cursor: default;
}

.notifications-inbox-bulk--danger {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.25);
}

.notifications-inbox-bulk--danger:hover:not(:disabled),
.notifications-inbox-bulk--danger:focus-visible:not(:disabled) {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.4);
}

.notifications-inbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notifications-inbox-item {
    display: flex;
    align-items: stretch;
    background: var(--rz-base-background-color, #fff);
    border: 1px solid var(--rz-border-color, #e3e3e3);
    border-radius: 10px;
    overflow: hidden;
}

.notifications-inbox-item--unread {
    border-color: var(--rz-primary, #b5179e);
    background: var(--rz-primary-lighter, #fdf2fb);
}

.notifications-inbox-item-btn {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 0.85rem 1rem;
    cursor: pointer;
}

.notifications-inbox-item-btn:hover {
    background: var(--rz-base-200, rgba(0, 0, 0, 0.03));
}

.notifications-inbox-item-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.1rem;
    padding: 0.35rem 0.5rem 0.35rem 0;
}

.notifications-inbox-item-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--rz-text-tertiary-color, #8a8a8a);
    cursor: pointer;
}

.notifications-inbox-item-action:hover {
    background: var(--rz-base-200, rgba(0, 0, 0, 0.06));
    color: var(--rz-text-color, #1f1f1f);
}

.notifications-inbox-item-action--danger:hover {
    background: var(--rz-danger-lighter, #fdECEC);
    color: var(--rz-danger, #dc3545);
}

.notifications-inbox-item-action .rzi {
    font-size: 1.15rem;
}

.notifications-inbox-item-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: 0.4rem;
    border-radius: 50%;
    background: transparent;
}

.notifications-inbox-item--unread .notifications-inbox-item-dot {
    background: var(--rz-primary, #b5179e);
}

.notifications-inbox-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1 1 auto;
}

.notifications-inbox-item-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.notifications-inbox-item-title {
    font-weight: 600;
    color: var(--rz-text-color, #1f1f1f);
}

.notifications-inbox-item--unread .notifications-inbox-item-title {
    font-weight: 700;
}

.notifications-inbox-item-time {
    flex: 0 0 auto;
    font-size: 0.8rem;
    color: var(--rz-text-tertiary-color, #8a8a8a);
}

.notifications-inbox-item-clip {
    font-size: 0.95rem;
    vertical-align: middle;
    margin-left: 0.25rem;
    color: var(--rz-text-tertiary-color, #8a8a8a);
}

.notifications-inbox-item-body {
    color: var(--rz-text-secondary-color, #555);
    font-size: 0.92rem;
    white-space: pre-wrap;
}

.notifications-inbox-item-cta {
    align-self: flex-start;
    margin-top: 0.15rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rz-primary, #b5179e);
}

.notifications-inbox-empty {
    text-align: center;
}

.messaging-bell-dropdown-footer {
    border-top: 1px solid var(--rz-border-color, #e3e3e3);
}

.messaging-bell-dropdown-seeall {
    display: block;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 0.6rem 0.85rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--rz-primary, #b5179e);
    cursor: pointer;
}

.messaging-bell-dropdown-seeall:hover {
    background: var(--rz-base-200, rgba(0, 0, 0, 0.03));
}

.notification-detail-dialog-time {
    font-size: 0.82rem;
    color: var(--rz-text-tertiary-color, #8a8a8a);
    margin-bottom: 0.5rem;
}

.notification-detail-dialog-body {
    color: var(--rz-text-color, #1f1f1f);
    white-space: pre-wrap;
    line-height: 1.5;
}

.notification-detail-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--rz-border-color, #e3e3e3);
}

.notification-detail-actions-spacer {
    flex: 1 1 auto;
}

.notification-detail-attachments {
    margin-top: 1rem;
    border-top: 1px solid var(--rz-border-color, #e3e3e3);
    padding-top: 0.75rem;
}

.notification-detail-attachments-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rz-text-tertiary-color, #8a8a8a);
    margin-bottom: 0.4rem;
}

.announcement-attach-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.announcement-attach-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--rz-border-color, #e3e3e3);
    border-radius: 8px;
    background: var(--rz-base-background-color, #fff);
}

.announcement-attach-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.announcement-attach-link {
    color: var(--rz-primary, #b5179e);
    font-weight: 600;
    text-decoration: none;
}

.announcement-attach-link:hover {
    text-decoration: underline;
}

.announcement-attach-size {
    flex: 0 0 auto;
    font-size: 0.8rem;
    color: var(--rz-text-tertiary-color, #8a8a8a);
}

.announcement-attach-remove {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: var(--rz-text-secondary-color, #777);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.announcement-attach-remove:hover {
    color: var(--rz-danger, #d32f2f);
}

.announcement-attach-add {
    display: inline-flex;
    margin: 0;
    cursor: pointer;
    width: fit-content;
}

.announcement-attach-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.announcement-attach-add-face {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--rz-border-color, #d1d5db);
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 600;
}

.announcement-attach-add:hover .announcement-attach-add-face {
    background: #f9fafb;
}

/* ==========================================================================
   Mobile dialogs — bottom sheet
   On phones, Radzen's centered .rz-dialog card reads as an awkward floating
   box. Turn every DialogService dialog into a bottom sheet: pinned to the
   bottom edge, full width, rounded top, drag-handle affordance, and clear of
   the home indicator. Radzen positions .rz-dialog with inline left/top/width
   (from DialogOptions.Width), so the offset resets below need !important.
   Centered-card behaviour is retained on >=641px screens.
   ========================================================================== */
@media (max-width: 640px) {
    /* Push the sheet to the bottom of the viewport. */
    .rz-dialog-wrapper {
        align-items: flex-end !important;
    }

    /* Darken the backdrop a touch for depth. */
    .rz-dialog-mask {
        background-color: rgba(15, 23, 42, 0.55) !important;
        opacity: 1 !important;
    }

    /* Convert the absolutely-positioned card into a full-width bottom sheet.
       left/top/right/bottom reset defeats Radzen's inline positioning. */
    .rz-dialog {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        max-height: 92dvh !important;
        border-radius: 18px 18px 0 0 !important;
        padding-top: 0.6rem;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25) !important;
        animation: cubs-sheet-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    /* Grab-handle affordance at the top-center of the sheet. */
    .rz-dialog::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.18);
        z-index: 2;
        pointer-events: none;
    }

    /* Keep generic dialog content clear of the home indicator. The feedback
       wizard host manages its own footer safe-area (see .feedback-dialog-shell__footer),
       so leave it untouched to avoid double padding. */
    .rz-dialog:not(.player-feedback-dialog-host) .rz-dialog-content {
        padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px)) !important;
    }
}

@keyframes cubs-sheet-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .rz-dialog {
        animation: none !important;
    }
}

/* ==========================================================================
   Phone polish — touch targets & tidy quick actions (<=640px)
   Small, safe tweaks so tappable elements meet the ~44px minimum and the
   dashboard shortcut row reads as an even grid rather than an uneven wrap.
   ========================================================================== */
@media (max-width: 640px) {
    /* Section tabs: comfortable tap height. */
    .portal-tab-link {
        min-height: 44px;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    /* Dashboard quick actions (Attendance / Tournaments / Feedback / Sessions):
       even two-up grid, full-width buttons that are easy to hit. Scoped to the
       parent portal so the denser staff dashboard is unaffected. */
    .parent-dashboard .staff-dashboard-shortcuts {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        justify-content: stretch;
    }

    .parent-dashboard .staff-dashboard-shortcuts .rz-button {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    /* Inline "quick link" affordances get a real tap target without changing
       their inline visual flow. */
    .parent-quick-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}


/* Permissions screen: pages are grouped under the same headings as the staff
   drawer, so the group title has to read as a level above the page titles it
   collects. */
.portal-permissions-group-title {
    font-weight: 700;
    letter-spacing: 0.01em;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--rz-base-300, #dee2e6);
}

.portal-permissions-group + .portal-permissions-group {
    margin-top: 2.25rem;
}

/* ---------------------------------------------------------------------------
   Section nav (PortalSectionNav)

   Sibling *pages* — coach assignments vs 1-on-1 bookings, monthly vs annual
   billing. Styled as sub-navigation rather than tabs on purpose: these are
   links that change the URL, and dressing them as a segmented control made
   readers think the pages were still tabs on one page. .portal-tab-link keeps
   the pill look for genuine in-page tabs (player dialogs, team detail).
   --------------------------------------------------------------------------- */
.portal-section-nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    margin: 0 0 1.35rem;
    padding: 0 0.15rem;
    border-bottom: 1px solid var(--rz-base-200, #e2e8f0);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.portal-section-nav::-webkit-scrollbar {
    display: none;
}

.portal-section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    padding: 0.6rem 0.15rem;
    border: none;
    background: transparent;
    text-decoration: none;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    /* Sits on the nav's 1px rule so the active marker replaces it rather than
       stacking a second line underneath. */
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.portal-section-link:hover,
.portal-section-link:focus-visible {
    color: var(--rz-primary, #b51b85);
    border-bottom-color: var(--rz-base-300, #dee2e6);
    text-decoration: none;
}

.portal-section-link:focus-visible {
    outline: 2px solid var(--rz-primary, #b51b85);
    outline-offset: 2px;
    border-radius: 2px;
}

.portal-section-link--active,
.portal-section-link--active:hover,
.portal-section-link--active:focus {
    color: var(--rz-primary, #b51b85);
    font-weight: 650;
    border-bottom-color: var(--rz-primary, #b51b85);
}

.portal-section-link-icon {
    font-size: 1.05rem !important;
    line-height: 1;
}

/* Billing colours its sections; carry that through as the marker and label
   colour now that there's no filled pill to tint. */
.portal-section-nav .billing-tab--monthly.portal-section-link--active,
.portal-section-nav .billing-tab--monthly.portal-section-link--active:hover {
    color: var(--billing-active);
    border-bottom-color: var(--billing-active);
}

.portal-section-nav .billing-tab--annual.portal-section-link--active,
.portal-section-nav .billing-tab--annual.portal-section-link--active:hover {
    color: var(--billing-players);
    border-bottom-color: var(--billing-players);
}

.portal-section-nav .billing-tab--orphaned.portal-section-link--active,
.portal-section-nav .billing-tab--orphaned.portal-section-link--active:hover {
    color: var(--billing-missing);
    border-bottom-color: var(--billing-missing);
}

.portal-section-nav .billing-tab--monthly:not(.portal-section-link--active):hover {
    color: var(--billing-active);
}

.portal-section-nav .billing-tab--annual:not(.portal-section-link--active):hover {
    color: var(--billing-players);
}

.portal-section-nav .billing-tab--orphaned:not(.portal-section-link--active):hover {
    color: var(--billing-missing);
}

@media (max-width: 576px) {
    .portal-section-nav {
        gap: 1.1rem;
    }

    .portal-section-link {
        font-size: 0.85rem;
    }
}

/* ------------------------------------------------------------------
   Parent portal — lapsed membership banner, cards and prompt dialog.
   Deliberately loud: this is the one thing a parent must act on.
   ------------------------------------------------------------------ */

.parent-sub-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin: 0.75rem 0 0.25rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid #b42318;
    background: linear-gradient(135deg, #d92d20 0%, #b42318 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(180, 35, 24, 0.28);
}

.parent-sub-banner-main {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 22rem;
}

.parent-sub-banner-icon.rz-icon {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.15rem;
    line-height: 1.75rem;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.parent-sub-banner-text {
    min-width: 0;
}

.parent-sub-banner-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.parent-sub-banner-sub {
    margin-top: 0.15rem;
    font-size: 0.85rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.92);
}

.parent-sub-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.parent-sub-banner .parent-sub-banner-btn.rz-button {
    background: #fff;
    color: #b42318;
    border: none;
    font-weight: 700;
    box-shadow: none;
}

.parent-sub-banner .parent-sub-banner-btn.rz-button:hover {
    background: #fff0ef;
    color: #912018;
}

.parent-sub-banner .parent-sub-banner-btn--ghost.rz-button {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 600;
}

.parent-sub-banner .parent-sub-banner-btn--ghost.rz-button:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

@media (max-width: 640px) {
    .parent-sub-banner-actions {
        width: 100%;
    }

    .parent-sub-banner .parent-sub-banner-btn.rz-button {
        flex: 1 1 auto;
        justify-content: center;
    }
}

.parent-sub-gap-stack {
    display: grid;
    gap: 0.75rem;
}

.parent-sub-gap-card {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(180, 35, 24, 0.28);
    border-left: 4px solid #d92d20;
    background: #fffaf9;
}

.parent-sub-gap-card + .parent-sub-gap-card {
    margin-top: 0.75rem;
}

.parent-sub-gap-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.parent-sub-gap-card-icon.rz-icon {
    flex: 0 0 auto;
    color: #b42318;
    font-size: 1.25rem;
}

.parent-sub-gap-card-text {
    min-width: 0;
}

.parent-sub-gap-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: #7a271a;
}

.parent-sub-gap-card-meta {
    margin-top: 0.1rem;
    font-size: 0.83rem;
    color: rgba(84, 30, 20, 0.78);
}

.parent-sub-gap-card-note {
    margin-top: 0.55rem;
    font-size: 0.83rem;
    line-height: 1.4;
    color: rgba(84, 30, 20, 0.9);
}

.parent-sub-gap-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.parent-sub-gap-card .parent-sub-gap-card-action.rz-button {
    margin-top: 0.7rem;
    font-weight: 600;
}

.parent-sub-gap-dialog {
    display: grid;
    gap: 0.85rem;
}

.parent-sub-gap-dialog-lead {
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--rz-text-secondary-color, #475467);
}

.parent-sub-gap-dialog-note {
    font-size: 0.83rem;
    line-height: 1.4;
    color: var(--rz-text-tertiary-color, #667085);
}

.parent-sub-gap-dialog-footer {
    display: flex;
    justify-content: flex-end;
}

/* Fix-it button inside the dashboard membership aside. */
.parent-dashboard-aside .parent-membership-fix-btn.rz-button {
    margin-top: 0.65rem;
    width: 100%;
    justify-content: center;
    font-weight: 600;
}

/* The aside caps panels at 14rem and scrolls them; a lapsed panel must show its
   action without the parent having to scroll inside the card. */
.staff-dashboard-aside .parent-membership-panel--fix {
    max-height: none;
    overflow: visible;
}

/* ------------------------------------------------------------------
   Attendance — players training without a live monthly plan.
   ------------------------------------------------------------------ */

/* Inset rather than a real border so flagged cards stay the same width as the rest
   and their names do not shift right of the unflagged ones. */
.attendance-player-card--uncovered {
    box-shadow: inset 4px 0 0 #d92d20, 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* Its own strip across the foot of the card: a chip beside the name collided with
   the present button once the name wrapped in the two-column grid. */
.attendance-player-flag {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-top: 1px solid rgba(217, 45, 32, 0.18);
    background: rgba(217, 45, 32, 0.08);
    color: #b42318;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.attendance-player-flag-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendance-player-flag-icon.rz-icon {
    font-size: 0.9rem;
    line-height: 1;
}

/* Block, not flex: at phone width a flex row pushed the icon onto its own line
   above the wrapped text. Inline keeps it on the first line. */
.attendance-log-progress-uncovered {
    margin-top: 0.4rem;
    color: #b42318;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
}

.attendance-log-progress-uncovered .attendance-player-flag-icon.rz-icon {
    display: inline;
    margin-right: 0.15rem;
    vertical-align: -0.15em;
}

.parent-upsell-note {
    color: var(--rz-text-tertiary-color, #667085);
    font-size: 0.83rem;
    line-height: 1.4;
}

.parent-upsell-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 576px) {
    .parent-upsell-actions .rz-button {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* ------------------------------------------------------------------
   Billing admin — players paying for two monthly plans at once.
   ------------------------------------------------------------------ */

.billing-duplicate-lead {
    color: var(--rz-text-secondary-color, #475467);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.billing-duplicate-card.rz-card {
    border-left: 4px solid #f79009;
}

.billing-duplicate-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.billing-duplicate-player {
    font-size: 1.05rem;
    font-weight: 700;
}

.billing-duplicate-meta {
    font-size: 0.82rem;
    color: var(--rz-text-tertiary-color, #667085);
}

.billing-duplicate-overcharge {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(247, 144, 9, 0.14);
    color: #b54708;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.billing-duplicate-keeper {
    background: rgba(22, 163, 74, 0.06);
}

.billing-duplicate-badge {
    margin-left: 0.4rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.billing-duplicate-paypal-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
}

/* Amber variant: the plan is cancelled but still paid up, and runs out shortly.
   Nothing is owed yet, so it must not read as urgently as a lapse. */
.parent-sub-banner--warning {
    border-color: #b54708;
    background: linear-gradient(135deg, #f79009 0%, #b54708 100%);
    box-shadow: 0 6px 18px rgba(181, 71, 8, 0.26);
}

.parent-sub-banner--warning .parent-sub-banner-btn.rz-button {
    color: #b54708;
}

.parent-sub-banner--warning .parent-sub-banner-btn.rz-button:hover {
    background: #fff7ed;
    color: #93370d;
}

.parent-sub-banner--warning .parent-sub-banner-btn--ghost.rz-button {
    color: #fff;
}

.parent-sub-gap-card--warning {
    border-color: rgba(181, 71, 8, 0.28);
    border-left-color: #f79009;
    background: #fffcf5;
}

.parent-sub-gap-card--warning .parent-sub-gap-card-icon.rz-icon,
.parent-sub-gap-card--warning .parent-sub-gap-card-title {
    color: #b54708;
}

.parent-sub-gap-card--warning .parent-sub-gap-card-meta,
.parent-sub-gap-card--warning .parent-sub-gap-card-note {
    color: rgba(122, 60, 10, 0.85);
}
