/* Plyvo stylesheet layer 4. Load in the order declared in views/layout/head.php. */
.list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.list button.selected {
  border-color: var(--primary);
  color: var(--primary-strong);
  background: var(--primary-soft-hover);
}

.list .danger { margin-left: auto; }

/* Kanban uses the same Plyvo admin surfaces as the surrounding platform pages. */
.kanban-board-grid { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; margin-top: 18px; padding: 2px 2px 13px; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-color: color-mix(in srgb, var(--primary) 34%, var(--border)) transparent; scrollbar-width: thin; }
.kanban-board-grid::-webkit-scrollbar { height: 9px; }
.kanban-board-grid::-webkit-scrollbar-track { border-radius: 999px; background: color-mix(in srgb, var(--surface-subtle) 72%, transparent); }
.kanban-board-grid::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--primary) 34%, var(--border)); background-clip: padding-box; }
.app-content:has(#platformTasksPage:not([hidden])) > .content-header > div:first-child { display: none; }
.kanban-board-shell { overflow: hidden; padding: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, #d9f6f1), var(--surface) 48%, color-mix(in srgb, var(--surface) 90%, #cce9e7)); }
.kanban-board-shell > .section-heading { padding: 20px 22px 14px; }
.kanban-board-toolbar { display: flex; align-items: center; gap: 9px; }
.kanban-board-toolbar #kanbanNewTask { min-height: 34px; padding: 7px 12px; }
.kanban-board-inline-title button { display: inline-flex; padding: 2px 5px; border: 0; border-radius: 7px; color: inherit; background: transparent; font: inherit; line-height: inherit; }
.kanban-board-inline-title input { width: min(420px, 65vw); min-height: 38px; padding: 5px 9px; color: var(--ink); background: var(--surface); font: inherit; }
.kanban-board-inline-title [hidden] { display: none; }
.kanban-edit-mode-hint { display: flex; align-items: center; gap: 9px; margin: 0 22px 4px; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border)); border-radius: 10px; color: var(--text-muted); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); font-size: .7rem; }
.kanban-edit-mode-hint[hidden] { display: none; }
.kanban-edit-mode-hint strong { color: var(--primary-strong, var(--ink)); }
.kanban-board-shell.is-editing { box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 28%, transparent), var(--shadow-sm); }
.kanban-board-shell.is-editing .kanban-board-inline-title button { outline: 1px dashed color-mix(in srgb, var(--primary) 42%, var(--border)); cursor: text; }
.kanban-column { min-width: 220px; min-height: 150px; flex: 0 0 max(220px, calc((100% - 36px) / 4)); margin: 0; padding: 0 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 74%, transparent); box-shadow: var(--shadow-sm); scroll-snap-align: start; transition: outline-color .16s ease, transform .16s ease, background-color .16s ease; }
.kanban-column-banner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 13px 11px; border-radius: 13px 13px 8px 8px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 13%, var(--surface)), color-mix(in srgb, var(--surface) 95%, #d9f6f1)); }
.kanban-column-banner h3 { margin: 0; color: var(--ink); font-size: .88rem; }
.kanban-column-edit-trigger { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border: 1px dashed color-mix(in srgb, var(--primary) 38%, var(--border)); border-radius: 9px; color: var(--ink); background: color-mix(in srgb, var(--surface) 74%, transparent); text-align: left; }
.kanban-column-edit-trigger strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-column-edit-trigger small { color: var(--text-muted); font-size: .62rem; font-weight: 700; }
.kanban-board-shell.is-editing .kanban-column { cursor: grab; user-select: none; }
.kanban-board-shell.is-editing .kanban-column:active { cursor: grabbing; }
.kanban-board-shell.is-editing .kanban-column.is-column-dragging { opacity: .45; }
.kanban-board-shell.is-editing .kanban-column.is-column-drag-target { outline: 2px dashed var(--primary); outline-offset: 3px; transform: translateY(-2px); }
.kanban-board-shell.is-editing .kanban-task { opacity: .68; cursor: default; pointer-events: none; }
.kanban-column-count { display: inline-grid; min-width: 24px; height: 24px; place-items: center; padding: 0 7px; border: 1px solid color-mix(in srgb, var(--border) 75%, transparent); border-radius: 999px; color: var(--text-muted); background: color-mix(in srgb, var(--surface) 84%, transparent); font-size: .68rem; font-weight: 800; }
.kanban-column[data-color="teal"] { border-top: 3px solid #20b8aa; background: linear-gradient(180deg, color-mix(in srgb, #20b8aa 11%, var(--surface-subtle)), var(--surface-subtle) 55%); }
.kanban-column[data-color="blue"] { border-top: 3px solid #5b8def; background: linear-gradient(180deg, color-mix(in srgb, #5b8def 11%, var(--surface-subtle)), var(--surface-subtle) 55%); }
.kanban-column[data-color="violet"] { border-top: 3px solid #8174e8; background: linear-gradient(180deg, color-mix(in srgb, #8174e8 11%, var(--surface-subtle)), var(--surface-subtle) 55%); }
.kanban-column[data-color="amber"] { border-top: 3px solid #e9a83b; background: linear-gradient(180deg, color-mix(in srgb, #e9a83b 13%, var(--surface-subtle)), var(--surface-subtle) 55%); }
.kanban-column[data-color="rose"] { border-top: 3px solid #df7690; background: linear-gradient(180deg, color-mix(in srgb, #df7690 11%, var(--surface-subtle)), var(--surface-subtle) 55%); }
.kanban-column[data-color="green"] { border-top: 3px solid #44b88a; background: linear-gradient(180deg, color-mix(in srgb, #44b88a 11%, var(--surface-subtle)), var(--surface-subtle) 55%); }
.kanban-column .section-heading { align-items: center; margin-bottom: 11px; }
.kanban-column h3 { margin: 0; color: var(--ink); font-size: .88rem; }
.kanban-column .section-heading button { min-width: 30px; padding: 4px 8px; }
.kanban-task { display: grid; gap: 5px; margin-top: 8px; padding: 11px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-sm); cursor: grab; transition: opacity .16s ease, transform .16s ease, box-shadow .16s ease; }
.kanban-task.has-unread-activity { position: relative; border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 10%, transparent), var(--shadow-sm); }
.kanban-task-unread { position: absolute; top: -7px; right: -7px; display: grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border: 2px solid var(--surface); border-radius: 999px; color: #fff; background: var(--primary); font-size: .61rem; font-weight: 900; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.kanban-task:hover { transform: translateY(-1px); box-shadow: var(--shadow-md, var(--shadow-sm)); }
.kanban-task:active { cursor: grabbing; }
.kanban-task.is-dragging { opacity: .45; }
.kanban-task.is-saving { opacity: .58; pointer-events: none; }
.kanban-column.is-drag-target { outline: 2px dashed var(--primary, #0d5c5b); outline-offset: 4px; transform: translateY(-2px); }
.kanban-column-empty { margin: 11px 2px 0; padding: 18px 8px; border: 1px dashed color-mix(in srgb, var(--border) 82%, transparent); border-radius: 10px; color: var(--text-muted); text-align: center; font-size: .72rem; }
.kanban-empty-board { grid-column: 1 / -1; margin: 0; padding: 28px; color: var(--text-muted); text-align: center; }
.kanban-task strong { color: var(--ink); font-size: .82rem; line-height: 1.3; }
.kanban-task small { color: var(--text-muted); font-size: .68rem; text-transform: capitalize; }
.kanban-task-preview { display: -webkit-box; overflow: hidden; margin: 2px 0 1px; color: var(--text-muted); font-size: .72rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.kanban-task:focus-visible { outline: 2px solid var(--primary, #0d5c5b); outline-offset: 2px; }
.access-dialog.kanban-task-dialog { width: min(1180px, calc(100% - 24px)); max-height: calc(100vh - 24px); }
.kanban-task-dialog .access-dialog-panel { box-sizing: border-box; overflow: hidden; width: 100%; max-height: calc(100vh - 24px); padding: 24px; }
.kanban-task-heading { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.kanban-task-heading-actions { display: flex; align-items: center; gap: 12px; }
.kanban-save-state { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); background: var(--surface-subtle); font-size: .68rem; font-weight: 750; white-space: nowrap; }
.kanban-save-state > span { width: 7px; height: 7px; border-radius: 50%; background: #42b883; box-shadow: 0 0 0 3px color-mix(in srgb, #42b883 14%, transparent); }
.kanban-save-state[data-state="dirty"] > span { background: #e9a83b; box-shadow: 0 0 0 3px color-mix(in srgb, #e9a83b 16%, transparent); }
.kanban-save-state[data-state="saving"] > span { background: #5b8def; box-shadow: 0 0 0 3px color-mix(in srgb, #5b8def 16%, transparent); animation: kanban-save-pulse 1s ease-in-out infinite; }
.kanban-save-state[data-state="error"] { color: var(--danger, #b42318); }
.kanban-save-state[data-state="error"] > span { background: var(--danger, #b42318); box-shadow: none; }
@keyframes kanban-save-pulse { 50% { opacity: .35; } }
.kanban-inline-title { min-width: min(480px, 65vw); }
.kanban-inline-title button { display: inline-block; max-width: 100%; padding: 2px 4px; border: 0; border-radius: 7px; color: inherit; background: transparent; font: inherit; line-height: inherit; text-align: left; cursor: text; }
.kanban-inline-title button:hover { background: var(--surface-subtle); }
.kanban-inline-title button:focus-visible { outline: 2px solid var(--primary, #0d5c5b); outline-offset: 2px; }
.kanban-inline-title input { width: 100%; min-height: 0; padding: 2px 4px; border: 1px solid var(--primary, #0d5c5b); border-radius: 7px; color: inherit; background: var(--surface); font: inherit; line-height: inherit; }
.kanban-inline-title [hidden] { display: none; }
.kanban-task-workspace > .access-form { display: flex; min-width: 0; min-height: 560px; flex-direction: column; gap: 16px; }
.kanban-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kanban-field-heading small { color: var(--text-muted); font-size: .66rem; font-weight: 600; }
.kanban-description-field { display: grid; gap: 7px; color: var(--text-muted); font-size: .73rem; font-weight: 750; }
.kanban-task-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kanban-task-fields > label { display: grid; min-width: 0; gap: 7px; padding: 11px 12px 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text-muted); background: color-mix(in srgb, var(--surface-subtle) 82%, transparent); font-size: .7rem; font-weight: 750; }
.kanban-task-fields > label > select,
.kanban-task-fields > label > input { width: 100%; background-color: var(--surface); }
.kanban-status-control { display: flex; align-items: center; gap: 7px; }
.kanban-status-control select { flex: 1; min-width: 0; }
.kanban-status-control button { display: inline-grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; padding: 0; border-color: color-mix(in srgb, var(--primary, #0d5c5b) 30%, var(--border)); color: var(--primary, #0d5c5b); background: color-mix(in srgb, var(--primary, #0d5c5b) 8%, var(--surface)); font-size: 1.15rem; }
.kanban-status-control button:hover:not(:disabled) { transform: translateX(1px); background: color-mix(in srgb, var(--primary, #0d5c5b) 14%, var(--surface)); }
.kanban-status-control button:disabled { opacity: .35; cursor: not-allowed; }
.kanban-task-dialog textarea { min-height: 145px; resize: vertical; background: color-mix(in srgb, var(--surface) 94%, var(--surface-subtle)); }
.kanban-task-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; min-height: 0; }
.kanban-task-actions { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.kanban-task-actions .kanban-archive-task { margin-right: auto; color: var(--danger, #b42318); background: color-mix(in srgb, var(--danger, #b42318) 6%, var(--surface)); }
.kanban-task-activity { min-width: 0; padding: 18px; border: 1px solid color-mix(in srgb, var(--border) 88%, transparent); border-radius: 15px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface-subtle) 88%, #d9f6f1), var(--surface)); }
.kanban-task-activity-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.kanban-task-activity-heading h3 { margin: 3px 0 0; color: var(--ink); font-size: 1rem; }
.kanban-task-activity-heading > button { padding: 5px 8px; border: 0; color: var(--text-muted); background: transparent; font-size: .68rem; }
.kanban-event-count { display: inline-grid; min-width: 22px; height: 22px; place-items: center; margin-left: 5px; padding: 0 6px; border-radius: 999px; color: var(--primary, #0d5c5b); background: color-mix(in srgb, var(--primary, #0d5c5b) 10%, var(--surface)); font-size: .65rem; vertical-align: middle; }
.kanban-activity-filters { display: flex; gap: 5px; margin-bottom: 16px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.kanban-activity-filters button { flex: 1; padding: 6px 7px; border: 0; border-radius: 7px; color: var(--text-muted); background: transparent; font-size: .66rem; }
.kanban-activity-filters button[aria-pressed="true"] { color: var(--ink); background: color-mix(in srgb, var(--primary, #0d5c5b) 11%, var(--surface)); font-weight: 800; }
.kanban-task-activity ol { display: grid; gap: 0; max-height: 390px; overflow-y: auto; margin: 0; padding: 0 4px 0 0; list-style: none; scrollbar-width: thin; }
.kanban-task-activity.is-collapsed .kanban-activity-filters,
.kanban-task-activity.is-collapsed ol { display: none; }
.kanban-task-event { position: relative; display: grid; gap: 3px; margin-left: 7px; padding: 0 0 18px 20px; border-left: 1px solid var(--border); }
.kanban-task-event::before { position: absolute; top: 3px; left: -5px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--primary, #0d5c5b); content: ''; }
.kanban-task-event:last-child { padding-bottom: 2px; }
.kanban-task-event strong { color: var(--ink); font-size: .78rem; line-height: 1.35; }
.kanban-task-event span { color: var(--text-muted); font-size: .7rem; line-height: 1.4; }
.kanban-task-event-empty { padding: 18px 10px; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-muted); font-size: .75rem; text-align: center; }
.kanban-assignees-field { position: relative; min-width: 0; margin: 0; padding: 11px 12px 12px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--surface-subtle) 82%, transparent); }
.kanban-assignees-field legend { padding: 0; color: var(--text-muted); font-size: .7rem; font-weight: 750; }
.kanban-assignee-toggle { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: space-between; gap: 9px; padding: 9px 11px; color: var(--ink); background: var(--surface); text-align: left; }
.kanban-assignee-toggle::after { margin-left: auto; color: var(--text-muted); content: '⌄'; }
.kanban-assignee-count { display: inline-grid; min-width: 22px; height: 22px; place-items: center; padding: 0 6px; border-radius: 999px; color: var(--primary, #0d5c5b); background: color-mix(in srgb, var(--primary, #0d5c5b) 10%, var(--surface)); font-size: .65rem; }
.kanban-assignee-menu { position: absolute; z-index: 4; top: calc(100% - 7px); right: 12px; left: 12px; display: grid; max-height: 210px; overflow-y: auto; padding: 7px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); box-shadow: 0 14px 32px rgba(0, 45, 49, .16); }
.kanban-assignee-menu[hidden] { display: none; }
.kanban-assignee-menu label { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 8px; color: var(--ink); font-size: .74rem; cursor: pointer; }
.kanban-assignee-menu label:hover { background: var(--surface-subtle); }
.kanban-assignee-menu input { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: var(--primary, #0d5c5b); }
.kanban-assignee-chips { display: flex; min-height: 0; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.kanban-assignee-chips:empty { display: none; }
.kanban-assignee-chip { padding: 4px 7px; border-radius: 999px; color: var(--primary-strong, #073f42); background: color-mix(in srgb, var(--primary, #0d5c5b) 11%, var(--surface)); font-size: .64rem; font-weight: 750; }
.kanban-task-chat { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-subtle); }
.kanban-task-chat-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kanban-task-chat-heading h3 { margin: 2px 0 0; color: var(--ink); font-size: .92rem; }
.kanban-task-comments { display: grid; gap: 8px; max-height: 150px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.kanban-task-comment { display: grid; gap: 3px; max-width: 88%; padding: 9px 11px; border-radius: 12px 12px 12px 3px; color: var(--ink); background: var(--surface); font-size: .73rem; line-height: 1.45; }
.kanban-task-comment span { color: var(--text-muted); font-size: .62rem; }
.kanban-task-comment-empty { padding: 10px 0; color: var(--text-muted); font-size: .71rem; }
.kanban-comment-composer { display: grid; gap: 6px; }
.kanban-comment-composer > label { color: var(--text-muted); font-size: .68rem; font-weight: 750; }
.kanban-comment-composer > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.kanban-task-dialog .kanban-comment-composer textarea { min-height: 58px; padding: 9px 10px; resize: vertical; }
.kanban-comment-composer button { min-height: 42px; }
.kanban-comment-composer small { color: var(--text-muted); font-size: .63rem; }
.kanban-board-actions { margin-left: auto; }
.kanban-board-actions summary { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: var(--text); background: var(--surface); cursor: pointer; font-size: 1.15rem; font-weight: 800; list-style: none; }
.kanban-board-actions summary::-webkit-details-marker { display: none; }
.kanban-board-actions .roster-action-popover { right: 0; left: auto; min-width: 160px; }
.kanban-board-actions .roster-action-popover button { display: block; width: 100%; padding: 9px 11px; border: 0; border-radius: 7px; background: transparent; text-align: left; }
.kanban-board-actions .roster-action-popover button:hover { background: var(--surface-subtle); }
#kanbanMessage:empty { display: none; }
#kanbanMessage[data-type="error"] { color: var(--danger, #b42318); }
#kanbanMessage[data-type="success"] { color: var(--success, #18794e); }
#kanbanTaskMessage:empty { display: none; }
#kanbanTaskMessage:not(:empty) { margin: 0; padding: 9px 11px; border-radius: 9px; background: var(--surface-subtle); }
#kanbanBoardSelect { min-width: 170px; }
@media (max-width: 900px) { .kanban-column { flex-basis: max(230px, calc((100% - 12px) / 2)); } }
@media (max-width: 560px) { .kanban-column { flex-basis: min(86vw, 300px); } #kanbanBoardSelect { min-width: 0; max-width: 100%; } }
@media (max-width: 560px) { .kanban-task-fields { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .kanban-task-dialog .access-dialog-panel { overflow-y: auto; } .kanban-task-workspace { grid-template-columns: 1fr; } .kanban-task-workspace > .access-form { min-height: 0; } .kanban-task-activity { padding: 16px; } .kanban-inline-title { min-width: 0; } .kanban-save-state { display: none; } }
.inline-form,
.player-form { margin-top: 16px; padding: 15px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-subtle); }
.roster-picker { align-items: center; }
.roster-picker select { min-width: min(320px, 100%); }
.members-card { max-width: 1040px; }
.club-settings-form { display: grid; gap: 16px; }
.club-settings-intro { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.club-settings-intro h2 { margin: 3px 0 5px; color: var(--ink); }
.club-settings-intro p { margin-bottom: 0; }
.club-settings-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.club-settings-layout > .card { margin-top: 0; }
.club-settings-layout > .card:nth-child(2) { grid-row: span 2; }
.club-venue-list { display: grid; gap: 10px; margin-top: 14px; }
.club-venue-row { display: grid; grid-template-columns: minmax(145px, 1fr) 82px auto auto; align-items: end; gap: 9px; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-subtle); }
.club-venue-row label { display: grid; min-width: 0; gap: 5px; color: var(--text-muted); font-size: .72rem; font-weight: 750; }
.club-venue-name { grid-column: 1; grid-row: 1; }
.club-venue-courts { grid-column: 2; grid-row: 1; }
.club-venue-default { grid-column: 3; grid-row: 1; }
.club-venue-actions { grid-column: 4; grid-row: 1; align-self: end; }
.club-venue-row { position: relative; z-index: 0; }
.club-venue-row:has(.club-venue-actions[open]) { z-index: 12; }
.club-venue-address-choice { display: flex; grid-column: 1 / -1; grid-row: 2; align-items: center; gap: 10px; min-width: 0; }
.club-venue-address-toggle { display: flex !important; align-items: center; gap: 6px !important; color: var(--text) !important; white-space: nowrap; }
.club-venue-address-toggle input { width: auto; min-height: auto; }
.club-venue-inherited-address { overflow: hidden; color: var(--text-muted); font-size: .65rem; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.club-venue-address { grid-column: 1 / -1; grid-row: 3; }
.club-venue-default { display: flex !important; align-items: center; align-self: center; gap: 6px !important; white-space: nowrap; }
.club-venue-default input { width: auto; }
.club-settings-savebar { position: sticky; z-index: 8; bottom: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
.club-settings-savebar .form-message { margin-right: auto; }
.member-roles-card { margin-bottom: 16px; }
.member-level-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.member-level-grid label { display: grid; gap: 5px; color: var(--text-muted); font-size: .78rem; font-weight: 750; }
#memberDialog { width: min(820px, calc(100% - 24px)); }
.member-profile-form fieldset { padding: 15px; }
.member-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.member-profile-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-subtle); }
.member-profile-link > span { display: grid; gap: 3px; }
.member-profile-link small { color: var(--text-muted); font-size: .66rem; line-height: 1.35; }
.member-profile-status { width: fit-content; padding: 4px 8px; border-radius: 999px; color: var(--primary-strong); background: var(--primary-soft); font-size: .72rem; }
.member-profile-status[data-status="invited"] { color: #9a6400; background: color-mix(in srgb, #f5aa18 18%, var(--surface)); }
.member-profile-status[data-status="linked"] { color: #087a6c; background: color-mix(in srgb, #13b9a5 16%, var(--surface)); }
.member-profile-link button { align-self: center; }
.member-profile-grid label,
.member-advanced fieldset > label { display: grid; min-width: 0; gap: 5px; color: var(--text-muted); font-size: .78rem; font-weight: 750; }
.member-profile-grid label .field-help { color: var(--text-muted); font-size: .7rem; font-weight: 500; line-height: 1.35; }
.member-field-wide { grid-column: 1 / -1; }
.member-field-hint { margin: -2px 0 8px; }
.member-advanced { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-subtle); }
.member-advanced > summary { padding: 13px 15px; cursor: pointer; color: var(--ink); }
.member-advanced > summary > span { display: inline-grid; gap: 2px; margin-left: 4px; vertical-align: middle; }
.member-advanced > summary small { color: var(--text-muted); font-weight: 500; }
.member-advanced[open] > summary { border-bottom: 1px solid var(--border); }
.member-advanced-body { display: grid; gap: 12px; padding: 14px; }
.member-advanced-body fieldset { background: var(--surface); }
.member-consent { display: grid !important; grid-template-columns: auto 1fr; align-items: start; }
.member-profile-form textarea { width: 100%; min-height: 76px; resize: vertical; }
#memberRoster td:last-child,
#roster td:last-child { white-space: nowrap; }
.member-name-cell { min-width: 0; }
.member-display-name { font-weight: 650; }
.member-role-markers { display: inline-flex; align-items: center; gap: 4px; margin-left: 7px; vertical-align: middle; }
.member-profile-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: -3px 0 12px; color: var(--text-muted); font-size: .68rem; font-weight: 650; }
.member-profile-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.member-profile-marker { display: inline-grid; width: 18px; height: 18px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-style: normal; font-size: .65rem; font-weight: 900; line-height: 1; }
.member-profile-marker.is-linked { color: #31c8a5; background: color-mix(in srgb, #31c8a5 10%, transparent); }
.member-profile-marker.is-invited { color: #f2ad37; background: color-mix(in srgb, #f2ad37 10%, transparent); }
.member-profile-marker.is-local { color: var(--text-muted); }
.member-role-marker { display: inline-grid; width: 19px; height: 19px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: .62rem; font-weight: 900; line-height: 1; }
.member-role-marker.is-primary,
.member-role-marker.is-admin { border-color: transparent; font-size: .9rem; }
.member-role-marker.is-primary { color: #f5b82e; filter: drop-shadow(0 1px 4px #f5b82e55); }
.member-role-marker.is-admin { color: #aab2c0; filter: drop-shadow(0 1px 3px #aab2c055); }
.member-role-marker.is-trainer { color: #58b9ff; }
.member-role-marker.is-helper { color: #38c9a7; }
.roster-action-menu { position: relative; display: inline-block; }
.roster-action-menu > summary { display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid var(--border); border-radius: 11px; color: var(--text); background: var(--surface-raised); font-size: 1.25rem; line-height: 1; cursor: pointer; list-style: none; }
.roster-action-menu > summary::-webkit-details-marker { display: none; }
.roster-action-menu[open] > summary { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.roster-action-popover { position: absolute; z-index: 8; top: calc(100% + 6px); right: 0; display: grid; width: 178px; gap: 4px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); box-shadow: var(--shadow); }
.roster-action-popover.is-platform-portal { position: fixed; z-index: 1000; }
#roster tr { position: relative; z-index: 0; }
#roster tr:has(.roster-action-menu[open]) { z-index: 20; }
#roster td:has(.roster-action-menu[open]) { position: relative; z-index: 21; }
.roster-action-menu[open] { z-index: 22; }
#roster tr:nth-last-child(-n + 2) .roster-action-popover { top: auto; bottom: calc(100% + 6px); }
.roster-action-popover button { width: 100%; justify-content: flex-start; border-color: transparent; text-align: left; }
.roster-action-popover .danger { color: var(--danger); }

.access-layout {
  width: min(860px, 100%);
}

.access-layout > .card { margin-top: 0; }
.access-user-list { display: grid; gap: 9px; margin-top: 17px; }

.permission-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 15px;
}

.permission-summary span { display: grid; padding: 9px 10px; border-radius: 10px; color: var(--text-muted); background: var(--surface-subtle); font-size: .7rem; }
.permission-summary strong { color: var(--ink); font-size: .73rem; }

.access-user {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-subtle);
}

.access-user > div { display: grid; min-width: 0; gap: 2px; }
.access-user-name { display: flex !important; align-items: center; gap: 7px; }
.primary-contact-star { color: #f5b82e; font-size: .9rem; line-height: 1; filter: drop-shadow(0 1px 4px #f5b82e55); }
.access-user small { overflow: hidden; color: var(--text-muted); font-size: .75rem; text-overflow: ellipsis; }
.role-badges { display: flex !important; gap: 5px !important; flex-wrap: wrap; margin-top: 6px; }
.role-badges span { padding: 3px 7px; border-radius: 999px; color: var(--primary-strong); background: var(--primary-soft); font-size: .66rem; font-weight: 750; }

.access-dialog {
  width: min(700px, calc(100% - 24px));
  max-width: none;
  max-height: min(90vh, 860px);
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--text);
  background: transparent;
}

.access-dialog::backdrop {
  background: rgba(8, 12, 24, .72);
  backdrop-filter: blur(8px);
}

.access-dialog-panel {
  max-height: min(90vh, 860px);
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
}

.club-profile-dialog { width: min(900px, calc(100% - 24px)); }
.club-profile-form fieldset { padding: 15px; }
.club-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.club-profile-grid label { display: grid; min-width: 0; gap: 5px; color: var(--text-muted); font-size: .78rem; font-weight: 750; }
.club-profile-grid label > small { font-weight: 500; line-height: 1.4; }
.club-field-wide { grid-column: 1 / -1; }
.club-profile-grid textarea { width: 100%; min-height: 82px; resize: vertical; }

.dialog-heading { align-items: center; }
.dialog-close {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--surface-subtle);
  font-size: 1.4rem;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--ink);
  background: var(--primary-soft);
}

.access-form { display: grid; gap: 13px; margin-top: 18px; }
.access-form > label { display: grid; gap: 5px; color: var(--text-muted); font-size: .78rem; font-weight: 750; }
.access-form > label small { color: var(--text-muted); font-weight: 500; line-height: 1.45; }
.access-source-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 5px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-subtle); }
.access-source-switch button { border-color: transparent; color: var(--text-muted); background: transparent; box-shadow: none; }
.access-source-switch button.selected { border-color: var(--primary); color: var(--primary-strong); background: var(--primary-soft); }
.access-form input[readonly] { color: var(--text-muted); background: var(--surface-subtle); cursor: default; }
.access-form fieldset { display: grid; gap: 8px; margin: 0; padding: 13px; border: 1px solid var(--border); border-radius: 13px; }
.access-form legend { padding: 0 5px; color: var(--ink); font-size: .8rem; font-weight: 800; }
.role-choice { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; font-weight: 750; }
.role-choice small { grid-column: 2; color: var(--text-muted); font-weight: 500; }
.team-role-editor { display: grid; gap: 8px; }
.team-role-row { display: grid; gap: 7px; padding: 10px; border-radius: 10px; background: var(--surface-subtle); }
.team-role-row > div { display: flex; gap: 7px; flex-wrap: wrap; }
.role-chip { display: flex; gap: 5px; align-items: center; padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .72rem; font-weight: 700; }
.form-actions { display: flex; gap: 8px; }
.form-message { min-height: 20px; margin: 0; color: var(--primary-strong); font-size: .8rem; font-weight: 700; }

.staff-reset-panel {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-subtle);
}

.staff-reset-panel > span { display: grid; gap: 4px; }
.staff-reset-panel strong { color: var(--ink); font-size: .82rem; }
.staff-reset-panel small { color: var(--text-muted); font-size: .72rem; line-height: 1.4; }
.staff-reset-panel button { flex: 0 0 auto; }

.auth-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  overflow: auto;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 20% 10%, rgba(79, 70, 229, .33), transparent 28rem), #0b1020;
}

.auth-card {
  width: min(440px, 100%);
  padding: 30px;
  border: 1px solid #303a50;
  border-radius: 22px;
  color: #d7dce5;
  background: #151b2b;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .44);
}

.auth-brand { display: flex; gap: 11px; align-items: center; justify-content: center; margin-bottom: 32px; text-align: center; }
.auth-brand img { width: 44px; height: 44px; border-radius: 13px; }
.auth-brand span { display: grid; }
.auth-brand strong { color: #fff; font-size: 1.5rem; line-height: 1; }
.auth-brand small { margin-top: 4px; color: #8f99ad; }
.auth-card > .card-kicker,
.auth-card > h1,
.auth-card > h1 + p { display: block; text-align: center; }
.auth-card h1 { margin-top: 5px; color: #fff; font-size: 1.8rem; }
.auth-card > p { color: #aeb7c7; }
.auth-card form { display: grid; gap: 14px; margin-top: 24px; }
.auth-card form label { display: grid; gap: 6px; color: #cfd5df; font-size: .8rem; font-weight: 750; }
.auth-card input { border-color: #3a455d; color: #fff; background: #1b2335; }
.auth-password-control { position: relative; display: block; }
.auth-password-control input { width: 100%; padding-right: 46px; }
.auth-password-toggle {
  position: absolute; top: 50%; right: 5px; width: 38px; min-height: 36px; padding: 7px;
  transform: translateY(-50%); border: 0; border-radius: 8px; color: currentColor;
  background: transparent; box-shadow: none;
}
.auth-password-toggle:hover { border: 0; color: var(--primary); background: rgba(125, 211, 199, .12); box-shadow: none; }
.auth-password-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.auth-password-toggle svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-error { min-height: 20px; margin: 0; color: #ff9aa3; font-size: .8rem; }
.auth-error:empty { display: none; }
.auth-success { margin: 18px 0 0; padding: 11px 13px; border: 1px solid rgba(183, 243, 74, .28); border-radius: 11px; color: #dfffa6 !important; background: rgba(183, 243, 74, .08); font-size: .82rem; }
.auth-card form > .primary { width: 100%; }
.auth-link { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; padding: 4px; border: 0; color: #aeb7c7; background: transparent; font-size: .8rem; }
.auth-link:hover { border: 0; color: #fff; background: transparent; text-decoration: underline; }
.auth-home-link { margin-top: -10px; font-weight: 650; }

#attendanceToggle { display: inline-flex; align-items: center; justify-content: center; }

/* Dynamically created dialogs inherit the Plyvo system. */
body > div[style*="position: fixed"][style*="inset: 0px"] {
  background: rgba(8, 12, 24, .72) !important;
  backdrop-filter: blur(8px);
}

body > div[style*="position: fixed"][style*="inset: 0px"] > div {
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  background: var(--surface) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3) !important;
}

body > div[style*="position: fixed"][style*="inset: 0px"] div[style*="background"],
.round-pause-editor {
  border-color: var(--border) !important;
  background: var(--surface-subtle) !important;
}

:root.dark {
  color-scheme: dark;
  --primary: #8178ff;
  --primary-hover: #7067eb;
  --primary-strong: #c8c4ff;
  --primary-soft: #252345;
  --primary-soft-hover: #302e5b;
  --energy-ink: #192203;
  --ink: #f8fafc;
  --text: #e4e7ec;
  --text-muted: #a5afbf;
  --background: #0b1020;
  --surface: #151b2b;
  --surface-raised: #192133;
  --surface-subtle: #1b2335;
  --border: #293248;
  --border-strong: #3a455d;
  --danger: #ff8e98;
  --danger-border: #713d46;
  --warning: #f6ca68;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, .15);
  --shadow: 0 18px 46px rgba(0, 0, 0, .25);
}

:root.dark body {
  background:
    radial-gradient(circle at 92% 0%, rgba(79, 70, 229, .18), transparent 24rem),
    var(--background);
}

:root.dark .card,
:root.dark .metric-card,
:root.dark .context-pill,
:root.dark .header-actions { background: rgba(21, 27, 43, .93); }
:root.dark .header-club-switcher { background: transparent; }
:root.dark .header-club-switcher:hover,
:root.dark .account-button:hover,
:root.dark .header-actions .icon-button:hover { background: var(--primary-soft-hover); }
:root.dark .header-club-switcher select { color: var(--ink); background: transparent; }
:root.dark button,
:root.dark select,
:root.dark input,
:root.dark textarea { color: var(--text); background: var(--surface-raised); }
:root.dark button:hover { background: var(--primary-soft-hover); }
:root.dark .primary { color: #fff; background: #6258e8; border-color: #6258e8; }
:root.dark .energy-action { color: var(--energy-ink); background: var(--energy); border-color: var(--energy); }
:root.dark th { color: #c7cfdb; background: #20283a; }
:root.dark tbody tr:nth-child(even) { background: #181f30; }
:root.dark tbody tr:hover { background: var(--primary-soft); }
:root.dark .metric-icon-indigo { color: #c8c4ff; }
:root.dark .metric-icon-teal { color: #66e3d4; }
:root.dark .danger:hover { background: #3a2027; }
:root.dark .round-court-count { background: var(--surface-raised); }
:root.dark .round-court-count select { background: transparent; }

@media (max-width: 1400px) {
  .active-training-card { align-items: stretch; flex-direction: column; gap: 18px; }
  .active-training-card > div:first-child { width: 100%; }
  .active-training-card .training-status-note { max-width: 620px; }
  .active-training-actions {
    display: grid;
    grid-template-columns: auto minmax(220px, 1.25fr) minmax(180px, .8fr) auto auto;
    align-items: end;
  }
  .active-training-actions label,
  .active-training-actions select { min-width: 0; width: 100%; }
  .active-training-actions > button { min-height: 42px; }
}

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .app-sidebar { padding-inline: 14px; }
  .brand-tagline { display: none; }
  .brand-name { font-size: 1.58rem; }
  .workspace-switcher { padding: 13px; }
  .app-content { padding-inline: 24px; }
  .round-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-results-card { grid-column: auto; }
  .round-grid .table-wrap { max-height: none; }
  .live-card { position: static; max-height: none; }
  .platform-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .training-list { grid-template-columns: 1fr; }
  .active-training-card, .active-training-actions, .next-training-card { align-items: stretch; flex-direction: column; }
  .active-training-actions { display: flex; }
  .training-step-actions button { flex: 1; }
  .training-form-grid { grid-template-columns: 1fr 1fr; }
  .club-venue-row { grid-template-columns: minmax(140px, 1fr) 82px auto auto; }
}

@media (max-width: 760px) {
  body { background: var(--background); }
  .club-venue-row { grid-template-columns: minmax(130px, 1fr) 82px; }
  .club-venue-name { grid-column: 1; grid-row: 1; }
  .club-venue-courts { grid-column: 2; grid-row: 1; }
  .club-venue-default { grid-column: 1; grid-row: 2; justify-self: start; }
  .club-venue-actions { grid-column: 2; grid-row: 2; justify-self: end; }
  .club-venue-address-choice { grid-column: 1 / -1; grid-row: 3; }
  .club-venue-address { grid-column: 1 / -1; grid-row: 4; }
  .sidebar-toggle { display: none; }
  .app-shell { display: block; }
  .app-sidebar {
    position: relative;
    height: auto;
    padding: 15px 14px 13px;
    border-right: 0;
    border-bottom: 1px solid var(--sidebar-border);
  }
  .sidebar-top { padding: 0; }
  .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
  .brand-name { font-size: 1.55rem; }
  .brand-tagline { display: block; font-size: .6rem; }
  .workspace-switcher {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .workspace-switcher .sidebar-label { display: none; }
  .workspace-switcher label { font-size: .68rem; }
  .workspace-switcher select { min-width: 0; }
  .tabs {
    position: fixed;
    z-index: 50;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-template-columns: none;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 4px;
    margin: 0;
    padding: 7px;
    border: 1px solid #303a50;
    border-radius: 18px;
    background: rgba(16, 22, 38, .96);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .35);
    backdrop-filter: blur(16px);
  }
  .tab {
    display: grid;
    min-width: 0;
    gap: 3px;
    place-items: center;
    padding: 7px 3px 6px;
    font-size: .64rem;
    text-align: center;
  }
  .tab svg { width: 19px; height: 19px; }
  .tab > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab.active { box-shadow: none; }
  .platform-admin-tab { margin-bottom: 0; }
  .sidebar-footer { display: none; }
  .app-content { padding: 22px 12px 104px; }
  .content-header { flex-wrap: wrap; align-items: flex-start; margin-bottom: 18px; }
  .page-team-context { align-items: stretch; flex-direction: column; gap: 9px; margin-top: 0; }
  .page-team-context .page-team-actions { align-items: stretch; flex-direction: column; }
  .page-team-context label { justify-content: space-between; }
  .page-team-context select { width: min(100%, 320px); min-width: 0; }
  .content-header h1 { font-size: 1.8rem; }
  .context-pill { display: none; }
  .header-actions { width: 100%; margin-left: 0; }
  .header-club-switcher { min-width: 0; max-width: none; flex: 1; }
  .account-button > span:last-child { display: none; }
  .account-button { padding: 5px; }
  .metric-grid { gap: 7px; }
  .metric-card { display: grid; gap: 7px; justify-items: start; padding: 11px; }
  .metric-icon { width: 30px; height: 30px; border-radius: 9px; font-size: .72rem; }
  .metric-card small { font-size: .62rem; }
  .metric-card strong { font-size: 1.08rem; }
  .card { padding: 15px; border-radius: 16px; }
  .round-builder { padding: 15px; }
  .card-intro { align-items: flex-start; }
  .status-badge { max-width: 48%; padding: 6px 8px; font-size: .67rem; }
  .builder-status,
  .builder-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .builder-status #makeRound { grid-column: 1 / -1; }
  .builder-status .builder-info { position: absolute; right: 26px; margin-top: 7px; }
  .builder-status .builder-info { display: none; }
  .builder-controls label { grid-column: 1 / -1; }
  .builder-controls > button { min-width: 0; padding-inline: 8px; font-size: .76rem; }
  .builder-controls > button:only-of-type { grid-column: 1 / -1; }
  .allocation-status { grid-column: 1 / -1; }
  .page-card-grid { grid-template-columns: 1fr; gap: 0; }
  .section-heading { align-items: flex-start; }
  .section-heading > button { min-height: 36px; padding: 7px 9px; font-size: .75rem; }
  .court { padding: 13px; }
  .court strong { padding-right: 96px; }
  .court-result { display: grid; grid-template-columns: 1fr 88px; }
  .court-result select,
  .court-result input { width: 100%; min-width: 0; }
  .court-result button { grid-column: 1 / -1; }
  .inline-form,
  .player-form { align-items: stretch; }
  .inline-form > *,
  .player-form > * { width: 100%; }
  .attendance-metric-card { position: relative; }
  .attendance-metric-card .metric-card-action { position: absolute; right: 9px; bottom: 9px; }
  .training-attendance-card { padding: 15px; }
  .compact-attendance-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .attendance-heading-actions { width: 100%; justify-content: space-between; }
  .guest-form-grid { grid-template-columns: 1fr; }
  #guestLevelField { grid-column: auto; }
  .inline-round-builder-controls { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .inline-round-builder-controls label, .inline-builder-help { grid-column: 1 / -1; max-width: none; }
  .inline-round-builder-controls select { width: 100%; min-width: 0; }
  .inline-manual-teams { grid-template-columns: 1fr; }
  .inline-manual-actions { align-items: stretch; flex-direction: column; }
  .auth-overlay { padding: 12px; }
  .auth-card { padding: 22px; }
  .permission-summary { grid-template-columns: 1fr; }
  .platform-admin-hero { min-height: 0; padding: 21px; }
  .platform-admin-hero::after { display: none; }
  .platform-admin-hero button { min-height: 36px; padding: 7px 9px; font-size: .72rem; }
  .platform-registry-heading { display: grid; }
  .platform-filters { width: 100%; }
  .platform-search { flex: 1; }
  .platform-search input { width: 100%; }
  .platform-filters select { min-width: 0; max-width: 155px; }
  .platform-member-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .platform-member-filters .platform-search { grid-column: 1 / -1; }
  .platform-member-filters select { width: 100%; min-width: 0; }
  .platform-member-detail-grid { grid-template-columns: 1fr; }
  .platform-member-detail-section.is-wide { grid-column: auto; }
  .platform-member-detail-toolbar { align-items: stretch; flex-direction: column; }
  .platform-member-detail-actions { width: 100%; }
  .platform-member-detail-actions button { flex: 1; }
  .member-level-grid { grid-template-columns: 1fr; }
  .access-dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
  }
  .access-dialog-panel {
    max-height: calc(100vh - 16px);
    padding: 18px;
    border-radius: 16px;
  }
  .club-profile-grid { grid-template-columns: 1fr; }
  .club-field-wide { grid-column: auto; }
  .club-settings-layout { grid-template-columns: 1fr; }
  .club-settings-layout > .card:nth-child(2) { grid-row: auto; }
  .club-settings-intro { flex-direction: column; }
  .club-settings-savebar { align-items: stretch; flex-direction: column; }
  .club-settings-savebar button { width: 100%; }
  .member-profile-grid { grid-template-columns: 1fr; }
  .member-profile-link { grid-template-columns: 1fr; }
  .member-profile-link button { width: 100%; }
  .member-field-wide { grid-column: auto; }
  .account-page-grid { grid-template-columns: 1fr; gap: 12px; }
  .account-staff-profile-layout { grid-template-columns: 1fr; gap: 12px; }
  .account-staff-profile-data,
  .account-staff-data { grid-template-columns: 1fr 1fr; }
  .account-profile-form { grid-template-columns: 1fr; }
  .account-profile-form .form-message,
  .account-profile-form .form-actions { grid-column: auto; }
  .account-preference-row { align-items: stretch; flex-direction: column; }
  .account-theme-toggle { justify-content: center; width: 100%; }
  .account-profile-ids { grid-template-columns: 1fr; }
  .account-security-panel { align-items: stretch; flex-direction: column; }
  .account-page-logout { align-items: stretch; flex-direction: column; }
  .account-page-logout button { width: 100%; }
}

@media (max-width: 390px) {
  .account-staff-profile-data,
  .account-staff-data { grid-template-columns: 1fr; }
  .brand-tagline { display: none; }
  .metric-card { padding: 9px; }
  .metric-card small { white-space: normal; line-height: 1.1; }
  .platform-metric-grid { grid-template-columns: 1fr 1fr; }
  .platform-admin-hero { display: grid; }
  .platform-admin-hero button { justify-self: start; }
  .platform-filters { display: grid; }
  .platform-filters select { width: 100%; max-width: none; }
  .builder-status,
  .builder-controls { grid-template-columns: 1fr; }
  .builder-status #makeRound,
  .builder-controls label,
  .allocation-status { grid-column: auto; }
}
