/* Design tokens */

:root {
    --ink: #172026;
    --muted: #66727d;
    --line: #d7e0e4;
    --panel: #ffffff;
    --panel-soft: #f8fafb;
    --bg: #f3f5f2;
    --green: #1f6f5b;
    --button-color: #1f6f5b;
    --button-text-color: #ffffff;
    --selection-color: #315f8c;
    --selection-text-color: #ffffff;
    --green-dark: #155142;
    --blue: #315f8c;
    --gold: #bf8f32;
    --red: #a64545;
    --shadow: 0 16px 38px rgba(24, 32, 38, 0.075);
    --shadow-soft: 0 8px 22px rgba(24, 32, 38, 0.06);
    --control-height: 36px;
    --icon-button-size: 34px;
    --icon-button-size-compact: 28px;
    --control-radius: 7px;
    --panel-radius: 8px;
    --control-transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
    --table-min-width: 720px;
    --table-cell-padding: 6px 8px;
    --table-cell-font-size: 12px;
    --table-head-font-size: 10px;
    --table-head-bg: #f7f9fa;
    --table-head-color: #5b6871;
    --table-toolbar-gap: 12px;
    --table-toolbar-margin: 16px;
    --table-action-gap: 8px;
    --table-pagination-size: 36px;
}

/* Training exercise library, units and tactical editor */

.training-module-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    margin: 0 0 14px;
    padding: 2px 0;
}

.training-module-nav a {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--button-radius);
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
}

.training-module-nav a.is-active {
    border-color: var(--button-color);
    background: var(--button-color);
    color: var(--button-text-color);
}

.training-library-hero,
.training-units-hero {
    overflow: hidden;
    background: linear-gradient(135deg, color-mix(in srgb, var(--button-color) 8%, #fff), #fff 64%);
}

.training-library-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.training-library-summary a {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--button-color) 18%, var(--line));
    border-radius: var(--panel-radius);
    background: rgba(255, 255, 255, .88);
    color: var(--ink);
}

.training-library-summary span {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.training-library-summary strong {
    color: var(--button-color);
    font-size: 22px;
    font-weight: 900;
}

.training-category-manager,
.training-exercise-form-surface,
.training-unit-builder {
    border-color: color-mix(in srgb, var(--button-color) 28%, var(--line));
}

.training-category-manager .compact-form {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 18px;
}

.training-library-filters {
    display: grid;
    grid-template-columns: minmax(210px, 1.5fr) repeat(5, minmax(130px, .75fr));
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.training-library-filters input,
.training-library-filters select,
.training-library-filters button {
    min-width: 0;
    width: 100%;
}

.training-exercise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.training-exercise-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    background: #fff;
    box-shadow: 0 5px 20px rgba(21, 41, 33, .04);
}

.training-exercise-card:hover {
    border-color: color-mix(in srgb, var(--button-color) 40%, var(--line));
    box-shadow: 0 8px 26px rgba(21, 41, 33, .08);
}

.training-exercise-visual {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1000 / 620;
    background: #e9eeeb;
}

.training-exercise-visual img,
.training-exercise-visual canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.training-exercise-visual-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 2px dashed #aebbb5;
    border-radius: 16px;
    color: #74837c;
    font-size: 28px;
}

.training-exercise-visual.is-large {
    min-height: 310px;
    border-radius: var(--panel-radius);
}

.training-exercise-visual.is-compact {
    width: 108px;
    min-width: 108px;
    border-radius: 8px;
}

.training-exercise-visual.is-print {
    width: min(420px, 42%);
    min-width: 260px;
    border: 1px solid #cfd8d3;
    border-radius: 8px;
}

.training-exercise-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.training-exercise-card-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.training-exercise-card-heading h3,
.training-exercise-card-heading small,
.training-exercise-card-body p {
    margin: 0;
}

.training-exercise-card-heading h3 {
    margin-top: 2px;
    font-size: 15px;
}

.training-exercise-card-heading h3 a {
    color: var(--ink);
}

.training-exercise-card-heading small,
.training-exercise-card-body p {
    color: var(--muted);
    font-size: 11px;
}

.training-favorite-button {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: #b8c0bd;
    font-size: 19px;
}

.training-favorite-button.is-active {
    border-color: #e5b83c;
    background: #fff8d8;
    color: #d69a05;
}

.training-exercise-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.training-exercise-tags span {
    overflow: hidden;
    max-width: 100%;
    padding: 4px 7px;
    border-radius: 999px;
    background: #f0f4f2;
    color: #52645c;
    font-size: 10px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.training-exercise-card footer {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    background: #fbfcfb;
}

.training-exercise-card footer > .mini-button {
    margin-right: auto;
}

.training-exercise-card footer form {
    display: inline-flex;
}

.training-exercise-age-groups > div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.training-exercise-age-groups label {
    display: flex;
    gap: 7px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 11px;
}

.training-exercise-age-groups input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.training-diagram-editor {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    background: #f5f8f6;
}

.training-diagram-heading {
    display: flex;
    gap: 15px;
    align-items: end;
    justify-content: space-between;
}

.training-diagram-heading > div,
.training-diagram-heading strong,
.training-diagram-heading small {
    display: grid;
    gap: 3px;
}

.training-diagram-heading small {
    color: var(--muted);
    font-size: 11px;
}

.training-diagram-heading label {
    width: min(210px, 100%);
}

.training-diagram-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.training-diagram-toolbar button {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 10px;
}

.training-diagram-toolbar button.is-active {
    border-color: var(--button-color);
    background: var(--button-color);
    color: var(--button-text-color);
}

.training-diagram-toolbar button.danger-button {
    color: #a52626;
}

.training-diagram-canvas-wrap {
    overflow: hidden;
    border: 1px solid #bdc9c3;
    border-radius: 10px;
    background: #1e6d30;
    touch-action: none;
}

.training-diagram-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
    touch-action: none;
}

.training-exercise-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(230px, .7fr);
    gap: 16px;
}

.training-exercise-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    align-content: start;
}

.training-exercise-detail-meta article,
.training-exercise-copy-grid article {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.training-exercise-detail-meta span,
.training-exercise-detail-meta strong {
    display: block;
}

.training-exercise-detail-meta span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
}

.training-exercise-copy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.training-exercise-copy-grid h3,
.training-exercise-copy-grid p {
    margin: 0;
}

.training-exercise-copy-grid h3 {
    margin-bottom: 7px;
    font-size: 13px;
}

.training-exercise-copy-grid p {
    color: #405149;
    font-size: 12px;
    line-height: 1.55;
}

.training-exercise-media-links {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.training-exercise-media-links video {
    width: min(680px, 100%);
    max-height: 420px;
    border-radius: 10px;
    background: #111;
}

.training-unit-exercise-list {
    display: grid;
    gap: 8px;
}

.training-unit-exercise-row {
    display: grid;
    grid-template-columns: 28px 108px minmax(180px, 1fr) minmax(145px, .55fr) 80px auto;
    gap: 10px;
    align-items: center;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.training-unit-exercise-row.is-dragging {
    opacity: .45;
    border-color: var(--button-color);
}

.training-unit-drag-handle {
    color: #718078;
    font-size: 21px;
    font-weight: 900;
    cursor: grab;
    text-align: center;
}

.training-unit-exercise-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.training-unit-exercise-copy strong,
.training-unit-exercise-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.training-unit-exercise-copy small {
    color: var(--muted);
    font-size: 10px;
}

.training-unit-exercise-copy input,
.training-unit-exercise-row select,
.training-unit-exercise-row label input {
    min-width: 0;
    width: 100%;
    padding: 8px;
}

.training-unit-exercise-row label {
    min-width: 0;
    font-size: 10px;
}

.training-unit-total {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--button-color) 7%, #fff);
}

.training-unit-total span {
    color: var(--muted);
    font-size: 11px;
}

.training-unit-total strong {
    margin-right: auto;
    color: var(--button-color);
    font-size: 20px;
}

.training-unit-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.training-unit-picker-grid > article {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.training-unit-picker-grid article > div:not(.training-exercise-visual),
.training-unit-picker-grid article strong,
.training-unit-picker-grid article small {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.training-unit-picker-grid article strong,
.training-unit-picker-grid article small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.training-unit-picker-grid article small {
    color: var(--muted);
    font-size: 10px;
}

.training-unit-list tr.is-selected-row td {
    background: color-mix(in srgb, var(--button-color) 7%, #fff);
}

.training-unit-print-preview {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.training-unit-print-preview > summary {
    color: var(--button-color);
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.training-unit-print-header {
    display: flex;
    gap: 18px;
    align-items: end;
    justify-content: space-between;
    padding: 18px 0 12px;
    border-bottom: 2px solid var(--button-color);
}

.training-unit-print-header span,
.training-unit-print-header h2 {
    margin: 0;
}

.training-unit-print-header dl {
    display: flex;
    gap: 18px;
    margin: 0;
}

.training-unit-print-header dl div,
.training-unit-print-header dt,
.training-unit-print-header dd {
    display: grid;
    gap: 2px;
    margin: 0;
}

.training-unit-print-header dt {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.training-unit-print-header dd {
    font-size: 11px;
    font-weight: 800;
}

.training-unit-print-phase > h3 {
    margin: 18px 0 8px;
    padding: 8px 10px;
    border-radius: 7px;
    background: #eef3f0;
    font-size: 13px;
}

.training-unit-print-exercise {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    break-inside: avoid;
}

.training-unit-print-exercise > div:last-child {
    flex: 1 1 auto;
}

.training-unit-print-exercise h4 {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin: 0 0 8px;
}

.training-unit-print-exercise h4 span {
    color: var(--button-color);
    font-size: 11px;
}

.training-unit-print-exercise p {
    margin: 5px 0;
    font-size: 11px;
    line-height: 1.45;
}

.training-instance-exercise-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.training-instance-exercise-list > section > h3 {
    margin: 0 0 7px;
    padding: 8px 10px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--button-color) 8%, #fff);
    font-size: 12px;
}

.training-instance-exercise-list article {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.training-instance-exercise-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    aspect-ratio: 1000 / 620;
    border-radius: 8px;
    background: #e8eeea;
}

.training-instance-exercise-visual img,
.training-instance-exercise-visual canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.training-instance-exercise-list h4 {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin: 0 0 7px;
}

.training-instance-exercise-list h4 span {
    color: var(--button-color);
    font-size: 11px;
    white-space: nowrap;
}

.training-instance-exercise-list p,
.training-instance-exercise-list small {
    display: block;
    margin: 4px 0;
    color: #4b5a53;
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .training-exercise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .training-library-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .training-unit-exercise-row { grid-template-columns: 28px 92px minmax(150px, 1fr) minmax(130px, .55fr) 72px; }
    .training-unit-exercise-row > .row-actions { grid-column: 3 / -1; justify-content: flex-end; }
    .training-unit-picker-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .training-library-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .training-category-manager .compact-form,
    .training-library-filters,
    .training-exercise-grid,
    .training-exercise-detail-grid,
    .training-exercise-copy-grid { grid-template-columns: 1fr; }
    .training-exercise-age-groups > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .training-diagram-heading { align-items: stretch; flex-direction: column; }
    .training-diagram-heading label { width: 100%; }
    .training-diagram-toolbar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .training-diagram-toolbar button { flex: 0 0 auto; }
    .training-unit-exercise-row { grid-template-columns: 24px 78px minmax(0, 1fr); }
    .training-unit-exercise-row > label { grid-column: span 1; }
    .training-unit-exercise-row > label:first-of-type { grid-column: 2 / 3; }
    .training-unit-exercise-row > .row-actions { grid-column: 3 / 4; }
    .training-unit-picker-grid > article { grid-template-columns: 82px minmax(0, 1fr); }
    .training-unit-picker-grid > article form { grid-column: 2; }
    .training-exercise-visual.is-compact { width: 78px; min-width: 78px; }
    .training-unit-print-exercise { flex-direction: column; }
    .training-exercise-visual.is-print { width: 100%; min-width: 0; }
    .training-unit-print-header { align-items: flex-start; flex-direction: column; }
    .training-unit-print-header dl { flex-wrap: wrap; }
    .training-instance-exercise-list article { grid-template-columns: 1fr; }
}

/* Área de Staff — agenda mensal */
.staff-agenda-heading {
    align-items: center;
}

.staff-agenda-month-navigation {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.staff-agenda-month-navigation strong {
    min-width: 152px;
    text-align: center;
}

.staff-agenda-filters {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #dfe7ea;
    border-radius: 10px;
    background: #f8fafb;
}

.staff-agenda-filters label {
    display: grid;
    gap: 5px;
    min-width: 190px;
    color: #52646d;
    font-size: 12px;
    font-weight: 700;
}

.staff-agenda-weekdays,
.staff-agenda-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.staff-agenda-weekdays {
    margin-top: 18px;
    border: 1px solid #dfe7ea;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #f5f8f9;
}

.staff-agenda-weekdays span {
    padding: 9px 6px;
    border-right: 1px solid #dfe7ea;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.staff-agenda-weekdays span:last-child {
    border-right: 0;
}

.staff-agenda-calendar {
    overflow: hidden;
    border: 1px solid #dfe7ea;
    border-radius: 0 0 10px 10px;
}

.staff-agenda-day {
    min-height: 138px;
    padding: 7px;
    border-right: 1px solid #dfe7ea;
    border-bottom: 1px solid #dfe7ea;
    background: #fff;
}

.staff-agenda-day:nth-child(7n) {
    border-right: 0;
}

.staff-agenda-day:nth-last-child(-n + 7) {
    border-bottom: 0;
}

.staff-agenda-day > header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 5px;
}

.staff-agenda-day > header time {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    color: #52646d;
    font-size: 12px;
    font-weight: 800;
}

.staff-agenda-day.is-today > header time {
    background: var(--selection-color);
    color: #fff;
}

.staff-agenda-day.is-outside-month {
    background: #fafcfc;
}

.staff-agenda-day.is-outside-month > header time {
    color: #a7b2b7;
}

.staff-agenda-day-events {
    display: grid;
    gap: 5px;
}

.staff-agenda-event {
    display: block;
    overflow: hidden;
    padding: 5px 6px;
    border-left: 3px solid #3970a6;
    border-radius: 4px;
    background: #eef5fb;
    color: #243840;
    font-size: 11px;
    line-height: 1.25;
    text-decoration: none;
}

.staff-agenda-event:hover {
    filter: brightness(.97);
}

.staff-agenda-event.is-game {
    border-left-color: #c78324;
    background: #fff5e7;
}

.staff-agenda-event.is-occupied {
    border-left-color: #9b4e75;
    background: #f9edf3;
    cursor: default;
}

.staff-agenda-event.is-blocked {
    border-left-color: #6f7880;
    background: #f0f2f3;
    cursor: default;
}

.staff-training-workflow {
    margin-bottom: 16px;
}

.staff-training-selector {
    margin-bottom: 16px;
}

.staff-training-edit {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #dfe7ea;
}

.staff-training-edit > summary {
    cursor: pointer;
    color: var(--selection-color);
    font-weight: 800;
}

.staff-training-edit[open] > form {
    margin-top: 14px;
}

.training-validation-notice {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid #e6c26a;
    border-radius: 9px;
    background: #fff8e7;
    color: #705214;
    font-size: 13px;
}

.staff-training-library-link { margin: 14px 0 4px; }
.staff-library-type-tabs { margin: 14px 0 16px; }
.staff-exercise-grid { margin-top: 12px; }
.staff-exercise-grid .training-exercise-visual { min-height: 210px; }
.training-exercise-staff-objective { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.staff-exercise-detail { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--panel-radius); background: #fbfcfb; }
.staff-exercise-detail-grid { display: grid; grid-template-columns: minmax(320px, 1.1fr) minmax(260px, .9fr); gap: 18px; align-items: start; }
.staff-exercise-detail-grid .training-exercise-visual { border-radius: 10px; min-height: 300px; }
.staff-exercise-detail article { margin: 0 0 12px; padding: 12px; border: 1px solid #e5ebea; border-radius: 9px; background: #fff; }
.staff-exercise-detail article h3, .staff-exercise-detail article p { margin: 0; }
.staff-exercise-detail article p { margin-top: 7px; white-space: pre-line; }
.staff-exercise-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.staff-exercise-meta div { padding: 10px; border: 1px solid #e5ebea; border-radius: 9px; background: #fff; }
.staff-exercise-meta dt { color: var(--muted); font-size: 11px; }
.staff-exercise-meta dd { margin: 3px 0 0; font-weight: 700; font-size: 13px; }
@media (max-width: 760px) { .staff-exercise-detail-grid { grid-template-columns: 1fr; } .staff-exercise-grid .training-exercise-visual { min-height: 170px; } }
.staff-training-document-list { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.staff-training-document-list small { color: var(--muted); }
.staff-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.staff-library-exercise-picker { border: 1px solid var(--border, #dce4ea); border-radius: 10px; padding: 12px; margin: 14px 0; max-height: 260px; overflow: auto; }
.staff-library-exercise-picker legend { font-weight: 700; padding: 0 6px; }
.staff-library-exercise-picker label { display: block; padding: 7px 3px; border-bottom: 1px solid #edf1f4; }
.staff-library-exercise-picker label:last-child { border-bottom: 0; }
.staff-library-exercise-picker small { color: var(--muted); margin-left: 6px; }
@media (max-width: 900px) { .staff-library-grid { grid-template-columns: 1fr; } }

.training-validation-notice strong {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: #d59a22;
    color: #fff;
}

.staff-agenda-event time {
    margin-right: 4px;
    color: #436273;
    font-weight: 800;
}

.staff-agenda-event span,
.staff-agenda-event small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-agenda-event time + span {
    display: inline;
}

.staff-agenda-event small {
    margin-top: 2px;
    color: #65777f;
}

@media (max-width: 820px) {
    .staff-agenda-surface {
        overflow-x: auto;
    }

    .staff-agenda-weekdays,
    .staff-agenda-calendar {
        min-width: 720px;
    }

    .staff-agenda-day {
        min-height: 126px;
    }
}

@media (max-width: 560px) {
    .staff-agenda-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .staff-agenda-filters label {
        width: 100%;
    }
}

@media print {
    .training-module-nav,
    .training-library-hero,
    .training-units-hero,
    .training-category-manager,
    .training-exercise-form-surface,
    .training-exercise-catalogue,
    .training-unit-picker,
    .training-unit-list,
    .training-unit-builder > .section-header,
    .training-unit-exercise-form,
    .training-unit-print-preview > summary,
    .sidebar,
    .topbar {
        display: none !important;
    }
    .training-unit-builder,
    .training-unit-print-preview {
        display: block !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
    }
    .training-unit-print-preview:not([open]) > :not(summary) { display: block !important; }
    .training-unit-print-exercise { page-break-inside: avoid; }
}

/* Treinos: modelos, disponibilidade, fluxo e estatísticas */
.training-profile-switcher > form {
    display: inline-flex;
    margin: 0;
}

.training-plan-tools {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto minmax(280px, 1fr);
    gap: 12px;
    align-items: end;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line, #d8e1e7);
}

.training-plan-tools form {
    display: flex;
    gap: 9px;
    align-items: end;
    margin: 0;
}

.training-plan-tools label {
    flex: 1 1 auto;
    min-width: 0;
}

.training-template-manager {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #cbd9df;
    border-radius: 14px;
    background: #f7faf9;
}

.training-template-form {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #d8e1e7;
}

.training-availability-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.training-availability-summary > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #d8e1e7;
    border-radius: 10px;
    background: #fff;
}

.training-state-cell {
    width: 52px;
    min-width: 52px;
    text-align: center;
}

.training-attendance-table td [data-attendance-state-dot] {
    display: inline-flex;
    margin-right: 7px;
    vertical-align: middle;
}

.training-attendance-table td select {
    width: min(230px, 100%);
}

.training-attendance-table tr.is-saved td {
    background: #eef8f3;
    transition: background .25s ease;
}

.training-attendance-table tr.has-save-error td {
    background: #fff1f0;
}

.training-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 12px;
    margin: 14px 0 20px;
}

.training-summary-grid article {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #d8e1e7;
    border-radius: 12px;
    background: #f8faf9;
}

.training-summary-grid article span {
    color: #64748b;
    font-size: .78rem;
}

.training-summary-grid article strong {
    color: #163b32;
    font-size: 1.35rem;
}

.training-final-notes-form,
.training-final-notes-read {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d8e1e7;
}

.training-final-notes-read > span {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.training-statistics-panel {
    margin: 16px 0;
    border: 1px solid #d8e1e7;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.training-statistics-panel > summary {
    padding: 14px 16px;
    color: #163b32;
    background: #f3f7f5;
    cursor: pointer;
    font-weight: 750;
}

.training-statistics-panel[open] > summary {
    border-bottom: 1px solid #d8e1e7;
}

.training-statistics-panel > .training-summary-grid,
.training-statistics-panel > .table-wrap {
    margin-left: 16px;
    margin-right: 16px;
}

.team-training-statistics {
    margin-top: 18px;
}

.member-training-list {
    display: grid;
    gap: 12px;
}

.member-training-card {
    display: grid;
    grid-template-columns: 82px minmax(180px, 1fr) minmax(300px, 1.2fr);
    gap: 16px;
    align-items: center;
    padding: 15px;
    border: 1px solid #d8e1e7;
    border-radius: 14px;
    background: #fff;
}

.member-training-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    border-radius: 11px;
    color: #fff;
    background: #1f6f5b;
}

.member-training-date strong {
    font-size: 1.55rem;
    line-height: 1;
}

.member-training-date span,
.member-training-date small {
    font-size: .72rem;
}

.member-training-info {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.member-training-info > div {
    display: flex;
    flex-direction: column;
}

.member-training-info span,
.member-training-info small {
    color: #64748b;
}

.member-training-response {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    font-size: .82rem;
}

.member-training-response-form {
    display: grid;
    grid-template-columns: 1fr 1.3fr auto;
    gap: 9px;
    align-items: end;
    margin: 0;
}

@media (max-width: 900px) {
    .training-plan-tools,
    .member-training-card,
    .member-training-response-form {
        grid-template-columns: 1fr;
    }

    .training-plan-tools form {
        flex-wrap: wrap;
    }

    .member-training-date {
        width: 82px;
    }
}

/* Assistente simples de criação de campeonatos */
.championship-wizard-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 18px 0 24px;
}

.championship-wizard-steps button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 8px 12px;
    color: var(--text-muted, #667085);
    background: var(--surface-muted, #f5f6f7);
    border: 1px solid var(--border, #dfe3e8);
    border-radius: 10px;
}

.championship-wizard-steps button span {
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #fff;
    background: #98a2b3;
}

.championship-wizard-steps button.is-active {
    color: var(--primary, #176b45);
    background: rgba(23, 107, 69, .08);
    border-color: rgba(23, 107, 69, .35);
}

.championship-wizard-steps button.is-active span {
    background: var(--primary, #176b45);
}

.championship-wizard.is-enhanced .championship-wizard-panel {
    display: none;
}

.championship-wizard.is-enhanced .championship-wizard-panel.is-active {
    display: block;
}

.championship-selection-card {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(120px, 1fr));
    gap: 12px;
    align-items: center;
    padding: 16px;
    margin-bottom: 18px;
    background: var(--surface-muted, #f5f6f7);
    border: 1px solid var(--border, #dfe3e8);
    border-radius: 12px;
}

.championship-selection-card span {
    color: var(--text-muted, #667085);
    font-size: .9rem;
}

.championship-wizard-toolbar {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.championship-wizard-toolbar label {
    flex: 1 1 280px;
}

.championship-wizard-toolbar > div {
    padding: 10px 4px;
}

.championship-club-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-height: 430px;
    padding: 4px;
    overflow: auto;
}

.championship-club-grid label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 10px 12px;
    background: var(--surface-muted, #f5f6f7);
    border: 1px solid var(--border, #dfe3e8);
    border-radius: 9px;
    cursor: pointer;
}

.championship-club-grid label:has(input:checked) {
    background: rgba(23, 107, 69, .08);
    border-color: rgba(23, 107, 69, .45);
}

.championship-club-grid input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.championship-club-grid .championship-draw-position {
    width: 58px;
    height: 34px;
    margin-left: auto;
    text-align: center;
}

.championship-model-preview {
    padding: 14px 16px;
    margin-top: 12px;
    color: var(--muted);
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 9px;
}

.championship-template-association {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(360px, 1.5fr);
    gap: 18px;
    align-items: end;
    padding: 16px;
    margin-bottom: 18px;
    background: rgba(49, 95, 140, .06);
    border: 1px solid rgba(49, 95, 140, .2);
    border-radius: 9px;
}

.championship-template-association > div {
    display: grid;
    gap: 4px;
}

.championship-template-association > div span,
.championship-template-association > div small {
    color: var(--muted);
}

.championship-template-association form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

@media (max-width: 760px) {
    .championship-template-association,
    .championship-template-association form {
        grid-template-columns: 1fr;
    }
}

.championship-participant-insert {
    margin-bottom: 16px;
}

.championship-participant-insert > summary {
    width: fit-content;
    color: var(--button-text-color);
    background: var(--button-color);
    border-radius: var(--control-radius);
}

.championship-participant-order-table tr[draggable="true"] {
    transition: opacity .15s ease, background .15s ease;
}

.championship-participant-order-table tr[draggable="true"].is-dragging {
    opacity: .45;
    background: rgba(49, 95, 140, .1);
}

.championship-participant-order-table.is-sortable th:first-child,
.championship-participant-order-table.is-sortable td:first-child {
    width: 38px;
    padding-left: 4px;
    padding-right: 4px;
}

.participant-drag-handle {
    display: inline-block;
    padding: 3px 6px;
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: grab;
    user-select: none;
}

.championship-participant-order-table tr.is-dragging .participant-drag-handle {
    cursor: grabbing;
}

.championship-participant-order-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.championship-standings table th:not(:nth-child(2)),
.championship-standings table td:not(:nth-child(2)) {
    text-align: center;
}

.championship-standings tbody tr.is-promotion td {
    background: rgba(31, 111, 91, .08);
}

.championship-standings tbody tr.is-relegation td {
    background: rgba(166, 69, 69, .08);
}

.championship-standings-filter label {
    display: grid;
    gap: 5px;
    min-width: 260px;
    color: var(--muted);
    font-size: 12px;
}

.championship-standings-filter select {
    min-height: 40px;
}

@media (max-width: 760px) {
    .championship-standings .section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .championship-standings-filter label,
    .championship-standings-filter select {
        width: 100%;
    }
}

.championship-wizard-actions {
    justify-content: flex-end;
    margin-top: 22px;
}

.championship-manage-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.master-association-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.master-association-heading .sports-settings-list-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    object-fit: contain;
}

.master-association-heading h2 {
    margin-bottom: 4px;
}

.master-association-row-actions,
.master-competition-row-actions {
    gap: 6px;
    width: max-content;
    margin-left: auto;
}

.master-association-row-actions form,
.master-association-row-actions .icon-link,
.master-competition-row-actions form,
.master-competition-row-actions .icon-link {
    width: 28px;
    height: 28px;
}

.master-association-row-actions .icon-link,
.master-competition-row-actions .icon-link {
    min-height: 0;
    border-radius: 7px;
    font-size: 14px;
}

.master-association-row-actions .icon-link svg,
.master-competition-row-actions .icon-link svg {
    width: 15px;
    height: 15px;
}

.master-association-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(108px, 138px));
    gap: 12px;
    margin-top: 18px;
}

.master-association-stat-card {
    display: flex;
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-soft);
    color: var(--ink);
    text-align: center;
    text-decoration: none;
    transition: var(--control-transition);
}

.master-association-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--selection-color);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.master-association-stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.master-association-stat-card strong {
    color: var(--selection-color);
    font-size: 2rem;
    line-height: 1;
}

.master-association-stat-card small {
    color: var(--muted);
    font-size: 10px;
}

.master-association-stat-card.is-active,
.master-association-stat-card.is-current {
    border-color: rgba(49, 95, 140, .35);
    background: rgba(49, 95, 140, .08);
}

@media (max-width: 620px) {
    .master-association-stat-grid {
        grid-template-columns: repeat(2, minmax(104px, 1fr));
    }

    .master-association-stat-card {
        aspect-ratio: auto;
        min-height: 112px;
    }
}

/* Clinical management */

.toast.error-toast {
    border-color: #edc6c6;
    background: #f9e8e8;
    color: var(--red);
}

.clinical-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.list-summary-item.is-warning {
    border-color: #d9c7e9;
    background: #f8f3fb;
}

.list-summary-item.is-warning strong {
    color: #76508e;
}

.clinical-summary-grid .list-summary-item.is-selected {
    outline: 2px solid var(--selection-color);
    outline-offset: 2px;
}

.clinical-list-toolbar {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.clinical-list-toolbar input,
.clinical-list-toolbar select {
    min-width: 170px;
}

.clinical-athlete-list [data-clinical-athletes-table] {
    min-width: 860px;
}

.clinical-state-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
}

.clinical-state-inline .sports-settings-status-dot {
    flex: 0 0 auto;
}

.clinical-ellipsis {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.clinical-athlete-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.clinical-athlete-identity > img,
.clinical-athlete-identity > span {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f0f3f4;
    color: var(--muted);
    font-weight: 800;
    object-fit: cover;
}

.clinical-athlete-identity h2,
.clinical-athlete-identity p {
    margin: 3px 0 0;
}

.clinical-athlete-summary {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.clinical-athlete-summary > div {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafb;
}

.clinical-athlete-summary span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.clinical-athlete-summary strong {
    display: flex;
    align-items: center;
    gap: 7px;
}

.clinical-profile-form,
.clinical-entry-form {
    margin-top: 14px;
}

.clinical-exam-batch .form-actions {
    margin-top: 14px;
}

.clinical-exam-batch-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.clinical-exam-batch-actions form {
    margin: 0;
}

.clinical-exam-upload-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.clinical-exam-upload-fields label {
    display: grid;
    gap: 7px;
}

.clinical-exam-toolbar {
    margin-bottom: 14px;
}

.clinical-exam-batch .compact-checkbox {
    width: 34px;
    min-width: 34px;
    text-align: center;
}

.clinical-exam-batch .compact-checkbox input {
    width: 16px;
    height: 16px;
}

.clinical-exam-upload {
    display: inline-flex;
    align-items: center;
    margin: 0;
    position: relative;
}

.clinical-exam-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.clinical-exam-batch .row-actions {
    flex-wrap: nowrap;
    gap: 5px;
}

.clinical-exam-batch td {
    vertical-align: middle;
}

.clinical-missing-data,
.clinical-complete-data {
    display: block;
    max-width: 170px;
    line-height: 1.3;
    font-weight: 700;
}

.clinical-missing-data {
    color: #b54708;
}

.clinical-complete-data {
    color: #18794e;
}

.clinical-exam-batch button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.clinical-entry-form {
    padding: 16px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #f8fafb;
}

.athlete-clinical-link-head {
    margin-bottom: 12px;
}

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

@media (max-width: 760px) {
    .clinical-summary-grid,
    .clinical-athlete-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .clinical-list-toolbar,
    .clinical-athlete-head {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .clinical-list-toolbar {
        flex-direction: column;
    }

    .clinical-list-toolbar input,
    .clinical-list-toolbar select {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .clinical-summary-grid,
    .clinical-athlete-summary {
        grid-template-columns: 1fr;
    }
}

/* Instalações, clientes e reservas */
.message {
    margin-bottom: 16px;
    padding: 12px 15px;
    border: 1px solid #b9ded0;
    border-radius: 11px;
    color: #185843;
    background: #e6f5ef;
    font-weight: 750;
}

.message.error-message {
    border-color: #efb9bf;
    color: #8a2630;
    background: #fdebed;
}

.facility-rental-settings {
    margin-top: 8px;
    padding: 18px;
    border: 1px solid #d7e2e4;
    border-radius: 14px;
    background: #f8fbfa;
}

.facility-rental-settings > legend {
    padding: 0 8px;
    color: #173f35;
    font-weight: 800;
}

.facility-rental-pricing {
    margin: 16px 0;
}

.facility-rental-hours {
    display: grid;
    gap: 8px;
    margin: 10px 0 16px;
}

.facility-rental-hour-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 130px 130px;
    gap: 12px;
    align-items: end;
    padding: 9px 12px;
    border: 1px solid #e1e8e9;
    border-radius: 10px;
    background: #fff;
}

.booking-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.booking-summary-grid article {
    display: grid;
    gap: 3px;
    min-height: 105px;
    padding: 17px 19px;
    border: 1px solid #d8e3e4;
    border-radius: 15px;
    background: linear-gradient(145deg, #fff, #f3f8f6);
    box-shadow: 0 8px 22px rgba(25, 55, 47, .05);
}

.booking-summary-grid span,
.booking-summary-grid small {
    color: #63746f;
}

.booking-summary-grid strong {
    color: #173f35;
    font-size: 1.55rem;
    line-height: 1.1;
}

.booking-page-header {
    align-items: flex-start;
}

.booking-calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    margin: 16px 0 10px;
    padding: 12px;
    border: 1px solid #dce5e6;
    border-radius: 12px;
    background: #f8faf9;
}

.booking-calendar-toolbar label {
    min-width: 175px;
    margin: 0;
}

.booking-calendar-toolbar .icon-button {
    margin-bottom: 2px;
}

.booking-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 14px;
}

.booking-calendar-legend span,
.booking-status-pill {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 800;
}

.booking-calendar-legend .is-pending,
.booking-status-pill.is-pending { color: #76520b; background: #fff2c7; }
.booking-calendar-legend .is-confirmed,
.booking-status-pill.is-confirmed { color: #175943; background: #dff4ea; }
.booking-calendar-legend .is-training { color: #245d84; background: #dfeef9; }
.booking-calendar-legend .is-game { color: #724511; background: #f8e7d2; }
.booking-calendar-legend .is-block { color: #7b2930; background: #f8dfe2; }
.booking-status-pill.is-cancelled { color: #68716f; background: #e8eceb; }

.booking-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    overflow-x: auto;
    border: 1px solid #d8e2e3;
    border-radius: 13px;
    background: #d8e2e3;
    gap: 1px;
}

.booking-weekday {
    padding: 9px;
    color: #4c605a;
    background: #eff4f2;
    font-size: .75rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.booking-day {
    min-height: 150px;
    padding: 8px;
    background: #fff;
}

.booking-day.is-empty { background: #f5f7f6; }
.booking-day.is-today { box-shadow: inset 0 0 0 2px var(--button-color, #1f6f5b); }
.booking-day-number { display: block; margin-bottom: 6px; color: #344943; font-size: .82rem; }
.booking-day-events { display: grid; gap: 5px; }

.booking-event {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 5px;
    padding: 5px 6px;
    overflow: hidden;
    border-left: 3px solid #c49836;
    border-radius: 6px;
    color: #554015;
    background: #fff5d9;
    font-size: .68rem;
    line-height: 1.2;
    text-decoration: none;
}

.booking-event time { font-weight: 900; }
.booking-event span { overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.booking-event small { grid-column: 1 / -1; overflow: hidden; opacity: .78; text-overflow: ellipsis; white-space: nowrap; }
.booking-event.is-confirmed { border-color: #2b8d6c; color: #174f3e; background: #e5f5ee; }
.booking-event.is-cancelled { border-color: #9ba6a3; color: #68716f; background: #edf0ef; }
.booking-event.is-training { border-color: #3f8dc0; color: #245d84; background: #e8f3fa; }
.booking-event.is-game { border-color: #b87323; color: #724511; background: #faeddd; }
.booking-event.is-block { border-color: #b94c57; color: #7b2930; background: #f9e7e9; }
.booking-more-events { color: #63746f; font-weight: 700; }

.booking-secondary-section {
    margin-top: 18px;
}

.booking-secondary-section > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #173f35;
    font-size: 1.05rem;
    font-weight: 850;
}

.booking-secondary-section > summary span {
    min-width: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e5efeb;
    text-align: center;
}

.booking-secondary-section[open] > summary { margin-bottom: 15px; }

.booking-recurrence-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    border: 1px solid #d9e4e1;
    border-radius: 12px;
    background: #f6faf8;
}

.booking-recurrence-fields[hidden] { display: none; }
.booking-recurrence-fields > small { grid-column: 1 / -1; color: #657872; }

.booking-commercial-panel { margin-top: 18px; }

.booking-commercial-panel > summary {
    display: flex;
    cursor: pointer;
    list-style: none;
}

.booking-commercial-panel > summary::-webkit-details-marker { display: none; }

.booking-commercial-panel > summary > span {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.booking-commercial-panel > summary strong { color: #173f35; font-size: 1.05rem; }
.booking-commercial-panel > summary small { color: #667a74; font-weight: 750; }
.booking-commercial-panel[open] > summary { margin-bottom: 18px; }

.booking-promo-form,
.booking-callback-list,
.booking-report-filters {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid #dbe5e2;
    border-radius: 13px;
    background: #f7faf9;
}

.booking-callback-list { display: grid; gap: 12px; }
.booking-callback-list input { font-size: .78rem; }

.booking-report-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
}

.booking-report-filters label { min-width: 170px; margin: 0; }

.booking-report-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.booking-report-summary article {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid #dbe5e2;
    border-radius: 12px;
    background: #fff;
}

.booking-report-summary span { color: #697c76; font-size: .75rem; font-weight: 800; }
.booking-report-summary strong { color: #173f35; font-size: 1.15rem; }

.member-booking-actions { min-width: 180px; }
.member-booking-actions > summary { cursor: pointer; color: var(--button-color, #1f6f5b); font-weight: 800; }
.member-booking-actions form { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #dfe7e4; }
.member-booking-actions label { min-width: 0; font-size: .78rem; }
.member-booking-actions input,
.member-booking-actions select,
.member-booking-actions textarea { width: 100%; }

@media (max-width: 1000px) {
    .booking-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .booking-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facility-rental-hour-row { grid-template-columns: 1fr 110px 110px; }
}

@media (max-width: 620px) {
    .booking-summary-grid { grid-template-columns: 1fr; }
    .facility-rental-hour-row { grid-template-columns: 1fr 1fr; }
    .facility-rental-hour-row > .checkbox-label { grid-column: 1 / -1; }
    .booking-calendar-toolbar label { min-width: min(100%, 220px); flex: 1; }
    .booking-recurrence-fields,
    .booking-report-summary { grid-template-columns: 1fr; }
}

.public-portal-settings .section-header {
    align-items: center;
}

.public-portal-state {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 0 13px;
    border-radius: 999px;
    color: #62716d;
    background: #e8edeb;
    font-size: .78rem;
    font-weight: 900;
}

.public-portal-state.is-published {
    color: #176044;
    background: #dff2e8;
}

.public-portal-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid #dce5e1;
    border-radius: 14px;
    background: #f7faf8;
}

.public-portal-link-row label {
    display: grid;
    gap: 7px;
    color: #52645f;
    font-size: .78rem;
    font-weight: 800;
}

.public-portal-link-row input {
    min-width: 0;
    background: #ffffff;
}

.public-portal-link-row .mini-button {
    min-height: 42px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .public-portal-link-row {
        grid-template-columns: 1fr;
    }

    .public-portal-link-row .mini-button {
        width: 100%;
    }
}

.calendar-lock-badge {
    display: inline-flex;
    align-items: center;
    min-height: var(--control-height);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
}

.calendar-lock-badge.is-open {
    color: #155142;
    background: rgba(31, 111, 91, .12);
}

.calendar-lock-badge.is-closed {
    color: #7a2e2e;
    background: rgba(166, 69, 69, .12);
}

.championship-calendar-navigation {
    display: flex;
    align-items: end;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 18px;
}

.championship-calendar-navigation label {
    min-width: 190px;
}

.championship-calendar-sheet {
    max-width: 940px;
    margin: 0 auto;
    padding: 24px;
    color: #141414;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.championship-calendar-sheet > h2 {
    margin: 0;
    color: #164cc5;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
    font-weight: 500;
}

.championship-calendar-sheet > p {
    margin: 5px 0 18px;
    color: #555;
    text-align: center;
}

.championship-calendar-round-headings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 0 14px 7px;
}

.championship-calendar-round-headings > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
}

.championship-calendar-table-wrap {
    overflow-x: auto;
}

.championship-calendar-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-family: Georgia, "Times New Roman", serif;
    table-layout: fixed;
}

.championship-calendar-table th,
.championship-calendar-table td {
    padding: 7px 10px;
    color: #171717;
    text-align: center;
    border: 1px solid #202020;
    font-size: .98rem;
}

.championship-calendar-table th {
    background: #eef0f2;
    font-size: 1rem;
    font-weight: 500;
}

.championship-calendar-table th:first-child,
.championship-calendar-table th:last-child,
.championship-calendar-table td:first-child,
.championship-calendar-table td:last-child {
    width: 126px;
}

.championship-calendar-table td:nth-child(2),
.championship-calendar-table td:nth-child(4) {
    width: calc((100% - 302px) / 2);
}

.championship-calendar-table .championship-calendar-versus {
    width: 50px;
    padding-left: 4px;
    padding-right: 4px;
}

.championship-calendar-time {
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
}

.championship-calendar-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.championship-calendar-score input {
    width: 40px;
    height: 29px;
    padding: 2px 3px;
    text-align: center;
    border: 1px solid #9aa2aa;
    border-radius: 4px;
    -moz-appearance: textfield;
}

.championship-calendar-score input::-webkit-inner-spin-button,
.championship-calendar-score input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.championship-calendar-result-actions {
    display: flex;
    justify-content: flex-end;
    max-width: 940px;
    margin: 14px auto 0;
}

@media (max-width: 700px) {
    .championship-calendar-sheet {
        padding: 14px;
    }

    .championship-calendar-round-headings {
        gap: 12px;
        margin-left: 4px;
        margin-right: 4px;
    }

    .championship-calendar-round-headings > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
        font-size: .9rem;
    }
}

@media print {
    body.calendar-print-mode * {
        visibility: hidden !important;
    }

    body.calendar-print-mode .championship-calendar-sheet,
    body.calendar-print-mode .championship-calendar-sheet * {
        visibility: visible !important;
    }

    body.calendar-print-mode .championship-calendar-sheet {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        max-width: none;
        padding: 0;
        border: 0;
        border-radius: 0;
    }

    body.calendar-print-mode .championship-calendar-score input {
        border: 0;
    }
}

.championship-wizard-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 18px;
}

.championship-wizard-summary > div {
    display: grid;
    gap: 5px;
    min-height: 76px;
    padding: 13px;
    background: var(--surface-muted, #f5f6f7);
    border: 1px solid var(--border, #dfe3e8);
    border-radius: 10px;
}

.championship-wizard-summary span {
    color: var(--text-muted, #667085);
    font-size: .82rem;
}

.championship-wizard-summary strong {
    font-size: 1.15rem;
}

.championship-wizard .form-error {
    margin-top: 12px;
    color: #b42318;
}

@media (max-width: 900px) {
    .championship-wizard-steps,
    .championship-wizard-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .championship-selection-card,
    .championship-club-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .championship-wizard-steps {
        grid-template-columns: 1fr 1fr;
    }

    .championship-wizard-steps button {
        font-size: .82rem;
    }

    .championship-wizard-summary {
        grid-template-columns: 1fr 1fr;
    }
}

/* Base */

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0) 320px),
        var(--bg);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--selection-color);
    box-shadow: 0 0 0 3px rgba(49, 95, 140, 0.14);
    outline: none;
}

/* Login */

.login-page {
    min-height: 100vh;
    background:
        linear-gradient(110deg, rgba(23, 32, 38, 0.82), rgba(31, 111, 91, 0.76)),
        url("https://images.unsplash.com/photo-1577223625816-7546f13df25d?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.admin-access-page.has-custom-background {
    background-image:
        linear-gradient(110deg, rgba(23, 32, 38, .82), rgba(31, 111, 91, .68)),
        var(--admin-access-background-image);
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

.member-access-page {
    background:
        linear-gradient(115deg, rgba(9, 33, 43, 0.84) 0%, rgba(25, 91, 83, 0.72) 46%, rgba(222, 176, 81, 0.42) 100%),
        url("https://images.unsplash.com/photo-1526232761682-d26e03ac148e?auto=format&fit=crop&w=1800&q=82") center/cover;
}

.member-access-page.has-custom-background {
    background-image:
        linear-gradient(115deg, rgba(9, 33, 43, .84) 0%, rgba(25, 91, 83, .72) 46%, rgba(222, 176, 81, .42) 100%),
        var(--member-access-background-image);
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

.member-access-page .login-shell {
    place-items: center end;
    padding-right: clamp(28px, 8vw, 120px);
}

.member-access-page .login-panel {
    grid-template-columns: minmax(280px, 0.92fr) 410px;
    gap: clamp(28px, 6vw, 72px);
}

.member-access-page .login-intro {
    align-self: end;
    padding-bottom: clamp(12px, 7vh, 72px);
}

.member-access-page .login-brand {
    width: 132px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.88);
}

.member-access-page .login-brand img {
    max-height: 82px;
}

.member-access-page .login-panel h1 {
    max-width: 610px;
    font-size: clamp(34px, 4.6vw, 58px);
}

.member-access-page .login-card {
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

.member-portal-page {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(234, 244, 240, 0.94), rgba(246, 248, 246, 0.88) 280px),
        linear-gradient(135deg, rgba(31, 111, 91, 0.11), rgba(191, 143, 50, 0.08)),
        url("https://images.unsplash.com/photo-1526232761682-d26e03ac148e?auto=format&fit=crop&w=1800&q=82") center / cover fixed;
}

.member-portal-page.has-custom-background {
    background-image:
        linear-gradient(180deg, rgba(234, 244, 240, .72), rgba(246, 248, 246, .64) 280px),
        var(--member-area-background-image);
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

.member-club-header {
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 22px 24px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(23, 32, 38, 0.94), rgba(31, 111, 91, 0.88)),
        linear-gradient(90deg, rgba(191, 143, 50, 0.22), rgba(255, 255, 255, 0));
    border-radius: var(--panel-radius);
    box-shadow: var(--shadow-soft);
}

.member-club-brand {
    display: flex;
    gap: 16px;
    align-items: center;
    min-width: 0;
}

.member-club-brand img,
.member-club-brand > span {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    object-fit: contain;
}

.member-club-brand > span {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

.member-club-brand h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.05;
}

.member-club-brand strong {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.member-club-header .eyebrow {
    color: rgba(255, 255, 255, 0.68);
}

.member-club-details {
    display: grid;
    gap: 5px;
    min-width: min(360px, 44%);
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    text-align: right;
}

.member-club-details div,
.member-club-details dd {
    margin: 0;
}

.member-club-details dt {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-panel {
    width: min(1050px, 100%);
    display: grid;
    grid-template-columns: 1.2fr 420px;
    gap: 48px;
    align-items: center;
    color: #fff;
}

.login-intro {
    display: grid;
    gap: 18px;
    justify-items: start;
}

.login-brand {
    width: min(360px, 100%);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.22);
}

.login-brand img {
    display: block;
    width: 100%;
    max-height: 110px;
    object-fit: contain;
}

.login-panel h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1;
    letter-spacing: 0;
}

.login-card {
    display: grid;
    gap: 18px;
    padding: 30px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-card h2,
.surface h2 {
    margin: 0;
    font-size: 22px;
}

/* Application shell, sidebar and topbar */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: 76px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 10px;
    background: var(--sidebar-color, #172026);
    color: #d8e1e5;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 8px 0 24px rgba(20, 29, 34, 0);
    transition: width 180ms ease, padding 180ms ease, box-shadow 180ms ease;
}

.sidebar:hover,
.sidebar:focus-within {
    width: 274px;
    padding: 16px 16px;
    box-shadow: 8px 0 24px rgba(20, 29, 34, 0.18);
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding: 6px 8px;
}

.brand-copy {
    display: block;
    visibility: hidden;
    width: 222px;
}

.sidebar:hover .brand-copy,
.sidebar:focus-within .brand-copy {
    visibility: visible;
}

.brand-mark,
.brand-logo {
    width: 48px;
    height: auto;
    max-height: 54px;
    flex: 0 0 auto;
}

.sidebar:hover .brand-logo,
.sidebar:focus-within .brand-logo {
    width: clamp(58px, 42%, 88px);
    max-height: 78px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--green);
    color: #fff;
    font-weight: 800;
}

.brand-logo {
    display: block;
    object-fit: contain;
    border-radius: 8px;
    background: transparent;
    padding: 0;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.brand small,
.sidebar nav p,
.eyebrow,
.hint,
.metric small,
.user-menu small {
    color: var(--muted);
    font-size: 12px;
}

.sidebar nav {
    display: grid;
    gap: 1px;
    flex: 1 1 auto;
}

.sidebar nav p {
    display: block;
    visibility: hidden;
    margin: 16px 8px 5px;
    color: #b8c7cf;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar:hover nav p,
.sidebar:focus-within nav p {
    visibility: visible;
}

.sidebar nav a {
    display: flex;
    min-height: 27px;
    gap: 8px;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    color: #d8e1e5;
}

.nav-icon {
    width: 31px;
    min-width: 31px;
    height: 22px;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
}

.nav-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-label {
    display: none;
    white-space: nowrap;
}

.sidebar:hover .nav-label,
.sidebar:focus-within .nav-label {
    display: inline;
}

.sidebar nav a:hover,
.sidebar nav a.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-license {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin-top: auto;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #d8e1e5;
}

.sidebar-license-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #87969f;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.sidebar-license.is-valid .sidebar-license-icon {
    background: #16a36a;
}

.sidebar-license.is-invalid .sidebar-license-icon {
    background: var(--red);
}

.sidebar-license-copy {
    display: none;
    min-width: 0;
}

.sidebar:hover .sidebar-license-copy,
.sidebar:focus-within .sidebar-license-copy {
    display: grid;
    gap: 2px;
}

.sidebar-license-copy strong,
.sidebar-license-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-license-copy strong {
    color: #fff;
    font-size: 13px;
}

.sidebar-license-copy small {
    color: #aab7bd;
    font-size: 12px;
}

.app {
    min-height: 100vh;
    margin-left: 76px;
    padding: 24px 28px 34px;
    transition: margin-left 180ms ease;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(215, 224, 228, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.topbar h1 {
    margin: 4px 0 0;
    font-size: 28px;
    letter-spacing: 0;
}

.permission-preview-banner {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin: -8px 0 22px;
    padding: 12px 14px;
    border: 1px solid #e5c779;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff7df 0%, #fffdf5 100%);
    box-shadow: 0 8px 22px rgba(126, 91, 19, 0.08);
}

.master-performance-panel {
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid #d7e0e4;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.master-performance-panel details > summary {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    cursor: pointer;
    list-style: none;
    background: #f6f8f9;
}

.master-performance-panel details > summary::-webkit-details-marker {
    display: none;
}

.master-performance-panel details > summary span {
    display: grid;
    gap: 2px;
}

.master-performance-panel details > summary strong {
    color: var(--ink);
    font-size: 13px;
}

.master-performance-panel details > summary small {
    color: var(--muted);
    font-size: 11px;
}

.master-performance-panel details > summary b {
    padding: 5px 9px;
    border-radius: 999px;
    background: #e7f5ed;
    color: #17643c;
    font-size: 13px;
    white-space: nowrap;
}

.master-performance-panel.is-warning details > summary b {
    background: #fff0d5;
    color: #92560a;
}

.master-performance-panel.is-slow details > summary b {
    background: #fde7e8;
    color: #a5252b;
}

.master-performance-content {
    padding: 15px 16px 16px;
    border-top: 1px solid #e3e9ec;
}

.master-performance-highlight {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
}

.master-performance-highlight strong {
    color: var(--ink);
}

.master-performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 9px;
}

.master-performance-grid article {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #e1e7ea;
    border-left: 4px solid #58a77b;
    border-radius: 8px;
    background: #fbfcfc;
}

.master-performance-grid article.is-warning {
    border-left-color: #df9c2f;
    background: #fffbf3;
}

.master-performance-grid article.is-slow {
    border-left-color: #d65057;
    background: #fff7f7;
}

.master-performance-grid article span,
.master-performance-grid article small {
    color: var(--muted);
    font-size: 11px;
}

.master-performance-grid article strong {
    color: var(--ink);
    font-size: 15px;
}

.master-performance-content > .hint {
    margin: 12px 0 0;
}

.master-performance-content code {
    padding: 1px 4px;
    border-radius: 4px;
    background: #edf1f3;
    color: var(--ink);
}

.master-updates-hero {
    margin-bottom: 18px;
}

.master-updates-bulk-form {
    margin: 0;
}

.master-updates-select-column {
    width: 1%;
    min-width: 62px;
    text-align: center;
    white-space: nowrap;
}

.master-updates-select-column input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--club-button-bg, var(--primary));
    cursor: pointer;
}

.master-updates-select-all {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 11px;
}

.master-updates-bulk-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8ea;
}

.master-updates-submit-group {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.master-updates-submit-group .hint {
    margin: 0;
    white-space: nowrap;
}

.master-updates-force {
    min-height: 44px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #f8fafb;
}

.master-updates-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.master-updates-summary span,
.master-update-state {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
}

.master-updates-summary .is-current,
.master-update-state.is-current,
.master-update-state.is-updated {
    background: #e7f5ed;
    color: #17643c;
}

.master-updates-summary .is-pending,
.master-update-state.is-pending,
.master-update-state.is-running {
    background: #fff0d5;
    color: #92560a;
}

.master-updates-summary .is-failed,
.master-update-state.is-failed {
    background: #fde7e8;
    color: #a5252b;
}

.permission-preview-banner form {
    flex: 0 0 auto;
    margin: 0;
}

.permission-preview-identity {
    display: flex;
    gap: 11px;
    align-items: center;
    min-width: 0;
}

.permission-preview-identity > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.permission-preview-identity strong,
.permission-preview-identity small,
.permission-preview-identity span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-preview-identity strong {
    color: #694b0d;
    font-size: 13px;
}

.permission-preview-identity small {
    color: #806a3d;
    font-size: 11px;
}

.permission-preview-identity > div > span {
    color: #a33b32;
    font-size: 11px;
    font-weight: 750;
}

.permission-preview-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #f2d58b;
    color: #62460d;
}

.permission-preview-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.permission-preview-button {
    color: #536a8b;
}

.topbar-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
}

.global-season-control {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
}

.global-season-navigation {
    display: flex;
    gap: 6px;
    align-items: center;
}

.global-season-navigation form {
    margin: 0;
}

.global-season-navigation .season-arrow {
    width: 40px;
    height: 40px;
}

.global-season-navigation .season-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.global-season-selector select {
    width: 190px;
    min-height: 40px;
    padding: 8px 34px 8px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
    color: var(--ink);
}

.eyebrow {
    color: var(--green);
    font-weight: 800;
    text-transform: uppercase;
}

.user-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    text-align: right;
}

.user-identity {
    display: grid;
    gap: 2px;
    min-width: 0;
    margin-right: 6px;
}

.user-identity span {
    max-width: 190px;
    overflow: hidden;
    color: var(--ink);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-identity small {
    max-width: 190px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-icon-button {
    position: relative;
    display: inline-flex;
    width: 40px;
    height: 40px;
    min-height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfc;
    color: #43515a;
    text-decoration: none;
    box-shadow: none;
    transition: transform 0.14s ease, border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.topbar-icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.topbar-icon-button:hover {
    transform: translateY(-1px);
    border-color: var(--selection-color);
    background: #ffffff;
    color: var(--selection-color);
}

.topbar-icon-button[data-loading="1"] svg {
    animation: page-reload-spin 0.75s linear infinite;
}

.page-reload-indicator {
    position: fixed;
    z-index: 10000;
    top: 18px;
    left: 50%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    padding: 10px 15px;
    border: 1px solid color-mix(in srgb, var(--selection-color) 28%, #fff);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 28px rgb(20 40 50 / 18%);
}

.page-reload-indicator[hidden] {
    display: none;
}

.page-reload-indicator span {
    width: 15px;
    height: 15px;
    border: 2px solid #d9e3e5;
    border-top-color: var(--selection-color);
    border-radius: 50%;
    animation: page-reload-spin 0.75s linear infinite;
}

@keyframes page-reload-spin {
    to { transform: rotate(360deg); }
}

.notification-button {
    color: var(--selection-color);
}

.topbar-icon-button:disabled,
.topbar-icon-button:disabled:hover {
    transform: none;
    border-color: var(--line);
    background: #fbfcfc;
    color: #8a959b;
    cursor: default;
}

.notification-dot {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 7px;
    height: 7px;
    border: 2px solid #fbfcfc;
    border-radius: 999px;
    background: #d79b2f;
}

.notification-button:disabled .notification-dot {
    background: #c8d0d4;
}

.notification-button.no-alerts .notification-dot {
    background: #c8d0d4;
}

.notification-button.has-alerts {
    color: #bf8f32;
}

.notification-count {
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border: 2px solid #fbfcfc;
    border-radius: 999px;
    background: #d79b2f;
    color: #fff;
    font-size: 9px;
    font-weight: 850;
    line-height: 12px;
    text-align: center;
}

.logout-button {
    color: #a24343;
}

.logout-button:hover {
    border-color: rgba(162, 67, 67, 0.35);
    background: #fffafa;
    color: #a24343;
}

/* Dashboard */

.surface {
    background: var(--panel);
    border: 1px solid rgba(215, 224, 228, 0.9);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.surface {
    margin-bottom: 20px;
    padding: 22px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(23, 32, 38, 0.98), rgba(31, 111, 91, 0.94));
    color: #fff;
    box-shadow: 0 22px 50px rgba(23, 32, 38, 0.18);
    overflow: hidden;
}

.dashboard-hero h2 {
    margin: 6px 0 8px;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.08;
    letter-spacing: 0;
}

.dashboard-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.45;
}

.dashboard-hero-kicker {
    color: #f0c56a;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    align-self: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.dashboard-hero-stats a {
    display: grid;
    gap: 5px;
    padding: 12px 11px;
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-hero-stats span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 10px;
}

.dashboard-hero-stats strong {
    font-size: 18px;
    line-height: 1;
}

.dashboard-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-group,
.dashboard-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(121, 135, 145, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 45px rgba(24, 32, 38, 0.08);
}

.dashboard-group-heading,
.dashboard-panel-heading {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.dashboard-panel-heading {
    display: block;
}

.dashboard-group-heading h2,
.dashboard-panel-heading h2 {
    margin: 0;
    font-size: 15px;
}

.dashboard-group-heading p,
.dashboard-panel-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.dashboard-group-mark {
    width: 10px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--green);
}

.mark-members {
    background: #1f6f5b;
}

.mark-sport {
    background: #315f8c;
}

.mark-finance {
    background: #bf8f32;
}

.mark-system {
    background: #465159;
}

.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.dashboard-group:nth-child(2) .dashboard-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-metric {
    position: relative;
    display: grid;
    min-height: 100px;
    gap: 6px;
    padding: 11px;
    border: 1px solid #dce4e7;
    border-radius: 10px;
    background: #fff;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.dashboard-metric:hover {
    transform: translateY(-2px);
    border-color: var(--selection-color);
    box-shadow: 0 16px 32px rgba(24, 32, 38, 0.1);
}

.dashboard-metric-icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: #eaf3ef;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 900;
}

.dashboard-tone-blue .dashboard-metric-icon {
    background: #e8eef6;
    color: #315f8c;
}

.dashboard-tone-gold .dashboard-metric-icon {
    background: #fff2d8;
    color: #8a641e;
}

.dashboard-metric-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-metric strong {
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
}

.dashboard-metric small {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-lower-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-action-list,
.dashboard-timeline {
    display: grid;
    gap: 6px;
}

.dashboard-action-list a,
.dashboard-timeline a,
.dashboard-empty-line {
    display: grid;
    gap: 4px;
    padding: 8px 0;
    border-top: 1px solid #e4eaed;
}

.dashboard-action-list a:first-child,
.dashboard-timeline a:first-child,
.dashboard-empty-line:first-child {
    border-top: 0;
}

.dashboard-action-list span,
.dashboard-timeline strong {
    font-size: 12px;
    font-weight: 850;
}

.dashboard-action-list small,
.dashboard-timeline small,
.dashboard-empty-line {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-timeline a {
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: start;
}

.dashboard-timeline time {
    color: #315f8c;
    font-size: 11px;
    font-weight: 850;
}

.dashboard-validation-panel {
    margin-bottom: 16px;
    border-color: color-mix(in srgb, var(--button-color) 34%, var(--line));
}

.dashboard-validation-heading {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dashboard-validation-heading h2,
.dashboard-validation-heading p {
    margin-top: 0;
}

.dashboard-validation-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--button-color);
    color: var(--button-text-color);
    font-size: 17px;
    font-weight: 900;
}

.dashboard-validation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.dashboard-validation-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    background: #fff;
}

.dashboard-validation-card > header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    background: color-mix(in srgb, var(--button-color) 7%, #fff);
}

.dashboard-validation-card > header div,
.dashboard-validation-card > header strong,
.dashboard-validation-card > header small {
    display: grid;
    gap: 2px;
}

.dashboard-validation-card > header small,
.dashboard-validation-list small,
.dashboard-validation-list p {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-validation-card > header > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--button-color);
    color: var(--button-text-color);
    font-size: 12px;
    font-weight: 900;
}

.dashboard-validation-list {
    display: grid;
}

.dashboard-validation-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px 14px;
    border-top: 1px solid var(--line);
    color: var(--ink);
}

.dashboard-validation-list a:first-child {
    border-top: 0;
}

.dashboard-validation-list a > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.dashboard-validation-list a > span strong,
.dashboard-validation-list a > span small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-validation-list a > b {
    color: var(--button-color);
    font-size: 11px;
}

.dashboard-validation-list p {
    margin: 0;
    padding: 9px 14px;
    border-top: 1px solid var(--line);
}

.dashboard-contact-duplicate-card {
    border-color: #e0aaa5;
}

.dashboard-contact-duplicate-card > header {
    background: #fff2f1;
}

.dashboard-contact-duplicate-card > header > span {
    background: #b13a31;
}

.dashboard-birthday-panel {
    margin-bottom: 16px;
    border-color: #f0cf9f;
    background: linear-gradient(135deg, #fff8eb 0%, #fffdf9 70%, #fff 100%);
}

.dashboard-birthday-heading {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dashboard-birthday-heading h2,
.dashboard-birthday-heading p {
    margin-top: 0;
}

.dashboard-birthday-heading-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dashboard-birthday-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    background: #e58a2b;
    color: #fff;
    font-size: 17px;
    font-weight: 900;
}

.dashboard-birthday-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.dashboard-birthday-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #efd7b5;
    border-radius: var(--panel-radius);
    background: #fff;
    color: var(--ink);
    box-shadow: 0 7px 18px rgba(134, 84, 25, 0.06);
}

.dashboard-birthday-card:hover {
    border-color: #e58a2b;
    transform: translateY(-1px);
}

.dashboard-birthday-avatar {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 50%;
    background: #fff0d7;
    color: #b65d12;
    font-size: 22px;
}

.dashboard-birthday-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-birthday-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.dashboard-birthday-copy strong,
.dashboard-birthday-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-birthday-copy small {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-birthday-card-actions {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.dashboard-birthday-channels {
    display: flex;
    gap: 5px;
}

.dashboard-birthday-channel {
    position: relative;
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #d9dfe2;
    border-radius: 7px;
    background: #f3f5f6;
    color: #98a1a6;
}

.dashboard-birthday-channel.is-sent {
    border-color: #9dd4bd;
    background: #e4f5ed;
    color: #08734a;
}

.dashboard-birthday-channel.is-responsible {
    border-color: #c8e0f4;
    background: #f8fbff;
    color: #4c82ac;
}

.dashboard-birthday-channel.is-sent.is-responsible {
    border-color: #1d65a9;
    background: #287dc5;
    color: #fff;
    box-shadow: 0 3px 8px rgba(29, 101, 169, 0.24);
}

.dashboard-birthday-recipient-note {
    max-width: 112px;
    overflow: hidden;
    color: #286a9e;
    font-size: 9px;
    font-weight: 800;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-birthday-channel.is-unavailable {
    color: #a5afb6;
    border-color: #dfe4e7;
    background: #f1f3f4;
}

.dashboard-birthday-channel.is-unavailable i {
    position: absolute;
    inset: -3px -4px auto auto;
    display: grid;
    width: 14px;
    height: 14px;
    place-items: center;
    border-radius: 50%;
    background: #df5a66;
    color: #fff;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
}

.dashboard-birthday-channel svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-birthday-channel sup {
    position: absolute;
    top: -6px;
    right: -5px;
    display: inline-grid;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    place-items: center;
    border-radius: 999px;
    background: #08734a;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.contact-duplicate-summary {
    margin-bottom: 20px;
}

.contact-duplicate-summary-grid {
    margin: 16px 0 20px;
}

.contact-duplicate-summary-grid .list-summary-item {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.contact-duplicate-summary-grid .list-summary-item.is-selected {
    outline: 2px solid var(--selection-color);
    outline-offset: 2px;
}

.contact-duplicate-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.contact-duplicate-toolbar label {
    display: grid;
    width: min(340px, 100%);
    gap: 6px;
}

.contact-duplicate-toolbar p {
    margin: 0;
}

.contact-duplicate-groups {
    display: grid;
    gap: 14px;
}

.contact-duplicate-group {
    overflow: hidden;
    border: 1px solid #e2c5c2;
    border-radius: var(--panel-radius);
    background: #fff;
}

.contact-duplicate-group > header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 16px;
    border-bottom: 1px solid #ecd8d6;
    background: #fff6f5;
}

.contact-duplicate-group > header > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.contact-duplicate-group > header small {
    color: var(--muted);
    font-size: 11px;
}

.contact-duplicate-group > header strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-duplicate-type {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 9px;
    background: #f8deda;
    color: #a33129;
}

.contact-duplicate-type svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-duplicate-count {
    padding: 5px 9px;
    border-radius: 999px;
    background: #a33129;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.contact-duplicate-header-actions {
    display: flex !important;
    grid-auto-flow: column;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
}

.contact-duplicate-header-actions .mini-button {
    min-height: 32px;
}

.contact-duplicate-members {
    display: grid;
}

.contact-duplicate-member {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, .7fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.contact-duplicate-member:last-child {
    border-bottom: 0;
}

.contact-duplicate-member-meta {
    display: grid;
    gap: 3px;
    color: var(--muted);
    font-size: 11px;
}

.contact-duplicate-household-link,
.contact-family-current a {
    width: fit-content;
    color: var(--selection-color);
    font-weight: 800;
    text-decoration: none;
}

.contact-duplicate-household-link:hover,
.contact-family-current a:hover {
    text-decoration: underline;
}

.app-dialog.contact-family-dialog {
    width: min(940px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
    border-radius: 14px;
}

.app-dialog.contact-family-dialog > form {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: calc(100vh - 32px);
    padding: 0;
}

.contact-family-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 17px;
    border-bottom: 1px solid var(--line);
}

.contact-family-dialog-header h3,
.contact-family-dialog-header p {
    margin: 0;
}

.contact-family-dialog-header h3 {
    margin-top: 3px;
}

.contact-family-dialog-header p {
    margin-top: 5px;
    color: var(--muted);
}

.contact-family-dialog-close {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.contact-family-dialog-scroll {
    display: grid;
    gap: 16px;
    padding: 18px 24px;
    overflow-y: auto;
    background: #fbfcfc;
}

.contact-family-mode {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.contact-family-mode > label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 70px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
}

.contact-family-mode > label:has(input:checked) {
    border-color: #87b6a6;
    background: #eef7f3;
    box-shadow: inset 0 0 0 1px #87b6a6;
}

.contact-family-mode input,
.contact-family-check input,
.contact-family-member-select > input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: var(--button-color);
}

.contact-family-mode span {
    display: grid;
    gap: 3px;
}

.contact-family-mode small {
    color: var(--muted);
    font-weight: 500;
}

.contact-family-destination {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.contact-family-destination > label {
    display: grid;
    gap: 7px;
}

.contact-family-destination textarea {
    width: 100%;
    min-height: 66px;
    resize: vertical;
}

.contact-family-destination .hint {
    margin: 8px 0 0;
}

.contact-family-guidance {
    display: grid;
    gap: 3px;
    color: var(--text);
}

.contact-family-guidance span {
    color: var(--muted);
    font-size: 12px;
}

.contact-family-members {
    display: grid;
    gap: 10px;
}

.contact-family-member {
    display: grid;
    grid-template-columns: minmax(230px, 1.15fr) minmax(170px, .72fr) minmax(190px, .8fr);
    gap: 12px 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.contact-family-member.is-inactive {
    opacity: .58;
}

.contact-family-member-select {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    cursor: pointer;
}

.contact-family-member-select .team-staff-member {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.contact-family-member-select .team-staff-member > span:last-child {
    display: grid;
    gap: 2px;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 0;
    place-items: initial;
    align-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.25;
    text-align: left;
}

.contact-family-member-select .team-staff-member > img,
.contact-family-member-select .team-staff-member > span:first-child:not(:last-child) {
    flex: 0 0 38px;
}

.contact-family-member-select .team-staff-member strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-family-member > label:not(.contact-family-member-select) {
    display: grid;
    gap: 6px;
}

.contact-family-member-options {
    display: grid;
    gap: 7px;
}

.contact-family-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
}

.contact-family-check:has(input:disabled) {
    color: var(--muted);
    cursor: default;
}

.contact-family-current {
    grid-column: 1 / -1;
    margin: -2px 0 0 27px;
    color: var(--muted);
    font-size: 11px;
}

.contact-family-dialog-actions {
    justify-content: flex-end;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.contact-family-managed-settings {
    overflow: hidden;
    border: 1px solid #cfdde2;
    border-radius: 12px;
    background: #fff;
}

.contact-family-managed-settings > summary {
    padding: 13px 15px;
    color: var(--ink);
    font-weight: 850;
    cursor: pointer;
}

.contact-family-managed-settings[open] > summary {
    border-bottom: 1px solid var(--line);
    background: #f5f8f9;
}

.contact-family-managed-settings-body {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px 16px;
    padding: 15px;
}

.contact-family-managed-settings-body > label {
    display: grid;
    align-content: start;
    gap: 6px;
}

.contact-family-managed-settings-body .span-2 {
    grid-column: span 2;
}

.contact-family-managed-settings-body .span-3 {
    grid-column: 1 / -1;
}

.contact-family-managed-settings-body .hint {
    margin: 0;
}

.contact-family-managed-scopes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.contact-family-managed-scopes legend {
    padding: 0 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.member-contact-duplicates-page > .message a {
    margin-left: 8px;
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 760px) {
    .contact-duplicate-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .contact-duplicate-group > header {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .contact-duplicate-header-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .contact-duplicate-member {
        grid-template-columns: 1fr;
    }

    .contact-duplicate-member .mini-button {
        justify-self: start;
    }

    .contact-family-mode,
    .contact-family-member,
    .contact-family-managed-settings-body {
        grid-template-columns: 1fr;
    }

    .contact-family-current {
        grid-column: auto;
    }

    .contact-family-managed-settings-body .span-2,
    .contact-family-managed-settings-body .span-3 {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .dashboard-birthday-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-birthday-heading-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Master dashboard */

.master-dashboard-hero {
    background: linear-gradient(135deg, rgba(23, 32, 38, 0.98), rgba(49, 95, 140, 0.94));
}

.master-dashboard-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.master-dashboard-menu a,
.master-dashboard-menu button {
    display: grid;
    gap: 4px;
    width: 100%;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid rgba(121, 135, 145, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(24, 32, 38, 0.06);
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.master-dashboard-menu a:hover,
.master-dashboard-menu button:hover {
    border-color: var(--selection-color);
    transform: translateY(-1px);
}

.master-dashboard-menu form {
    margin: 0;
}

.master-dashboard-menu span {
    color: #315f8c;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.master-dashboard-menu strong {
    font-size: 14px;
}

.master-dashboard-menu small {
    color: var(--muted);
    font-size: 11px;
}

.master-dashboard-summary .dashboard-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.master-login-summary-surface {
    margin-bottom: 16px;
}

.master-login-metrics {
    margin-bottom: 14px;
}

.master-login-metrics .dashboard-metric {
    min-height: 86px;
}

.master-login-filter {
    display: flex;
    gap: 8px;
    align-items: end;
    margin: 0;
}

.master-login-filter label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.master-login-filter select {
    min-width: 220px;
    min-height: 38px;
}

.master-login-summary-surface table {
    min-width: 900px;
}

.master-club-summary-surface table {
    min-width: 950px;
    table-layout: fixed;
}

#master-dashboard-table th,
#master-dashboard-table td {
    padding-right: 7px;
    padding-left: 7px;
}

#master-dashboard-table th:nth-child(1) { width: 19%; }
#master-dashboard-table th:nth-child(2) { width: 10%; }
#master-dashboard-table th:nth-child(3) { width: 6%; }
#master-dashboard-table th:nth-child(4) { width: 8%; }
#master-dashboard-table th:nth-child(5) { width: 8%; }
#master-dashboard-table th:nth-child(6) { width: 11%; }
#master-dashboard-table th:nth-child(7),
#master-dashboard-table th:nth-child(8),
#master-dashboard-table th:nth-child(9) {
    width: 4%;
    text-align: center;
}
#master-dashboard-table td:nth-child(7),
#master-dashboard-table td:nth-child(8),
#master-dashboard-table td:nth-child(9) {
    text-align: center;
}
#master-dashboard-table th:nth-child(10) { width: 16%; }
#master-dashboard-table th:nth-child(11) { width: 6%; }

.master-dashboard-actions {
    gap: 6px;
    justify-content: flex-end;
    white-space: nowrap;
}

.master-dashboard-actions form {
    margin: 0;
    width: var(--icon-button-size);
    height: var(--icon-button-size);
}

.master-dashboard-actions .icon-link,
.master-dashboard-actions .icon-button {
    width: var(--icon-button-size);
    height: var(--icon-button-size);
    min-height: var(--icon-button-size);
}

/* Navigation tabs */

.tabs,
.role-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tabs a,
.role-tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    color: #39444d;
    font-weight: 750;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.tabs a.is-active,
.role-tabs a.is-active {
    border-color: var(--selection-color);
    background: var(--selection-color);
    color: var(--selection-text-color);
}

.tabs a:hover,
.role-tabs a:hover {
    border-color: var(--selection-color);
    transform: translateY(-1px);
}

/* Forms */

.form-grid,
.permissions-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.form-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.password-feedback {
    margin: -8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.password-feedback.is-valid {
    color: #1f7a52;
}

.password-feedback.is-invalid {
    color: #b24646;
}

.field-feedback {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
}

.field-feedback.is-valid {
    color: #1f7a52;
}

.field-feedback.is-invalid {
    color: #b24646;
}

.field-feedback.is-neutral {
    color: #667085;
}

label {
    display: grid;
    gap: 7px;
    color: #34424b;
    font-size: 13px;
    font-weight: 400;
}

.quota-year-top {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(240px, 1fr) minmax(190px, 240px);
    gap: 16px;
    align-items: end;
}

.quota-year-check {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    padding: 8px 0;
    color: var(--ink);
}

.quota-year-check input {
    width: auto;
    min-height: 0;
}

.quota-year-common[hidden] {
    display: none !important;
}

.quota-price-cell {
    display: grid;
    gap: 2px;
}

.quota-price-cell small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.finance-athlete-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.finance-athlete-shortcuts article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
}

.finance-athlete-shortcuts span,
.finance-athlete-shortcuts strong,
.finance-athlete-shortcuts small {
    display: block;
}

.finance-athlete-shortcuts span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.finance-athlete-shortcuts small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.competition-picker {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.competition-picker legend {
    margin-bottom: 8px;
    color: #39444d;
}

.competition-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.competition-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-soft);
    transition: border-color 0.14s ease, background 0.14s ease;
}

.competition-option[hidden] {
    display: none !important;
}

.competition-option:hover {
    border-color: var(--selection-color);
    background: #fff;
}

.competition-option input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
}

.competition-option span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.competition-option strong {
    overflow-wrap: anywhere;
    font-weight: 500;
}

.competition-option small {
    color: var(--muted);
}

.competition-knockout-rules {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
}

.competition-knockout-rules .competition-option {
    min-height: 58px;
    padding: 10px 12px;
    background: #fff;
}

.competition-knockout-rules .competition-option.is-wide {
    grid-column: 1 / -1;
}

.competition-knockout-rules .competition-option strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.competition-knockout-rules .competition-option small {
    font-size: 11px;
    line-height: 1.35;
}

.competition-knockout-rules .competition-option.is-disabled {
    border-style: dashed;
    background: #f3f5f6;
    opacity: .72;
}

.competition-knockout-rules .competition-option input[type="checkbox"] {
    width: 18px !important;
    min-width: 18px;
    height: 18px !important;
    min-height: 18px;
    padding: 0;
    border-radius: 4px;
    accent-color: var(--selection-color);
}

@media (max-width: 980px) {
    .competition-knockout-rules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .competition-knockout-rules {
        grid-template-columns: 1fr;
    }
}

input,
select,
textarea {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfcfc;
    color: var(--ink);
    font-size: 12px;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #c4d0d6;
    background: #fff;
}

textarea {
    min-height: 76px;
    resize: vertical;
}

/* Buttons and controls */

button,
.mini-button {
    min-height: var(--control-height);
    padding: 7px 13px;
    border: 1px solid transparent;
    border-radius: var(--control-radius);
    background: var(--button-color);
    color: var(--button-text-color);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--control-transition);
}

button:hover,
.mini-button:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

button:disabled,
button:disabled:hover {
    transform: none;
    filter: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: 1 / -1;
}

.sms-character-counter {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    text-align: right;
}

.sms-character-counter.is-limit {
    color: #b42318;
    font-weight: 700;
}

.color-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.color-row input[type="color"] {
    min-height: 34px;
    padding: 4px;
}

.field-action {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
}

.checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

/* Tables */

.table-wrap {
    width: 100%;
    margin-top: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(215, 224, 228, 0.9);
    border-radius: var(--panel-radius);
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrap table {
    min-width: var(--table-min-width);
}

th,
td {
    padding: var(--table-cell-padding);
    border-bottom: 1px solid var(--line);
    font-size: var(--table-cell-font-size);
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--table-head-bg);
    color: var(--table-head-color);
    font-size: var(--table-head-font-size);
    font-weight: 850;
    text-transform: uppercase;
}

tbody tr {
    transition: background 0.12s ease;
}

tbody tr:hover {
    background: #fbfcfc;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.table-sort-button {
    min-height: 0;
    display: inline-flex;
    gap: 7px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: 700;
    text-transform: inherit;
    cursor: pointer;
}

.table-sort-button:hover,
.table-sort-button:focus-visible {
    color: var(--ink);
}

.table-sort-indicator::before {
    content: "↕";
    color: #9aa5ad;
    font-size: 11px;
}

th[aria-sort="ascending"] .table-sort-indicator::before {
    content: "↑";
    color: var(--selection-color);
}

th[aria-sort="descending"] .table-sort-indicator::before {
    content: "↓";
    color: var(--selection-color);
}

.row-actions {
    display: flex;
    gap: var(--table-action-gap);
    align-items: center;
    justify-content: flex-end;
}

.section-header .row-actions {
    flex-wrap: wrap;
}

.row-actions:has(input[value="sync_member_address_from_responsible"]),
.row-actions:has(input[value="set_household_responsible"]),
.row-actions:has(input[value="remove_household_member"]) {
    display: grid;
    grid-template-columns: repeat(4, var(--icon-button-size));
    gap: var(--table-action-gap);
    justify-content: end;
    align-items: center;
}

.row-actions form:has(input[value="sync_member_address_from_responsible"]) {
    grid-column: 1;
    grid-row: 1;
}

.row-actions form:has(input[value="set_household_responsible"]) {
    grid-column: 2;
    grid-row: 1;
}

.row-actions:has(input[value="sync_member_address_from_responsible"]) .settings-edit-button,
.row-actions:has(input[value="set_household_responsible"]) .settings-edit-button,
.row-actions:has(input[value="remove_household_member"]) .settings-edit-button {
    grid-column: 3;
    grid-row: 1;
}

.row-actions form:has(input[value="remove_household_member"]) {
    grid-column: 4;
    grid-row: 1;
}

.grid-row-actions {
    --grid-action-size: var(--icon-button-size);
    display: grid;
    gap: var(--table-action-gap);
    justify-content: end;
    width: max-content;
    min-width: max-content;
}

.grid-actions-2 {
    grid-template-columns: repeat(2, var(--grid-action-size));
}

.grid-actions-3 {
    grid-template-columns: repeat(3, var(--grid-action-size));
}

.grid-actions-4 {
    grid-template-columns: repeat(4, var(--grid-action-size));
}

.grid-actions-5 {
    grid-template-columns: repeat(5, var(--grid-action-size));
}

/* Member and people lists */

.member-row-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    width: max-content;
    margin-left: auto;
}

#members-table th:last-child,
#members-table td:last-child {
    width: 214px;
    min-width: 214px;
}

#members-table .member-age-cell {
    width: 56px;
    text-align: center;
    white-space: nowrap;
}

#members-table .member-mobile-cell {
    width: 132px;
    white-space: nowrap;
}

#members-table .member-mobile-cell small,
.member-recent-surface .member-mobile-cell small {
    display: block;
    max-width: 132px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#members-table .member-rgpd-cell {
    width: 58px;
    text-align: center;
    white-space: nowrap;
}

.member-row-actions form {
    width: 28px;
    height: 28px;
}

#members-table .member-row-actions .icon-link,
#members-table .member-row-actions .icon-slot-placeholder {
    width: 28px;
    height: 28px;
    min-height: 0;
    border-radius: 7px;
}

#members-table .member-row-actions .icon-link {
    font-size: 14px;
}

#members-table .member-row-actions .icon-link svg {
    width: 15px;
    height: 15px;
}

#members-table .team-staff-member {
    gap: var(--table-action-gap);
}

#members-table .team-staff-member img,
#members-table .team-staff-member > span {
    width: var(--icon-button-size);
    height: var(--icon-button-size);
}

#members-table .socio-list-member .team-staff-member-name {
    font-size: 13px;
}

#members-table .team-staff-member small {
    font-size: 10px;
}

.icon-slot-placeholder {
    width: var(--icon-button-size);
    height: var(--icon-button-size);
    visibility: hidden;
}

.family-address-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    color: #d97706;
    font-size: 13px;
    font-weight: 900;
    vertical-align: middle;
}

.family-household-member-section,
.family-authorization-section {
    margin-top: 26px;
}

.compact-section-header {
    align-items: center;
    margin-bottom: -6px;
}

.compact-section-header h3,
.family-authorization-section h3 {
    margin: 0;
}

.family-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 10px;
    background: #edf3f1;
    color: #1f6f5b;
    font-size: 14px;
    font-weight: 850;
}

.family-management-state {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.family-management-state.is-active {
    background: #e4f4eb;
    color: #17643c;
}

.family-management-state.is-validation {
    background: #e8f3ff;
    color: #245f8f;
}

.family-management-state.is-pending {
    background: #fff0d5;
    color: #92560a;
}

.family-management-state.is-danger {
    background: #fde7e8;
    color: #a5252b;
}

.family-management-state.is-inactive {
    background: #edf0f2;
    color: #66727a;
}

.family-list-member {
    min-width: 190px;
}

.family-household-name {
    display: grid;
    gap: 3px;
    min-width: 180px;
}

.family-household-name small {
    display: block;
    max-width: 360px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
}

.family-list-member > div {
    min-width: 0;
}

.family-authorize-link {
    display: block;
    width: fit-content;
    margin-top: 6px;
    color: var(--selection-color);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.family-authorize-link:hover {
    text-decoration: underline;
}

.family-authorization-create {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafb;
}

.family-authorization-create > summary,
.family-authorization-actions > summary {
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
}

.family-authorization-create[open] > summary {
    margin-bottom: 16px;
}

.family-authorization-scopes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.family-authorization-scopes legend {
    padding: 0 6px;
    font-weight: 800;
}

.family-authorization-scopes .checkbox-row {
    align-items: flex-start;
    margin: 0;
    padding: 10px;
    border: 1px solid #e0e7e9;
    border-radius: 8px;
    background: #fff;
}

.family-authorization-scopes .checkbox-row span {
    display: grid;
    gap: 2px;
}

.family-authorization-scopes .checkbox-row small {
    color: var(--muted);
    font-weight: 500;
}

.family-authorization-actions {
    position: relative;
}

.family-authorization-actions[open] {
    min-width: 270px;
}

.family-authorization-actions form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.family-authorization-actions textarea {
    min-height: 56px;
}

.family-authorization-row-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.family-managed-age {
    white-space: nowrap;
}

.app-dialog.family-authorization-edit-dialog {
    width: min(720px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
}

.app-dialog.family-authorization-edit-dialog > form {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: calc(100vh - 32px);
    padding: 0;
}

.family-authorization-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 16px;
    border-bottom: 1px solid var(--line);
}

.family-authorization-dialog-header h3,
.family-authorization-dialog-header p {
    margin: 0;
}

.family-authorization-dialog-header .eyebrow {
    margin-bottom: 4px;
}

.family-authorization-dialog-header h3 + p {
    margin-top: 4px;
    color: var(--muted);
}

.family-authorization-dialog-close {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.family-authorization-dialog-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px 22px;
    overflow-y: auto;
}

.family-authorization-dialog-body > label {
    display: grid;
    align-content: start;
    gap: 7px;
}

.family-authorization-dialog-body .span-2 {
    grid-column: 1 / -1;
}

.family-authorization-edit-dialog .family-authorization-scopes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.family-authorization-dialog-footer {
    padding: 16px 22px 22px;
    border-top: 1px solid var(--line);
    background: #fff;
}

@media (max-width: 680px) {
    .family-authorization-dialog-body,
    .family-authorization-edit-dialog .family-authorization-scopes {
        grid-template-columns: 1fr;
    }

    .family-authorization-dialog-body .span-2 {
        grid-column: auto;
    }
}

.member-authorization-list {
    display: grid;
    gap: 14px;
}

.member-authorization-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f9fbfb;
}

.member-authorization-card .section-header {
    margin-bottom: 0;
}

.member-authorization-card h3 {
    margin: 2px 0;
}

.member-authorization-links {
    justify-content: flex-start;
}

.member-authorization-confirm,
.member-authorization-upload,
.member-authorization-revoke {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dfe7e6;
    border-radius: 10px;
    background: #fff;
}

.member-authorization-upload {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.member-authorization-revoke {
    border-color: rgba(165, 37, 43, 0.2);
}

.form-alert {
    padding: 10px 12px;
    border: 1px solid rgba(217, 119, 6, 0.28);
    border-radius: 8px;
    background: rgba(255, 247, 237, 0.94);
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
}

.is-current-member-row {
    background: rgba(49, 95, 140, 0.06);
}

.row-actions a {
    color: var(--blue);
    font-weight: 800;
}

.row-actions .mini-button {
    color: var(--button-text-color);
    height: var(--control-height);
    min-height: var(--control-height);
    line-height: 1;
}

.row-actions .mini-button.secondary-button {
    color: var(--ink);
}

.settings-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    width: max-content;
    min-width: 76px;
    margin-left: auto;
}

.sports-settings-association-actions {
    display: grid;
    grid-template-columns: repeat(3, var(--icon-button-size));
    gap: var(--table-action-gap);
    min-width: calc((var(--icon-button-size) * 3) + (var(--table-action-gap) * 2));
}

.sports-settings-association-actions form {
    width: var(--icon-button-size);
    height: var(--icon-button-size);
    margin: 0;
}

.settings-edit-button {
    color: var(--blue);
}

.settings-status-toggle.is-active {
    border-color: #a9dac5;
    background: #e8f6ef;
    color: #16875a;
}

.settings-status-toggle.is-active:hover {
    border-color: #16875a;
    background: #d9f0e5;
    color: #0f7049;
}

.settings-status-toggle.is-inactive {
    border-color: #cdd3d7;
    background: #f1f3f4;
    color: #7b858c;
}

.settings-status-toggle.is-inactive:hover {
    border-color: #89939a;
    background: #e7eaec;
    color: #5f696f;
}

.table-link {
    color: var(--blue);
    font-weight: 800;
}

.icon-link,
.icon-button {
    width: var(--icon-button-size);
    height: var(--icon-button-size);
    min-height: var(--icon-button-size);
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    background: #fff;
    color: var(--blue);
    font-size: 18px;
    line-height: 1;
    padding: 0;
    text-decoration: none;
    cursor: pointer;
    transition: var(--control-transition);
}

.icon-link:hover,
.icon-button:hover {
    transform: translateY(-1px);
    background: #fff;
    border-color: var(--selection-color);
    color: var(--selection-color);
}

.icon-link:disabled,
.icon-button:disabled,
.icon-link[aria-disabled="true"],
.icon-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
    filter: none;
}

.icon-link svg,
.icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.row-actions form {
    margin: 0;
}

.inline-refresh-form {
    display: inline-flex;
    margin: 0 6px 0 0;
    vertical-align: middle;
}

.form-static-info {
    display: grid;
    align-content: center;
    min-height: var(--control-height);
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: #f8fafb;
}

.form-static-info span {
    color: var(--muted);
    font-size: 11px;
}

.form-static-info strong {
    font-size: 13px;
}

.settings-row-actions form,
.grid-row-actions form,
.birthday-row-actions form,
.team-staff-table .row-actions form,
.team-roster-row-actions form,
.training-row-actions form,
.training-profile-switcher form,
.quota-row-actions form {
    margin: 0;
}

.settings-row-actions form:has(.icon-link),
.settings-row-actions form:has(.icon-button),
.grid-row-actions form,
.quota-row-actions form {
    width: var(--icon-button-size);
    height: var(--icon-button-size);
}

.settings-row-actions .icon-link {
    min-height: var(--icon-button-size);
    padding: 0;
}

button.icon-link,
button.icon-button {
    padding: 0;
    font-weight: 400;
}

.row-actions button.danger-icon:not(.icon-link):not(.icon-button) {
    min-height: var(--control-height);
    padding: 7px 13px;
    border: 1px solid #b42318;
    background: #b42318;
    color: #fff;
}

.row-actions button.danger-icon:not(.icon-link):not(.icon-button):hover {
    background: #961b12;
    border-color: #961b12;
    color: #fff;
}

.icon-link.danger-icon,
.icon-button.danger-icon,
.danger-icon {
    color: var(--red);
}

.icon-link.danger-icon:hover,
.icon-button.danger-icon:hover {
    border-color: var(--red);
    color: var(--red);
}

.icon-link.danger-icon svg,
.icon-button.danger-icon svg {
    width: 16px;
    height: 16px;
}

.icon-link.master-delete-member-icon {
    color: #6f42c1;
    border-color: #cdb8ed;
    background: #f4effc;
}

.icon-link.master-delete-member-icon:hover {
    color: #fff;
    border-color: #6f42c1;
    background: #6f42c1;
}

.danger-button {
    background: #b42318;
    border-color: #b42318;
    color: #fff;
}

.danger-button:hover {
    background: #961b12;
    border-color: #961b12;
    color: #fff;
}

.exclude-socio-icon {
    line-height: 1;
}

.exclude-socio-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.assign-socio-icon svg,
.readmit-socio-icon svg,
.assign-athlete-icon svg,
.assign-staff-icon svg,
.delete-member-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.former-socio-row td {
    background: #f7f8f8;
    color: #8a949b;
}

.former-socio-row .badge {
    filter: grayscale(1);
    opacity: 0.72;
}

.former-socio-row .icon-link {
    color: #758087;
}

.former-socio-row .assign-socio-icon:hover,
.former-socio-row .readmit-socio-icon:hover {
    color: var(--selection-color);
}

.readmit-socio-icon {
    color: var(--green-dark);
}

.inactive-member-row td {
    background: #f7f8f8;
    color: #8a949b;
}

.inactive-member-row .badge {
    filter: grayscale(1);
    opacity: 0.72;
}

.inactive-member-row .icon-link {
    color: #758087;
}

/* Table pagination and filters */

.table-pagination {
    min-height: var(--table-pagination-size);
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin-top: var(--table-toolbar-margin);
}

.table-pagination:empty {
    display: none;
}

.table-pagination button {
    width: var(--table-pagination-size);
    min-height: var(--table-pagination-size);
    padding: 0;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    box-shadow: none;
}

.table-pagination button.is-active {
    border-color: var(--selection-color);
    background: var(--selection-color);
    color: var(--selection-text-color);
}

.table-pagination button:disabled {
    cursor: default;
    opacity: 0.4;
}

.table-pagination span {
    width: 24px;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(88, 100, 107, 0.08);
    background: #edf1f2;
    color: #44515b;
    font-size: 12px;
    font-weight: 800;
}

.badge-active,
.badge-signed {
    background: #e1f3ec;
    color: var(--green-dark);
}

.settings-state-toggle-form {
    display: inline-flex;
    margin: 0;
}

.settings-state-toggle-button {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.settings-state-toggle-button:hover .badge,
.settings-state-toggle-button:focus-visible .badge {
    box-shadow: 0 0 0 2px rgba(49, 95, 140, 0.2);
}

.badge-open {
    background: #fff2d8;
    color: #866019;
}

.badge-paid,
.badge-exempt {
    background: #e1f3ec;
    color: var(--green-dark);
}

.badge-inactive,
.badge-closed,
.badge-cancelled,
.badge-revoked {
    background: #eceff1;
    color: #6c757d;
}

.badge-preparation {
    background: #fff2d8;
    color: #866019;
}

.badge-pending,
.badge-unpaid,
.badge-validation {
    background: #fff2d8;
    color: #866019;
}

.badge-partial {
    background: #e7f0fb;
    color: #315f92;
}

.badge-available {
    background: #e1f3ec;
    color: var(--green-dark);
}

.badge-recovering {
    background: #fff2d8;
    color: #866019;
}

.badge-unavailable {
    background: #fde7e7;
    color: var(--red);
}

.badge-overdue {
    background: #fde7e7;
    color: var(--red);
}

.badge-scheduled {
    background: #e7f0fb;
    color: #315f92;
}

.badge-completed {
    background: #e1f3ec;
    color: var(--green-dark);
}

.badge-postponed {
    background: #fff2d8;
    color: #866019;
}

.toast,
.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #e7f6ef;
    color: #1f6f5b;
    border: 1px solid #b9dfcf;
    box-shadow: 0 8px 18px rgba(31, 111, 91, 0.08);
}

.alert {
    background: #f9e8e8;
    color: var(--red);
    border-color: #edc6c6;
}

.permissions-form {
    grid-template-columns: 1fr 2fr;
}

.permissions-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.permissions-grid label {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    transition: border-color 0.14s ease, background 0.14s ease;
}

.permissions-grid label:hover {
    border-color: var(--selection-color);
    background: #fff;
}

.media-preview img {
    max-width: 140px;
    max-height: 90px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.settings-background-preview {
    display: grid;
    gap: 8px;
    align-content: start;
}

.settings-background-preview img {
    width: 220px;
    max-width: 100%;
    height: 124px;
    max-height: none;
    object-fit: cover;
}

.settings-background-preview .danger-button {
    justify-self: start;
}

.club-background-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.club-background-field {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 10px;
}

.club-logo-field {
    display: flex;
    align-items: end;
    gap: 16px;
}

.club-logo-field > label {
    width: min(100%, 520px);
}

.club-save-row {
    display: flex;
}

.club-save-row > button {
    width: min(100%, 280px);
}

@media (max-width: 760px) {
    .club-background-fields {
        grid-template-columns: 1fr;
    }

    .club-logo-field {
        align-items: start;
        flex-direction: column;
    }
}

.sports-settings-list-logo {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.sports-settings-inline-form {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    scroll-margin-top: 20px;
}

.surface-inline-panel {
    margin: 16px 0 20px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
}

.surface-inline-panel summary {
    cursor: pointer;
    font-weight: 700;
}

.surface-inline-panel .sports-settings-inline-form {
    margin: 14px 0 0;
}

.match-form-disclosure:not([open]) {
    display: inline-block;
    margin: 8px 8px 8px 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.match-form-disclosure[open] {
    display: block;
}

.master-match-list-wrap {
    display: block !important;
    clear: both;
}

.opponent-list-filters.match-round-filter {
    align-items: end;
    justify-content: space-between;
    width: 100%;
    margin-top: 18px;
}

.match-team-filter,
.match-round-navigation {
    display: inline-flex;
    align-items: end;
    gap: 6px;
}

.match-round-navigation {
    margin-left: auto;
}

.match-round-navigation .icon-link {
    width: 38px;
    height: 38px;
}

.match-round-navigation .icon-link.is-disabled {
    cursor: default;
    opacity: .35;
    pointer-events: none;
}

.match-team-search input {
    width: min(240px, 32vw);
}

@media (max-width: 760px) {
    .match-round-filter,
    .match-team-filter,
    .match-round-navigation {
        width: 100%;
    }

    .match-round-navigation {
        margin-left: 0;
        justify-content: flex-end;
    }

    .match-team-search {
        flex: 1;
    }

    .match-team-search input {
        width: 100%;
    }
}

.master-match-cards {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.master-match-card {
    display: grid;
    grid-template-columns: 150px minmax(320px, 1.5fr) minmax(180px, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: var(--panel);
}

.master-match-card-meta,
.master-match-card-details {
    display: grid;
    gap: 3px;
}

.master-match-card-meta span,
.master-match-card-details span {
    color: var(--muted);
    font-size: 11px;
}

.master-match-card-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.master-match-card-teams > b {
    text-align: center;
}

.master-match-card-teams .club-logo-name:last-child {
    justify-content: flex-end;
    text-align: right;
}

.master-match-club-link {
    color: inherit;
    text-decoration: none;
}

.master-match-club-link:hover {
    color: var(--green);
    text-decoration: underline;
}

.master-match-club-link .master-match-club-name {
    font-weight: 400;
}

.master-match-club-link.is-winner .master-match-club-name {
    font-weight: 700;
}

.master-match-card-actions {
    flex-wrap: nowrap;
}

.master-match-card-actions .icon-link.is-disabled {
    cursor: not-allowed;
    opacity: .35;
    pointer-events: none;
}

@media (max-width: 980px) {
    .master-match-card {
        grid-template-columns: 1fr auto;
    }

    .master-match-card-teams {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .master-match-card-details {
        grid-column: 1;
    }
}

.club-inline-input {
    width: 100%;
    min-width: 145px;
    min-height: 36px;
    padding: 6px 8px;
}

.club-inline-gps-input {
    min-width: 190px;
}

.club-inline-input.is-saving {
    opacity: .65;
}

.club-inline-input.is-saved {
    border-color: #1f6f5b;
    box-shadow: 0 0 0 2px rgba(31, 111, 91, .12);
}

.club-inline-input.is-error {
    border-color: #a64545;
    box-shadow: 0 0 0 2px rgba(166, 69, 69, .12);
}

.club-inline-save-status {
    min-width: 120px;
}

.club-inline-save-status.is-error {
    color: #a64545;
}

.master-club-search-panel {
    max-width: 520px;
    margin: 16px 0 8px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-soft);
}

.master-club-search-form > label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.master-club-search-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.master-club-search-controls input[type="search"] {
    flex: 0 1 360px;
    width: 360px;
    max-width: 100%;
    min-width: 220px;
}

@media (max-width: 700px) {
    .master-club-search-controls {
        align-items: stretch;
        flex-direction: column;
    }
}

.association-club-toolbar,
.association-club-actions {
    display: inline-flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 10px;
    margin-right: 10px;
}

.association-club-actions {
    margin-top: 16px;
}

.association-club-actions form {
    margin: 0;
}

/* Settings and sports settings */

.sports-settings-status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    vertical-align: middle;
}

.sports-settings-status-dot.is-active {
    background: #20a66a;
    box-shadow: 0 0 0 3px #e1f3ec;
}

.sports-settings-status-dot.is-inactive {
    background: #98a1a8;
    box-shadow: 0 0 0 3px #eceff1;
}

.sports-settings-status-dot.is-pending {
    background: #f0ad3d;
    box-shadow: 0 0 0 3px #fff0d8;
}

.sports-settings-status-dot.is-warning {
    background: #f0ad3d;
    box-shadow: 0 0 0 3px #fff0d8;
}

.sports-settings-status-dot.is-validation {
    background: #5b9bd5;
    box-shadow: 0 0 0 3px #e8f2fb;
}

.sports-settings-status-dot.is-danger {
    background: #d94b4b;
    box-shadow: 0 0 0 3px #f8dddd;
}

.facility-photo-link {
    display: inline-flex;
    align-items: center;
}

.facility-list-photo {
    display: block;
    width: 56px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    object-fit: cover;
    background: #f4f6f7;
}

.facility-status-form {
    display: inline-flex;
    margin: 0;
}

.sports-settings-site-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Section headers and list toolbars */

.section-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.section-header h2,
.section-header h3,
.section-header p {
    margin-top: 0;
}

.section-header p,
.section-header .hint {
    line-height: 1.45;
}

.table-filter {
    margin-top: var(--table-toolbar-margin);
}

.table-list-toolbar {
    display: flex;
    gap: var(--table-toolbar-gap);
    align-items: end;
    justify-content: flex-start;
    margin-top: var(--table-toolbar-margin);
}

.table-list-toolbar .table-filter {
    width: min(460px, 100%);
    margin-top: 0;
}

.table-page-size {
    display: grid;
    gap: 5px;
    min-width: 110px;
}

.table-list-toolbar .mini-button {
    margin-left: auto;
    white-space: nowrap;
}

.member-role-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.member-role-filters button,
.member-role-filters .member-birthday-link,
.member-role-filters .member-role-filter-link {
    align-items: start;
    display: grid;
    gap: 5px;
    justify-items: start;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #fbfcfc;
    color: var(--ink);
    box-shadow: none;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.member-role-filters button span,
.member-role-filters .member-birthday-link span,
.member-role-filters .member-role-filter-link span {
    display: block;
    min-width: 0;
    height: auto;
    margin-left: 0;
    padding: 0 6px;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-size: 23px;
    line-height: 1;
}

.member-role-filters .member-birthday-link.has-birthdays {
    border-color: #e8993f;
    background: #fff2df;
    color: #9a4f0d;
    box-shadow: 0 12px 26px rgba(216, 120, 31, 0.16);
}

.member-role-filters .member-birthday-link.has-birthdays span {
    color: #c86612;
}

.member-role-filters button.is-active,
.member-role-filters .member-role-filter-link.is-active {
    border-color: var(--selection-color);
    background: #f2f7fb;
    color: var(--selection-color);
    box-shadow: 0 12px 26px rgba(49, 95, 140, 0.1);
}

.member-role-filters button.is-active span,
.member-role-filters .member-role-filter-link.is-active span {
    background: transparent;
    color: var(--selection-color);
}

.socio-summary-filters {
    margin-bottom: 2px;
}

.socio-summary-filters button.has-pending,
.socio-summary-filters button.has-pending.is-active {
    border-color: #ef9a9a;
    background: #fff0f1;
    color: #a61b1b;
    box-shadow: 0 12px 26px rgb(185 28 28 / 14%);
}

.socio-summary-filters button.has-pending span,
.socio-summary-filters button.has-pending.is-active span {
    color: #c62828;
}

/* Birthdays */

.birthday-range-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px 0 12px;
}

.birthday-range-filters a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    min-height: 58px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    text-decoration: none;
}

.birthday-range-filters a small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.birthday-range-filters a strong {
    font-size: 22px;
    line-height: 1;
}

.birthday-range-filters a.is-active {
    border-color: var(--selection-color);
    background: #f2f7fb;
    color: var(--selection-color);
}

.birthday-list-title {
    margin: 12px 0 10px;
}

.birthday-list-title h3 {
    margin: 0;
    font-size: 16px;
}

.birthday-list-title .hint {
    margin-top: 3px;
}

.birthday-row-actions {
    gap: 6px;
    justify-content: flex-end;
}

.message-log-details summary {
    cursor: pointer;
    color: var(--selection-color);
    font-weight: 800;
}

.message-log-body {
    max-width: 520px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--ink);
    white-space: normal;
}

.communication-error-body {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

/* Payment methods */

.payment-methods-header {
    align-items: flex-start;
}

.payment-methods-header .hint {
    max-width: 760px;
}

.payment-method-type-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.payment-method-type-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    min-width: 0;
    min-height: 210px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fbfcfc;
}

.payment-method-active-count {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid #b8dfcc;
    border-radius: 999px;
    background: #f0faf5;
    color: #0b754d;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.payment-method-type-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 9px;
    background: #e7f4ee;
    color: #0b754d;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.payment-method-type-card h3,
.payment-method-type-card p,
.payment-method-form-head h3,
.payment-method-list h3,
.payment-method-row p {
    margin: 0;
}

.payment-method-type-card h3 {
    font-size: 15px;
}

.payment-method-type-card p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.payment-method-type-card .mini-button {
    width: 100%;
    justify-content: center;
}

.payment-method-form {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid #b9cfdf;
    border-radius: 9px;
    background: #f7fafc;
}

.payment-method-form-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.payment-method-form-head .eyebrow {
    margin: 0 0 2px;
}

.payment-method-note {
    align-self: end;
    min-height: 64px;
    padding: 11px 13px;
    border: 1px solid #cfe0eb;
    border-radius: 8px;
    background: #eef6fb;
    color: #385565;
    font-size: 12px;
    line-height: 1.4;
}

.payment-method-note a {
    display: inline-block;
    margin-left: 4px;
    color: var(--selection-color);
    font-weight: 800;
}

.payment-method-default-check {
    grid-column: 1 / -1;
    justify-self: start;
}

.payment-method-list {
    margin-top: 28px;
}

.payment-method-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(190px, .45fr) auto;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.payment-method-row.is-default {
    border-color: #c7cdd1;
    background: #eceff1;
}

.payment-method-row-main {
    min-width: 0;
}

.payment-method-row-main > div {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 9px;
}

.payment-method-row-main > div > span {
    color: var(--muted);
    font-size: 11px;
}

.payment-method-row-main p {
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-method-state {
    display: grid;
    gap: 2px;
    padding-left: 12px;
    border-left: 3px solid #d4dde1;
}

.payment-method-state strong {
    font-size: 12px;
}

.payment-method-state small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
}

.payment-method-state.is-ready {
    border-left-color: #0f8f5f;
}

.payment-method-state.is-incomplete {
    border-left-color: #d97706;
}

.payment-method-row .row-actions form {
    margin: 0;
}

.payment-method-row .row-actions {
    flex-wrap: wrap;
    min-width: max-content;
}

.payment-method-row .row-actions button.payment-method-toggle-button {
    min-width: 86px;
    min-height: var(--control-height);
    padding: 7px 12px;
    border-color: transparent;
    background: var(--button-color);
    color: var(--button-text-color);
    font-weight: 800;
}

.payment-method-row .row-actions button.payment-method-toggle-button.secondary-button {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}

.compact-empty-state {
    margin-top: 10px;
    padding: 22px;
}

@media (max-width: 1180px) {
    .payment-method-type-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .member-authorization-upload {
        grid-template-columns: 1fr;
    }

    .payment-method-type-grid {
        grid-template-columns: 1fr;
    }

    .payment-method-type-card {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        min-height: 0;
    }

    .payment-method-type-card .payment-method-type-icon {
        grid-row: 1 / 3;
    }

    .payment-method-active-count {
        position: static;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
    }

    .payment-method-type-card .mini-button {
        grid-column: 2;
        width: auto;
        justify-self: start;
    }

    .payment-method-form {
        padding: 14px;
    }

    .payment-method-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: start;
    }

    .payment-method-state {
        grid-column: 2 / -1;
    }

    .payment-method-row .row-actions {
        grid-column: 2 / -1;
        justify-content: flex-start;
        min-width: 0;
    }

    .payment-method-row-main p {
        white-space: normal;
    }
}

.knockout-section {
    overflow: hidden;
}

.knockout-bracket {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 8px 2px 18px;
}

.knockout-round {
    display: flex;
    flex: 0 0 280px;
    flex-direction: column;
    min-width: 280px;
}

.knockout-round > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding: 0 4px;
}

.knockout-round > header span {
    color: var(--muted, #61717a);
    font-size: .78rem;
}

.knockout-round-matches {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-around;
    gap: 14px;
}

.knockout-match {
    padding: 12px;
    border: 1px solid var(--line, #d9e1e5);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(20, 44, 57, .05);
}

.knockout-match > div {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 30px;
    color: #5e6c74;
}

.knockout-match > div.is-winner {
    color: var(--ink, #18262d);
    font-weight: 800;
}

.knockout-team-logo {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
}

.knockout-team-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.knockout-score {
    display: block;
    margin: 6px 0;
    padding: 6px;
    border-block: 1px solid #edf1f3;
    text-align: center;
}

.knockout-match footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted, #61717a);
    font-size: .76rem;
}

.knockout-match footer a {
    font-weight: 700;
}

.knockout-winner-card {
    display: grid;
    grid-template-columns: auto 54px minmax(0, auto) auto;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 4px 0 20px;
    padding: 16px;
    border: 1px solid #d5b970;
    border-radius: 14px;
    background: linear-gradient(135deg, #fffaf0, #fff);
    color: #76551a;
}

.knockout-winner-card img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.knockout-winner-card strong {
    color: var(--ink, #18262d);
    font-size: 1.15rem;
}

.knockout-matrix-summary {
    margin-top: 14px;
}

.knockout-matrix-help {
    margin: -6px 0 14px;
    padding: 10px 12px;
    border-left: 3px solid var(--selection-color);
    background: var(--panel-soft);
}

.knockout-matrix-position {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid #cfdce3;
    border-radius: 999px;
    background: #f4f8fa;
    color: #34515f;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.knockout-draw-editor {
    display: grid;
    gap: 18px;
    margin: 16px 0 22px;
}

.knockout-draw-step {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.knockout-draw-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-soft);
}

.knockout-draw-step-header > div {
    display: grid;
    gap: 2px;
}

.knockout-draw-step-header small {
    color: var(--muted);
}

.knockout-draw-step-number {
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--selection-color);
    color: #fff;
    font-weight: 800;
}

.knockout-draw-table {
    margin: 0;
}

.knockout-draw-table select {
    width: 100%;
    min-width: 210px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.knockout-draw-table select.is-auto-swapped {
    border-color: var(--selection-color);
    background: #edf8f3;
    box-shadow: 0 0 0 3px rgba(31, 111, 91, .14);
}

.knockout-draw-table th:first-child,
.knockout-draw-table td:first-child {
    width: 100px;
}

.knockout-draw-versus {
    width: 36px;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

.knockout-draw-actions {
    justify-content: flex-end;
    margin-top: 0;
}

.knockout-draw-swap-feedback {
    margin: -4px 0 0;
    padding: 9px 12px;
    border: 1px solid #b9dfcf;
    border-radius: 8px;
    background: #f2faf6;
    color: #1f6f5b;
    font-size: 13px;
    font-weight: 700;
}

.knockout-draw-swap-feedback.is-error {
    border-color: #edc6c6;
    background: #fffafa;
    color: #a24343;
}

@media (max-width: 640px) {
    .knockout-winner-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .knockout-winner-card > span,
    .knockout-winner-card > small {
        grid-column: 1 / -1;
        text-align: center;
    }

    .knockout-draw-step-header {
        align-items: flex-start;
    }

    .knockout-draw-table select {
        min-width: 170px;
    }

    .knockout-draw-actions {
        justify-content: stretch;
    }
}

.communications-sms-balance {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 18px 0 16px;
    padding: 12px 14px;
    border: 1px solid #b8dfcc;
    border-radius: 8px;
    background: #f0faf5;
}

.communications-sms-balance-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #0f8f5f;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.communications-sms-balance > div {
    display: grid;
    gap: 2px;
}

.communications-sms-balance > div span,
.communications-sms-balance small {
    color: var(--muted);
    font-size: 11px;
}

.communications-sms-balance strong {
    color: var(--ink);
    font-size: 19px;
    line-height: 1.1;
}

.communications-sms-balance small {
    text-align: right;
}

.communications-sms-balance.is-unavailable {
    border-color: #f1d5a8;
    background: #fff9ef;
}

.communications-sms-balance.is-unavailable .communications-sms-balance-icon {
    background: #b7791f;
}

@media (max-width: 720px) {
    .communications-sms-balance {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .communications-sms-balance small {
        grid-column: 2;
        text-align: left;
    }
}

.profile-member-data-card {
    margin-top: 0;
}

.profile-communications-open {
    margin-top: 24px;
}

.profile-payments-open {
    margin-top: 24px;
}

.profile-payment-total {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #e7f7ef;
    color: #166534;
    font-size: 14px;
}

.member-communications-table td {
    vertical-align: top;
}

.member-payments-table td {
    vertical-align: middle;
}

.member-payments-table .icon-button + .table-secondary {
    margin-top: 4px;
}

.member-payment-proof-upload {
    margin-top: 7px;
}

.member-payment-proof-upload summary {
    width: fit-content;
    cursor: pointer;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.member-payment-proof-upload form {
    display: grid;
    gap: 7px;
    min-width: 210px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft, #f8fafc);
}

.member-payment-proof-upload input[type="file"] {
    width: 100%;
    min-width: 0;
    font-size: 11px;
}

.member-payment-validation-review {
    margin-bottom: 24px;
    border-color: #f2d39b;
    background: linear-gradient(135deg, #fffdf8 0%, #fff 72%);
}

.member-payment-validation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.member-payment-validation-group {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.member-payment-validation-group h3 {
    margin: 0 0 12px;
}

.member-payment-validation-item {
    display: grid;
    gap: 6px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.member-payment-validation-item:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.member-payment-validation-item > small {
    color: var(--muted);
}

.member-payment-validation-item .member-payment-validation-actions {
    flex-wrap: wrap;
    margin-top: 3px;
}

@media (max-width: 820px) {
    .member-payment-validation-grid {
        grid-template-columns: 1fr;
    }
}

.communication-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.communication-status-sent {
    background: #dcfce7;
    color: #166534;
}

.communication-status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.birthday-send-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.sent-status {
    display: inline-flex;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    flex: 0 0 11px;
    vertical-align: middle;
}

.sent-status-ok {
    background: #12b981;
    box-shadow: 0 0 0 4px rgba(18, 185, 129, 0.12);
}

.sent-status-empty {
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.14);
}

.birthday-send-count {
    display: inline-grid;
    place-items: center;
    min-width: 29px;
    height: 29px;
    padding: 0 7px;
    border-radius: 999px;
    background: #edf2f5;
    color: #0f4d73;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.birthday-row-actions .icon-button svg {
    width: 18px;
    height: 18px;
}

.birthday-row-actions .birthday-channel-button.is-sent {
    border-color: #138a5b;
    background: #18a66c;
    color: #fff;
    box-shadow: 0 4px 10px rgba(19, 138, 91, 0.2);
}

.birthday-row-actions .birthday-channel-button.is-sent:hover {
    border-color: #0f7049;
    background: #138a5b;
    color: #fff;
}

.birthday-row-actions .birthday-channel-button.is-responsible:not(.is-sent) {
    border-color: #c8e0f4;
    background: #f8fbff;
    color: #4c82ac;
}

.birthday-row-actions .birthday-channel-button.is-responsible.is-sent {
    border-color: #1d65a9;
    background: #287dc5;
    color: #fff;
    box-shadow: 0 4px 10px rgba(29, 101, 169, 0.24);
}

.birthday-responsible-contact {
    color: #286a9e;
    font-weight: 800;
}

.birthday-responsible-name {
    color: #4b5563;
    font-weight: 700;
}

.birthday-row-actions .icon-button:disabled,
.birthday-row-actions .icon-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.members-empty-state {
    margin: 18px 0 2px;
    color: var(--muted);
    text-align: center;
}

.inline-warning {
    margin-top: 18px;
    padding: 12px 14px;
    border-left: 4px solid #b77a13;
    background: #fff7e8;
    color: #6b4a13;
}

/* Teams and sport management */

.team-list-surface {
    padding-bottom: 18px;
}

.team-list-surface > .section-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
}

.team-list-surface > .section-header h2 {
    grid-column: 1;
}

.team-list-surface > .section-header .team-season-navigation {
    grid-column: 2;
}

.team-list-surface > .section-header .team-new-button,
.team-list-surface > .section-header .team-header-actions {
    grid-column: 3;
    justify-self: end;
}

.team-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.team-header-actions form {
    margin: 0;
}

#team-form,
#athlete-form,
#athlete-monthly-fee-form,
#membership-monthly-fee-form {
    scroll-margin-top: 20px;
}

.athlete-list-surface table {
    min-width: 1060px;
}

.athlete-list-cell {
    min-width: 250px;
}

.athlete-list-member {
    gap: 8px;
    min-width: 0;
}

.athlete-list-member img,
.athlete-list-member > span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
}

.athlete-list-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.athlete-list-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.athlete-list-number {
    flex: 0 0 auto;
    min-width: 32px;
    padding: 2px 6px;
    border: 1px solid #d7e3e8;
    border-radius: 6px;
    background: #f7fafb;
    color: #315f8c;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.athlete-list-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
}

.athlete-list-full-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
}

#team-profile-athletes-table th:first-child,
#team-profile-athletes-table td:first-child {
    display: none;
}

.athlete-list-surface > .section-header {
    align-items: end;
    gap: 12px;
    grid-template-columns: auto minmax(420px, 1fr) auto;
}

.athlete-list-surface > .section-header .athlete-list-toolbar {
    grid-column: 2;
    justify-content: center;
    justify-self: stretch;
}

/* Athlete lists */

.athlete-list-toolbar {
    flex-wrap: nowrap;
}

.athlete-team-filter {
    flex: 0 1 340px;
    margin: 0;
}

.athlete-team-filter label,
.athlete-team-filter select {
    width: 100%;
}

.team-season-filter {
    min-width: min(100%, 240px);
}

.team-season-filter label {
    gap: 5px;
}

.team-season-filter select {
    min-width: 200px;
}

.team-season-navigation {
    display: flex;
    gap: 8px;
    align-items: end;
}

.team-season-navigation .season-arrow {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    min-height: 42px;
}

.team-season-navigation .season-arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.team-season-navigation .season-arrow.is-disabled {
    cursor: default;
    opacity: 0.32;
}

.competition-phase-form [hidden] {
    display: none !important;
}

.phase-team-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.phase-profile-hero,
.phase-profile-actions,
.phase-participant-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.phase-tabs-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.phase-tabs-row .phase-profile-tabs {
    flex: 0 1 auto;
    margin: 0;
}

.phase-teams-button {
    flex: 0 0 auto;
}

.phase-profile-hero h2,
.phase-profile-hero p {
    margin: 0;
}

.phase-profile-hero h2 {
    margin-top: 4px;
}

.phase-profile-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.phase-summary-group h3 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.phase-summary-group dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.phase-summary-group dl div,
.phase-summary-notes {
    min-width: 0;
}

.phase-summary-group dt,
.phase-summary-notes span {
    color: var(--muted);
    font-size: 0.78rem;
}

.phase-summary-group dd {
    margin: 4px 0 0;
    font-weight: 600;
}

.phase-summary-notes {
    grid-column: 1 / -1;
    padding-top: 4px;
}

.phase-summary-notes p {
    margin: 6px 0 0;
}

.phase-overview-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0;
}

.phase-overview-metrics > div {
    padding: 22px;
    border-right: 1px solid var(--line);
    text-align: center;
}

.phase-overview-metrics > div:last-child {
    border-right: 0;
}

.phase-overview-metrics span,
.phase-overview-metrics strong {
    display: block;
}

.phase-overview-metrics span {
    color: var(--muted);
    font-size: 0.82rem;
}

.phase-overview-metrics strong {
    margin-top: 6px;
    font-size: 1.55rem;
}

.phase-participants-form,
.phase-inline-form {
    margin-bottom: 20px;
    padding: 18px;
    background: var(--surface-muted, #f5f6f7);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.phase-club-participant {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 16px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.phase-club-participant img,
.phase-club-participant > span {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    object-fit: contain;
}

.phase-club-participant > span {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #edf1f2;
    color: var(--muted);
    font-weight: 700;
}

.phase-club-participant small,
.phase-club-participant strong {
    display: block;
}

.phase-club-participant small {
    margin-bottom: 2px;
    color: var(--muted);
}

.phase-club-facility {
    min-width: 260px;
    margin-left: auto;
}

.phase-club-facility select {
    min-height: 40px;
}

.phase-round-config-table {
    margin: 16px 0;
}

.phase-round-config-table table {
    min-width: 820px;
}

.phase-round-config-table th:first-child,
.phase-round-config-table td:first-child {
    width: 58px;
    min-width: 58px;
    padding-right: 7px;
    padding-left: 7px;
    text-align: center;
}

.phase-round-config-table th:last-child,
.phase-round-config-table td:last-child {
    min-width: 170px;
}

.phase-round-config-table select,
.phase-round-config-table input {
    min-height: 38px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.phase-round-config-table th:nth-child(3),
.phase-round-config-table td:nth-child(3) {
    width: 104px;
    min-width: 104px;
    padding-right: 7px;
    padding-left: 7px;
}

.phase-round-config-table th:nth-child(4),
.phase-round-config-table td:nth-child(4) {
    width: 172px;
    min-width: 172px;
    padding-right: 7px;
    padding-left: 7px;
}

.phase-round-config-table th:nth-child(5),
.phase-round-config-table td:nth-child(5) {
    padding-right: 7px;
    padding-left: 7px;
}

.phase-round-config-table .phase-round-venue[readonly] {
    background: #eef2f3;
    color: var(--muted);
}

.phase-round-config-table tr.is-bye td:not(:first-child):not(:nth-child(2)) {
    opacity: 0.55;
}

.phase-match-table td:nth-child(3) {
    min-width: 260px;
}

.phase-match-table th:first-child,
.phase-match-table td:first-child {
    width: 58px;
    min-width: 58px;
    padding-right: 8px;
    padding-left: 8px;
    text-align: center;
}

.phase-match-table td:nth-child(5) small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.phase-match-table .badge {
    white-space: nowrap;
}

.phase-condition-casa {
    background: #e1f3ec;
    color: var(--green-dark);
}

.phase-condition-fora {
    background: #e8eef6;
    color: #315f8c;
}

.phase-condition-isento,
.phase-condition-neutro {
    background: #eceff1;
    color: #6c757d;
}

.phase-versus {
    display: inline-block;
    margin: 0 8px;
    color: var(--muted);
    font-size: 0.78rem;
}

.phase-match-side {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.phase-match-side img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.phase-club-name {
    font-weight: 700;
}

.phase-goal-summary,
.phase-goal-summary span {
    display: block;
}

.phase-goal-summary {
    margin-top: 4px;
    color: var(--muted);
    white-space: nowrap;
}

.phase-goal-scorers {
    padding-top: 4px;
}

.phase-goal-scorers-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.phase-goal-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 110px;
    gap: 12px;
    margin-top: 10px;
}

.phase-goal-row label {
    min-width: 0;
}

.phase-match-actions {
    display: grid;
    grid-template-columns: repeat(3, var(--icon-button-size));
    gap: var(--table-action-gap);
    width: 118px;
    min-width: 118px;
}

.phase-match-actions svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.match-profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.match-profile-head h2,
.match-profile-head p {
    margin: 0;
}

.match-profile-head h2 {
    margin-top: 4px;
}

.match-profile-head p {
    margin-top: 10px;
    color: var(--muted);
}

.match-profile-fixture {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.match-profile-fixture span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.match-profile-fixture img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.match-profile-fixture b {
    color: var(--muted);
    font-size: 0.78rem;
}

.match-profile-tabs {
    margin-bottom: 18px;
}

.match-profile-form {
    margin-top: 0;
}

.match-athlete-table {
    margin-top: 2px;
}

.match-athlete-table table {
    min-width: 680px;
}

.match-athlete-table td:first-child,
.match-athlete-table th:first-child {
    width: 70px;
    text-align: center;
}

.match-athlete-table td:last-child,
.match-athlete-table th:last-child {
    width: 210px;
}

.match-athlete-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.match-finished-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    align-self: end;
}

.match-finished-toggle input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
}

.match-form-section {
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.match-form-section h3,
.match-form-section p {
    margin: 0;
}

.match-form-section p {
    margin-top: 4px;
}

.match-event-row {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.match-goal-row {
    grid-template-columns: minmax(220px, 1fr) 100px;
}

.match-substitution-row {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) 100px 38px;
}

.match-remove-event {
    width: 38px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    color: var(--red);
    font-size: 1.25rem;
}

@media (max-width: 900px) {
    .phase-profile-summary,
    .phase-overview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .phase-summary-group dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .phase-overview-metrics > div:nth-child(2) {
        border-right: 0;
    }

    .phase-overview-metrics > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 680px) {
    .phase-profile-hero,
    .phase-participant-toolbar,
    .phase-tabs-row {
        align-items: stretch;
        flex-direction: column;
    }

    .phase-club-participant {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .phase-club-facility {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .phase-teams-button {
        align-self: flex-start;
    }

    .phase-profile-summary,
    .phase-summary-group dl,
    .phase-overview-metrics {
        grid-template-columns: 1fr;
    }

    .phase-overview-metrics > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .phase-overview-metrics > div:last-child {
        border-bottom: 0;
    }

    .phase-goal-scorers-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .phase-goal-row {
        grid-template-columns: 1fr;
    }

    .match-profile-head,
    .match-profile-fixture {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-profile-fixture {
        gap: 9px;
    }

    .match-goal-row,
    .match-substitution-row {
        grid-template-columns: 1fr;
    }

    .match-remove-event {
        justify-self: end;
    }
}

/* Team profile, rosters and modality actions */

.modality-edit-button {
    color: var(--blue);
}

.team-promote-button {
    color: var(--selection-color);
}

.team-bulk-athlete-button {
    color: var(--green-dark);
}

.team-competition-button {
    color: var(--selection-color);
    position: relative;
}

.team-competition-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border: 2px solid var(--panel);
    border-radius: 999px;
    background: var(--selection-color);
    color: var(--selection-text-color);
    font-size: 9px;
    font-weight: 800;
    line-height: 13px;
    text-align: center;
}

.team-games-button {
    color: var(--green-dark);
}

.team-delete-button {
    color: #a33232;
}

.team-promote-button:hover {
    background: var(--selection-color);
    color: var(--selection-text-color);
}

.modality-action-placeholder {
    width: var(--icon-button-size);
    height: var(--icon-button-size);
    visibility: hidden;
}

.team-athlete-count {
    display: inline-grid;
    min-width: 30px;
    min-height: 28px;
    place-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #edf1f2;
    color: #44515b;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.team-athlete-count:hover {
    background: var(--selection-color);
    color: var(--selection-text-color);
}

.team-roster-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.team-roster-head h2,
.team-roster-head p {
    margin: 0;
}

.team-roster-head h2 {
    margin-top: 4px;
}

.team-roster-head p {
    margin-top: 6px;
}

.team-roster-actions {
    flex-wrap: wrap;
}

.team-roster-total {
    color: var(--muted);
    font-weight: 600;
}

.team-profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.team-profile-title h2,
.team-profile-title p {
    margin: 0;
}

.team-profile-title h2 {
    margin-top: 4px;
    font-size: 26px;
}

.team-profile-title p {
    margin-top: 6px;
    color: var(--muted);
}

.team-profile-switcher {
    display: flex;
    align-items: end;
    gap: 10px;
}

.team-profile-switcher label {
    min-width: 260px;
}

.team-profile-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 28px;
    align-items: center;
}

.team-profile-data {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 24px;
}

.team-profile-data > div {
    min-width: 0;
}

.team-profile-data span,
.team-profile-data strong,
.team-profile-data small {
    display: block;
}

.team-profile-data span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.team-profile-data strong {
    font-weight: 650;
    overflow-wrap: anywhere;
}

.team-profile-data small {
    margin-top: 3px;
    color: var(--muted);
}

.team-profile-location,
.team-profile-competitions {
    grid-column: span 2;
}

.team-profile-logo {
    display: grid;
    place-items: center;
    min-height: 150px;
}

.team-profile-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
}

.team-profile-logo > span {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--green);
    font-size: 28px;
    font-weight: 800;
}

.team-profile-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.team-profile-tabs a span {
    display: inline-grid;
    place-items: center;
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    border-radius: 12px;
    background: #edf1f3;
    color: #39444d;
    font-size: 12px;
    font-weight: 700;
}

.team-profile-tabs a.is-active span {
    background: var(--selection-text-color);
    color: var(--selection-color);
}

.team-week-surface .section-header h2,
.team-week-surface .section-header p {
    margin: 0;
}

.team-week-surface .section-header p {
    margin-top: 4px;
}

.team-week-actions,
.week-navigation,
.agenda-month-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.week-navigation .icon-button,
.agenda-month-navigation .icon-button {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
}

.week-navigation .icon-button svg,
.agenda-month-navigation .icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.team-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    margin-top: 18px;
    overflow-x: auto;
    border: 1px solid var(--line);
}

.team-week-day {
    min-height: 130px;
    border-right: 1px solid var(--line);
}

.team-week-day:last-child {
    border-right: 0;
}

.team-week-day header {
    display: grid;
    gap: 3px;
    padding: 11px 8px;
    background: #465159;
    color: #fff;
    text-align: center;
}

.team-week-day header strong {
    font-size: 12px;
}

.team-week-day header span {
    font-size: 11px;
    opacity: 0.82;
}

.team-week-day p {
    margin: 0;
    padding: 18px 8px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.team-week-events {
    display: grid;
    gap: 7px;
    padding: 8px;
}

.team-week-events article {
    display: grid;
    gap: 2px;
    padding: 7px;
    border-left: 3px solid var(--selection-color);
    background: #f5f7f8;
}

.team-week-events time,
.team-week-events small {
    color: var(--muted);
    font-size: 11px;
}

.team-week-events strong {
    font-size: 12px;
}

.team-profile-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.team-profile-definition-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 22px;
    margin: 18px 0 0;
}

.team-profile-definition-list div {
    min-width: 0;
}

.team-profile-definition-list dt {
    margin-bottom: 5px;
    color: #39444d;
    font-weight: 700;
}

.team-profile-definition-list dd {
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.team-profile-empty {
    padding: 18px 0;
}

.team-profile-empty p {
    max-width: 520px;
    margin: 7px 0 0;
    color: var(--muted);
}

.team-staff-assignment-form {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.team-staff-table table {
    min-width: 720px;
}

.team-staff-member {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-staff-member img,
.team-staff-member > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    object-fit: cover;
}

.team-staff-member > span {
    background: #f0f3f4;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.team-staff-member-name,
.team-staff-member small {
    display: block;
}

.team-staff-member-name {
    font-weight: 400;
}

.team-staff-member small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.staff-list-table {
    min-width: 920px;
}

.staff-function-filters {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    margin-bottom: 18px;
}

.staff-function-filters .member-role-filter-link {
    min-width: 0;
    text-decoration: none;
}

.staff-list-table-wrap {
    max-height: min(68vh, 720px);
    margin-top: 10px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.staff-list-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    box-shadow: 0 1px 0 var(--line);
}

.staff-list-table th:first-child,
.staff-list-table td:first-child {
    width: 36%;
    min-width: 320px;
}

.staff-list-table th:nth-child(2),
.staff-list-table td:nth-child(2) {
    width: 24%;
}

.staff-list-table th:nth-child(3),
.staff-list-table td:nth-child(3) {
    width: 30%;
}

.staff-list-table th:last-child,
.staff-list-table td:last-child {
    width: 132px;
    min-width: 132px;
}

.staff-list-member > div {
    min-width: 0;
}

.staff-list-member .team-staff-member-name {
    overflow-wrap: anywhere;
}

.staff-list-actions {
    min-width: 118px;
}

.staff-team-separator {
    color: var(--muted);
}

.staff-matrix-surface {
    margin: 20px 0;
}

.staff-matrix-wrap {
    max-height: min(68vh, 720px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.staff-matrix-table {
    min-width: 780px;
    font-size: 12px;
}

.staff-matrix-table th,
.staff-matrix-table td {
    padding: 6px 7px;
    line-height: 1.2;
}

.staff-matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    box-shadow: 0 1px 0 var(--line);
}

.staff-matrix-team-name,
.staff-matrix-team-age-group {
    display: block;
}

.staff-matrix-team-name {
    color: var(--ink);
    font-weight: 800;
}

.staff-matrix-team-age-group {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.staff-matrix-table th:first-child,
.staff-matrix-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    background: #fff;
}

.staff-matrix-table thead th:first-child {
    z-index: 5;
    background: var(--table-head-bg);
}

.staff-matrix-table th:not(:first-child),
.staff-matrix-table td:not(:first-child) {
    min-width: 142px;
    vertical-align: top;
}

.staff-matrix-table .team-staff-member {
    gap: 6px;
}

.staff-matrix-table .team-staff-member img,
.staff-matrix-table .team-staff-member > span {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
}

.staff-matrix-table .team-staff-member-name {
    font-size: 12px;
    line-height: 1.15;
}

.staff-function-checklist {
    display: grid;
    gap: 3px;
}

.staff-function-checklist label {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 21px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 500;
}

.staff-function-checklist input {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.social-mandate-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.summary-square {
    display: grid;
    gap: 4px;
    min-height: 96px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--table-head-bg);
}

.summary-square span,
.summary-square small {
    color: var(--muted);
    font-size: 12px;
}

.summary-square strong { font-size: 17px; }
.summary-square.is-active { border-color: #8ccbb5; background: #eff9f4; }
.summary-square.is-warning { border-color: #e4c26c; background: #fff8e5; }

.status-dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    min-width: 13px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #98a1a8;
    box-shadow: 0 0 0 3px #eceff1;
    cursor: pointer;
}

.status-dot.is-active { background: #20a66a; box-shadow: 0 0 0 3px #e1f3ec; }
.status-dot.is-inactive { background: #98a1a8; box-shadow: 0 0 0 3px #eceff1; }
.status-dot.is-validation { background: #5b9bd5; box-shadow: 0 0 0 3px #e8f2fb; }

.social-body-detail-grid {
    display: grid;
    gap: 18px;
}

.social-body-detail-grid > section + section {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.social-assignment-filter { display: flex; align-items: end; justify-content: flex-end; gap: 10px; margin: 12px 0; }
.social-assignment-filter label { min-width: 250px; }
.social-assignment-filter .mini-button { margin-bottom: 0; }
.social-assignment-order-table tr[draggable="true"] { transition: opacity .15s ease, background .15s ease; }
.social-assignment-order-table tr[draggable="true"].is-dragging { opacity: .48; background: rgba(49, 95, 140, .1); }
.social-assignment-order-table th:first-child,
.social-assignment-order-table td:first-child { width: 42px; text-align: center; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .table-wrap .social-assignment-order-table { min-width: 970px; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table th:nth-child(1) { width: 42px; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table th:nth-child(2) { width: 58px; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table th:nth-child(3) { width: 14%; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table th:nth-child(4) { width: 14%; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table th:nth-child(5) { width: 16%; text-align: left; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table th:nth-child(6) { width: 54px; text-align: center; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table th:nth-child(7) { width: 18%; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table th:nth-child(8) { width: 62px; text-align: center; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table th:nth-child(9) { width: 94px; }
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table td:nth-child(6),
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .social-assignment-order-table td:nth-child(8) { text-align: center; }
.social-assignment-photo img,
.social-assignment-photo span { display: block; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.social-assignment-photo span { display: grid; place-items: center; background: var(--surface-soft, #eef2f5); color: var(--muted); font-weight: 700; }
.social-assignment-member-link { color: var(--text); font-weight: 700; text-decoration: none; }
.social-assignment-member-link:hover { color: var(--blue); text-decoration: underline; }
.social-assignment-contact { line-height: 1.25; }
.social-assignment-contact a { display: block; overflow: hidden; color: var(--text); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.social-assignment-contact small { display: block; margin-top: 2px; color: var(--muted); }
@media (max-width: 700px) { .social-assignment-filter { align-items: stretch; justify-content: stretch; flex-direction: column; } .social-assignment-filter label { width: 100%; min-width: 0; } }

.federative-process-actions { align-items: center; flex-wrap: wrap; }
.federative-process-upload { display: inline-flex; align-items: center; gap: 6px; }
.federative-process-upload input[type="file"] { max-width: 150px; min-width: 0; font-size: 11px; }
.federative-age-groups-fieldset { min-width: 0; margin: 0; padding: 12px 14px; border: 1px solid var(--line, #d7e0e8); border-radius: 10px; }
.federative-age-groups-fieldset legend { padding: 0 6px; font-weight: 700; color: var(--ink, #172230); }
.federative-age-groups-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; }
.federative-age-groups-options .checkbox-label { margin: 0; min-width: 0; }
.federative-staff-selection-form { margin-bottom: 16px; }
.federative-staff-selection-form .form-actions { justify-content: flex-end; }
.federative-club-people { min-width: 0; margin: 0; padding: 12px 14px; border: 1px solid var(--line, #d7e0e8); border-radius: 10px; }
.federative-club-people legend { padding: 0 6px; font-weight: 700; color: var(--ink, #172230); }
.federative-club-people-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 14px; }
.federative-club-people-options .checkbox-label { margin: 0; align-items: flex-start; }
.federative-club-people-options small { display: block; margin-left: 24px; color: var(--muted, #64748b); }
.federative-association-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.federative-association-tab { display: flex; align-items: center; justify-content: center; gap: 12px; width: min(100%, 220px); min-height: 94px; padding: 10px 14px; border: 1px solid var(--line, #d7e0e8); border-radius: 12px; color: inherit; text-decoration: none; background: #fff; }
.federative-association-tab:hover { border-color: var(--primary, #1d7a63); background: #f3faf7; }
.federative-association-tab.is-active { border-color: var(--primary, #1d7a63); box-shadow: inset 0 0 0 1px var(--primary, #1d7a63); background: #ecf8f2; }
.federative-association-tab img, .federative-association-fallback { width: 72px; height: 72px; flex: 0 0 72px; object-fit: contain; border-radius: 10px; background: #f1f5f3; }
.federative-association-fallback { display: grid; place-items: center; color: var(--primary, #1d7a63); font-weight: 800; font-size: 15px; }
.federative-association-tab > span:last-child { min-width: 0; }
.federative-association-tab strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.federative-association-heading { margin: 0 0 14px; }
.federative-association-heading h3 { margin: 0 0 3px; }
.federative-dossier-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; }
.federative-dossier-tabs .mini-button { text-decoration: none; }
.federative-dossier-tabs .mini-button.is-active { background: var(--primary, #1d7a63); border-color: var(--primary, #1d7a63); color: var(--primary-text, #fff); }
.federative-summary-cards { margin-top: 12px; }
.federative-summary-dialog { max-width: 920px; width: min(920px, calc(100vw - 28px)); }
.federative-summary-dialog .payment-dialog-form { max-width: none; }
.federative-summary-age-group strong,
.federative-summary-age-group small { display: block; }
.federative-summary-age-group small { margin-top: 2px; color: var(--muted, #667085); font-size: 11px; line-height: 1.2; }
.federative-summary-toggle-column { width: 42px; min-width: 42px; text-align: center; }
.federative-summary-expand { min-width: 28px; width: 28px; height: 28px; padding: 0; font-size: 18px; line-height: 1; }
.federative-summary-expanded-row > td { padding: 10px 16px; background: #f8fafc; }
.federative-summary-expanded-row[hidden] { display: none !important; }
.federative-summary-expanded-table { margin: 0; background: #fff; }
.federative-summary-expanded-table td { text-align: center; }
.federative-summary-expanded-table td:first-child { text-align: left; }
.federative-summary-document-link { display: inline-flex; align-items: center; justify-content: center; }
.federative-summary-inline-form { display: inline-flex; align-items: center; justify-content: center; margin: 0; }
.federative-summary-dot-button { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.federative-form-document-actions { display: inline-flex; align-items: center; justify-content: center; gap: .2rem; }
.federative-cc-sign-button { width: 1.65rem; min-width: 1.65rem; height: 1.65rem; padding: 0; font-size: .8rem; line-height: 1; }
.federative-regenerate-button { width: 1.9rem; min-width: 1.9rem; height: 1.9rem; padding: 0; border-radius: 50%; background: #2563eb; border-color: #2563eb; color: #fff; }
.federative-signed-download-button { width: 1.9rem; min-width: 1.9rem; height: 1.9rem; padding: 0; border-radius: 50%; background: #16835f; border-color: #16835f; color: #fff; }
.federative-regenerate-button:hover, .federative-regenerate-button:focus { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.federative-signed-download-button:hover, .federative-signed-download-button:focus { background: #0f6b4e; border-color: #0f6b4e; color: #fff; }
.federative-cc-sign-dialog { max-width: 38rem; }
.federative-cc-sign-dialog [data-federative-cc-sign-status].error-message { color: #b42318; font-weight: 700; }
.federative-summary-athlete { justify-content: flex-start; }
.federative-summary-athlete .team-staff-member-name { min-width: 0; }
.athlete-federative-selector {
    align-items: end;
}
.athlete-federative-association-block .association-card-title {
    align-items: center;
    display: flex;
    gap: 14px;
}
.athlete-federative-association-block .association-card-title img {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    height: 58px;
    object-fit: contain;
    padding: 8px;
    width: 92px;
}
.athlete-federative-documents-table th:first-child,
.athlete-federative-documents-table td:first-child {
    text-align: center;
    width: 46px;
}
.athlete-federative-documents-table th:nth-child(3),
.athlete-federative-documents-table td:nth-child(3) {
    white-space: nowrap;
    width: 110px;
}
.athlete-federative-documents-table th:last-child,
.athlete-federative-documents-table td:last-child {
    width: 230px;
}
.athlete-federative-documents-table .table-secondary {
    display: block;
    margin-top: 3px;
}
.athlete-federative-overview .metric-cards {
    margin: 0;
}
.federative-athlete-dossiers .section-header > form { flex: 0 0 auto; margin-left: 16px; }
.federative-dossier-ready, .federative-dossier-missing { display: inline-block; font-size: 12px; font-weight: 700; }
.federative-dossier-ready { color: #147653; }
.federative-dossier-missing { color: #b45309; }
@media (max-width: 620px) { .federative-association-tab { width: 100%; } .federative-athlete-dossiers .section-header > form { margin: 10px 0 0; } }

.social-file-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.social-file-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.social-file-list a {
    display: grid;
    gap: 2px;
    color: inherit;
    text-decoration: none;
}

.social-file-list small { color: var(--muted); }

.social-photo-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.social-photo-admin-grid article {
    display: grid;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.social-photo-admin-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.social-photo-admin-grid p { min-height: 18px; margin: 0; font-size: 12px; }
.social-photo-admin-grid .row-actions { justify-content: flex-end; }

.social-catalogue-section { margin-top: 18px; }
.social-catalogue-section summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.social-catalogue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 18px; }
.social-chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.social-chip-list form { margin: 0; }
.social-chip-list button { padding: 5px 8px; font-size: 11px; color: var(--muted); background: #f3f5f6; border: 1px solid var(--line); }
.social-chip-list button.is-active { color: #12694e; background: #eaf7f1; border-color: #9fd6c0; }

.social-mandate-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.social-mandate-tab {
    min-height: 36px;
    padding: 6px 13px;
    color: var(--text);
    background: #fff;
    border-color: var(--line);
}

.social-mandate-tab.is-active {
    color: var(--button-text-color);
    background: var(--button-color);
    border-color: var(--button-color);
}

.social-mandate-tab span {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    margin-left: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .25);
    font-size: 11px;
}

.social-mandate-tab:not(.is-active) span {
    color: var(--muted);
    background: var(--table-head-bg);
}

.social-mandate-tab-panel { display: none; }
.social-mandate-tab-panel.is-active { display: block; }

.social-assignment-table {
    margin-top: 14px;
    overflow-x: auto;
    overflow-y: hidden;
}

.social-assignment-table table {
    min-width: 0;
    table-layout: fixed;
}

.social-assignment-table th:nth-child(1) { width: 16%; }
.social-assignment-table th:nth-child(2) { width: 22%; }
.social-assignment-table th:nth-child(3) { width: auto; }
.social-assignment-table th:nth-child(4) { width: 62px; text-align: center; }
.social-assignment-table th:nth-child(5) { width: 94px; }
.social-assignment-table td:nth-child(4) { text-align: center; }

.social-assignment-table .team-staff-member {
    min-width: 0;
    gap: 8px;
}

.social-assignment-table .team-staff-member img,
.social-assignment-table .team-staff-member > span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
}

.social-assignment-table .team-staff-member > span {
    display: block;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    word-break: normal;
}

.social-mandate-detail .status-dot {
    box-sizing: border-box;
    width: 14px;
    min-width: 14px;
    height: 14px;
    min-height: 14px;
    padding: 0;
    border-radius: 50%;
    line-height: 1;
    appearance: none;
}

.archive-icon {
    color: #8a5b20;
    font-size: 16px;
}

/* A tabela de composição herda estilos de staff; aqui volta a usar a largura
   disponível sem comprimir o nome do membro nem criar scroll vertical. */
.social-mandate-tab-panel[data-social-mandate-panel="composition"] .table-wrap {
    margin-top: 14px;
    overflow-x: auto;
    overflow-y: hidden;
}

.social-mandate-tab-panel[data-social-mandate-panel="composition"] .table-wrap table {
    min-width: 0;
    table-layout: fixed;
}

@media (max-width: 720px) {
    .social-mandate-summary-grid,
    .social-catalogue-grid { grid-template-columns: 1fr; }
    .social-file-list article { align-items: flex-start; flex-direction: column; }
}

.team-staff-table .row-actions {
    min-width: 76px;
}

.team-staff-table .danger-icon {
    color: var(--red);
}

.team-roster-row-actions {
    min-width: 118px;
}

.team-roster-row-actions .modality-edit-button {
    color: var(--blue);
}

.team-roster-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.team-roster-header-actions .mini-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.team-roster-header-actions .mini-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.team-athlete-edit-form {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8faf9;
}

.team-athlete-add-form {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8faf9;
    scroll-margin-top: 20px;
}

.team-athlete-edit-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.team-athlete-edit-heading h3 {
    margin: 4px 0 0;
    font-size: 18px;
    font-weight: 600;
}

.team-roster-row-actions button.icon-button,
.team-staff-table .row-actions button.icon-button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--red);
}

.team-roster-row-actions button.icon-button:hover,
.team-staff-table .row-actions button.icon-button:hover {
    border-color: var(--red);
    background: #fff;
    color: var(--red);
}

.roster-delete-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 680px) {
    .team-athlete-edit-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .team-athlete-edit-heading .mini-button {
        align-self: flex-start;
    }
}

.team-upcoming-games {
    display: grid;
    margin-top: 12px;
}

.team-upcoming-games article {
    display: grid;
    grid-template-columns: 130px minmax(120px, 1fr);
    gap: 4px 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.team-upcoming-games article:last-child {
    border-bottom: 0;
}

.team-upcoming-games time {
    grid-row: span 2;
    color: var(--muted);
    font-size: 12px;
}

.team-upcoming-games span {
    color: var(--muted);
    font-size: 12px;
}

.team-performance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.team-performance-grid article {
    display: grid;
    gap: 5px;
    padding: 20px;
    border-right: 1px solid var(--line);
}

.team-performance-grid article:last-child {
    border-right: 0;
}

.team-performance-grid span,
.team-performance-grid small {
    color: var(--muted);
}

.team-performance-grid strong {
    font-size: 28px;
}

.team-profile-tab-empty {
    min-height: 260px;
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}

.team-settings-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-color-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    vertical-align: middle;
}

.team-profile-link {
    font-weight: 700;
}

.table-secondary {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.roster-profile-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bulk-athlete-surface {
    scroll-margin-top: 20px;
}

/* Competitions and matches */

.team-competition-manager {
    scroll-margin-top: 20px;
}

.team-competition-manager h2,
.team-competition-manager p {
    margin: 0;
}

.team-competition-manager .section-header p {
    margin-top: 4px;
}

.team-competition-rules {
    margin-top: 20px;
}

.team-competition-rules table {
    min-width: 720px;
}

.team-competition-rules th,
.team-competition-rules td {
    white-space: nowrap;
}

.competition-games-manager {
    scroll-margin-top: 20px;
}

.competition-games-manager h2,
.competition-games-manager p {
    margin: 0;
}

.competition-games-manager .section-header p {
    margin-top: 4px;
}

.competition-game-reference-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.competition-reference-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.competition-games-list {
    margin-top: 20px;
}

.competition-standings-heading {
    margin-top: 24px;
}

.competition-games-manager tr.is-current-club td {
    background: color-mix(in srgb, var(--green) 9%, transparent);
}

.match-sheet-header .hint {
    margin-top: 12px;
    text-align: center;
}

.match-sheet-header-actions,
.match-sheet-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-sheet-navigation {
    padding-right: 10px;
    border-right: 1px solid var(--line);
}

.match-sheet-navigation-button {
    width: 38px;
    height: 38px;
    border-color: #cfd9de;
    background: #fff;
    color: var(--selection-color);
}

.match-sheet-navigation-button svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.4;
}

.match-sheet-navigation-button.is-disabled {
    opacity: .35;
    cursor: default;
}

.match-sheet-scoreboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    font-size: 20px;
    text-align: center;
}

.match-sheet-scoreboard span {
    padding: 10px 16px;
    border-radius: var(--control-radius);
    background: var(--ink);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
}

.match-sheet-permissions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.match-sheet-permissions .inline-form {
    align-items: end;
}

.match-sheet-event-form {
    margin-top: 16px;
}

.match-sheet-events-table {
    margin-top: 20px;
}

.match-sheet-status {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.match-sheet-status.is-approved {
    background: #e5f4ed;
    color: var(--green-dark);
}

.match-sheet-status.is-pending {
    background: #fff3d6;
    color: #815b13;
}

.match-sheet-status.is-rejected {
    background: #f9e6e6;
    color: var(--red);
}

.club-logo-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    vertical-align: middle;
}

.club-logo-name img {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel);
    object-fit: contain;
}

.championship-calendar-table .club-logo-name {
    justify-content: center;
}

.championship-calendar-table .club-logo-name img {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

@media (max-width: 760px) {
    .match-sheet-header .section-header {
        align-items: stretch;
    }

    .match-sheet-header-actions {
        justify-content: space-between;
        width: 100%;
    }

    .match-sheet-scoreboard {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .match-sheet-scoreboard span {
        justify-self: center;
    }

    .match-sheet-permissions {
        grid-template-columns: 1fr;
    }
}

.competition-games-list table {
    min-width: 900px;
}

.competition-games-list th,
.competition-games-list td {
    white-space: nowrap;
}

.game-opponent-cell {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.game-opponent-cell img {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 6px;
    object-fit: contain;
}

.location-tooltip {
    position: relative;
}

.location-tooltip::after {
    position: absolute;
    z-index: 30;
    bottom: calc(100% + 8px);
    left: 50%;
    max-width: 260px;
    padding: 7px 9px;
    border-radius: 4px;
    background: #20272c;
    color: #fff;
    content: attr(data-tooltip);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translate(-50%, 4px);
    transition: opacity 120ms ease, transform 120ms ease;
    white-space: normal;
    width: max-content;
}

.location-tooltip:hover::after,
.location-tooltip:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.global-agenda {
    min-width: 0;
}

.agenda-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.agenda-header h2,
.agenda-header p {
    margin: 0;
}

.agenda-header h2 {
    margin-top: 4px;
}

.agenda-header p {
    margin-top: 5px;
}

.agenda-header-controls {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.agenda-date-jump {
    display: flex;
    align-items: end;
    gap: 7px;
    margin: 0;
}

.agenda-date-jump label {
    display: grid;
    gap: 4px;
}

.agenda-date-jump label span {
    color: var(--muted);
    font-size: 11px;
}

.agenda-date-jump input {
    width: 156px;
    min-height: 38px;
}

.agenda-calendar-wrap {
    margin-top: 20px;
    overflow-x: auto;
    border: 1px solid var(--line);
}

.agenda-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    min-width: 1050px;
}

.agenda-weekday {
    padding: 10px 8px;
    border-right: 1px solid #68737a;
    background: #465159;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.agenda-weekday:nth-child(7) {
    border-right: 0;
}

.agenda-day {
    min-height: 150px;
    padding: 8px;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: #fff;
}

.agenda-day:nth-child(7n) {
    border-right: 0;
}

.agenda-day.is-outside-month {
    background: #f5f6f7;
    color: var(--muted);
}

.agenda-day.is-today {
    box-shadow: inset 0 0 0 2px var(--selection-color);
}

.agenda-day > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
}

.agenda-day > header span {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    font-size: 12px;
    font-weight: 700;
}

.agenda-day.is-today > header span {
    border-radius: 50%;
    background: var(--selection-color);
    color: var(--selection-text-color);
}

.agenda-day > header small {
    color: var(--muted);
    font-size: 11px;
}

.agenda-day-games {
    display: grid;
    gap: 6px;
    margin-top: 7px;
}

.agenda-game {
    display: grid;
    gap: 1px;
    min-width: 0;
    padding: 7px 8px;
    border-left: 4px solid var(--agenda-team-color);
    border-radius: 4px;
    background: #f1f3f4;
    color: #20272c;
    text-decoration: none;
}

.agenda-game:hover,
.agenda-game:focus-visible {
    background: var(--agenda-team-color);
    color: var(--agenda-team-text);
}

.agenda-game time,
.agenda-game small {
    color: inherit;
    font-size: 10px;
    opacity: 0.78;
}

.agenda-game strong,
.agenda-game span,
.agenda-game small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-game strong {
    font-size: 12px;
}

.agenda-game span {
    font-size: 11px;
}

.agenda-training {
    border-left-style: double;
}

/* Trainings */

.training-filter-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin: 14px 0 18px;
}

.training-filter-form > label {
    min-width: 280px;
}

.training-month-navigation {
    display: flex;
    align-items: end;
    gap: 8px;
}

.training-month-navigation .icon-button {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
}

.training-month-navigation .icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.training-month-picker {
    min-width: 156px;
}

.training-month-picker span {
    color: var(--muted);
    font-size: 11px;
}

.training-series-form {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.training-series-preview {
    width: min(720px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    margin: auto;
    padding: 18px;
    border: 1px solid #bdd9d0;
    border-radius: 10px;
    background: #f4fbf8;
}

.training-series-preview::backdrop {
    background: rgba(20, 35, 43, .52);
}

.training-series-preview-total {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #deefe8;
    color: #215e49;
}

.training-series-preview-total strong {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: #1d7a60;
    color: #fff;
    font-size: 18px;
}

.training-series-preview-total span {
    font-weight: 800;
}

.training-series-preview-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.training-series-preview-meta div {
    padding: 9px 10px;
    border: 1px solid #d8ebe4;
    border-radius: 7px;
    background: #fff;
}

.training-series-preview-meta dt {
    color: var(--muted);
    font-size: 11px;
}

.training-series-preview-meta dd {
    margin: 3px 0 0;
    font-size: 13px;
    font-weight: 700;
}

.training-series-preview-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    max-height: 184px;
    overflow: auto;
    margin-bottom: 16px;
}

.training-series-preview-dates span {
    padding: 6px 9px;
    border-radius: 6px;
    background: #e3f3ed;
    color: #215e49;
    font-size: 12px;
    font-weight: 700;
}

.training-series-apply {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #d8ebe4;
    border-radius: 7px;
    background: #f4fbf8;
    color: #285c4b;
    font-size: 13px;
}

.training-series-apply input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
}

/* Área de membro — formas de pagamento */
.member-payment-method-details {
    padding: 12px 14px;
    border: 1px solid #bcd9d0;
    border-radius: 8px;
    background: #f2fbf7;
    color: #245d4b;
}

.member-payment-method-details strong,
.member-payment-method-details p {
    display: block;
    margin: 0;
}

.member-payment-method-details p {
    margin-top: 4px;
    line-height: 1.5;
}

.member-payment-method-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.member-payment-method-card {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.member-payment-method-card.is-default {
    border-color: #bdc7cc;
    background: #f0f3f4;
}

.member-payment-method-card h3 {
    margin: 0;
    font-size: 15px;
}

.member-payment-method-card h3 small {
    margin-left: 5px;
    color: #65747b;
    font-size: 10px;
    text-transform: uppercase;
}

.member-payment-method-card span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.member-payment-method-card p {
    margin: 12px 0 0;
    color: #31454e;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-line;
}

@media (max-width: 720px) {
    .training-series-preview-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.training-weekday-picker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.training-weekday-picker legend {
    padding: 0 4px;
    color: #39444d;
    font-size: 13px;
    font-weight: 700;
}

.training-weekday-picker label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfcfc;
}

.training-weekday-picker input {
    width: 16px;
    height: 16px;
}

.training-weekday-picker small {
    flex-basis: 100%;
    color: var(--muted);
}

.training-list table {
    min-width: 860px;
}

.training-row-actions {
    min-width: 76px;
}

.training-profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.training-profile-hero h2 {
    margin: 4px 0 0;
    font-size: 26px;
}

.training-profile-switcher {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.training-profile-switcher select {
    min-width: 150px;
}

.training-profile-switcher .icon-button[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.35;
}

.training-profile-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 26px;
    align-items: start;
}

.training-profile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 24px;
}

.training-profile-grid > div {
    min-width: 0;
}

.training-profile-grid span,
.training-plan-meta span {
    display: block;
    margin-bottom: 5px;
    color: #39444d;
    font-size: 12px;
    font-weight: 700;
}

.training-profile-grid strong,
.training-plan-meta strong {
    display: block;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.training-profile-logo {
    display: grid;
    place-items: center;
    min-height: 130px;
}

.training-profile-logo img {
    max-width: 130px;
    max-height: 130px;
    object-fit: contain;
}

.training-profile-logo span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--green-dark);
    font-weight: 800;
}

.training-tabs {
    margin-top: 26px;
}

.training-tabs a span {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #edf1f3;
    color: #39444d;
    font-size: 11px;
    font-weight: 800;
}

.training-plan-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
    padding-top: 2px;
}

.training-unit-header {
    margin-top: 34px;
}

.training-unit-header h2 {
    margin: 0;
}

.training-unit-header > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.training-unit-table {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.training-unit-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 54px 54px;
    min-height: 46px;
    border: 1px solid var(--line);
}

.training-unit-row strong,
.training-unit-row b {
    display: grid;
    align-items: center;
    padding: 12px;
    background: #eef0f1;
}

.training-unit-row span {
    padding: 12px;
    background: #fff;
    color: #39444d;
}

.training-unit-row b {
    justify-content: center;
    border-left: 1px solid var(--line);
    font-size: 11px;
}

.team-week-training {
    border-left-color: var(--green-dark) !important;
}

.team-week-events article a {
    margin-top: 2px;
    color: var(--selection-color);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.opponent-list-surface table {
    min-width: 720px;
}

.opponent-list-filters {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.opponent-list-filters label {
    display: grid;
    gap: 5px;
    min-width: 220px;
    color: var(--muted);
    font-size: 12px;
}

.opponent-list-filters select {
    min-height: 40px;
}

.opponent-filter-empty {
    margin-top: 14px;
}

.opponent-list-logo {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    object-fit: contain;
}

.opponent-list-logo-empty {
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

/* Opponents and venues */

.opponent-add-venue-button {
    color: var(--green-dark);
}

.opponent-profile-button {
    color: var(--selection-color);
}

.opponent-venue-count {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--selection-color);
    font-weight: 700;
    text-decoration: none;
}

.opponent-venue-count:hover,
.opponent-venue-count:focus-visible {
    border-color: var(--selection-color);
    background: var(--selection-color);
    color: var(--selection-text-color);
}

.opponent-venue-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.opponent-age-groups {
    display: block;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opponent-profile-age-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
}

.opponent-profile-age-groups > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #f5f7f8;
    font-weight: 700;
}

.opponent-profile-age-groups small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.opponent-facebook-button {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    background: #1877f2;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.opponent-facebook-button:hover,
.opponent-facebook-button:focus-visible {
    background: #0f5fc7;
    color: #fff;
}

.venue-coordinates {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 190px;
}

.venue-coordinates > span {
    flex: 1 1 auto;
    white-space: nowrap;
}

.venue-map-button {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    color: var(--green-dark);
}

.venue-map-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.opponent-current-image {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 70px;
}

.opponent-current-image span {
    color: var(--muted);
}

.opponent-current-image img {
    display: block;
    width: 64px;
    height: 64px;
    border: 1px solid var(--line);
    border-radius: 6px;
    object-fit: contain;
}

.opponent-initial-venue {
    min-width: 0;
    margin: 4px 0 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8faf9;
}

.opponent-initial-venue legend {
    padding: 0 7px;
    color: #27343d;
    font-size: 15px;
    font-weight: 600;
}

.opponent-initial-venue > .hint {
    margin: 0;
}

.opponent-initial-venue .form-grid {
    margin-top: 14px;
}

.opponent-profile-hero {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
}

.opponent-profile-image {
    display: grid;
    place-items: center;
    width: 110px;
    height: 110px;
}

.opponent-profile-image img,
.opponent-profile-image > span {
    width: 110px;
    height: 110px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.opponent-profile-image img {
    display: block;
    object-fit: contain;
}

.opponent-profile-image > span {
    display: grid;
    place-items: center;
    color: var(--green-dark);
    font-size: 28px;
    font-weight: 800;
}

.opponent-profile-title h2 {
    margin: 5px 0 10px;
}

.opponent-profile-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.opponent-profile-details a {
    font-weight: 600;
}

.opponent-venue-cards {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.opponent-venue-cards article {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.opponent-venue-photo {
    display: grid;
    place-items: center;
    min-height: 120px;
    background: #f5f6f7;
}

.opponent-venue-photo img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: contain;
}

.opponent-venue-photo > span {
    color: var(--muted);
}

.opponent-venue-copy {
    min-width: 0;
}

.opponent-venue-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.opponent-venue-title h3 {
    margin: 0;
}

.opponent-venue-copy dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    margin: 14px 0;
}

.opponent-venue-copy dt {
    color: var(--muted);
    font-size: 11px;
}

.opponent-venue-copy dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
}

.bulk-athlete-surface h2,
.bulk-athlete-surface p {
    margin: 0;
}

.bulk-athlete-surface p {
    margin-top: 4px;
}

.bulk-member-picker {
    min-width: 0;
}

.bulk-member-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.bulk-select-all {
    display: flex;
    grid-auto-flow: column;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.bulk-select-all input,
.bulk-member-option input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
}

.bulk-member-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding: 2px;
}

.bulk-member-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    transition: border-color 0.14s ease, background 0.14s ease;
}

.bulk-member-option:hover {
    border-color: var(--selection-color);
    background: #fff;
}

.bulk-member-option[hidden] {
    display: none;
}

.bulk-member-option:has(input:checked) {
    border-color: var(--selection-color);
    background: #f2f8f6;
}

.bulk-member-option span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.bulk-member-option strong {
    overflow-wrap: anywhere;
    font-weight: 500;
}

.bulk-member-option small {
    color: var(--muted);
}

/* Member profile */

.member-data-block,
.member-collapsible-block {
    scroll-margin-top: 82px;
}

.member-data-readonly {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.member-data-content {
    margin-top: 18px;
}

.billing-different-fields[hidden] {
    display: none;
}

.billing-data-toggle {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: color-mix(in srgb, var(--selection-color) 7%, #fff);
}

.billing-different-fields {
    margin-top: 2px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.member-data-readonly h3 {
    margin: 10px 0 -4px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}

.member-collapsible-block {
    margin-top: 24px;
}

.member-collapsible-block > summary {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.member-collapsible-block > summary::-webkit-details-marker {
    display: none;
}

.member-collapsible-block > summary::after {
    content: '+';
    order: 3;
    color: var(--selection-color);
    font-size: 24px;
    font-weight: 800;
}

.member-collapsible-block[open] > summary::after {
    content: '−';
}

.member-collapsible-block > summary h2 {
    margin: 0;
}

.member-collapsible-content {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.member-change-review {
    margin-bottom: 24px;
    border-color: color-mix(in srgb, var(--selection-color) 32%, var(--line));
}

.member-change-review-form {
    margin-top: 18px;
}

.member-profile-head {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(280px, auto);
    gap: 16px;
    align-items: start;
}

.member-profile-head .row-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    align-self: start;
}

.member-profile-head .member-profile-actions {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 8px;
    justify-content: end;
    align-items: start;
}

.member-profile-actions .member-socio-switcher {
    grid-column: 1;
    grid-row: 1 / span 3;
    justify-self: end;
}

.member-profile-actions > a[href="?page=members"] {
    grid-column: 2;
    grid-row: 1;
}

.member-profile-actions > .danger-button {
    grid-column: 3;
    grid-row: 1;
}

.member-profile-actions > a[href*="mode=edit"] {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-self: end;
}

.member-profile-actions > a[href*="page=socios"] {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-self: end;
}

.member-profile-actions > .member-access-action {
    grid-column: 2 / -1;
    grid-row: 3;
    justify-self: end;
    margin: 0;
}

.member-profile-head .member-access-action {
    flex: 0 0 100%;
    margin-top: 2px;
}

.member-socio-switcher {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafb;
}

.member-socio-switcher .icon-button {
    width: 28px;
    height: 28px;
    min-height: 28px;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
}

.member-socio-switcher .icon-button.is-disabled {
    color: var(--muted);
    opacity: 0.45;
    pointer-events: none;
}

.member-socio-jump-form {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.member-socio-jump-form label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}

.member-socio-jump-form input {
    width: 74px;
    min-height: 28px;
    padding: 3px 7px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.member-profile-title {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.member-profile-title > div {
    min-width: 0;
    max-width: min(100%, 720px);
}

.member-profile-title h2 {
    max-width: 100%;
    font-size: 21px;
    line-height: 1.22;
}

.member-profile-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.profile-photo-link {
    display: inline-flex;
    flex: 0 0 auto;
}

.member-photo {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    transition: transform 0.14s ease, border-color 0.14s ease;
}

.profile-photo-link:hover .member-photo {
    transform: scale(1.04);
    border-color: var(--selection-color);
}

.profile-tabs {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.profile-tab-panel {
    display: none;
}

.profile-tab-panel.is-active {
    display: block;
}

.member-outstanding-overview,
.profile-athlete-expenses-open {
    margin-top: 24px;
}

.member-outstanding-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.member-outstanding-button {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfc;
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.member-outstanding-button:hover {
    transform: translateY(-2px);
    border-color: var(--selection-color);
    box-shadow: 0 8px 20px rgb(20 43 37 / 8%);
}

.member-outstanding-button span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.member-outstanding-button strong {
    font-size: clamp(21px, 2.2vw, 30px);
    line-height: 1.1;
    white-space: nowrap;
}

.member-outstanding-button small {
    color: var(--muted);
    font-size: 12px;
}

.athlete-outstanding-button {
    border-top: 4px solid #3b82f6;
}

.quota-outstanding-button {
    border-top: 4px solid #f59e0b;
}

.total-outstanding-button {
    border-color: var(--selection-color);
    border-top: 4px solid var(--selection-color);
    background: color-mix(in srgb, var(--selection-color) 8%, #fff);
}

.athlete-expense-header {
    align-items: end;
}

.athlete-expense-view-tabs,
.quota-payment-view-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.athlete-expense-view-tabs a,
.quota-payment-view-tabs a {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfc;
    color: var(--ink);
    text-decoration: none;
}

.athlete-expense-view-tabs a.is-active,
.quota-payment-view-tabs a.is-active {
    border-color: var(--selection-color);
    background: color-mix(in srgb, var(--selection-color) 10%, #fff);
    box-shadow: inset 0 0 0 1px var(--selection-color);
}

.athlete-expense-view-tabs span,
.quota-payment-view-tabs span {
    font-size: 13px;
    font-weight: 800;
}

.athlete-expense-view-tabs strong,
.quota-payment-view-tabs strong {
    font-size: 21px;
}

.athlete-expense-view-tabs small,
.quota-payment-view-tabs small {
    color: var(--muted);
}

.athlete-expense-payment-form {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: #fbfcfc;
}

.member-quota-header-actions {
    align-items: center;
    flex-wrap: wrap;
}

.member-quota-header-actions .form-actions {
    margin: 0;
}

.member-advance-quota-panel {
    display: grid;
    gap: 14px;
}

.member-advance-quota-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.member-advance-quota-heading h3,
.member-advance-quota-heading p {
    margin: 0;
}

.member-advance-quota-heading p {
    margin-top: 4px;
}

.member-advance-quota-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: #fff;
}

.member-advance-quota-summary span {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: 12px;
}

.member-advance-quota-summary strong {
    color: var(--ink);
    font-size: 14px;
}

.member-advance-quota-summary span:last-child {
    text-align: right;
}

.athlete-expense-selection-summary {
    display: grid;
    gap: 4px;
}

.athlete-expense-filter-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin: 16px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: #fbfcfc;
}

.athlete-expense-filter-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.athlete-expense-filter-form .mini-button {
    min-height: 42px;
}

.athlete-expense-table-wrap table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.athlete-expense-table-wrap .expense-select-column {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    padding-right: 4px;
    padding-left: 4px;
    text-align: center;
}

.athlete-expense-table-wrap .expense-select-column input[type="checkbox"] {
    display: inline-block;
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.athlete-expense-table-wrap th,
.athlete-expense-table-wrap td {
    padding-right: 6px;
    padding-left: 6px;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.athlete-expense-table-wrap .expense-athlete-column {
    width: 15%;
}

.athlete-expense-table-wrap .expense-description-column {
    width: 22%;
}

.athlete-expense-table-wrap .expense-due-column {
    width: 88px;
    white-space: nowrap;
}

.athlete-expense-table-wrap .expense-amount-column {
    width: 8ch;
    padding-right: 4px;
    padding-left: 4px;
    white-space: nowrap;
}

.athlete-expense-table-wrap .expense-status-column {
    width: 52px;
    text-align: center;
}

.athlete-expense-table-wrap .expense-payment-column {
    width: 22%;
}

.athlete-expense-table-wrap .expense-receipt-column {
    width: 90px;
    overflow-wrap: anywhere;
}

.athlete-expense-table-wrap .expense-actions-column {
    width: 44px;
    text-align: center;
}

.athlete-expense-table-wrap .table-secondary {
    font-size: 10px;
    line-height: 1.3;
}

.athlete-expense-table-wrap .expense-charge-type {
    display: block;
    color: var(--ink);
    font-size: 12px;
}

@media (max-width: 760px) {
    .athlete-expense-table-wrap table {
        min-width: 760px;
    }
}

@media (max-width: 720px) {
    .member-outstanding-buttons,
    .athlete-expense-view-tabs,
    .quota-payment-view-tabs,
    .athlete-expense-filter-form {
        grid-template-columns: 1fr;
    }

    .member-advance-quota-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .member-advance-quota-summary {
        grid-template-columns: 1fr;
    }

    .member-advance-quota-summary span:last-child {
        text-align: left;
    }
}

.profile-quotas-open {
    margin-top: 24px;
}

.profile-edit-form {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.message-template-body-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.message-template-body-row label {
    grid-column: auto;
}

.form-actions-wide {
    grid-column: 1 / -1;
}

.form-actions-wide button,
.form-actions-wide .mini-button {
    min-width: 132px;
    justify-content: center;
}

.secondary-button {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: none;
}

.secondary-button:hover {
    border-color: var(--selection-color);
    color: var(--selection-color);
    background: #fff;
}

/* Quotas, payments and overdue alerts */

.quota-section-header {
    margin-top: 18px;
}

.quota-section-header h2,
.quota-section-header p {
    margin: 0;
}

.quota-section-header p {
    margin-top: 5px;
}

.quota-renew-form {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
}

.socio-admit-checklist {
    min-height: 36px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    align-self: end;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfcfc;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.socio-admit-checklist input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #0f8f5f;
}

.quota-exemption-check {
    justify-content: flex-start;
    align-self: stretch;
    border-color: rgba(217, 119, 6, 0.22);
    background: rgba(255, 247, 237, 0.62);
}

.quota-bulk-form .quota-notes-compact textarea {
    min-height: 58px;
    resize: vertical;
}

.quota-bulk-form .quota-exemption-feedback {
    margin-top: -8px;
    margin-bottom: 2px;
}

.receipt-draft-toggle-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.payment-status-preview {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: var(--ink);
    font-weight: 700;
}

.quota-preview-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.quota-preview-loading[hidden] {
    display: none;
}

.quota-preview-loading span {
    width: 14px;
    height: 14px;
    border: 2px solid #cfd8dd;
    border-top-color: var(--button-color);
    border-radius: 999px;
    animation: quota-preview-spin 0.75s linear infinite;
}

@keyframes quota-preview-spin {
    to {
        transform: rotate(360deg);
    }
}

.receipt-draft {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    background: #f7f9fa;
}

.receipt-draft-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.receipt-draft-header h3 {
    margin: 2px 0 0;
    font-size: 16px;
}

.receipt-draft-page {
    padding: 16px;
    border: 1px solid #dfe5e8;
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.receipt-draft-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
}

.receipt-draft-logo {
    display: block;
    width: 44px;
    height: 44px;
    margin-bottom: 9px;
    object-fit: contain;
}

.receipt-draft-party strong,
.receipt-draft-title strong {
    display: block;
}

.receipt-draft-party p {
    margin: 2px 0;
    color: var(--ink);
    font-size: 12px;
}

.receipt-draft-title {
    margin-bottom: 20px;
    text-align: right;
}

.receipt-draft-title h3 {
    margin: 0;
    font-size: 18px;
}

.receipt-draft-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
    padding: 9px 0;
    border-top: 1px solid #d6d9da;
    border-bottom: 1px solid #d6d9da;
}

.receipt-draft-meta div {
    min-height: 38px;
    padding: 0 10px;
    border-right: 1px solid #c2c8cc;
}

.receipt-draft-meta div:last-child {
    border-right: 0;
}

.receipt-draft-meta span,
.receipt-draft-meta strong {
    display: block;
}

.receipt-draft-meta span {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
}

.receipt-draft-lines {
    width: 100%;
    margin-top: 18px;
    border-collapse: collapse;
    font-size: 12px;
}

.receipt-draft-lines th {
    padding: 6px;
    background: #eef0f1;
    text-align: left;
}

.receipt-draft-lines td {
    padding: 6px;
    border-bottom: 1px solid #e4e8ea;
}

.receipt-draft-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
    gap: 24px;
    margin-top: 22px;
}

.receipt-draft-bottom h4 {
    margin: 0 0 8px;
    font-size: 14px;
}

.receipt-draft-summary div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #e4e8ea;
}

.receipt-draft-summary .total {
    font-weight: 800;
}

.receipt-draft-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
    padding-top: 8px;
    border-top: 1px solid #c9ced1;
    color: var(--ink);
    font-size: 11px;
}

@media (max-width: 820px) {
    .receipt-draft-page {
        padding: 16px;
    }

    .receipt-draft-top,
    .receipt-draft-bottom {
        grid-template-columns: 1fr;
    }

    .receipt-draft-title {
        text-align: left;
    }

    .receipt-draft-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .receipt-draft-meta div:nth-child(2) {
        border-right: 0;
    }
}

.rgpd-consent-form {
    margin-top: 14px;
}

#profile-rgpd table small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.quota-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 20px;
}

.profile-quotas-open .quota-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.profile-quotas-open .quota-summary > div {
    padding: 10px;
}

.profile-quotas-open .quota-summary strong {
    min-width: 0;
    font-size: clamp(9px, 1.35vw, 18px);
    line-height: 1.1;
    white-space: nowrap;
}

.profile-quotas-open .quota-summary span {
    padding: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .profile-quotas-open .quota-summary > div {
        min-height: 64px;
        padding: 8px 6px;
    }

    .profile-quotas-open .quota-summary span {
        font-size: 8px;
    }
}

.quota-summary > div,
.quota-summary > button {
    align-items: start;
    display: grid;
    gap: 5px;
    justify-items: start;
    min-height: 72px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #fbfcfc;
    color: var(--ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.quota-summary > button {
    width: 100%;
    font-family: inherit;
    cursor: pointer;
}

.quota-summary span {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0 6px;
    color: var(--ink);
    font-size: 23px;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
}

.payment-action {
    background: var(--button-color);
    color: var(--button-text-color);
}

.quota-row-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    white-space: nowrap;
}

.profile-quotas-open .quota-row-actions {
    --icon-button-size: var(--icon-button-size-compact);
    gap: 4px;
}

.profile-quotas-open .date-nowrap {
    white-space: nowrap;
}

.profile-quotas-open .quota-receipt-link {
    color: #1d67d8;
    font-weight: 700;
}

.quota-row-actions .icon-button svg {
    width: 18px;
    height: 18px;
}

#socios-table th:first-child,
#socios-table td:first-child {
    min-width: 260px;
}

#socios-table th:last-child,
#socios-table td:last-child {
    width: 178px;
    min-width: 178px;
}

#overdue-quotas-table th:first-child,
#overdue-quotas-table td:first-child {
    min-width: 240px;
}

#overdue-quotas-table th:nth-child(2),
#overdue-quotas-table td:nth-child(2) {
    width: 112px;
    max-width: 112px;
}

#overdue-quotas-table th:last-child,
#overdue-quotas-table td:last-child {
    width: 154px;
    min-width: 154px;
}

.overdue-contact-cell div,
.overdue-contact-cell small {
    display: block;
    max-width: 16ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overdue-contact-cell div {
    font-size: 10px;
}

.overdue-contact-cell small {
    font-size: 10px;
}

.quota-interval-cell {
    white-space: nowrap;
}

.overdue-interval-cell {
    white-space: normal;
}

.overdue-interval-stack {
    display: inline-grid;
    gap: 2px;
    line-height: 1.15;
}

.overdue-interval-stack span {
    white-space: nowrap;
}

.overdue-alert-count-cell {
    text-align: center;
}

.overdue-alert-popover {
    position: relative;
    display: inline-block;
}

.overdue-alert-popover summary {
    list-style: none;
    cursor: pointer;
}

.overdue-alert-popover summary::-webkit-details-marker {
    display: none;
}

.overdue-alert-count {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #cddbe3;
    border-radius: 999px;
    background: #f4f8fa;
    color: var(--selection-color);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
}

.overdue-alert-popover-panel {
    position: absolute;
    right: 0;
    z-index: 30;
    width: 240px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    text-align: left;
}

.overdue-alert-popover-panel ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.overdue-alert-popover-panel li {
    display: grid;
    gap: 2px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.overdue-alert-popover-panel li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.overdue-alert-popover-panel span,
.overdue-alert-popover-panel small {
    color: var(--muted);
    font-size: 10px;
}

.socio-list-member > div {
    min-width: 0;
}

.socio-list-member .team-staff-member-name {
    color: var(--ink);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.socio-list-member a.team-staff-member-name:hover {
    color: var(--selection-color);
    text-decoration: underline;
}

.socio-status-dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 999px;
    vertical-align: middle;
    background: #9aa3a8;
    box-shadow: inset 0 0 0 1px rgba(23, 32, 38, 0.12);
}

.socio-status-active,
.socio-status-paid,
.socio-status-exempt {
    background: #0abf7a;
}

.socio-status-pending,
.socio-status-validation {
    background: #f2ad42;
}

.socio-status-overdue {
    background: #d94b45;
}

.socio-status-inactive,
.socio-status-cancelled {
    background: #aeb6ba;
}

.socio-status-deceased {
    background: #20262a;
}

.deceased-socio-row td {
    background: #f1f3f4;
    color: #858e94;
}

.deceased-socio-row .team-staff-member-name,
.deceased-socio-row .team-staff-member-name:visited,
.deceased-socio-row small {
    color: #858e94;
}

.deceased-socio-row:hover td {
    background: #eceff0;
}

/* Automatic alerts */

.automatic-alert-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.automatic-alert-summary > div {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #fbfcfc;
}

.automatic-alert-summary span,
.automatic-alert-summary strong {
    display: block;
}

.automatic-alert-summary span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.automatic-alert-summary strong {
    margin-top: 5px;
    color: var(--ink);
    font-size: 22px;
}

.automatic-alert-rule-form,
#notification-preference-form {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
}

.automatic-alert-optout-note {
    align-content: center;
    min-height: 48px;
    padding: 9px 12px;
    border-left: 3px solid var(--selection-color);
    background: #f2f7fb;
}

.automatic-alert-optout-note strong,
.automatic-alert-optout-note span {
    display: block;
}

.automatic-alert-rule-form .socio-admit-checklist.is-disabled {
    opacity: 0.55;
}

.automatic-alert-optout-note span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.automatic-alert-channels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.automatic-alert-channels > div {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.automatic-alert-channels .socio-admit-checklist {
    margin-bottom: 8px;
}

.automatic-alert-preference-checks {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.automatic-alert-row-actions {
    grid-template-columns: repeat(5, 34px);
}

.automatic-alert-row-actions form {
    margin: 0;
}

.automatic-alert-row-actions .icon-button {
    width: 34px;
    height: 34px;
}

.automatic-alert-preview {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid #b9cfdf;
    border-radius: 8px;
    background: #f4f8fb;
}

.automatic-alert-stacked-cell strong,
.automatic-alert-stacked-cell small {
    display: block;
}

.automatic-alert-stacked-cell small {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.3;
}

.automatic-alert-help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
}

.automatic-alert-help-grid > div {
    display: grid;
    gap: 3px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.automatic-alert-help-grid span {
    color: var(--muted);
    font-size: 12px;
}

.automatic-alert-model-example {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.automatic-alert-model-example h4,
.automatic-alert-model-example p {
    margin: 0 0 8px;
}

.automatic-alert-model-example pre {
    margin: 0;
    padding: 12px;
    overflow: auto;
    border: 1px solid var(--line);
    background: #f7f9fa;
    color: var(--ink);
    font: inherit;
    line-height: 1.45;
    white-space: pre-wrap;
}

@media (max-width: 720px) {
    .automatic-alert-help-grid {
        grid-template-columns: 1fr;
    }

    .automatic-alert-row-actions {
        grid-template-columns: repeat(5, 32px);
    }

    .automatic-alert-row-actions .icon-button {
        width: 32px;
        height: 32px;
    }
}

.compact-filter-grid {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    align-items: end;
}

.logs-table th:first-child,
.logs-table td:first-child {
    width: 130px;
    white-space: nowrap;
}

.logs-table th:nth-child(5),
.logs-table td:nth-child(5) {
    width: 70px;
    text-align: center;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

.icon-button.payment-action:hover {
    color: var(--button-text-color);
}

.icon-button.validate-socio-action {
    background: #fbfcfc;
    color: #0f8f5f;
    border-color: var(--line);
}

.icon-button.validate-socio-action:hover {
    background: #fff;
    color: #0b754d;
    border-color: #0b754d;
}

/* Dialogs and detail grids */

.payment-dialog,
.app-dialog {
    width: min(520px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(20, 30, 35, 0.24);
}

.payment-dialog::backdrop,
.app-dialog::backdrop {
    background: rgba(25, 32, 35, 0.5);
}

.payment-dialog-form {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.app-dialog > form {
    padding: 22px;
}

.payment-dialog-form label {
    display: grid;
    gap: 7px;
}

.payment-dialog-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
}

.payment-dialog-head h3,
.payment-dialog-head p {
    margin: 0;
}

.payment-dialog-head p {
    margin-top: 5px;
}

.payment-dialog .form-actions,
.app-dialog .form-actions {
    margin-top: 4px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 18px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
}

.detail-grid.compact-details {
    margin-bottom: 10px;
}

.detail-item {
    min-width: 0;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
}

.detail-item span,
.detail-item strong {
    display: block;
}

.detail-item span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.detail-item strong {
    overflow-wrap: anywhere;
    font-size: 15px;
    font-weight: 600;
}

.profile-information-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 16px;
    border-top: 0;
}

.profile-information-grid .detail-item {
    position: relative;
    min-height: 84px;
    padding: 14px 15px;
    border: 1px solid #dce5ec;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 2px 7px rgba(28, 54, 75, .035);
}

.profile-information-grid .detail-item span {
    margin-bottom: 6px;
    color: #617087;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .015em;
    text-transform: uppercase;
}

.profile-information-grid .detail-item strong {
    color: #14243a;
    font-size: 13.5px;
    line-height: 1.35;
}

.profile-information-grid .detail-item.is-cc-verified {
    border-color: #9bd8bc;
    background: linear-gradient(135deg, #f3fcf7 0%, #e5f8ed 100%);
}

.detail-item-source {
    display: inline-flex;
    margin-top: 7px;
    color: #18734f;
    font-size: 9px;
    font-weight: 800;
}

.detail-document-check {
    position: absolute;
    top: 10px;
    right: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
}

.is-document-check-valid .detail-document-check { background: #1f9b68; }
.is-document-check-invalid .detail-document-check { background: #d8474d; }

.member-documents-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 3px;
    padding: 0 5px;
    border-radius: 999px;
    background: #607086;
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
}

.form-tabs button.is-active .member-documents-tab-count {
    background: rgba(255, 255, 255, .28);
    color: inherit;
}

.member-cc-header-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e5f8ed;
    color: #18734f;
    font-size: 11px;
    font-weight: 800;
}

.form-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.form-tabs button,
.form-tabs .profile-tab-action {
    min-height: 36px;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.form-tabs .profile-tab-action.family-create-action {
    border-color: #efb36b;
    background: #fff0dc;
    color: #984b0b;
}

.form-tabs .profile-tab-action.family-create-action:hover {
    background: #ffe5c2;
}

.form-tabs .profile-tab-action {
    display: inline-flex;
    align-items: center;
    border-radius: var(--control-radius);
    padding: 0 13px;
    font-weight: 700;
}

.form-tabs button.is-active {
    background: var(--selection-color);
    color: var(--selection-text-color);
}

.form-tab-panel {
    display: none;
}

.form-tab-panel.is-active {
    display: block;
}

.inner-grid {
    margin-top: 0;
}

.status-toggle {
    min-height: 0;
    padding: 0;
    background: transparent;
    color: inherit;
}

.empty-state {
    min-height: 260px;
    display: grid;
    align-content: center;
}

.empty-state p {
    max-width: 620px;
    color: var(--muted);
}

/* Responsive layout */

@media (max-width: 980px) {
    .sidebar,
    .sidebar:hover,
    .sidebar:focus-within {
        position: static;
        width: auto;
        min-height: auto;
        gap: 10px;
        padding: 12px 16px;
        box-shadow: none;
        overflow: visible;
    }

    .brand {
        min-height: 58px;
        flex-direction: row;
        gap: 14px;
        align-items: center;
        padding: 0;
    }

    .brand-copy,
    .nav-label {
        display: block;
    }

    .brand-copy {
        visibility: visible;
    }

    .sidebar nav {
        display: flex;
        gap: 6px;
        padding-bottom: 5px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar nav p {
        display: none;
    }

    .sidebar nav a {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 7px 9px;
    }

    .nav-icon {
        width: 28px;
        min-width: 28px;
    }

    .brand-logo,
    .sidebar:hover .brand-logo,
    .sidebar:focus-within .brand-logo {
        width: 52px;
        max-height: 52px;
    }

    .app {
        margin-left: 0;
        padding: 18px;
    }

    .master-dashboard-menu,
    .dashboard-validation-grid,
    .dashboard-groups,
    .dashboard-lower-grid,
    .form-grid,
    .form-grid.compact,
    .quota-year-top,
    .detail-grid,
    .color-row,
    .compact-filter-grid,
    .quota-summary,
    .automatic-alert-summary,
    .automatic-alert-channels,
    .automatic-alert-preference-checks,
    .finance-athlete-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-stats,
    .dashboard-metric-grid,
    .dashboard-group:nth-child(2) .dashboard-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .competition-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bulk-member-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .permissions-form,
    .permissions-grid,
    .login-panel {
        grid-template-columns: 1fr;
    }

    .login-intro {
        justify-items: center;
        text-align: center;
    }

    .login-brand {
        width: min(320px, 100%);
    }

    .member-club-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .member-club-details {
        min-width: 0;
        text-align: left;
    }

    .member-access-page .login-shell {
        place-items: center;
        padding-right: 32px;
    }

    .member-access-page .login-intro {
        align-self: auto;
        padding-bottom: 0;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
        align-items: stretch;
        justify-content: space-between;
    }

    .permission-preview-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .master-performance-panel details > summary {
        align-items: flex-start;
    }

    .master-performance-grid {
        grid-template-columns: 1fr;
    }

    .master-updates-bulk-actions,
    .master-updates-submit-group {
        align-items: stretch;
        flex-direction: column;
    }

    .master-updates-submit-group {
        width: 100%;
    }

    .master-updates-submit-group button {
        width: 100%;
    }

    .permission-preview-banner form,
    .permission-preview-banner .mini-button {
        width: 100%;
    }

    .global-season-control {
        flex: 1 1 240px;
    }

    .global-season-navigation,
    .global-season-selector select {
        width: 100%;
    }

    .global-season-selector {
        flex: 1 1 auto;
    }

    .user-menu {
        flex: 1 1 auto;
        justify-content: flex-start;
        text-align: left;
    }

    input,
    select,
    textarea,
    button,
    .mini-button,
    .icon-link {
        min-height: 38px;
    }

    .icon-link {
        width: 38px;
        height: 38px;
    }

    .member-row-actions {
        width: max-content;
    }

    #members-table th:last-child,
    #members-table td:last-child {
        width: 214px;
        min-width: 214px;
    }

    .member-row-actions form,
    #members-table .member-row-actions .icon-link,
    #members-table .member-row-actions .icon-slot-placeholder {
        width: 28px;
        height: 28px;
        min-height: 0;
    }

    .settings-row-actions {
        width: max-content;
        min-width: 96px;
    }

    .settings-row-actions form {
        width: 44px;
        height: 44px;
    }

    .grid-row-actions {
        --grid-action-size: 44px;
    }

    .grid-row-actions form,
    .grid-row-actions .icon-button,
    .modality-action-placeholder {
        width: 44px;
        height: 44px;
        min-height: 44px;
    }

    .team-profile-summary {
        grid-template-columns: minmax(0, 1fr) 140px;
    }

    .team-profile-data {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-profile-logo img {
        max-width: 125px;
        max-height: 125px;
    }

    .team-performance-grid,
    .team-settings-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-performance-grid article:nth-child(2) {
        border-right: 0;
    }

    .team-performance-grid article:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 620px) {
    .login-shell {
        padding: 18px;
    }

    .member-access-page .login-shell {
        padding: 18px;
    }

    .login-brand {
        width: min(280px, 100%);
        padding: 10px 12px;
    }

    .member-access-page .login-brand {
        width: 112px;
    }

    .member-club-header {
        padding: 18px;
    }

    .member-club-brand {
        align-items: flex-start;
    }

    .member-club-brand img,
    .member-club-brand > span {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }

    .login-brand img {
        max-height: 92px;
    }

    .team-list-surface .section-header {
        display: flex;
        align-items: stretch;
        flex-direction: column;
    }

    .athlete-list-toolbar {
        align-items: stretch;
        flex-direction: column;
        flex-wrap: wrap;
    }

    .athlete-team-filter {
        flex: 1 1 auto;
    }

    .team-list-surface > .section-header .team-new-button,
    .team-list-surface > .section-header .team-header-actions {
        align-self: flex-start;
    }

    .team-header-actions {
        flex-wrap: wrap;
    }

    .quota-year-top,
    .finance-athlete-shortcuts {
        grid-template-columns: 1fr;
    }

    .finance-athlete-shortcuts article {
        align-items: flex-start;
        flex-direction: column;
    }

    .team-roster-head {
        align-items: stretch;
        flex-direction: column;
    }

    .team-profile-hero,
    .team-profile-switcher {
        align-items: stretch;
        flex-direction: column;
    }

    .team-week-surface > .section-header,
    .agenda-header,
    .team-week-actions,
    .agenda-header-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .opponent-profile-hero,
    .opponent-venue-cards article {
        grid-template-columns: 1fr;
    }

    .opponent-profile-image {
        width: 90px;
        height: 90px;
    }

    .opponent-profile-image img,
    .opponent-profile-image > span {
        width: 90px;
        height: 90px;
    }

    .opponent-profile-actions,
    .opponent-venue-header-actions {
        justify-content: flex-start;
    }

    .opponent-venue-copy dl {
        grid-template-columns: 1fr;
    }

    .team-week-actions,
    .week-navigation,
    .agenda-month-navigation,
    .agenda-date-jump {
        width: 100%;
    }

    .agenda-date-jump label,
    .agenda-date-jump input {
        width: 100%;
    }

    .week-navigation .mini-button,
    .agenda-month-navigation .mini-button {
        flex: 1 1 auto;
        justify-content: center;
    }

    .team-week-actions > .mini-button {
        align-self: flex-start;
    }

    .team-profile-switcher label {
        min-width: 0;
    }

    .team-profile-summary,
    .team-profile-columns,
    .team-profile-data,
    .team-profile-definition-list,
    .team-settings-list,
    .team-performance-grid {
        grid-template-columns: 1fr;
    }

    .team-profile-logo {
        grid-row: 1;
        min-height: 100px;
        justify-content: start;
    }

    .team-profile-logo img {
        max-width: 100px;
        max-height: 100px;
    }

    .team-profile-location,
    .team-profile-competitions {
        grid-column: auto;
    }

    .team-performance-grid article,
    .team-performance-grid article:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .team-performance-grid article:last-child {
        border-bottom: 0;
    }

    .team-season-navigation {
        align-items: end;
        width: 100%;
    }

    .team-season-filter,
    .team-season-filter select {
        width: 100%;
        min-width: 0;
    }

    .team-season-filter {
        flex: 1 1 auto;
    }

    .login-panel h1 {
        font-size: 36px;
    }

    .login-card,
    .surface {
        padding: 16px;
    }

    .app {
        padding: 12px;
    }

    .topbar-actions {
        flex-direction: column;
    }

    .global-season-control,
    .user-menu {
        width: 100%;
        flex-basis: auto;
    }

    .user-menu {
        justify-content: flex-start;
    }

    .opponent-list-filters,
    .opponent-list-filters label,
    .opponent-list-filters select,
    .training-filter-form,
    .training-filter-form label,
    .training-filter-form select,
    .training-month-navigation,
    .training-month-picker,
    .training-month-picker input {
        width: 100%;
    }

    .training-month-navigation .training-month-picker {
        flex: 1 1 auto;
    }

    .sidebar,
    .sidebar:hover,
    .sidebar:focus-within {
        padding: 10px 12px;
    }

    .brand-copy small {
        display: none;
    }

    .sidebar nav a {
        gap: 5px;
        padding: 7px 9px;
    }

    .sidebar-license {
        padding: 7px 9px;
    }

    .sidebar-license-copy {
        display: grid;
    }

    .nav-label {
        font-size: 13px;
    }

    .master-dashboard-menu,
    .dashboard-validation-grid,
    .dashboard-groups,
    .dashboard-lower-grid,
    .dashboard-hero-stats,
    .dashboard-metric-grid,
    .dashboard-group:nth-child(2) .dashboard-metric-grid,
    .form-grid,
    .form-grid.compact,
    .detail-grid,
    .color-row,
    .compact-filter-grid,
    .quota-summary,
    .automatic-alert-summary,
    .automatic-alert-channels,
    .automatic-alert-preference-checks,
    .training-profile-main,
    .training-profile-grid,
    .training-plan-meta {
        grid-template-columns: 1fr;
    }

    .training-profile-hero,
    .training-profile-switcher {
        align-items: stretch;
        flex-direction: column;
    }

    .training-profile-switcher {
        justify-content: flex-start;
    }

    .training-profile-logo {
        grid-row: 1;
        justify-content: start;
        min-height: 90px;
    }

    .training-profile-logo img {
        max-width: 95px;
        max-height: 95px;
    }

    .training-unit-row {
        grid-template-columns: minmax(120px, 1fr) 40px 40px;
    }

    .training-unit-row span {
        grid-column: 1 / -1;
        grid-row: 2;
        min-height: 48px;
    }

    .competition-options {
        grid-template-columns: 1fr;
    }

    .bulk-member-toolbar,
    .bulk-member-options {
        grid-template-columns: 1fr;
    }

    .bulk-select-all {
        justify-content: flex-start;
    }

    .span-3 {
        grid-column: auto;
    }

    .span-2 {
        grid-column: auto;
    }

    .topbar h1 {
        font-size: 25px;
    }

    .tabs,
    .role-tabs,
    .form-tabs {
        flex-wrap: nowrap;
        padding-bottom: 5px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tabs a,
    .role-tabs a,
    .form-tabs button {
        flex: 0 0 auto;
    }

    .row-actions {
        justify-content: flex-start;
    }

    .member-profile-head {
        grid-template-columns: 1fr;
    }

    .member-profile-head .row-actions {
        justify-content: flex-start;
    }

    .member-row-actions {
        margin-left: 0;
    }
}

/* Athlete profile and athlete financials */

.athlete-list-toolbar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.team-season-static {
    background: #f4f6f7;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 2px;
    min-width: 190px;
    padding: 9px 12px;
}

.team-season-static span {
    color: var(--muted);
    font-size: 12px;
}

.team-season-static strong {
    font-size: 14px;
}

.athlete-profile-hero {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: auto 1fr auto;
}

.athlete-profile-photo,
.athlete-profile-photo img,
.athlete-profile-photo span {
    border-radius: 8px;
    height: 92px;
    width: 92px;
}

.athlete-profile-photo img {
    object-fit: cover;
}

.athlete-profile-photo span {
    align-items: center;
    background: #eef2f3;
    color: var(--muted);
    display: flex;
    font-weight: 700;
    justify-content: center;
}

.athlete-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.athlete-anthropometry-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.athlete-anthropometry-summary > span,
.athlete-anthropometry-summary > button {
    align-items: flex-start;
    background: #f6f8f8;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 1px;
    min-height: 58px;
    min-width: 128px;
    padding: 7px 10px;
    text-align: left;
}

.athlete-anthropometry-summary small,
.athlete-anthropometry-summary em {
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    line-height: 1.2;
}

.athlete-anthropometry-summary strong {
    font-size: 15px;
}

.athlete-anthropometry-summary > button {
    cursor: pointer;
}

.athlete-anthropometry-summary > button:hover,
.athlete-anthropometry-summary > button:focus-visible,
.athlete-bmi-card:hover,
.athlete-bmi-card:focus-visible {
    border-color: var(--selection-color, #315f8c);
    box-shadow: 0 0 0 3px rgba(49, 95, 140, 0.12);
}

.athlete-profile-tab-groups {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.athlete-profile-tab-groups > div {
    align-content: start;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 8px;
    padding-bottom: 12px;
}

.athlete-profile-tab-groups .tabs {
    align-items: center;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
}

.athlete-financial-panel .product-profile-header {
    margin-bottom: 4px;
}

.athlete-financial-summary {
    margin-bottom: 22px;
}

.athlete-product-form {
    margin: 18px 0 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
}

.athlete-subproduct-picker {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.athlete-subproduct-picker legend {
    margin-bottom: 10px;
    color: #39444d;
    font-weight: 700;
}

.athlete-subproduct-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.athlete-subproduct-option input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 2px;
}

.athlete-subproduct-option span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.athlete-subproduct-option strong {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.athlete-subproduct-option small {
    color: var(--muted);
}

.athlete-product-charge-list table {
    min-width: 760px;
}

.athlete-product-charge-list .athlete-charge-select-column {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    padding-right: 4px;
    padding-left: 4px;
    text-align: center;
}

.athlete-product-charge-list .athlete-charge-select-column input[type="checkbox"] {
    display: inline-block;
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.athlete-charge-select-all {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 8px;
}

.athlete-charge-select-all input[type="checkbox"] {
    height: 16px;
    margin: 0;
    min-height: 16px;
    min-width: 16px;
    width: 16px;
}

.athlete-product-charge-list td:nth-child(2) {
    min-width: 260px;
}

.athlete-product-charge-list .athlete-charge-status-column {
    width: 52px;
    text-align: center;
}

.athlete-personal-read {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.athlete-personal-read h2 {
    border-bottom: 1px solid var(--line);
    font-size: 22px;
    margin: 0 0 14px;
    padding-bottom: 8px;
}

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

.athlete-overview-form {
    display: grid;
    gap: 14px;
}

.athlete-overview-block {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
}

.athlete-overview-block > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    list-style: none;
    min-height: 50px;
    padding: 10px 14px;
}

.athlete-overview-block > summary::-webkit-details-marker {
    display: none;
}

.athlete-overview-block > summary::before {
    color: var(--muted);
    content: '›';
    flex: 0 0 auto;
    font-size: 24px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform .16s ease;
}

.athlete-overview-block[open] > summary::before {
    transform: rotate(90deg);
}

.athlete-overview-block > summary h2 {
    flex: 1 1 auto;
    font-size: 18px;
    margin: 0;
}

.athlete-overview-block > summary > span {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.athlete-overview-block[open] > summary {
    background: #f7f9f9;
    border-bottom: 1px solid var(--line);
}

.athlete-overview-block-content {
    padding: 14px;
}

.athlete-overview-form .readonly-form-grid {
    gap: 8px 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.athlete-overview-form .span-2 {
    grid-column: span 2;
}

.athlete-overview-form .span-3 {
    grid-column: span 4;
}

.readonly-form-grid input,
.readonly-form-grid textarea {
    background: #f7f9fa;
    color: var(--ink);
    cursor: default;
}

.readonly-form-grid textarea {
    min-height: 50px;
}

.readonly-form-grid label {
    gap: 3px;
}

.readonly-form-grid input {
    min-height: 34px;
    padding-block: 6px;
}

.athlete-anthropometry-panel .detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.athlete-anthropometry-panel article,
.athlete-bmi-card {
    background: #f7f9fa;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 4px;
    min-height: 78px;
    padding: 12px;
    text-align: left;
}

.athlete-anthropometry-panel article span,
.athlete-bmi-card span,
.athlete-anthropometry-panel article small,
.athlete-bmi-card small {
    color: var(--muted);
    font-size: 12px;
}

.athlete-anthropometry-panel article strong,
.athlete-bmi-card strong {
    font-size: 18px;
}

.athlete-bmi-card {
    cursor: pointer;
}

.athlete-bmi-dialog,
.athlete-model2-dialog {
    max-height: min(90vh, 900px);
    max-width: min(94vw, 980px);
    padding: 0;
    width: 920px;
}

.athlete-model2-dialog {
    box-sizing: border-box;
    height: calc(100vh - 32px);
    max-height: 900px;
    overflow: hidden;
    position: relative;
}

.athlete-bmi-dialog-form,
.athlete-model2-dialog-form {
    display: grid;
    gap: 16px;
    max-height: min(90vh, 900px);
    padding: 20px;
}

.athlete-bmi-dialog-form {
    overflow: auto;
}

.athlete-model2-dialog-form {
    box-sizing: border-box;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 100%;
    max-height: none;
    overflow: hidden;
    padding-bottom: 112px;
}

.athlete-model2-dialog-form > .payment-dialog-head { grid-row: 1; }
.athlete-model2-dialog-form > .athlete-model2-missing { grid-row: 2; }
.athlete-model2-dialog-form > .athlete-model2-form-scroll { grid-row: 3; }

/* Modal do Modelo 2 aberto a partir dos documentos federativos. Ao contrário
   da ficha do atleta, o rodapé faz parte do fluxo para nunca ficar cortado. */
.federative-model2-dialog-form {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
    padding-bottom: 20px;
}

.federative-model2-dialog-form > .form-actions {
    align-items: center;
    background: #fff;
    border-top: 1px solid var(--line);
    display: flex;
    grid-row: 4;
    margin: 0 -20px -20px;
    padding: 13px 20px;
}

.athlete-bmi-current-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.athlete-bmi-current-grid article {
    background: #f7f9fa;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.athlete-bmi-current-grid article.is-highlight {
    background: rgba(31, 111, 91, 0.08);
    border-color: rgba(31, 111, 91, 0.28);
}

.athlete-bmi-current-grid span,
.athlete-bmi-current-grid small {
    color: var(--muted);
    font-size: 12px;
}

.athlete-bmi-current-grid strong {
    font-size: 17px;
}

.athlete-bmi-thresholds h4,
.athlete-measurement-history h4,
.athlete-model2-dialog h4 {
    margin: 0 0 9px;
}

.athlete-bmi-thresholds > div {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.athlete-bmi-thresholds span {
    background: #f7f9fa;
    border: 1px solid var(--line);
    border-radius: 7px;
    display: grid;
    gap: 2px;
    padding: 8px 10px;
}

.athlete-bmi-thresholds small {
    color: var(--muted);
}

.athlete-bmi-new-measurement {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
}

.athlete-bmi-new-measurement > summary {
    cursor: pointer;
    font-weight: 700;
    padding: 11px 13px;
}

.athlete-bmi-new-measurement > div {
    border-top: 1px solid var(--line);
    padding: 13px;
}

.athlete-measurement-history table {
    min-width: 650px;
}

.athlete-model2-missing {
    background: #fff4e5;
    border: 1px solid #e7c580;
    border-radius: 8px;
    display: grid;
    gap: 3px;
    padding: 11px 13px;
}

.athlete-model2-missing span {
    font-size: 12px;
}

.athlete-model2-form-scroll {
    display: grid;
    gap: 18px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 6px;
}

.athlete-model2-footer-hint {
    margin: 0;
}

.athlete-model2-actions {
    background: #fff;
    border-top: 1px solid var(--line);
    bottom: 0;
    box-shadow: 0 -8px 22px rgba(22, 40, 50, 0.1);
    box-sizing: border-box;
    display: grid;
    gap: 9px;
    left: 0;
    padding: 12px 20px 16px;
    position: absolute;
    right: 0;
    z-index: 20;
}

.athlete-model2-actions .form-actions {
    flex-wrap: wrap;
}

.athlete-model2-form-scroll section {
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}

.athlete-model2-consent-grid {
    display: grid;
    gap: 9px;
}

.athlete-model2-registration {
    align-items: center;
    background: #f7f9fa;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px;
}

.athlete-model2-registration p {
    margin: 3px 0 0;
}

.athlete-profile-form select[multiple] {
    min-height: 130px;
}

.athlete-profile-form,
.athlete-registration-form,
.athlete-clinical-form {
    margin-top: 8px;
}

.checkbox-label {
    align-items: center;
    display: flex;
    gap: 8px;
    min-height: 36px;
}

.checkbox-label input {
    height: 20px;
    min-height: 20px;
    width: 20px;
    min-width: 20px;
}

.mini-button.is-disabled {
    opacity: 0.48;
    pointer-events: none;
}

.federative-summary-empty-download {
    cursor: not-allowed;
    opacity: 0.48;
}

.member-rgpd-form .form-actions {
    align-items: end;
}

.rgpd-acceptance {
    align-items: flex-start;
    line-height: 1.35;
    padding: 10px 0;
}

.training-details-form {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.training-attendance-panel {
    margin-top: 18px;
}

.training-attendance-table table input,
.training-attendance-table table select {
    min-width: 120px;
    width: 100%;
}

.training-attendance-table table th:first-child,
.training-attendance-table table td:first-child {
    min-width: 220px;
}

.training-extra-athletes-form {
    align-items: end;
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.training-extra-athletes-form label {
    max-width: 360px;
    width: 100%;
}

.training-extra-athletes-list {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 16px;
}

@media (max-width: 800px) {
    .athlete-profile-hero {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .athlete-profile-tab-groups,
    .athlete-personal-read,
    .athlete-personal-read .detail-grid,
    .athlete-overview-form .readonly-form-grid,
    .athlete-anthropometry-panel .detail-grid,
    .athlete-bmi-current-grid,
    .athlete-bmi-thresholds > div {
        grid-template-columns: 1fr;
    }

    .athlete-overview-form .span-2,
    .athlete-overview-form .span-3 {
        grid-column: span 1;
    }

    .athlete-profile-actions,
    .training-extra-athletes-form {
        justify-content: flex-start;
    }

    .training-extra-athletes-form {
        align-items: stretch;
        flex-direction: column;
    }

    .athlete-model2-registration {
        align-items: stretch;
        flex-direction: column;
    }
}
/* Drag and drop controls */

.drag-handle {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(23, 32, 38, 0.14);
    border-radius: 6px;
    background: #fff;
    color: #53616a;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
}

tr.is-dragging {
    opacity: 0.55;
}

.email-from-name-tools {
    align-items: end;
    display: flex;
    gap: 10px;
}

/* Setup help */

.setup-help-page {
    display: grid;
    gap: 18px;
}

.setup-progress {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.setup-progress strong {
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
}

.setup-progress span {
    color: var(--muted);
    font-size: 12px;
}

.setup-task-list {
    display: grid;
    gap: 10px;
}

.setup-task {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: 12px;
    grid-template-columns: 40px 1fr;
    padding: 14px;
    text-decoration: none;
}

.setup-task:hover {
    border-color: rgba(31, 111, 91, 0.35);
}

.setup-task-status {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.setup-task-status svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
    width: 18px;
}

.setup-task.is-done .setup-task-status {
    background: rgba(31, 111, 91, 0.12);
    color: #1f6f5b;
}

.setup-task.is-pending .setup-task-status {
    background: rgba(176, 125, 39, 0.12);
    color: #9a6a1f;
}

.setup-task strong,
.setup-task small {
    display: block;
}

.setup-task small {
    color: var(--muted);
    margin-top: 3px;
}

.license-overview {
    overflow: hidden;
}

.license-summary-panel {
    display: grid;
    grid-template-columns: minmax(230px, 0.8fr) 2fr;
    gap: 14px;
    margin-top: 8px;
}

.license-summary-main,
.license-summary-item {
    color: inherit;
    text-decoration: none;
}

.license-summary-main {
    align-content: center;
    display: grid;
    min-height: 150px;
    padding: 22px;
    border-radius: 8px;
    background: #172026;
    color: #fff;
}

.license-summary-main.is-clear {
    background: #1f6f5b;
}

.license-summary-main.has-blocked {
    background: #7c3434;
}

.license-summary-main span,
.license-summary-item span {
    color: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.license-summary-main strong {
    display: block;
    margin-top: 10px;
    font-size: 38px;
    line-height: 1;
}

.license-summary-main small {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.78);
}

.license-summary-items {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.license-summary-item {
    display: grid;
    align-content: center;
    min-height: 150px;
    padding: 16px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #fbfcfc;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.license-summary-item:hover,
.license-summary-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(24, 32, 38, 0.1);
}

.license-summary-item span {
    color: #607079;
}

.license-summary-item strong {
    display: block;
    margin-top: 10px;
    color: var(--ink);
    font-size: 27px;
    line-height: 1;
}

.license-summary-item small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.license-summary-item.is-success {
    border-color: #b9dfcf;
    background: #f2faf6;
}

.license-summary-item.is-danger {
    border-color: #edc6c6;
    background: #fffafa;
}

.license-summary-item.is-money {
    border-color: #ead49e;
    background: #fffaf0;
}

.license-summary-item.is-revenue {
    border-color: #b9d3e6;
    background: #f2f7fb;
}

.license-summary-item.is-success strong {
    color: #1f6f5b;
}

.license-summary-item.is-danger strong {
    color: #a24343;
}

.license-summary-item.is-money strong {
    color: #8a641e;
    font-size: 23px;
}

.license-summary-item.is-revenue strong {
    color: #315f8c;
    font-size: 23px;
}

.list-summary-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 18px;
}

.list-summary-item {
    align-content: center;
    display: grid;
    min-height: 112px;
    padding: 16px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #fbfcfc;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.list-summary-item:hover {
    transform: translateY(-1px);
    border-color: var(--selection-color);
    box-shadow: 0 12px 26px rgba(24, 32, 38, 0.08);
}

.list-summary-item span {
    color: #607079;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.list-summary-item strong {
    display: block;
    margin-top: 10px;
    color: var(--ink);
    font-size: 29px;
    line-height: 1;
}

.list-summary-item small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.list-summary-item.is-primary {
    border-color: #b9d3e6;
    background: #f2f7fb;
}

.list-summary-item.is-success {
    border-color: #b9dfcf;
    background: #f2faf6;
}

.list-summary-item.is-money {
    border-color: #ead49e;
    background: #fffaf0;
}

.list-summary-item.is-primary strong {
    color: #315f8c;
}

.list-summary-item.is-success strong {
    color: #1f6f5b;
}

.list-summary-item.is-money strong {
    color: #8a641e;
}

@media (max-width: 1100px) {
    .license-summary-panel {
        grid-template-columns: 1fr;
    }

    .license-summary-items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 900px) {
    .license-summary-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .license-summary-panel,
    .license-summary-items,
    .member-role-filters,
    .list-summary-panel {
        grid-template-columns: 1fr;
    }

    .license-summary-main,
    .license-summary-item {
        min-height: 112px;
    }
}
.family-member-switcher {
    display: flex;
    align-items: end;
    gap: 16px;
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid var(--line, #d9e1e5);
    background: #f7f9fa;
}

.family-member-switcher label {
    min-width: min(100%, 360px);
}

.family-member-switcher .hint {
    margin: 0 0 9px;
}

[data-sms-counter] {
    display: block;
    margin-top: 4px;
    color: #60717c;
    text-align: right;
}

[data-sms-counter].is-over-limit {
    color: #b42318;
}

.badge-sent {
    background: #dff3e9;
    color: #087443;
}

.badge-failed {
    background: #fee4e2;
    color: #b42318;
}

@media (max-width: 720px) {
    .family-member-switcher {
        align-items: stretch;
        flex-direction: column;
    }

    .family-authorization-scopes {
        grid-template-columns: 1fr;
    }
}

/* Annual athlete enrollment */
.athlete-enrollment-wizard {
    border-top: 4px solid #1f6f5b;
}

.athlete-initial-sports-form {
    border-top: 4px solid #1f6f5b;
}

.athlete-initial-setup-heading {
    display: grid;
    gap: 4px;
}

.athlete-initial-setup-heading h2,
.athlete-initial-setup-heading p {
    margin: 0;
}

.athlete-enrollment-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin: 18px 0 22px;
    padding: 0;
    list-style: none;
}

.athlete-enrollment-steps li {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 50px;
    padding: 10px 14px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #f7f9fa;
    color: #607079;
    font-size: 13px;
    font-weight: 800;
}

.athlete-enrollment-steps li span {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border-radius: 50%;
    background: #95a4ad;
    color: #fff;
}

.athlete-enrollment-steps li.is-active {
    border-color: #9bcab8;
    background: #f0f8f4;
    color: #185b49;
}

.athlete-enrollment-steps li.is-active span {
    background: #1f6f5b;
}

.athlete-enrollment-cost-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #f7f9fa;
}

.athlete-enrollment-cost-preview article {
    padding: 13px;
    border-radius: 7px;
    background: #fff;
}

.athlete-enrollment-cost-preview span,
.athlete-enrollment-cost-preview small {
    display: block;
    color: var(--muted);
}

.athlete-enrollment-cost-preview strong {
    display: block;
    margin: 5px 0;
    color: #1f6f5b;
    font-size: 22px;
}

.athlete-enrollment-financial-exceptions {
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid #d7e2e5;
    border-radius: 12px;
    background: #fbfcfc;
}

.athlete-enrollment-financial-exceptions legend {
    padding: 0 7px;
    color: #23333c;
    font-weight: 800;
}

.athlete-enrollment-financial-exceptions > .hint {
    margin: 0 0 12px;
}

.athlete-enrollment-exception-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.athlete-enrollment-age-exception .athlete-enrollment-exception-actions {
    grid-template-columns: minmax(0, 320px);
}

.athlete-enrollment-age-exception[hidden] {
    display: none;
}

.athlete-enrollment-exception-button {
    cursor: pointer;
}

.athlete-enrollment-exception-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.athlete-enrollment-exception-button span {
    display: grid;
    min-height: 46px;
    place-items: center;
    padding: 9px 12px;
    border: 1px solid #d6e0e3;
    border-radius: 9px;
    background: #fff;
    color: #3d4d55;
    font-size: .84rem;
    font-weight: 800;
    text-align: center;
    transition: .15s ease;
}

.athlete-enrollment-exception-button input:checked + span {
    border-color: var(--button-color, #1f6f5b);
    background: var(--button-color, #1f6f5b);
    color: var(--button-text-color, #fff);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--button-color, #1f6f5b) 14%, transparent);
}

.athlete-enrollment-exception-button input:focus-visible + span {
    outline: 3px solid color-mix(in srgb, var(--selection-color, #315f8c) 28%, transparent);
    outline-offset: 2px;
}

.athlete-enrollment-exception-button input:disabled + span,
.athlete-enrollment-financial-exceptions.is-disabled .athlete-enrollment-exception-notes {
    cursor: not-allowed;
    opacity: .55;
}

.athlete-enrollment-discount-value {
    max-width: 260px;
    margin-top: 12px;
}

.athlete-enrollment-exception-notes {
    display: block;
    margin-top: 12px;
}

.athlete-financial-exception-summary {
    color: #8a5b16;
    font-weight: 750;
}

.athlete-enrollment-status {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #edf0f2;
    color: #53616a;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.athlete-enrollment-status.is-active {
    background: #dff3e9;
    color: #087443;
}

.athlete-enrollment-status.is-warning {
    background: #fff1cc;
    color: #805a00;
}

.athlete-enrollment-status.is-inactive {
    background: #edf0f2;
    color: #6a747a;
}

.list-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.athlete-summary-grid .list-summary-item {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.athlete-summary-grid .list-summary-item.is-selected {
    outline: 2px solid var(--selection-color);
    outline-offset: 2px;
}

.athlete-management-head .section-header {
    align-items: end;
}

.athlete-season-filter {
    display: grid;
    gap: 3px;
    min-width: 220px;
    padding: 10px 14px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #f7f9fa;
}

.athlete-season-filter span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.athlete-list-surface > .section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
}

.athlete-list-surface > .section-header .athlete-list-toolbar {
    display: flex;
    grid-column: auto;
    justify-content: flex-end;
}

.athlete-list-toolbar input,
.athlete-list-toolbar select {
    min-width: 170px;
}

.athlete-list-surface > .section-header .athlete-list-toolbar-compact {
    flex-wrap: nowrap;
    gap: 8px;
    width: min(100%, 360px);
}

.athlete-list-toolbar-compact .athlete-list-filter-control {
    flex: 1 1 50%;
    min-width: 0;
    width: calc(50% - 4px);
}

.athlete-list-surface [data-athlete-management-table] {
    min-width: 0;
    table-layout: fixed;
}

.athlete-list-surface [data-athlete-management-table] th,
.athlete-list-surface [data-athlete-management-table] td {
    padding: 8px 6px;
    overflow-wrap: anywhere;
}

.athlete-list-surface [data-athlete-management-table] th:nth-child(1) { width: 22%; }
.athlete-list-surface [data-athlete-management-table] th:nth-child(2) { width: 5%; }
.athlete-list-surface [data-athlete-management-table] th:nth-child(3) { width: 17%; }
.athlete-list-surface [data-athlete-management-table] th:nth-child(4) { width: 12%; }
.athlete-list-surface [data-athlete-management-table] th:nth-child(5) { width: 18%; }
.athlete-list-surface [data-athlete-management-table] th:nth-child(6) { width: 12%; }
.athlete-list-surface [data-athlete-management-table] th:nth-child(7) { width: 14%; }

.athlete-list-surface [data-athlete-management-table] .row-actions {
    gap: 5px;
    flex-wrap: wrap;
}

@media (max-width: 760px) {
    .athlete-list-surface [data-athlete-management-table] {
        min-width: 780px;
    }
}

.athlete-plan-block {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) repeat(3, minmax(150px, 1fr));
    gap: 14px;
    align-items: end;
    padding: 16px;
    border: 1px solid #dce4e7;
    border-radius: 8px;
    background: #f7f9fa;
}

.athlete-plan-block h3 {
    margin: 4px 0 8px;
}

.athlete-role-next-step {
    display: grid;
    align-content: center;
    min-height: 78px;
    padding: 12px 16px;
    border: 1px solid #b9dfcf;
    border-radius: 8px;
    background: #f2faf6;
}

.athlete-role-next-step span,
.athlete-role-next-step small {
    color: #607079;
}

.athlete-role-next-step strong {
    margin: 3px 0;
    color: #1f6f5b;
}

.inline-info {
    padding: 12px 14px;
    border: 1px solid #b9d3e6;
    border-radius: 8px;
    background: #f2f7fb;
    color: #315f8c;
    font-size: 13px;
}

.status-dot-button {
    display: inline-grid;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}

/* Global active/inactive control */
.status-toggle,
.status-dot-button {
    display: inline-grid;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    place-items: center;
    border: 1px solid #cdd3d7;
    border-radius: 8px;
    background: #f1f3f4;
    color: #7b858c;
    box-shadow: none;
    cursor: pointer;
}

.status-toggle > .sports-settings-status-dot,
.status-dot-button > .sports-settings-status-dot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.status-toggle::before,
.status-dot-button::before {
    content: "";
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2v10M18.36 6.64a9 9 0 1 1-12.72 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2v10M18.36 6.64a9 9 0 1 1-12.72 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.status-toggle:has(.is-active),
.status-dot-button:has(.is-active) {
    border-color: #a9dac5;
    background: #e8f6ef;
    color: #16875a;
}

.status-toggle:has(.is-active):hover,
.status-dot-button:has(.is-active):hover {
    border-color: #16875a;
    background: #d9f0e5;
    color: #0f7049;
}

.status-toggle:has(.is-inactive),
.status-dot-button:has(.is-inactive) {
    border-color: #cdd3d7;
    background: #f1f3f4;
    color: #7b858c;
}

.status-toggle:has(.is-inactive):hover,
.status-dot-button:has(.is-inactive):hover {
    border-color: #89939a;
    background: #e7eaec;
    color: #5f696f;
}

.communication-server-block {
    padding-block: 18px;
}

.communication-server-header {
    margin: 0;
}

.communication-server-title {
    display: flex;
    gap: 10px;
    align-items: center;
}

.communication-server-status-label::before {
    content: "·";
    margin: 0 6px;
    color: #9aa4aa;
}

.communication-server-edit-button {
    min-width: 84px;
}

.communication-server-content {
    margin-top: 18px;
    padding-top: 2px;
    border-top: 1px solid #e1e7ea;
}

.communication-server-content[hidden] {
    display: none;
}

@media (max-width: 950px) {
    .athlete-enrollment-steps,
    .athlete-enrollment-cost-preview,
    .list-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .athlete-list-surface > .section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .communication-server-header {
        align-items: stretch;
    }

}

@media (max-width: 640px) {
    .athlete-enrollment-steps,
    .athlete-enrollment-cost-preview,
    .list-summary-grid,
    .athlete-plan-block {
        grid-template-columns: 1fr;
    }

    .athlete-list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .athlete-list-surface > .section-header .athlete-list-toolbar-compact {
        align-self: stretch;
        flex-direction: row;
        flex-wrap: nowrap;
        width: 100%;
    }
}
/* Artigos, vendas e seleção na inscrição dos atletas */
.shop-catalog-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.shop-catalog-summary span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--line, #d8e1e8);
    border-radius: 10px;
    background: #f7faf9;
    color: #52606d;
}

.shop-catalog-summary strong {
    color: var(--button-color, #1f6f5b);
    font-size: 1.05rem;
}

.shop-item-cell,
.shop-enrollment-choice {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-item-cell img,
.shop-enrollment-choice img,
.shop-item-placeholder {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #dbe4e8;
    background: #edf4f1;
}

.shop-item-placeholder {
    display: inline-grid;
    place-items: center;
    color: var(--button-color, #1f6f5b);
    font-weight: 800;
}

.shop-item-cell > div,
.shop-enrollment-choice > span {
    min-width: 0;
}

.shop-item-cell small,
.shop-enrollment-choice small,
.shop-enrollment-choice em {
    display: block;
    margin-top: 2px;
    color: #667681;
    font-size: .78rem;
    font-style: normal;
}

.shop-enrollment-choice em,
.shop-required-label {
    color: #a45c00;
    font-weight: 700;
}

.shop-age-group-selector,
.shop-enrollment-selector {
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid #d9e3e7;
    border-radius: 14px;
    background: #fbfcfc;
}

.shop-age-group-selector legend,
.shop-enrollment-selector legend {
    padding: 0 7px;
    color: #23333c;
    font-weight: 800;
}

.shop-age-group-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.shop-age-group-grid > label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #e0e7ea;
    border-radius: 9px;
    background: #fff;
}

.shop-age-group-grid input,
.shop-enrollment-choice > input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin: 2px 0 0;
    accent-color: var(--button-color, #1f6f5b);
}

.shop-age-group-grid small {
    display: block;
    color: #72808a;
}

.shop-option-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dfe7e9;
    border-radius: 12px;
    background: #f8fbfa;
}

.shop-option-grid .checkbox-label {
    min-height: 42px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #dce5e7;
    border-radius: 9px;
    background: #fff;
}

.shop-enrollment-selector > .section-header {
    margin-bottom: 10px;
}

.shop-enrollment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

[data-enrollment-shop] .shop-enrollment-grid {
    grid-template-columns: minmax(0, 1fr);
}

.shop-enrollment-item {
    min-width: 0;
    padding: 12px;
    border: 1px solid #dae3e6;
    border-radius: 12px;
    background: #fff;
}

.shop-enrollment-line-item {
    display: grid;
    grid-template-columns: minmax(240px, .9fr) minmax(0, 1.1fr);
    align-items: end;
    gap: 16px;
}

.shop-enrollment-line-item .shop-enrollment-choice {
    align-self: center;
}

.shop-enrollment-line-item .shop-enrollment-item-options {
    margin: 0;
}

.shop-enrollment-item:has([data-shop-item-check]:checked) {
    border-color: color-mix(in srgb, var(--button-color, #1f6f5b) 55%, #dbe5e8);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--button-color, #1f6f5b) 10%, transparent);
}

.shop-enrollment-choice {
    cursor: pointer;
}

.shop-enrollment-item-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px;
    align-items: end;
    gap: 10px;
    margin: 10px 0 0 27px;
}

.shop-enrollment-item-options label {
    font-size: .78rem;
}

.shop-enrollment-item-options select,
.shop-enrollment-item-options input {
    margin-top: 4px;
}

.shop-enrollment-item-options .shop-enrollment-quantity {
    grid-column: 2;
    width: 100px;
    justify-self: end;
}

.shop-enrollment-item-options.with-notes {
    grid-template-columns: minmax(0, 1fr) 100px minmax(180px, 1fr);
}

.shop-enrollment-item-options.with-notes.no-variants {
    grid-template-columns: 100px minmax(180px, 1fr);
}

.shop-enrollment-item-options.with-notes.no-variants .shop-enrollment-quantity {
    grid-column: 1;
    justify-self: start;
}

.shop-enrollment-item-options.with-notes .shop-enrollment-item-note {
    grid-column: 3;
    width: 100%;
    margin: 0;
}

.shop-enrollment-item-options.with-notes.no-variants .shop-enrollment-item-note {
    grid-column: 2;
}

.shop-enrollment-item-note {
    display: grid;
    gap: 7px;
    margin: 10px 0 0 27px;
    font-size: .78rem;
}

.shop-enrollment-item-note input {
    width: 100%;
    margin-top: 4px;
}

.athlete-enrollment-cost-preview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.athlete-shop-sales {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #d8e3e6;
    border-radius: 14px;
    background: #fbfcfc;
}

.athlete-shop-sale-form {
    margin-bottom: 18px;
}

.shop-sale-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #eef6f2;
}

.shop-sale-total strong {
    color: var(--button-color, #1f6f5b);
    font-size: 1.2rem;
}

.shop-delivery-form select {
    min-width: 150px;
    padding: 7px 30px 7px 9px;
    font-size: .82rem;
}

.athlete-shop-sales-table-wrap tr.is-muted {
    opacity: .62;
}

/* Member area dashboard and navigation */
.member-data-update-request-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.member-data-update-request-icon.is-requested {
    border-color: #60a5fa;
    background: #dbeafe;
    color: #1d4ed8;
}

.member-update-dialog {
    width: min(560px, calc(100vw - 28px));
    max-width: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d7e1dd;
    border-radius: 16px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 24px 70px rgb(15 45 37 / 24%);
}

.member-update-dialog::backdrop {
    background: rgb(16 38 32 / 52%);
    backdrop-filter: blur(2px);
}

.member-update-dialog form {
    display: grid;
    gap: 18px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 24px;
}

.member-update-dialog-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
}

.member-update-dialog-header h2,
.member-update-dialog-header p {
    margin: 0;
}

.member-update-dialog-header .hint {
    margin-top: 5px;
}

.member-update-dialog-close {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--muted);
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.member-update-dialog-note,
.member-update-alert-only {
    margin: 0;
}

.member-update-channel-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.member-update-channel-option {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbfa;
    cursor: pointer;
}

.member-update-channel-option:has(input:checked) {
    border-color: var(--button-color, #1f6f5b);
    background: #eef7f3;
    box-shadow: 0 0 0 2px rgb(31 111 91 / 10%);
}

.member-update-channel-option input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--button-color, #1f6f5b);
}

.member-update-channel-option span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.member-update-channel-option small {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-weight: 400;
}

.member-update-channel-option.is-unavailable {
    opacity: .55;
    cursor: not-allowed;
}

.member-update-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 3px;
}

.member-role-dialog {
    width: min(760px, calc(100vw - 28px));
}

.member-athlete-dialog {
    width: min(600px, calc(100vw - 28px));
}

.member-role-dialog .member-update-dialog-header {
    margin-bottom: 2px;
}

.member-role-dialog .form-actions {
    margin-top: 2px;
}

.member-role-dialog textarea {
    min-height: 82px;
}

.member-role-dialog .athlete-role-next-step {
    min-height: 0;
    padding: 14px 16px;
}

.member-post-create-dialog {
    width: min(760px, calc(100vw - 28px));
    padding: 24px;
    overflow: visible;
}

.member-post-create-dialog-header h2,
.member-post-create-dialog-header p {
    margin: 0;
}

.member-post-create-dialog-header .hint {
    margin-top: 6px;
}

.member-post-create-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.member-post-create-dialog .member-post-create-option {
    display: block;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d8e3df;
    border-radius: 12px;
    background: #f8fbfa;
}

.member-post-create-dialog .member-post-create-option:hover {
    border-color: var(--button-color, #1f6f5b);
    background: #eef7f3;
    box-shadow: 0 0 0 2px rgb(31 111 91 / 9%);
}

.member-post-create-option > button,
.member-post-create-dialog .member-post-create-options > a {
    display: grid;
    gap: 5px;
    width: 100%;
    min-height: 88px;
    padding: 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    text-align: left;
}

.member-post-create-option > button {
    height: 100%;
    cursor: pointer;
}

.member-post-create-option strong {
    color: var(--button-color, #1f6f5b);
    font-size: .95rem;
}

.member-post-create-option small {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 400;
    line-height: 1.4;
}

.member-post-create-option.is-finish {
    grid-column: 1 / -1;
    background: #fff;
}

.member-post-create-option.is-finish strong {
    color: var(--ink);
}

.member-athlete-deactivate-note {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff1f2;
    color: #7f1d1d;
}

.member-athlete-deactivate-note span {
    color: #9f3434;
    font-size: .86rem;
    line-height: 1.45;
}

.remove-athlete-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 560px) {
    .member-update-channel-options {
        grid-template-columns: 1fr;
    }

    .member-update-dialog form {
        padding: 20px;
    }

    .member-role-dialog .form-grid {
        grid-template-columns: 1fr;
    }

    .member-role-dialog .span-3 {
        grid-column: auto;
    }

    .member-role-dialog .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .member-post-create-options {
        grid-template-columns: 1fr;
    }

    .member-post-create-option.is-finish {
        grid-column: auto;
    }
}

.member-area-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 18px 0 0;
    padding: 7px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 8px 24px rgb(25 48 42 / 5%);
    scrollbar-width: thin;
}

.member-area-tabs a {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.member-area-tabs a:hover {
    border-color: var(--line);
    background: #f7faf9;
}

.member-area-tabs a.is-active {
    border-color: var(--selection-color);
    background: var(--selection-color);
    color: var(--selection-text-color, #fff);
}

.member-area-tabs a span {
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    border-radius: 999px;
    background: #e8eef1;
    color: #36454f;
    font-size: 11px;
}

.member-area-tabs a.is-active span {
    background: rgba(255, 255, 255, .22);
    color: inherit;
}

.member-dashboard,
.member-data-block,
.member-collapsible-block,
.profile-athlete-expenses-open,
.profile-quotas-open,
#member-facility-bookings,
.member-household-section {
    margin-top: 18px;
}

.member-dashboard-totals {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reservation-outstanding-button {
    border-top: 4px solid #8b5cf6;
}

.member-dashboard-alerts {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.member-dashboard-alert {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 70px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: 10px;
    background: #fbfcfc;
    color: var(--ink);
    text-decoration: none;
}

.member-dashboard-alert > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #edf2f3;
    font-weight: 900;
}

.member-dashboard-alert div {
    display: grid;
    gap: 3px;
}

.member-dashboard-alert small {
    color: var(--muted);
}

.member-dashboard-alert b {
    color: currentColor;
    font-size: 12px;
}

.member-dashboard-alert.is-warning { border-left-color: #f59e0b; }
.member-dashboard-alert.is-warning > span { background: #fef3c7; color: #a16207; }
.member-dashboard-alert.is-danger { border-left-color: #ef4444; }
.member-dashboard-alert.is-danger > span { background: #fee2e2; color: #b91c1c; }
.member-dashboard-alert.is-info { border-left-color: #60a5fa; }
.member-dashboard-alert.is-info > span { background: #dbeafe; color: #1d4ed8; }
.member-dashboard-alert.is-success { border-left-color: #22c55e; }
.member-dashboard-alert.is-success > span { background: #dcfce7; color: #15803d; }

.member-dashboard-household {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.member-household-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.member-household-grid.is-detailed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-household-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfc;
}

.member-household-card img,
.member-household-card > span {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #edf3f1;
    color: var(--selection-color);
    font-weight: 900;
}

.member-household-card div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.member-household-card strong,
.member-household-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-household-card small {
    color: var(--muted);
}

@media (max-width: 900px) {
    .member-dashboard-totals,
    .member-household-grid,
    .member-household-grid.is-detailed,
    .shop-age-group-grid,
    .shop-option-grid,
    .shop-enrollment-grid,
    .athlete-enrollment-cost-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .athlete-enrollment-exception-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .member-dashboard-totals,
    .member-household-grid,
    .member-household-grid.is-detailed,
    .shop-age-group-grid,
    .shop-option-grid,
    .shop-enrollment-grid,
    .athlete-enrollment-cost-preview,
    .shop-enrollment-item-options {
        grid-template-columns: 1fr;
    }

    .shop-enrollment-item-options {
        margin-left: 0;
    }

    .shop-enrollment-item-options .shop-enrollment-quantity {
        grid-column: 1;
        justify-self: start;
    }

    .shop-enrollment-item-options.with-notes,
    .shop-enrollment-item-options.with-notes.no-variants {
        grid-template-columns: 1fr;
    }

    .shop-enrollment-line-item {
        grid-template-columns: 1fr;
    }

    .shop-enrollment-line-item .shop-enrollment-item-options {
        margin-top: 10px;
    }

    .shop-enrollment-item-options.with-notes .shop-enrollment-item-note,
    .shop-enrollment-item-options.with-notes.no-variants .shop-enrollment-item-note {
        grid-column: 1;
    }

    .shop-enrollment-item-note {
        margin-left: 0;
    }

    .member-area-tabs {
        margin-inline: -2px;
        padding: 5px;
    }

    .member-dashboard-alert {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .member-dashboard-alert b {
        display: none;
    }

    .member-household-card {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .member-household-card img,
    .member-household-card > span {
        width: 48px;
        height: 48px;
    }

    .member-household-card .mini-button {
        grid-column: 1 / -1;
    }
}
.cc-reader-setup-page { max-width: 1180px; }
.cc-reader-setup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.cc-reader-setup-step {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: .85rem;
    padding: 1rem;
    border: 1px solid #d8e1df;
    border-radius: 14px;
    background: #fff;
}
.cc-reader-setup-step > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--club-button-color, #1f6f5b);
    color: #fff;
    font-weight: 800;
}
.cc-reader-setup-step h2 { margin: .1rem 0 .35rem; font-size: 1.05rem; }
.cc-reader-setup-step p { margin: 0 0 .8rem; }
.cc-reader-downloads { gap: .45rem; }
.cc-reader-test-status.is-error { color: #bd3e3e; font-weight: 700; }
.cc-reader-test-status.is-success { color: #157347; font-weight: 700; }
.cc-reader-setup-note { margin-top: 1rem; }
@media (max-width: 760px) { .cc-reader-setup-grid { grid-template-columns: 1fr; } }

.member-card-reading-panel {
    margin: 0 0 1rem;
    padding: 1rem;
    border: 1px solid #cfe0db;
    border-radius: 14px;
    background: linear-gradient(135deg, #f5fbf8, #fff);
}

.member-card-reader-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
    padding: .85rem 1rem;
    border: 1px solid #d8e1df;
    border-radius: 12px;
    background: #fbfcfc;
}

.member-card-reader-actions > div > p { margin: .2rem 0 0; }
.member-card-reader-actions form { min-width: min(100%, 420px); }
.member-card-reader-actions .row-actions { justify-content: flex-end; }
.member-card-reader-confirm-dialog { width: min(760px, calc(100% - 32px)); }
.member-card-reader-confirm-shell { padding: 22px; }
.member-card-reader-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    margin-top: 1rem;
}
.member-card-reader-compare-row {
    display: grid;
    gap: .2rem;
    padding: .65rem .75rem;
    border: 1px solid #d8e1df;
    border-radius: 9px;
    background: #fff;
}
.member-card-reader-compare-row strong { font-size: .9rem; }
.member-card-reader-compare-row span { font-size: .8rem; color: #596579; }
.member-card-reader-compare-row.is-match { border-color: #9fd8c2; background: #f1fbf5; }
.member-card-reader-compare-row.is-mismatch { border-color: #e8bc70; background: #fff8e8; }
.member-card-reader-compare-row.is-empty { background: #f7f9fa; }
.member-card-reader-extra-fields { margin-top: 1rem; }
.member-card-reader-confirm-warning { margin: 1rem 0 0; }

@media (max-width: 760px) {
    .member-card-reader-actions { align-items: stretch; flex-direction: column; }
    .member-card-reader-actions form { min-width: 0; }
    .member-card-reader-actions .row-actions { justify-content: flex-start; }
    .member-card-reader-compare { grid-template-columns: 1fr; }
}

.member-card-reading-head h3 { margin: 0 0 .2rem; }
.member-card-reading-head p { margin: 0; }
.member-card-reader-status { margin: .65rem 0 0; }
.member-card-reader-status.is-error { color: #bd3e3e; font-weight: 700; }
.member-card-reader-status.is-loading { color: var(--club-button-color, #1f6f5b); font-weight: 700; }
.cc-verified-field > input[readonly],
.cc-verified-field > select:disabled {
    background: #eefaf4;
    border-color: #9fd8c2;
    color: #195e45;
    opacity: 1;
}
.cc-verified-field::after {
    content: 'Confirmado pelo CC';
    display: block;
    margin-top: .22rem;
    color: #207353;
    font-size: .72rem;
    font-weight: 700;
}
.member-card-reading-empty { margin-bottom: 0; }

.member-card-reading-list {
    display: grid;
    gap: .65rem;
    margin-top: 1rem;
}

.member-card-reading-entry {
    border: 1px solid #d8e1df;
    border-radius: 11px;
    background: #fff;
}

.member-card-reading-entry > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem .85rem;
    cursor: pointer;
    list-style: none;
}

.member-card-reading-entry > summary::-webkit-details-marker { display: none; }
.member-card-reading-entry > summary small { display: block; margin-top: .15rem; color: #667085; }

.member-card-reading-body {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: .85rem;
    border-top: 1px solid #e3ebe8;
}

.member-card-reading-body .detail-grid { flex: 1 1 auto; }
.member-card-reading-photo {
    width: 80px;
    min-width: 80px;
    height: 104px;
    object-fit: cover;
    border: 1px solid #cfdad6;
    border-radius: 7px;
    background: #f5f7f6;
}

@media (max-width: 640px) {
    .member-card-reading-body { flex-direction: column; }
}

.member-document-upload,
.member-document-validation,
.member-document-removal {
    margin-top: 1rem;
    border: 1px solid #d8e1df;
    border-radius: 12px;
    background: #fbfcfc;
}

.member-document-upload > summary,
.member-document-validation > summary,
.member-document-removal > summary {
    padding: .85rem 1rem;
    cursor: pointer;
    font-weight: 700;
    color: var(--club-button-color, #1f6f5b);
}

.member-document-form,
.member-document-validation-form,
.member-document-reject-form,
.member-document-removal form {
    padding: 0 1rem 1rem;
}

.member-document-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.member-document-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid #d8e1df;
    border-radius: 14px;
    background: #fff;
}

.member-document-review-list {
    grid-template-columns: 1fr;
}

.member-document-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.member-document-card-head h3 {
    margin: 0 0 .2rem;
}

.member-document-card .row-actions {
    margin-top: .75rem;
}

.member-document-removal-review,
.member-document-validation {
    margin-top: .85rem;
}

.member-document-validation > p {
    padding: 0 1rem;
}

.member-document-ocr-preview {
    margin: .9rem 1rem 0;
    padding-top: .9rem;
    border-top: 1px solid #e3ebe8;
}

.member-document-ocr-preview h4 {
    margin: 0;
}

.member-document-ocr-preview .hint {
    margin: .25rem 0 .7rem;
}

.member-document-ocr-preview-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    max-width: 760px;
}

.member-document-ocr-preview-images a {
    display: block;
    overflow: hidden;
    border: 1px solid #d8e1df;
    border-radius: 10px;
    color: inherit;
    background: #fff;
    text-decoration: none;
}

.member-document-ocr-preview-images img {
    display: block;
    width: 100%;
    aspect-ratio: 1.58 / 1;
    object-fit: contain;
    background: #f4f7f6;
}

.member-document-ocr-preview-images span {
    display: block;
    padding: .42rem .7rem;
    border-top: 1px solid #e3ebe8;
    font-weight: 750;
    text-align: center;
}

@media (max-width: 640px) {
    .member-document-ocr-preview-images { grid-template-columns: 1fr; }
}

.member-document-reject-form {
    margin-top: .75rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e9e8;
}

.compact-detail-grid {
    margin-top: .75rem;
}

.choice-line {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
}

.choice-line input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: .15rem;
}

.member-document-crop-dialog {
    width: min(960px, calc(100vw - 2rem));
    max-width: 960px;
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(15, 43, 36, .28);
}

.member-document-crop-dialog::backdrop {
    background: rgba(12, 29, 25, .7);
}

.member-document-crop-shell {
    padding: 1.1rem;
}

.member-document-crop-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.member-document-crop-head h2 {
    margin: 0 0 .2rem;
}

.member-document-crop-side {
    display: inline-flex;
    margin: .75rem 0;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: #e7f3ef;
    color: var(--club-button-color, #1f6f5b);
    font-size: .85rem;
    font-weight: 800;
}

.member-document-crop-stage {
    display: grid;
    min-height: 260px;
    max-height: calc(100vh - 300px);
    place-items: center;
    overflow: auto;
    padding: .6rem;
    border-radius: 12px;
    background: #17221f;
}

.member-document-crop-stage canvas {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 325px);
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}

.member-document-crop-help {
    margin: .65rem 0 0;
}

.member-document-crop-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .6rem;
    margin-top: 1rem;
}

@media (max-width: 720px) {
    .member-document-list {
        grid-template-columns: 1fr;
    }

    .member-document-crop-dialog {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }

    .member-document-crop-shell {
        padding: .8rem;
    }

    .member-document-crop-actions > button {
        flex: 1 1 100%;
    }
}
.public-membership-review-card {
    display: grid;
    gap: 22px;
    padding: 20px;
    border: 1px solid var(--border, #d8e1dd);
    border-radius: 14px;
    background: #f8faf9;
}

.public-membership-review-data input[readonly],
.public-membership-review-data textarea[readonly] {
    color: #263d36;
    background: #ffffff;
}

.public-membership-review-actions {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.public-membership-review-actions form {
    margin: 0;
}

.public-membership-review-actions form:first-child {
    flex: 1 1 min(460px, 100%);
}

.public-membership-duplicate-check {
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #d5e3dc;
    border-radius: 10px;
    background: #fff;
}

.public-membership-duplicate-check legend {
    padding: 0 5px;
    color: #176d55;
    font-weight: 800;
}

.public-membership-duplicate-check .hint {
    margin: 0 0 3px;
}

.public-membership-duplicate-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #e0e8e4;
    border-radius: 8px;
    cursor: pointer;
}

.public-membership-duplicate-option:hover {
    border-color: #83b8a5;
    background: #f3faf6;
}

.public-membership-duplicate-option input {
    width: auto;
    margin: 4px 0 0;
}

.public-membership-duplicate-option span {
    display: grid;
    gap: 2px;
}

.public-membership-duplicate-option small {
    color: #63736c;
}

.public-membership-reject-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.public-membership-reject-form label {
    min-width: min(360px, 70vw);
}

.public-membership-reject-form textarea {
    min-height: 48px;
}

@media (max-width: 720px) {
    .public-membership-review-actions,
    .public-membership-reject-form {
        align-items: stretch;
        flex-direction: column;
    }

    .public-membership-reject-form label {
        min-width: 0;
    }
}

.member-card-settings-form {
    align-items: start;
}

.member-card-template-field {
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.member-card-template-preview {
    display: grid;
    gap: 10px;
}

.member-card-template-preview img {
    aspect-ratio: 85.6 / 54;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: block;
    max-width: 280px;
    object-fit: cover;
    width: 100%;
}

.socio-card-selector {
    align-items: end;
}

.socio-card-preview-section {
    overflow: visible;
}

.socio-card-print-area {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.socio-card-face {
    aspect-ratio: 85.6 / 54;
    background: #fff;
    border: 1px solid rgba(16, 32, 42, .18);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(20, 35, 45, .14);
    height: 54mm;
    overflow: hidden;
    position: relative;
    width: 85.6mm;
}

.socio-card-bg-image {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: fill;
    position: absolute;
    width: 100%;
    z-index: 0;
}

.socio-card-photo {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
    display: flex;
    height: 24mm;
    justify-content: center;
    right: 4mm;
    overflow: hidden;
    position: absolute;
    top: 4mm;
    width: 20mm;
    z-index: 1;
}

.socio-card-photo img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.socio-card-photo span {
    color: #172026;
    font-size: 18px;
    font-weight: 900;
}

.socio-card-identification {
    bottom: 5mm;
    color: #fff;
    max-width: 58mm;
    position: absolute;
    right: 5mm;
    text-align: right;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .65);
    z-index: 1;
}

.socio-card-identification span {
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.socio-card-identification strong {
    display: block;
    font-size: 14px;
    font-weight: 950;
    line-height: 1.08;
}

.member-document-validation-form .cc-number-valid {
    border-color: #1e9d70;
    box-shadow: 0 0 0 2px rgba(30, 157, 112, .12);
}

.member-document-validation-form .cc-number-invalid {
    border-color: #d64045;
    box-shadow: 0 0 0 2px rgba(214, 64, 69, .12);
}

.cc-document-check-state {
    margin: -4px 0 4px;
}

.cc-document-check-state.is-valid { color: #13795b; }
.cc-document-check-state.is-invalid { color: #ba2f35; font-weight: 700; }
.cc-document-check-state.is-pending { color: #8a6414; }
