.v3-app-main.v3-app-main--athletes {
    height: var(--v3-viewport-height);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

/* Athletes roster scan table */
.v3-athletes {
    --v3-alert-amber: var(--v3-warning-orange);
    --v3-score-good: #009B44;
    --v3-score-below: var(--v3-warning-orange);
    --v3-score-critical: var(--v3-danger-red);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
}

.v3-athletes-workspace,
.v3-athletes-panel--roster {
    min-height: 0;
}

.v3-athletes-panel--roster {
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.v3-athletes-toolbar {
    min-height: var(--v3-control-standard);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 16px;
    border-bottom: 1px solid var(--v3-app-border);
    padding: 0 16px;
}

.v3-athletes-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v3-athletes-toolbar-actions label {
    width: 190px;
    min-height: 38px;
}

.v3-athletes-tabs {
    --v3-app-muted: var(--v3-app-text);
    --v3-accent-foreground: var(--v3-athletic-green);
    justify-content: safe center;
}

.v3-athletes-table-wrap {
    min-height: 0;
    overflow: auto;
}

.v3-athletes-table {
    min-width: 980px;
    padding: 0;
}

.v3-athletes-row {
    min-height: 84px;
    grid-template-columns:
        148px
        minmax(148px, 0.78fr)
        minmax(174px, 0.9fr)
        minmax(166px, 0.92fr)
        minmax(150px, 0.84fr)
        minmax(136px, 0.7fr)
        36px;
    gap: 8px;
    padding: 0 12px;
}

.v3-athletes-row:not(.v3-athletes-row--head) {
    min-height: 84px;
    border-radius: 0;
    margin: 0;
    padding: 0 12px;
}

.v3-athletes-row--head {
    min-height: 44px;
    padding: 0 18px;
    font-size: var(--v3-type-caption);
    letter-spacing: 0.01em;
}

.v3-athletes-row--head [role="columnheader"] > button {
    min-width: 0;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
    padding: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.v3-athletes-row--head [role="columnheader"] > button > span {
    min-width: 0;
}

.v3-athletes-row--head > [role="columnheader"]:first-child > button {
    width: 100%;
    max-width: none;
    display: inline-flex;
    column-gap: 5px;
    justify-content: flex-start;
}

.v3-athletes-row--head > [role="columnheader"]:first-child > button > span {
    line-height: 1.25;
    white-space: nowrap;
}

.v3-athletes-row--head > [role="columnheader"]:nth-child(6) > button > span {
    white-space: nowrap;
}

.v3-athletes-row--head [role="columnheader"] > button:hover,
.v3-athletes-row--head [role="columnheader"] > button:focus-visible {
    color: var(--v3-app-text);
    background: transparent;
    outline: none;
    box-shadow: none;
}

.v3-athletes-row--head [role="columnheader"] > button.is-active {
    color: var(--v3-athletic-green);
    background: transparent;
    outline: none;
    box-shadow: none;
}

.v3-athletes-row--head [role="columnheader"] > button:focus-visible {
    text-decoration: underline;
    text-decoration-color: var(--v3-accent-border);
    text-underline-offset: 4px;
}

.v3-athletes-row--head [role="columnheader"] > button .v3-icon {
    flex: 0 0 auto;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
}

.v3-athletes-row--head [role="columnheader"] > button.is-active .v3-icon {
    color: currentColor;
}

.v3-athletes-row > span:last-child,
.v3-athletes-row:not(.v3-athletes-row--head):hover > span:last-child,
.v3-athletes-row:not(.v3-athletes-row--head):focus-visible > span:last-child,
.v3-athletes-row.is-selected > span:last-child {
    position: static;
    padding-left: 0;
    background: transparent;
    box-shadow: none;
}

.v3-roster-athlete {
    min-width: 0;
    display: block;
}

.v3-roster-today {
    min-width: 0;
    display: flex;
    align-items: center;
}

.v3-roster-score-gauge {
    position: relative;
    width: 78px;
    height: 52px;
    display: inline-grid;
    place-items: center;
}

.v3-roster-score-gauge canvas,
.v3-roster-history-gauge canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.v3-roster-athlete-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.v3-roster-athlete-copy > strong {
    color: var(--v3-app-text);
    font-size: var(--v3-type-body);
    line-height: 1.2;
    font-weight: 800;
}

.v3-roster-athlete-copy > span {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--v3-app-muted);
}

.v3-roster-athlete-copy em {
    font-size: var(--v3-type-caption);
    line-height: 1.25;
    font-style: normal;
    font-weight: 700;
}

.v3-roster-athlete-copy i {
    font-size: 8px;
    font-style: normal;
}

.v3-roster-availability {
    color: var(--v3-success-foreground);
}

.v3-roster-availability--unanswered {
    color: var(--v3-neutral-foreground);
}

.v3-roster-availability--unavailable {
    color: var(--v3-danger-foreground);
}

.v3-roster-availability--sick,
.v3-roster-availability--excused {
    color: var(--v3-warning-foreground);
}

.v3-roster-availability--injured {
    color: var(--v3-danger-foreground);
}

.v3-roster-history {
    display: grid;
    grid-template-columns: repeat(3, 58px);
    align-items: center;
    gap: 4px;
}

.v3-roster-history-item {
    display: grid;
    justify-items: center;
    gap: 1px;
}

.v3-roster-history-item > small {
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1;
    font-weight: 800;
}

.v3-roster-history-gauge {
    position: relative;
    width: 58px;
    height: 39px;
    display: inline-grid;
    place-items: center;
}

.v3-roster-signals {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.v3-roster-signal,
.v3-roster-signal-more {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--v3-app-border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: var(--v3-type-caption);
    line-height: 1.15;
    font-weight: 800;
}

.v3-roster-signal {
    --v3-roster-signal-tone: var(--v3-neutral-grey);
    border-color: var(--v3-roster-signal-tone);
    color: var(--v3-roster-signal-tone);
    background: transparent;
}

.v3-roster-signal--green {
    --v3-roster-signal-tone: var(--v3-score-good);
}

.v3-roster-signal--amber {
    --v3-roster-signal-tone: var(--v3-alert-amber);
}

.v3-roster-signal--red {
    --v3-roster-signal-tone: var(--v3-score-critical);
}

.v3-roster-signal--blue {
    --v3-roster-signal-tone: var(--v3-signal-blue);
}

.v3-roster-signal-more {
    color: var(--v3-app-muted);
    background: var(--v3-app-panel-soft);
}

.v3-roster-context {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 5px;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.35;
    font-weight: 700;
}

.v3-roster-context > span:only-child {
    color: var(--v3-app-muted);
}

.v3-athlete-note-item.v3-roster-context-message {
    width: 100%;
    max-width: none;
    margin: 0 0 5px;
}

.v3-roster-context-notification {
    --v3-roster-context-tone: var(--v3-neutral-grey);
    min-width: 0;
    display: grid;
    gap: 4px;
    border: 1px solid var(--v3-roster-context-tone);
    border-radius: 10px;
    background: transparent;
    padding: 7px 9px;
}

.v3-roster-context-notification--injured,
.v3-roster-context-notification--unavailable {
    --v3-roster-context-tone: var(--v3-danger-red);
}

.v3-roster-context-notification--sick,
.v3-roster-context-notification--excused {
    --v3-roster-context-tone: var(--v3-warning-orange);
}

.v3-roster-context-notification > header {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
}

.v3-roster-context-notification > header > span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--v3-roster-context-tone);
}

.v3-roster-context-notification .v3-icon {
    flex: 0 0 auto;
    font-size: var(--v3-type-caption);
}

.v3-roster-context-notification strong,
.v3-roster-context-notification time,
.v3-roster-context-notification small {
    font-size: var(--v3-type-caption);
    line-height: 1.2;
}

.v3-roster-context-notification strong {
    overflow-wrap: anywhere;
    font-weight: 800;
}

.v3-roster-context-notification time,
.v3-roster-context-notification small {
    color: var(--v3-app-muted);
    font-style: normal;
    font-weight: 700;
}

.v3-roster-context-notification time {
    flex: 0 0 auto;
    text-align: right;
}

.v3-roster-context-notification p {
    margin: 0;
    color: var(--v3-app-text);
    font-size: var(--v3-type-caption);
    line-height: 1.35;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.v3-roster-checkins {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v3-roster-checkin-dots {
    display: grid;
    grid-template-columns: repeat(7, 9px);
    gap: 4px;
}

.v3-roster-checkin-dots i {
    width: 9px;
    height: 9px;
    border: 1.5px solid var(--v3-app-muted);
    border-radius: 50%;
    background: transparent;
}

.v3-roster-checkin-dots i.is-complete {
    border-color: var(--v3-score-good);
    background: var(--v3-score-good);
}

.v3-roster-checkin-dots i.is-missing-today {
    border-color: var(--v3-alert-amber);
}

.v3-roster-checkins > strong {
    min-width: 28px;
    color: var(--v3-app-text);
    font-size: var(--v3-type-caption);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.v3-roster-open {
    justify-content: center !important;
}

.v3-roster-open .v3-row-action {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: color-mix(in oklch, var(--v3-app-text) 86%, transparent);
    background: transparent;
    box-shadow: none;
}

.v3-roster-open .v3-row-action:hover,
.v3-roster-open .v3-row-action:focus-visible {
    color: inherit;
    background: transparent;
    box-shadow: none;
}

.v3-athletes-empty-roster {
    min-width: 100%;
    padding-inline: 18px;
}

@media (max-width: 1100px) {
    .v3-athletes-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .v3-athletes-toolbar-actions label {
        width: 160px;
    }
}

@media (max-width: 920px) {
    .v3-app-main.v3-app-main--athletes {
        min-height: var(--v3-viewport-height);
    }

    .v3-athletes-toolbar {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 8px;
    }

    .v3-athletes-toolbar-actions {
        order: 1;
    }

    .v3-athletes-toolbar-actions label {
        width: min(100%, 320px);
    }
}

@media (max-width: 680px) {
    .v3-athletes-toolbar {
        padding-inline: 12px;
    }

    .v3-athletes-toolbar-actions label {
        width: 100%;
    }

    .v3-athletes-toolbar-actions {
        width: 100%;
    }

}

.v3-athletes {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    gap: 10px;
}

.v3-athletes--empty {
    grid-template-rows: auto auto minmax(0, 1fr);
}

.v3-athletes-summary,
.v3-athletes-panel,
.v3-athletes-empty-panel {
    border: 1px solid var(--v3-app-border);
    border-radius: 12px;
    color: var(--v3-app-text);
    background: var(--v3-app-panel);
    box-shadow: var(--v3-shadow-panel);
}

.v3-athletes-summary {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
}

.v3-athletes-stat {
    min-width: 0;
    min-height: 76px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border-right: 1px solid var(--v3-app-border);
    padding: 12px 16px;
}

.v3-athletes-stat:last-child {
    border-right: 0;
}

.v3-athletes-stat > span,
.v3-athletes-empty-panel-icon,
.v3-athletes-empty-roster span[aria-hidden="true"],
.v3-athletes-detail-avatar {
    display: grid;
    place-items: center;
    color: var(--v3-app-muted);
}

.v3-athletes-stat > span,
.v3-athletes-empty-panel-icon,
.v3-athletes-empty-roster span[aria-hidden="true"] {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.v3-athletes-detail-avatar {
    border-radius: 50%;
    background: var(--v3-app-panel-muted);
}

.v3-athletes-stat > span {
    width: 38px;
    height: 38px;
    font-size: 18px;
}

.v3-athletes-stat--neutral > span {
    color: var(--v3-neutral-grey);
    background: transparent;
    box-shadow: none;
}

.v3-athletes-stat--green > span {
    color: var(--v3-athletic-green);
    background: transparent;
    box-shadow: none;
}

.v3-athletes-stat--amber > span {
    color: var(--v3-warning-orange);
    background: transparent;
    box-shadow: none;
}

.v3-athletes-stat--red > span {
    color: var(--v3-danger-red);
    background: transparent;
    box-shadow: none;
}

.v3-athletes-stat--blue > span {
    color: var(--v3-signal-blue);
    background: transparent;
    box-shadow: none;
}

.v3-athletes-stat strong {
    display: block;
    color: var(--v3-app-text);
    font-family: var(--v3-font-display);
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
}

.v3-athletes-stat p,
.v3-athletes-stat em {
    margin: 0;
}

.v3-athletes-stat p {
    margin-top: 3px;
    overflow: hidden;
    color: var(--v3-app-text);
    font-size: 12.5px;
    line-height: 1.15;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v3-athletes-stat em {
    display: block;
    margin-top: 2px;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.2;
    font-style: normal;
    font-weight: 700;
}

.v3-athletes-empty-panel {
    min-width: 0;
    display: grid;
    grid-template-columns: 50px minmax(180px, 1fr) minmax(250px, auto) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
}

.v3-athletes-empty-panel-icon {
    width: 50px;
    height: 50px;
    color: var(--v3-athletic-green);
    background: transparent;
    box-shadow: none;
    font-size: 26px;
}

.v3-athletes-empty-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.v3-athletes-empty-copy h2,
.v3-athletes-empty-copy p {
    margin: 0;
}

.v3-athletes-empty-copy h2 {
    color: var(--v3-app-text);
    font-size: 15px;
    line-height: 1.15;
    font-weight: 800;
}

.v3-athletes-empty-copy p {
    max-width: 56ch;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.35;
    font-weight: 700;
}

.v3-athletes-workspace {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
    gap: 14px;
    align-items: stretch;
}

.v3-athletes-panel {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.v3-athletes-panel--roster {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
}

.v3-athletes-roster-header {
    min-width: 0;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--v3-app-border);
    padding: 12px 16px;
}

.v3-athletes-roster-header > div {
    min-width: 0;
}

.v3-athletes-roster-header h2,
.v3-athletes-detail-header h2,
.v3-athletes-detail-section h3,
.v3-athletes-detail-empty h2 {
    margin: 0;
    color: var(--v3-app-text);
    font-size: 15px;
    line-height: 1.15;
    font-weight: 800;
}

.v3-athletes-roster-header p,
.v3-athletes-detail-header p,
.v3-athletes-detail-section header span,
.v3-athletes-detail-empty p {
    margin: 3px 0 0;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.25;
    font-weight: 700;
}

.v3-athletes-toolbar {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--v3-app-border);
    padding: 10px 16px;
}

.v3-athletes-toolbar label {
    min-width: 0;
    min-height: 40px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 1px solid var(--v3-app-border);
    border-radius: 8px;
    color: var(--v3-app-muted);
    background: var(--v3-app-panel-soft);
    padding: 0 10px;
}

.v3-athletes-toolbar input {
    min-width: 0;
    border: 0;
    color: var(--v3-app-text);
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    outline: none;
}

.v3-athletes-toolbar input::placeholder {
    color: var(--v3-app-muted);
}

.v3-athletes-table-wrap {
    min-height: 0;
    overflow: auto;
}

.v3-athletes-table {
    min-width: 820px;
    padding: 0 14px 12px;
}

.v3-athletes-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(170px, 1.35fr) minmax(190px, 1.2fr) minmax(104px, 0.68fr) minmax(126px, 0.82fr) minmax(82px, 0.58fr) minmax(68px, 0.45fr);
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--v3-app-border);
    color: var(--v3-app-muted);
    font-size: 12.5px;
    font-weight: 700;
}

.v3-athletes-row:not(.v3-athletes-row--head) {
    border-radius: 9px;
    margin-top: -1px;
    padding: 0 4px;
    cursor: pointer;
}

.v3-athletes-row:not(.v3-athletes-row--head):hover,
.v3-athletes-row:not(.v3-athletes-row--head):focus-visible {
    background: var(--v3-row-hover);
    outline: none;
}

.v3-athletes-row.is-selected {
    border-color: var(--v3-athletic-green);
    background: var(--v3-row-hover);
    box-shadow: inset 0 0 0 1px var(--v3-athletic-green);
}

.v3-athletes-row--head {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 38px;
    color: var(--v3-app-muted);
    background: var(--v3-app-panel);
    font-size: var(--v3-type-caption);
    font-weight: 800;
}

.v3-athletes-row > span:last-child {
    position: sticky;
    right: 0;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    background: var(--v3-app-panel);
    box-shadow: -12px 0 12px var(--v3-app-panel);
    padding-left: 8px;
}

.v3-athletes-row--head > span:last-child {
    z-index: 3;
}

.v3-athletes-row:not(.v3-athletes-row--head):hover > span:last-child,
.v3-athletes-row:not(.v3-athletes-row--head):focus-visible > span:last-child {
    background: var(--v3-app-panel);
}

.v3-athletes-row.is-selected > span:last-child {
    background: var(--v3-app-panel);
}

.v3-athlete-cell {
    min-width: 0;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.v3-athlete-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--v3-ink-light);
    background: var(--v3-athletic-green);
    font-size: var(--v3-type-caption);
    font-weight: 800;
}

.v3-athlete-cell strong,
.v3-athlete-readiness-score strong,
.v3-athlete-readiness-target strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--v3-app-text);
    font-size: 12.5px;
    line-height: 1.15;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v3-athlete-cell em,
.v3-athlete-readiness-score em,
.v3-athlete-readiness-target em {
    display: block;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.2;
    font-style: normal;
    font-weight: 700;
}

.v3-athlete-readiness-cell {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(42px, 0.52fr) minmax(74px, 0.68fr);
    align-items: center;
    gap: 8px;
}

.v3-athlete-readiness-score,
.v3-athlete-readiness-target {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.v3-athlete-score-ring {
    --v3-score-ring: var(--v3-athletic-green);
    width: 44px;
    height: 28px;
    position: relative;
    flex: 0 0 auto;
    overflow: hidden;
}

.v3-athlete-score-ring::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 44px 44px 0 0;
    background:
        conic-gradient(
            from 270deg at 50% 100%,
            var(--v3-score-ring) 0deg calc(var(--v3-score) * 1.8deg),
            var(--v3-gauge-track) 0deg 180deg,
            transparent 180deg 360deg
        );
    mask: radial-gradient(circle at 50% 100%, transparent 0 13px, oklch(0.12 0.005 220) 14px);
}

.v3-athlete-score-ring span {
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--v3-gauge-track);
}

.v3-athlete-score-ring--below {
    --v3-score-ring: var(--v3-alert-amber);
}

.v3-athlete-score-ring--critical {
    --v3-score-ring: var(--v3-danger-red);
}

.v3-athlete-score-ring--missing {
    --v3-score-ring: var(--v3-neutral-grey);
}

.v3-athlete-score-ring--above,
.v3-athlete-score-ring--in {
    --v3-score-ring: var(--v3-athletic-green);
}

.v3-gap {
    color: var(--v3-app-muted);
    font-style: normal;
    font-weight: 800;
}

.v3-gap--positive {
    color: var(--v3-success-foreground);
}

.v3-gap--negative {
    color: var(--v3-danger-foreground);
}

.v3-availability {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    color: var(--v3-app-text);
    border: 1px solid var(--v3-neutral-grey);
    background: transparent;
    padding: 0 9px;
    font-size: var(--v3-type-caption);
    font-weight: 800;
    white-space: nowrap;
}

.v3-availability i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.v3-availability--available {
    color: var(--v3-success-foreground);
    border-color: var(--v3-success-border);
    background: transparent;
}

.v3-availability--unavailable {
    color: var(--v3-danger-foreground);
    border-color: var(--v3-danger-border);
    background: transparent;
}

.v3-availability--sick,
.v3-availability--excused {
    color: var(--v3-warning-foreground);
    border-color: var(--v3-warning-border);
    background: transparent;
}

.v3-availability--injured {
    color: var(--v3-danger-foreground);
    border-color: var(--v3-danger-border);
    background: transparent;
}

.v3-review-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--v3-app-muted);
}

.v3-review-cell > .v3-icon {
    flex: 0 0 auto;
}

.v3-review-cell span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v3-review-cell strong,
.v3-review-cell em {
    display: block;
}

.v3-review-cell strong {
    overflow: hidden;
    color: currentColor;
    font-size: var(--v3-type-caption);
    line-height: 1.15;
    font-weight: 800;
    text-overflow: ellipsis;
}

.v3-review-cell em {
    margin-top: 2px;
    overflow: hidden;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.2;
    font-style: normal;
    font-weight: 700;
    text-overflow: ellipsis;
}

.v3-review-cell--green {
    color: var(--v3-success-foreground);
}

.v3-review-cell--amber {
    color: var(--v3-warning-foreground);
}

.v3-review-cell--red {
    color: var(--v3-danger-foreground);
}

.v3-review-cell--blue {
    color: var(--v3-signal-blue);
}

.v3-row-action {
    position: relative;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--v3-app-border);
    border-radius: 8px;
    color: var(--v3-app-text);
    background: transparent;
    padding: 0 9px;
    font: inherit;
    font-size: var(--v3-type-caption);
    font-weight: 800;
    text-decoration: none;
    transition: transform var(--v3-press-transition), color var(--v3-transition), border-color var(--v3-transition), background var(--v3-transition);
}

.v3-row-action::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    min-width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
}

.v3-row-action:hover,
.v3-row-action:focus-visible {
    border-color: var(--v3-accent-border);
    color: var(--v3-accent-foreground);
    outline: none;
}

.v3-athletes-panel--detail {
    min-height: 0;
    overflow: auto;
}

.v3-athletes-detail-header {
    min-width: 0;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 84px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--v3-app-border);
    padding: 16px;
}

.v3-athletes-detail-avatar {
    width: 58px;
    height: 58px;
    color: var(--v3-ink-light);
    background: var(--v3-athletic-green);
    font-size: 17px;
    font-weight: 800;
}

.v3-athletes-detail-header > div:nth-child(2) {
    min-width: 0;
}

.v3-athletes-detail-header .v3-availability {
    margin-top: 8px;
}

.v3-detail-score-gauge {
    --v3-score-ring: var(--v3-athletic-green);
    width: 82px;
    height: 58px;
    position: relative;
    display: grid;
    align-content: end;
    justify-items: center;
    overflow: hidden;
}

.v3-detail-score-gauge::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 82px 82px 0 0;
    background:
        conic-gradient(
            from 270deg at 50% 100%,
            var(--v3-score-ring) 0deg calc(var(--v3-score) * 1.8deg),
            var(--v3-gauge-track) 0deg 180deg,
            transparent 180deg 360deg
        );
    mask: radial-gradient(circle at 50% 100%, transparent 0 25px, oklch(0.12 0.005 220) 26px);
}

.v3-detail-score-gauge--below {
    --v3-score-ring: var(--v3-alert-amber);
}

.v3-detail-score-gauge--critical {
    --v3-score-ring: var(--v3-danger-red);
}

.v3-detail-score-gauge--missing {
    --v3-score-ring: var(--v3-neutral-grey);
}

.v3-detail-score-gauge strong,
.v3-detail-score-gauge span {
    position: relative;
    z-index: 1;
}

.v3-detail-score-gauge strong {
    color: var(--v3-app-text);
    font-family: var(--v3-font-display);
    font-size: 28px;
    line-height: 0.9;
    font-weight: 800;
}

.v3-detail-score-gauge span {
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    font-weight: 800;
}

.v3-athletes-detail-kpis {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border-bottom: 1px solid var(--v3-app-border);
    padding: 12px 16px;
}

.v3-athletes-detail-kpis > div {
    min-width: 0;
    min-height: 72px;
    display: grid;
    align-content: center;
    gap: 4px;
    border: 1px solid var(--v3-app-border);
    border-radius: 9px;
    background: var(--v3-app-panel-soft);
    padding: 10px;
}

.v3-athletes-detail-kpis span,
.v3-athletes-detail-kpis em {
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.15;
    font-style: normal;
    font-weight: 800;
}

.v3-athletes-detail-kpis strong {
    min-width: 0;
    overflow: hidden;
    color: var(--v3-app-text);
    font-size: 16px;
    line-height: 1.1;
    font-weight: 800;
    text-overflow: ellipsis;
}

.v3-athletes-detail-kpis > div:first-child strong,
.v3-athletes-detail-kpis > div:nth-child(3) strong {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    line-height: 1.2;
    white-space: normal;
}

.v3-athletes-detail-kpis strong .v3-icon {
    flex: 0 0 auto;
    margin-right: 0;
    color: var(--v3-warning-foreground);
}

.v3-athletes-link-button {
    position: relative;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--v3-app-border);
    border-radius: 8px;
    color: var(--v3-app-text);
    background: transparent;
    padding: 0 11px;
    font: inherit;
    font-size: var(--v3-type-caption);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--v3-press-transition), color var(--v3-transition), border-color var(--v3-transition), background var(--v3-transition);
}

.v3-athletes-link-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    min-width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
}

.v3-athletes-link-button {
    border-color: var(--v3-accent-border);
    color: var(--v3-accent-foreground);
    background: transparent;
}

.v3-athletes-icon-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.v3-athletes-link-button:hover,
.v3-athletes-link-button:focus-visible {
    border-color: var(--v3-athletic-green);
    outline: none;
}

.v3-athletes-detail-section {
    min-width: 0;
    display: grid;
    gap: 10px;
    border-bottom: 1px solid var(--v3-app-border);
    padding: 14px 16px;
}

.v3-athletes-detail-section header,
.v3-athletes-detail-footer {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.v3-athletes-detail-section--focus {
    background: color-mix(in oklch, var(--v3-app-panel-soft) 46%, transparent);
}

.v3-focus-list {
    display: grid;
    gap: 8px;
}

.v3-focus-item {
    min-width: 0;
    display: grid;
    gap: 5px;
    border: 1px solid var(--v3-app-border);
    border-radius: 9px;
    background: var(--v3-app-panel-soft);
    padding: 10px;
}

.v3-focus-item > span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.15;
    font-weight: 800;
}

.v3-focus-item > strong,
.v3-focus-item > p {
    margin: 0;
    color: var(--v3-app-text);
    font-size: 12.5px;
    line-height: 1.32;
    font-weight: 800;
}

.v3-focus-item--green > span .v3-icon {
    color: var(--v3-success-foreground);
}

.v3-focus-item--amber > span .v3-icon {
    color: var(--v3-warning-foreground);
}

.v3-focus-item--red > span .v3-icon {
    color: var(--v3-danger-foreground);
}

.v3-athletes-detail-section--coach-notes {
    background: color-mix(in oklch, var(--v3-app-panel-soft) 28%, transparent);
}

.v3-coach-note-form {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.v3-coach-note-form textarea {
    width: 100%;
    min-height: 76px;
    border: 1px solid var(--v3-app-border);
    border-radius: 9px;
    color: var(--v3-app-text);
    background: var(--v3-app-panel-soft);
    padding: 10px;
    font: inherit;
    font-size: 12.5px;
    line-height: 1.35;
    font-weight: 700;
    resize: none;
    outline: none;
}

.v3-coach-note-form textarea:focus {
    border-color: var(--v3-athletic-green);
    box-shadow: var(--v3-focus-ring);
}

.v3-coach-note-form textarea::placeholder {
    color: var(--v3-app-muted);
}

.v3-coach-note-form-meta {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
}

.v3-coach-note-form-meta > span,
.v3-coach-note-form-meta output {
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    font-weight: 800;
}

.v3-coach-note-form-meta output::after {
    content: "/160";
}

.v3-coach-note-error {
    color: var(--v3-danger-foreground) !important;
}

.v3-coach-note-history {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.v3-coach-note-item {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
    align-items: start;
    gap: 10px;
    border: 1px solid var(--v3-app-border);
    border-radius: 9px;
    background: var(--v3-app-panel-soft);
    padding: 10px;
}

.v3-coach-note-item-main,
.v3-coach-note-item-status {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.v3-coach-note-item-main p {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--v3-app-text);
    font-size: 12.5px;
    line-height: 1.35;
    font-weight: 800;
}

.v3-coach-note-item-main span {
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.2;
    font-style: normal;
    font-weight: 800;
}

.v3-coach-note-item-status {
    justify-items: end;
    text-align: right;
}

.v3-coach-note-item-status form {
    margin: 0;
}

.v3-coach-note-item-status button {
    position: relative;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--v3-app-border);
    border-radius: 8px;
    color: var(--v3-danger-foreground);
    background: transparent;
    padding: 0 8px;
    font: inherit;
    font-size: var(--v3-type-caption);
    font-weight: 800;
    cursor: pointer;
    transition: transform var(--v3-press-transition), border-color var(--v3-transition), background var(--v3-transition);
}

.v3-coach-note-item-status button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    min-width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
}

.v3-coach-note-item-status button:hover,
.v3-coach-note-item-status button:focus-visible {
    border-color: var(--v3-danger-border);
    outline: none;
}

.v3-row-action:active,
.v3-athletes-link-button:active,
.v3-coach-note-item-status button:active {
    transform: scale(0.96);
}

.v3-athlete-trend {
    width: 100%;
    height: 180px;
    display: block;
}

.v3-athlete-trend line {
    stroke: var(--v3-gauge-track);
    stroke-width: 0.75;
}

.v3-athlete-trend polyline {
    fill: none;
    stroke: var(--v3-athletic-green);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.1;
}

.v3-athlete-trend circle {
    fill: var(--v3-athletic-green);
    stroke: var(--v3-app-panel);
    stroke-width: 1;
}

.v3-athlete-trend text {
    fill: var(--v3-app-text);
    font-size: 6px;
    font-weight: 800;
    text-anchor: middle;
}

.v3-athlete-trend .v3-athlete-trend-label {
    fill: var(--v3-app-muted);
    font-size: 5px;
    font-weight: 700;
}

.v3-athlete-trend.is-empty {
    opacity: 0.58;
}

.v3-driver-list {
    display: grid;
    gap: 8px;
}

.v3-driver-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(128px, 1fr) minmax(86px, 0.9fr) 52px;
    align-items: center;
    gap: 10px;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    font-weight: 800;
}

.v3-driver-row span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v3-driver-row span .v3-icon {
    color: var(--v3-accent-foreground);
}

.v3-driver-row strong {
    color: var(--v3-app-text);
    font-size: var(--v3-type-caption);
    text-align: right;
}

.v3-driver-row strong em {
    color: var(--v3-app-muted);
    font-style: normal;
    font-weight: 700;
}

.v3-driver-row meter {
    width: 100%;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--v3-gauge-track);
}

.v3-driver-row meter::-webkit-meter-bar {
    border: 0;
    border-radius: 999px;
    background: var(--v3-gauge-track);
}

.v3-driver-row meter::-webkit-meter-optimum-value,
.v3-driver-row meter::-webkit-meter-suboptimum-value,
.v3-driver-row meter::-webkit-meter-even-less-good-value {
    border-radius: 999px;
    background: var(--v3-athletic-green);
}

.v3-driver-row--fair meter::-webkit-meter-optimum-value,
.v3-driver-row--fair meter::-webkit-meter-suboptimum-value,
.v3-driver-row--fair meter::-webkit-meter-even-less-good-value {
    background: var(--v3-alert-amber);
}

.v3-driver-row--low meter::-webkit-meter-optimum-value,
.v3-driver-row--low meter::-webkit-meter-suboptimum-value,
.v3-driver-row--low meter::-webkit-meter-even-less-good-value {
    background: var(--v3-danger-red);
}

.v3-athletes-detail-note {
    margin: 0;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.35;
    font-weight: 700;
}

.v3-athletes-detail-footer {
    padding: 12px 16px;
}

.v3-athletes-detail-footer span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.v3-athletes-detail-footer em {
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    font-style: normal;
    font-weight: 800;
}

.v3-athletes-detail-footer strong {
    color: var(--v3-app-text);
    font-size: 13px;
    font-weight: 800;
}

.v3-athletes-detail-empty {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 12px;
    padding: 18px;
}

.v3-athletes-detail-empty > div {
    width: 100%;
    min-height: 54px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--v3-app-border);
}

.v3-athletes-detail-empty > div .v3-icon {
    color: var(--v3-app-muted);
    font-size: 17px;
}

.v3-athletes-detail-empty strong,
.v3-athletes-detail-empty em {
    display: block;
}

.v3-athletes-detail-empty strong {
    color: var(--v3-app-text);
    font-size: 13px;
    font-weight: 800;
}

.v3-athletes-detail-empty em {
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    font-style: normal;
    font-weight: 700;
}

.v3-athletes-empty-code {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(82px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--v3-app-border);
    border-radius: 10px;
    background: var(--v3-app-panel-soft);
    padding: 10px;
}

.v3-athletes-empty-code > span {
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.v3-athletes-empty-code > strong {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--v3-app-text);
    background: var(--v3-app-panel);
    padding: 0 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.v3-athletes-empty-code > div,
.v3-athletes-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v3-athletes-empty-code > div {
    justify-content: flex-end;
}

.v3-athletes-empty-actions {
    align-items: center;
}

.v3-athletes-empty-roster {
    display: grid;
    gap: 16px;
    padding: 28px 0 18px;
    border-bottom: 1px solid var(--v3-app-border);
}

.v3-athletes-empty-roster > div:first-child {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
}

.v3-athletes-empty-roster span[aria-hidden="true"] {
    width: 50px;
    height: 50px;
    color: var(--v3-app-muted);
    font-size: 24px;
}

.v3-athletes-empty-roster strong {
    color: var(--v3-app-text);
    font-size: 15px;
    font-weight: 800;
}

.v3-athletes-empty-roster p {
    max-width: 54ch;
    margin: 0;
    color: var(--v3-app-muted);
    font-size: 12.5px;
    line-height: 1.4;
    font-weight: 700;
}

.v3-athletes-ghost-rows {
    display: grid;
    gap: 9px;
}

.v3-athletes-ghost-rows span {
    height: 15px;
    border-radius: var(--v3-radius-pill);
    background: var(--v3-app-panel-muted);
}

.v3-athletes-ghost-rows span:nth-child(2) {
    width: 82%;
}

.v3-athletes-ghost-rows span:nth-child(3) {
    width: 64%;
}

/* Roster-first Athletes layout */
.v3-athletes {
    grid-template-rows: minmax(0, 1fr) auto;
}

.v3-athletes--empty {
    grid-template-rows: minmax(0, 1fr) auto;
}

.v3-athletes-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.v3-athletes-panel--roster {
    grid-template-rows: auto minmax(0, 1fr);
}

.v3-athletes-toolbar {
    grid-template-columns: minmax(240px, 460px) minmax(0, 1fr) 40px;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 12px 18px;
}

.v3-athletes-toolbar label {
    min-height: 44px;
    border-radius: 10px;
    padding: 0 12px;
}

.v3-athletes-table {
    min-width: 1180px;
    padding: 0;
}

.v3-athletes-row {
    min-height: 66px;
    grid-template-columns:
        minmax(210px, 1.25fr)
        minmax(126px, 0.62fr)
        minmax(210px, 1fr)
        minmax(118px, 0.55fr)
        minmax(214px, 1.08fr)
        minmax(106px, 0.54fr)
        minmax(96px, 0.45fr);
    gap: 10px;
    padding: 0 18px;
}

.v3-athletes-row:not(.v3-athletes-row--head) {
    min-height: 70px;
    border-radius: 0;
    margin-top: 0;
    padding: 0 18px;
}

.v3-athletes-row--head {
    min-height: 44px;
    padding: 0 18px;
}

.v3-athletes-row > span:last-child {
    right: 0;
    background: var(--v3-app-panel);
}

.v3-athlete-cell {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
}

.v3-athlete-avatar {
    width: 42px;
    height: 42px;
    font-size: 13px;
}

.v3-athlete-readiness-cell {
    grid-template-columns: 58px minmax(54px, auto) minmax(72px, 1fr);
    gap: 10px;
}

.v3-athlete-score-ring {
    width: 58px;
    height: 36px;
}

.v3-athlete-score-ring::before {
    border-radius: 58px 58px 0 0;
    mask: radial-gradient(circle at 50% 100%, transparent 0 16px, oklch(0.12 0.005 220) 17px);
}

.v3-athlete-score-ring span {
    left: 14px;
    right: 14px;
}

.v3-athlete-readiness-score strong {
    color: var(--v3-success-foreground);
    font-family: var(--v3-font-display);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}

.v3-athlete-readiness-context strong {
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    font-weight: 800;
}

.v3-athlete-readiness-context em,
.v3-athlete-range-cell strong {
    display: block;
}

.v3-athlete-range-cell strong {
    color: var(--v3-app-text);
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.v3-athletes-table-hint {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    color: var(--v3-app-muted);
    font-size: 13px;
    font-weight: 800;
}

.v3-athlete-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    place-items: center;
    padding: 22px;
}

.v3-athlete-modal.is-open {
    display: grid;
}

.v3-athlete-modal-backdrop {
    position: absolute;
    inset: 0;
    background: oklch(0.08 0.012 220 / 0.72);
    text-decoration: none;
}

.v3-athlete-modal-panel {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100vw - 44px));
    max-height: min(860px, calc(var(--v3-viewport-height) - 44px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--v3-app-border);
    border-radius: 12px;
    color: var(--v3-app-text);
    background: var(--v3-app-panel);
    box-shadow: 0 28px 80px oklch(0.06 0.014 220 / 0.48);
}

.v3-athlete-modal-panel .v3-athletes-detail-header {
    grid-template-columns: 76px minmax(190px, 1fr) auto 110px 42px;
    gap: 18px;
    padding: 20px 24px;
}

.v3-athlete-modal-panel .v3-athletes-detail-avatar {
    width: 76px;
    height: 76px;
    font-size: 25px;
}

.v3-athlete-modal-panel .v3-athletes-detail-header h2 {
    font-size: 25px;
    letter-spacing: 0;
}

.v3-athlete-modal-panel .v3-athletes-detail-header p {
    margin-top: 6px;
    font-size: 13px;
}

.v3-athlete-modal-body {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(340px, 1.38fr) minmax(280px, 0.86fr);
    grid-auto-rows: minmax(0, auto);
    gap: 8px;
    overflow: auto;
    padding: 8px 24px 18px;
}

.v3-athlete-modal-body .v3-athletes-detail-section {
    align-content: start;
    border: 1px solid var(--v3-app-border);
    border-radius: 10px;
    background: color-mix(in oklch, var(--v3-app-panel-soft) 44%, transparent);
    padding: 14px 16px;
}

.v3-athletes-detail-section--summary {
    grid-column: span 2;
}

.v3-athletes-detail-section--trend {
    grid-column: 1 / -1;
}

.v3-athletes-detail-section--drivers {
    grid-column: 1 / -1;
}

.v3-athlete-detail-grid,
.v3-athlete-health-list {
    display: grid;
    gap: 9px;
    margin: 0;
}

.v3-athlete-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v3-athlete-detail-grid div,
.v3-athlete-health-list div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.v3-athlete-detail-grid dt,
.v3-athlete-health-list dt {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    font-weight: 800;
}

.v3-athlete-detail-grid dd,
.v3-athlete-health-list dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--v3-app-text);
    font-size: 12.5px;
    font-weight: 800;
}

.v3-athlete-summary-grid {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.v3-athlete-summary-grid > .v3-detail-score-gauge {
    width: 138px;
    height: 98px;
}

.v3-athlete-summary-grid > .v3-detail-score-gauge strong {
    font-size: 42px;
}

.v3-athlete-summary-grid > .v3-detail-score-gauge::before {
    border-radius: 138px 138px 0 0;
    mask: radial-gradient(circle at 50% 100%, transparent 0 42px, oklch(0.12 0.005 220) 43px);
}

.v3-athlete-summary-grid .v3-athletes-detail-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 0;
    padding: 0;
}

.v3-athlete-status-line {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 0;
    border: 1px solid var(--v3-success-border);
    border-radius: 9px;
    color: var(--v3-app-text);
    background: transparent;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 800;
}

.v3-athlete-status-line--amber {
    border-color: var(--v3-warning-border);
    background: transparent;
}

.v3-athlete-status-line--red {
    border-color: var(--v3-danger-border);
    background: transparent;
}

.v3-athlete-status-line--blue {
    border-color: oklch(0.54 0.09 220 / 0.34);
    background: oklch(0.54 0.09 220 / 0.10);
}

.v3-athlete-trend-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.28fr);
    gap: 14px;
    align-items: stretch;
}

.v3-athlete-trend-summary {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 6px;
    border: 1px solid var(--v3-app-border);
    border-radius: 9px;
    background: var(--v3-app-panel-soft);
    padding: 12px;
}

.v3-athlete-trend-summary strong {
    color: var(--v3-app-text);
    font-size: 15px;
    font-weight: 800;
}

.v3-athlete-trend-summary span {
    color: var(--v3-app-muted);
    font-size: var(--v3-type-caption);
    line-height: 1.35;
    font-weight: 700;
}

.v3-athlete-modal-panel .v3-athletes-detail-footer {
    justify-content: start;
    border-top: 1px solid var(--v3-app-border);
    padding: 12px 24px;
}

.v3-athlete-modal-panel .v3-athletes-detail-footer .v3-coach-button {
    min-width: 190px;
}

:root[data-v3-theme="light"] .v3-athletes-summary,
:root[data-v3-theme="light"] .v3-athletes-empty-panel,
:root[data-v3-theme="light"] .v3-athletes-panel,
:root[data-v3-theme="light"] .v3-athlete-modal-panel {
    border-color: oklch(0.55 0.018 220 / 0.16);
    background: oklch(0.995 0.004 220);
}

:root[data-v3-theme="light"] .v3-athletes-empty-code,
:root[data-v3-theme="light"] .v3-athletes-empty-code > strong,
:root[data-v3-theme="light"] .v3-athletes-toolbar label,
:root[data-v3-theme="light"] .v3-athletes-detail-kpis > div,
:root[data-v3-theme="light"] .v3-focus-item,
:root[data-v3-theme="light"] .v3-coach-note-form textarea,
:root[data-v3-theme="light"] .v3-coach-note-item,
:root[data-v3-theme="light"] .v3-athlete-modal-body .v3-athletes-detail-section,
:root[data-v3-theme="light"] .v3-athlete-trend-summary {
    border-color: oklch(0.55 0.018 220 / 0.16);
    background: oklch(0.976 0.004 220);
}

:root[data-v3-theme="light"] .v3-athletes-row--head {
    background: oklch(0.995 0.004 220);
}

:root[data-v3-theme="light"] .v3-athletes-link-button,
:root[data-v3-theme="light"] .v3-row-action,
:root[data-v3-theme="light"] .v3-coach-note-item-status button {
    border-color: oklch(0.55 0.018 220 / 0.16);
}

@media (max-width: 1080px) {
    .v3-athletes-empty-panel {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .v3-athletes-empty-code,
    .v3-athletes-empty-actions {
        grid-column: 1 / -1;
    }

    .v3-athletes-workspace {
        grid-template-columns: minmax(0, 1fr);
        overflow: auto;
    }

    .v3-athlete-modal-body {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v3-athletes-detail-section--summary,
    .v3-athletes-detail-section--trend,
    .v3-athletes-detail-section--drivers {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1100px) {
    .v3-athletes-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .v3-athletes-stat:nth-child(3) {
        border-right: 0;
    }

    .v3-athletes-stat:nth-child(n + 4) {
        border-top: 1px solid var(--v3-app-border);
    }
}

@media (max-width: 920px) {
    .v3-app-main.v3-app-main--athletes {
        height: auto;
        min-height: var(--v3-viewport-height);
        overflow: visible;
    }

    .v3-athletes {
        min-height: auto;
    }

    .v3-athletes-toolbar {
        grid-template-columns: 1fr auto;
    }

    .v3-athletes-table-wrap {
        overflow-x: auto;
    }
}

@media (max-width: 680px) {
    .v3-athletes-empty-panel {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .v3-athletes-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v3-athletes-stat,
    .v3-athletes-stat:nth-child(n) {
        min-height: 68px;
        border-right: 1px solid var(--v3-app-border);
        border-top: 1px solid var(--v3-app-border);
        padding: 10px 14px;
    }

    .v3-athletes-stat:nth-child(-n + 2) {
        border-top: 0;
    }

    .v3-athletes-stat:nth-child(even),
    .v3-athletes-stat:last-child {
        border-right: 0;
    }

    .v3-athletes-stat:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .v3-athletes-toolbar {
        grid-template-columns: 1fr;
        padding-inline: 12px;
    }

    .v3-athletes-toolbar label,
    .v3-athletes-link-button,
    .v3-row-action {
        min-height: 44px;
    }

    .v3-athlete-modal {
        padding:
            max(8px, var(--v3-safe-top))
            max(8px, var(--v3-safe-right))
            max(8px, var(--v3-safe-bottom))
            max(8px, var(--v3-safe-left));
    }

    .v3-athlete-modal-panel {
        width: 100%;
        max-height: calc(var(--v3-viewport-height) - var(--v3-safe-top) - var(--v3-safe-bottom) - 16px);
    }

    .v3-athlete-modal-panel .v3-athletes-detail-header {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    .v3-athlete-modal-panel .v3-athletes-detail-avatar {
        width: 52px;
        height: 52px;
        font-size: 17px;
    }

    .v3-athlete-modal-panel .v3-athletes-detail-header h2 {
        font-size: 20px;
    }

    .v3-athlete-modal-panel .v3-athletes-detail-header .v3-availability,
    .v3-athlete-modal-panel .v3-athletes-detail-header .v3-detail-score-gauge,
    .v3-athlete-modal-close {
        grid-column: auto;
        justify-self: start;
    }

    .v3-athlete-modal-close {
        position: absolute;
        top: 12px;
        right: 12px;
        justify-self: start;
    }

    .v3-athlete-modal-body {
        grid-template-columns: 1fr;
        padding: 8px 14px 14px;
    }

    .v3-athlete-detail-grid,
    .v3-athlete-summary-grid,
    .v3-athlete-trend-layout {
        grid-template-columns: 1fr;
    }

    .v3-athletes-detail-kpis {
        grid-template-columns: 1fr;
    }

    .v3-driver-row {
        grid-template-columns: 1fr;
    }

    .v3-coach-note-form-meta,
    .v3-coach-note-item {
        grid-template-columns: 1fr;
    }

    .v3-coach-note-form-meta .v3-coach-button,
    .v3-coach-note-item-status {
        justify-self: stretch;
    }

    .v3-coach-note-item-status {
        justify-items: start;
        text-align: left;
    }

    .v3-driver-row strong {
        text-align: left;
    }

    .v3-athletes-empty-code {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .v3-athletes-empty-code > div,
    .v3-athletes-empty-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .v3-athletes-empty-actions .v3-coach-button,
    .v3-athletes-empty-actions .v3-athletes-link-button {
        flex: 1 1 180px;
    }
}

/* Final cascade for the roster scan table. */
.v3-athletes,
.v3-athletes--empty {
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
}

.v3-athletes-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.v3-athletes-panel--roster {
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.v3-athletes-toolbar {
    min-height: var(--v3-control-standard);
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 16px;
    border-bottom: 1px solid var(--v3-app-border);
    padding: 0 16px;
}

.v3-athletes-toolbar label {
    min-height: 38px;
    border-radius: 8px;
    padding: 0 10px;
}

.v3-athletes-table {
    min-width: 980px;
    padding: 0;
}

.v3-athletes-row,
.v3-athletes-row:not(.v3-athletes-row--head) {
    min-height: 84px;
    grid-template-columns:
        148px
        minmax(148px, 0.78fr)
        minmax(174px, 0.9fr)
        minmax(166px, 0.92fr)
        minmax(150px, 0.84fr)
        minmax(136px, 0.7fr)
        36px;
    gap: 8px;
    border-radius: 0;
    margin: 0;
    padding: 0 12px;
}

.v3-athletes-row--head {
    min-height: 44px;
    padding: 0 12px;
}

.v3-athletes-row > span:last-child,
.v3-athletes-row:not(.v3-athletes-row--head):hover > span:last-child,
.v3-athletes-row:not(.v3-athletes-row--head):focus-visible > span:last-child,
.v3-athletes-row.is-selected > span:last-child {
    position: static;
    padding-left: 0;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 920px) {
    .v3-app-main.v3-app-main--athletes {
        min-height: var(--v3-viewport-height);
    }

    .v3-athletes-toolbar {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 8px;
    }

    .v3-athletes-toolbar-actions {
        order: 1;
    }
}

@media (max-width: 680px) {
    .v3-athletes-toolbar {
        grid-template-columns: 1fr;
        padding-inline: 12px;
    }

    .v3-athletes-toolbar-actions,
    .v3-athletes-toolbar-actions label {
        width: 100%;
    }

}

/* Responsive roster contract: one flat row, one native detail action. */
.v3-athletes-row:not(.v3-athletes-row--head) {
    cursor: default;
}

.v3-roster-athlete-copy > .v3-roster-mobile-summary {
    display: none;
}

@media (max-width: 920px) {
    .v3-athletes-workspace,
    .v3-athletes-panel--roster,
    .v3-athletes-table-wrap {
        min-width: 0;
        overflow: visible;
    }

    .v3-athletes-table {
        width: 100%;
        min-width: 0;
    }

    .v3-athletes-row--head {
        display: none;
    }

    .v3-athletes-row:not(.v3-athletes-row--head) {
        width: 100%;
        min-height: 82px;
        grid-template-columns: minmax(0, 1fr) 68px 44px;
        grid-template-areas: "athlete score open";
        gap: 8px;
        padding: 10px 12px;
    }

    .v3-roster-athlete {
        grid-area: athlete;
        display: flex;
        align-items: center;
    }

    .v3-roster-today {
        grid-area: score;
        justify-content: center;
    }

    .v3-roster-open {
        grid-area: open;
    }

    .v3-roster-history,
    .v3-roster-signals,
    .v3-roster-context,
    .v3-roster-checkins {
        display: none;
    }

    .v3-roster-athlete-copy {
        width: 100%;
        gap: 7px;
    }

    .v3-roster-athlete-copy > strong {
        overflow-wrap: anywhere;
        font-size: var(--v3-type-body);
    }

    .v3-roster-athlete-copy > .v3-roster-athlete-meta {
        display: none;
    }

    .v3-roster-athlete-copy > .v3-roster-mobile-summary {
        --v3-roster-mobile-tone: var(--v3-neutral-grey);
        min-width: 0;
        display: grid;
        gap: 3px;
        color: var(--v3-app-muted);
    }

    .v3-roster-mobile-summary--green {
        --v3-roster-mobile-tone: var(--v3-success-foreground);
    }

    .v3-roster-mobile-summary--amber {
        --v3-roster-mobile-tone: var(--v3-warning-foreground);
    }

    .v3-roster-mobile-summary--red {
        --v3-roster-mobile-tone: var(--v3-danger-foreground);
    }

    .v3-roster-mobile-summary--blue {
        --v3-roster-mobile-tone: var(--v3-signal-blue);
    }

    .v3-roster-mobile-summary > span {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 5px;
        overflow-wrap: anywhere;
        font-size: var(--v3-type-caption);
        line-height: 1.3;
        font-style: normal;
        font-weight: 800;
    }

    .v3-roster-mobile-summary > span:first-child {
        color: var(--v3-roster-mobile-tone);
        font-weight: 800;
    }

    .v3-roster-mobile-summary > .v3-roster-mobile-availability--injured,
    .v3-roster-mobile-summary > .v3-roster-mobile-availability--unavailable {
        color: var(--v3-danger-foreground);
    }

    .v3-roster-mobile-summary > .v3-roster-mobile-availability--sick {
        color: var(--v3-warning-foreground);
    }

    .v3-roster-mobile-summary > span:first-child .v3-icon {
        flex: 0 0 auto;
        font-size: var(--v3-type-caption);
    }

    .v3-roster-score-gauge {
        width: 64px;
        height: 44px;
    }

}

/* Tablet roster: keep the review table within the workspace left by the fixed rail. */
@media (min-width: 921px) and (max-width: 1260px) {
    .v3-athletes-table-wrap {
        overflow-x: hidden;
    }

    .v3-athletes-table {
        width: 100%;
        min-width: 0;
    }

    .v3-athletes-row,
    .v3-athletes-row:not(.v3-athletes-row--head) {
        min-height: 72px;
        grid-template-columns:
            120px
            minmax(120px, 0.75fr)
            144px
            minmax(90px, 0.9fr)
            minmax(68px, 0.8fr)
            108px
            40px;
        gap: 6px;
        padding-inline: 8px;
    }

    .v3-athletes-row--head {
        min-height: 44px;
    }

    .v3-roster-score-gauge {
        width: 64px;
        height: 44px;
    }

    .v3-roster-athlete-copy {
        gap: 4px;
    }

    .v3-roster-athlete-copy > strong {
        font-size: var(--v3-type-label);
        overflow-wrap: anywhere;
    }

    .v3-roster-history {
        grid-template-columns: repeat(3, 46px);
        gap: 3px;
    }

    .v3-roster-history-gauge {
        width: 46px;
        height: 32px;
    }

    .v3-roster-signal,
    .v3-roster-signal-more {
        min-height: 26px;
        padding: 3px 6px;
    }

    .v3-roster-checkin-dots {
        display: none;
    }

    .v3-roster-checkins {
        justify-content: center;
    }

    .v3-roster-open,
    .v3-roster-detail-link {
        width: 40px;
        min-width: 40px;
    }
}
