* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #111;
}

body {
    min-height: 100vh;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

#app {
    min-height: 100vh;
}

/* =========================
   APP HEADER
   ========================= */

.app-header {
    background: #000;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand-title {
    font-size: 17px;
    font-weight: 700;
}

.brand-season {
    font-size: 11px;
    color: #bbb;
    margin-top: 2px;
}

.header-button {
    background: #333;
    border: 0;
    color: #fff;
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 12px;
}

/* =========================
   MAIN
   ========================= */

.page {
    max-width: 850px;
    margin: 0 auto;
    padding: 15px;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

h1,
h2,
h3 {
    margin-top: 0;
}

h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 18px;
}

.back-button {
    background: #e5e5e5;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 15px;
}

.primary-button {
    width: 100%;
    background: #000;
    color: #fff;
    border: 0;
    border-radius: 11px;
    padding: 16px;
    font-weight: 700;
    font-size: 16px;
}

.secondary-button {
    background: #ddd;
    color: #111;
    border: 0;
    border-radius: 9px;
    padding: 11px 14px;
    font-weight: 700;
}

.green-button {
    background: #198754;
    color: #fff;
    border: 0;
    border-radius: 9px;
    padding: 11px 14px;
    font-weight: 700;
}

.red-button {
    background: #c82333;
    color: #fff;
    border: 0;
    border-radius: 9px;
    padding: 10px 13px;
    font-weight: 700;
}

.blue-button {
    background: #0d6efd;
    color: #fff;
    border: 0;
    border-radius: 9px;
    padding: 11px 14px;
    font-weight: 700;
}

.small-button {
    padding: 8px 11px;
    font-size: 12px;
}

/* =========================
   WELCOME
   ========================= */

.welcome {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px 18px;
}

.welcome-card {
    width: 100%;
    max-width: 430px;
    text-align: center;
    background: #fff;
    border-radius: 18px;
    padding: 30px 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.welcome-logo {
    width: 135px;
    height: 135px;
    object-fit: contain;
    margin-bottom: 15px;
}

.welcome-title {
    font-size: 31px;
    font-weight: 800;
    margin-bottom: 5px;
}

.welcome-club {
    color: #666;
    margin-bottom: 28px;
}

.role-button {
    width: 100%;
    padding: 17px;
    margin-top: 10px;
    border: 0;
    border-radius: 11px;
    background: #000;
    color: #fff;
    font-weight: 700;
    font-size: 17px;
}

.welcome-version {
    color: #666;
    margin-top: 20px;
    font-size: 8px;
}

/* =========================
   PIN
   ========================= */

.pin-card {
    max-width: 420px;
    margin: 45px auto;
    text-align: center;
}

.pin-input {
    width: 100%;
    padding: 15px;
    text-align: center;
    font-size: 25px;
    letter-spacing: 7px;
    border: 1px solid #ccc;
    border-radius: 10px;
    margin: 15px 0;
}

.error {
    min-height: 22px;
    color: #c82333;
    font-weight: 700;
    margin-bottom: 8px;
}

/* =========================
   AGE GROUPS
   ========================= */

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

.age-button {
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 11px;
    padding: 19px 8px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: none;
}

.age-button.gms-needs-confirmation {
    background: #d6a900;
    color: #111;
}

.age-button.selected-age {
    background: #198754;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
    filter: brightness(0.92);
}

/* =========================
   DASHBOARD
   ========================= */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0;
}

.stat {
    background: #f0f0f0;
    border-radius: 10px;
    padding: 13px 7px;
    text-align: center;
}

.stat-number {
    font-size: 25px;
    font-weight: 800;
}

.stat-label {
    color: #666;
    font-size: 11px;
    margin-top: 3px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.menu-button {
    min-height: 82px;
    border: 0;
    border-radius: 12px;
    background: #111;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 12px;
    box-shadow: none;
}

.menu-button.blue {
    background: #0d6efd;
}

/* Coach dashboard visual polish — presentation only */
.coach-dashboard-card { padding: 20px; }
.coach-dashboard-title { font-size: 25px; line-height: 1.2; margin-bottom: 7px; }
.coach-dashboard-subtitle { line-height: 1.5; margin-bottom: 22px; }
.coach-dashboard-stats { gap: 13px; margin: 20px 0 25px; }
.coach-dashboard-card .stat { padding: 16px 8px; border: 1px solid #e7e7e7; border-radius: 12px; }
.coach-dashboard-card .stat-number { font-size: 27px; line-height: 1.1; }
.coach-dashboard-card .stat-label { font-size: 12px; margin-top: 6px; }
.coach-dashboard-menu { gap: 15px; }
.coach-dashboard-menu .menu-button { min-height: 88px; padding: 15px 12px; line-height: 1.35; border-radius: 12px; transition: filter 120ms ease, transform 120ms ease; }
.coach-dashboard-menu .menu-button:active { transform: scale(0.985); }
.coach-dashboard-menu .menu-button:focus-visible { outline: 3px solid #777; outline-offset: 3px; }
@media (max-width: 520px) {
    .coach-dashboard-card { padding: 16px; }
    .coach-dashboard-title { font-size: 23px; }
    .coach-dashboard-stats { gap: 9px; margin: 17px 0 22px; }
    .coach-dashboard-card .stat { padding: 14px 5px; }
    .coach-dashboard-card .stat-number { font-size: 24px; }
    .coach-dashboard-menu { gap: 12px; }
    .coach-dashboard-menu .menu-button { min-height: 82px; padding: 12px 8px; font-size: 14px; }
}

/* Coach dashboard — next scheduled event */
.coach-upcoming-summary { margin: 0 0 22px; }
.coach-upcoming-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    margin: 0;
    border: 1px solid #dfe5e1;
    border-left: 4px solid #198754;
    border-radius: 12px;
    background: #f8fbf9;
    color: #111;
    text-align: left;
}
.coach-upcoming-copy { display: grid; gap: 4px; min-width: 0; }
.coach-upcoming-eyebrow { color: #52705e; font-size: 10px; font-weight: 800; letter-spacing: .9px; }
.coach-upcoming-title { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.coach-upcoming-meta { color: #666; font-size: 12px; line-height: 1.45; }
.coach-upcoming-arrow { flex: 0 0 auto; font-size: 25px; color: #52705e; }
.coach-upcoming-empty, .coach-upcoming-loading {
    padding: 13px 15px;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    color: #666;
    font-size: 13px;
    background: #fafafa;
}

/* =========================
   PLAYER ROW
   ========================= */

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #e0e0e0;
}

.player-row:last-child {
    border-bottom: 0;
}

.player-name {
    font-weight: 700;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-small {
    color: #777;
    font-size: 12px;
    margin-top: 3px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gms-count {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.7;
}

.player-management-row {
    flex-direction: row !important;
    align-items: center !important;
}

/* =========================
   SLIDE TOGGLES
   ========================= */

.toggle {
    position: relative;
    display: inline-flex;
    width: 108px;
    height: 38px;
    border-radius: 30px;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
}

.toggle input {
    display: none;
}

.toggle-knob {
    position: absolute;
    top: 4px;
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
    transition: left .18s ease;
    z-index: 2;
}

.toggle-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    z-index: 3;
}

.toggle.present,
.toggle.confirmed {
    background: #198754;
}

.toggle.absent,
.toggle.not-confirmed {
    background: #c82333;
}

.toggle.present .toggle-knob,
.toggle.confirmed .toggle-knob {
    left: 74px;
}

.toggle.absent .toggle-knob,
.toggle.not-confirmed .toggle-knob {
    left: 4px;
}

.toggle.present .toggle-label {
    justify-content: flex-start;
    padding-left: 10px;
}

.toggle.absent .toggle-label {
    justify-content: flex-end;
    padding-right: 9px;
}

.toggle.gms-toggle .toggle-label {
    display: none;
}

.toggle.gms-toggle {
    width: 54px;
    height: 30px;
}

.toggle.gms-toggle .toggle-knob {
    width: 22px;
    height: 22px;
    top: 4px;
}

.toggle.gms-toggle.confirmed .toggle-knob {
    left: 28px;
}

.toggle.gms-toggle.not-confirmed .toggle-knob {
    left: 4px;
}

.toggle.gms-toggle.locked {
    opacity: 0.55;
    cursor: default;
}

/* =========================
   REGISTER STATUS
   ========================= */

.register-status {
    padding: 11px 13px;
    border-radius: 9px;
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 700;
}

.register-open {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #a3cfbb;
}

.register-submitted {
    background: #e2e3e5;
    color: #41464b;
    border: 1px solid #d3d6d8;
}

.gms-suggestion {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.gms-suggestion-label {
    font-size: 11px;
    color: #666;
    font-weight: 700;
}

/* =========================
   FORMS
   ========================= */

.form-group {
    margin-bottom: 15px;
}

.form-group label.title {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.text-input {
    width: 100%;
    padding: 13px;
    border: 1px solid #ccc;
    border-radius: 9px;
    font-size: 16px;
}

/* =========================
   USER MANAGEMENT
   ========================= */

.user-management-card {
    padding: 12px;
    margin-bottom: 10px;
}

.user-management-header {
    margin-bottom: 8px;
}

.user-management-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.user-action-button {
    min-height: 36px;
    padding: 8px 11px;
    border: 0;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.user-action-primary {
    background: #0d6efd;
    color: #fff;
}

.user-action-neutral {
    background: #e5e5e5;
    color: #111;
}

.user-action-danger {
    background: #c82333;
    color: #fff;
}

.user-status {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.user-status-active {
    background: #d1e7dd;
    color: #0f5132;
}

.user-status-inactive {
    background: #f8d7da;
    color: #842029;
}

/* =========================
   INFORMATION BOXES
   ========================= */

.info-box {
    padding: 13px;
    border-radius: 9px;
    margin-top: 15px;
    margin-bottom: 15px;
    background: #eee;
    font-size: 14px;
}

.warning-box {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
}

.danger-box {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f1aeb5;
}

.success-box {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #a3cfbb;
}

/* =========================
   LISTS
   ========================= */

.list-row {
    padding: 13px 0;
    border-bottom: 1px solid #ddd;
}

.list-row:last-child {
    border-bottom: 0;
}

.list-title {
    font-weight: 700;
}

.list-sub {
    color: #666;
    font-size: 13px;
    margin-top: 3px;
}

.promotion-row {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid #ddd;
}

.promotion-row:last-child {
    border-bottom: 0;
}

.empty {
    text-align: center;
    color: #777;
    padding: 25px 10px;
}

/* =========================
   SENIOR ALL PLAYERS
   ========================= */

.age-section {
    margin-top: 20px;
}

.age-section:first-child {
    margin-top: 0;
}

.age-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
    color: #fff;
    padding: 11px 13px;
    border-radius: 9px;
    font-weight: 700;
}

.age-section-warning {
    background: #d6a900;
    color: #111;
}

.age-section-count {
    font-size: 12px;
    font-weight: 700;
}

.archive-age-title {
    background: #555;
}

.archive-due {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
}

/* =========================
   MULTI AGE SELECTION
   ========================= */

.multi-age-summary {
    padding: 12px 13px;
    background: #eee;
    border-radius: 9px;
    margin: 15px 0;
    font-size: 14px;
}

.multi-age-summary strong {
    display: block;
    margin-bottom: 4px;
}

.multi-age-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 520px) {

    .page {
        padding: 10px;
    }

    .card {
        border-radius: 12px;
        padding: 15px;
    }

    .age-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 13px;
    }

    .age-button {
        padding: 17px 5px;
        font-size: 17px;
    }

    .menu-grid {
        grid-template-columns: 1fr 1fr;
        gap: 13px;
    }

    .menu-button {
        min-height: 75px;
        font-size: 14px;
    }

    .player-row {
        align-items: center;
        flex-direction: row;
    }

    .row-actions {
        width: auto;
        justify-content: flex-end;
    }

    .player-management-row {
        flex-direction: row !important;
        align-items: center !important;
    }
}

@media (max-width: 360px) {

    .age-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .stat-number {
        font-size: 21px;
    }
}


/* Club Check-In custom dialog */
.cc-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.65);
}

.cc-dialog {
    width: 100%;
    max-width: 380px;
    padding: 24px;
    border-radius: 18px;
    background: var(--card-bg, #ffffff);
    color: var(--text-color, #222222);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    animation: ccDialogIn 0.18s ease-out;
}

.cc-dialog-icon {
    font-size: 34px;
    margin-bottom: 12px;
}

.cc-dialog h2 {
    margin: 0 0 12px;
    font-size: 21px;
}

.cc-dialog-message {
    white-space: pre-line;
    line-height: 1.6;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.cc-dialog-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.cc-dialog-actions button {
    flex: 1;
    min-height: 48px;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.cc-dialog-cancel {
    background: #e9edf2;
    color: #222222;
}

.cc-dialog-confirm {
    background: #b42318;
    color: #ffffff;
}

.cc-dialog-ok {
    background: #245cba;
    color: #ffffff;
}

.cc-dialog-warning {
    color: #d97706;
}

.cc-dialog-danger {
    color: #dc2626;
}

.cc-dialog-success {
    color: #16803c;
}

@keyframes ccDialogIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-dialog {
        animation: none;
    }
}



/* Season Planner: monochrome layout with category colour markers */
.season-planner-shell { padding:22px !important; border:1px solid #e5e5e5; box-shadow:0 5px 22px rgba(0,0,0,.07); }
.season-planner-shell > h2 { font-size:28px; letter-spacing:-.5px; margin:4px 0 8px; }
.season-planner-shell > .subtitle { line-height:1.5; margin-bottom:22px; }
.season-planner-shell .back-button { background:#171717; color:#fff; border-radius:8px; padding:10px 15px; margin-bottom:18px; }
.season-planner-shell h3 { font-size:21px; line-height:1.3; margin:0 0 14px; }
.season-planner-shell h4 { font-size:17px; margin:24px 0 12px; }
.season-planner-shell .form-group { margin:0 0 21px !important; }
.season-planner-shell .form-group label { display:block; font-weight:700; margin-bottom:8px; }
.season-planner-shell input:not([type=checkbox]),.season-planner-shell select,.season-planner-shell textarea { width:100%; min-height:46px; padding:11px 12px; border:1px solid #ccc; border-radius:8px; background:#fff; color:#111; font:inherit; }
.season-planner-shell textarea { min-height:96px; }
.season-planner-shell .primary-button { background:#111; border:1px solid #111; min-height:48px; }
.season-planner-shell .secondary-button { background:#eee; border:1px solid #ddd; }
.season-planner-shell .info-box { border-radius:10px; line-height:1.5; padding:16px !important; margin:14px 0 !important; }
.season-planner-shell .card { border:1px solid #e5e5e5; box-shadow:none; border-radius:11px; padding:18px !important; margin:18px 0 !important; }
.sp-season-summary { padding:14px 0 17px; border-top:1px solid #e5e5e5; border-bottom:1px solid #e5e5e5; margin:18px 0 25px; }
.sp-eyebrow { color:#666; font-size:11px; font-weight:800; letter-spacing:1px; margin-bottom:5px; }
.sp-season-name { font-size:21px; font-weight:800; }
.sp-season-dates { color:#555; margin-top:3px; }
.sp-season-meta,.sp-event-meta { color:#666; font-size:13px; margin-top:7px; line-height:1.5; }
.sp-season-meta span { padding:0 4px; color:#aaa; }
.sp-section { margin-top:25px; }
.sp-section-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.sp-section-heading h3 { margin:0; }
.sp-date-chip { background:#171717; color:#fff; padding:6px 10px; border-radius:7px; font-size:12px; font-weight:700; }
.sp-upcoming-list { background:#f7f7f7; border-radius:9px; padding:4px 14px; }
.sp-upcoming-row { padding:13px 10px; border-bottom:1px solid #dedede; border-left:4px solid #777; margin-left:-14px; padding-left:14px; }
.sp-upcoming-row:last-child { border-bottom:0; }
.sp-event-title { font-weight:700; display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.sp-event-content { min-width:0; line-height:1.4; }
.sp-type-badge { display:inline-block; border-radius:5px; padding:3px 7px; font-size:10px; line-height:1.3; font-weight:800; letter-spacing:.35px; text-transform:uppercase; vertical-align:middle; }
.sp-type-fixture { color:#174f80; background:#e1effb; }
.sp-upcoming-fixture,.sp-calendar-fixture { border-left-color:#3984bd; }
.sp-manage-section { margin-top:30px; }
.sp-menu-list { border-top:1px solid #e2e2e2; }
.sp-menu-item { width:100%; display:flex; justify-content:space-between; align-items:center; gap:14px; text-align:left; padding:16px 3px; background:transparent; border:0; border-bottom:1px solid #e2e2e2; color:#111; }
.sp-menu-item strong { display:block; font-size:15px; }
.sp-menu-item small { display:block; color:#666; font-size:12px; margin-top:4px; line-height:1.4; }
.sp-menu-item b { font-size:25px; font-weight:400; color:#777; }
.sp-calendar-row { display:flex; justify-content:space-between; align-items:center; gap:12px; background:#f8f8f8; border:1px solid #e8e8e8; border-left:4px solid #777; border-radius:8px; padding:14px; margin:12px 0; }
.sp-calendar-main { min-width:0; line-height:1.45; }
.sp-calendar-date { color:#666; font-size:12px; font-weight:700; margin-bottom:4px; }
.sp-empty { color:#666; background:#f7f7f7; border-radius:9px; padding:18px; }
@media(max-width:520px) {
 .season-planner-shell { padding:17px !important; }
 .season-planner-shell > h2 { font-size:26px; }
 .season-planner-shell .form-group { margin-bottom:19px !important; }
 .season-planner-shell .card { padding:15px !important; }
 .sp-calendar-row { align-items:flex-start; flex-direction:column; }
 .sp-calendar-row .secondary-button { align-self:flex-start; }
}

/* Season Planner page refinements and locked-session visibility */
.sp-calendar-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin:12px 0 18px; }
.sp-calendar-toolbar .form-group { flex:1; margin:0 !important; min-width:0; }
.sp-locked-toggle { min-height:46px; white-space:nowrap; }
.sp-locked-tag { display:inline-block; margin-left:6px; padding:3px 7px; border-radius:5px; background:#e9e9e9; color:#555; font-size:10px; font-weight:800; text-transform:uppercase; vertical-align:middle; }
.sp-lock-note { color:#777; font-size:12px; white-space:nowrap; }
.sp-page-intro { color:#666; line-height:1.5; margin:2px 0 19px; }
.sp-form-panel { background:#fafafa; border:1px solid #e5e5e5; border-radius:12px; padding:20px; margin:16px 0 26px; }
.sp-form-panel h3 { margin:0 0 18px !important; }
.sp-form-panel .form-group { margin-bottom:18px !important; }
.sp-group-picker { border:1px solid #ddd; border-radius:9px; padding:12px; margin:0 0 18px; background:#fff; }
.sp-group-choice { display:flex; gap:9px; align-items:center; padding:8px 2px; }
.sp-field-hint { color:#666; font-size:13px; margin-bottom:6px; }
.sp-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.sp-existing-section { margin-top:26px; }
.sp-existing-section h3 { margin-bottom:12px !important; }
.sp-management-row { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:15px 13px; margin:11px 0; background:#fafafa; border:1px solid #e7e7e7; border-left:4px solid #999; border-radius:9px; }
.sp-management-main { min-width:0; line-height:1.45; }
.sp-management-row .secondary-button { flex-shrink:0; }
@media(max-width:520px) {
 .sp-calendar-toolbar { align-items:stretch; flex-direction:column; }
 .sp-locked-toggle { width:100%; }
 .sp-form-panel { padding:15px; }
 .sp-form-grid { grid-template-columns:1fr; gap:0; }
 .sp-management-row { align-items:flex-start; }
 .sp-management-row .secondary-button { padding:9px 11px; }
}


/* Independent Season Calendar visibility filters */
.sp-calendar-filter-row {
    display:flex;
    flex-wrap:wrap;
    gap:10px 22px;
    align-items:center;
    padding:10px 0 16px;
    margin:0 0 8px;
    border-bottom:1px solid #e5e5e5;
}
.sp-calendar-filter-row label {
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:#333;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
}
.sp-calendar-filter-row input[type="checkbox"],
.sp-group-picker input[type="checkbox"] {
    width:17px;
    height:17px;
    accent-color:#222;
    flex:0 0 auto;
}
.sp-group-picker {
    display:flex;
    flex-wrap:wrap;
    gap:2px 18px;
}
.sp-group-choice { margin:0; min-width:90px; }
@media(max-width:520px) {
    .sp-calendar-filter-row { align-items:flex-start; flex-direction:column; gap:12px; }
    .sp-group-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
}


/* Season Planner event palette — reuse the app's established blue, yellow and green */
.sp-type-match-home { color:#0f5132; background:#d1e7dd; }
.sp-type-match-away { color:#084298; background:#cfe2ff; }
.sp-type-training { color:#563477; background:#eee5f7; }
.sp-type-holiday { color:#664d03; background:#fff3cd; }
.sp-type-event { color:#7a3e00; background:#ffead1; }
.sp-type-cancelled { color:#555; background:#e5e5e5; }

.sp-upcoming-match-home,.sp-calendar-match-home { border-left-color:#198754; }
.sp-upcoming-match-away,.sp-calendar-match-away { border-left-color:#0d6efd; }
.sp-upcoming-training,.sp-calendar-training { border-left-color:#8960ad; }
.sp-upcoming-holiday,.sp-calendar-holiday { border-left-color:#d6a900; }
.sp-upcoming-event,.sp-calendar-event { border-left-color:#d97706; }
.sp-upcoming-cancelled,.sp-calendar-cancelled { border-left-color:#999; }

/* Keep the group cards calm; category appears as a slim side accent */
.sp-calendar-row { background:#fff; }
.sp-upcoming-row { background:rgba(255,255,255,.72); }


/* Season Planner: make the calendar the main workspace; keep admin tools secondary */
.sp-main-calendar {
    margin-top:24px;
    padding:20px;
    border:1px solid #dedede;
    border-radius:14px;
    background:#fff;
    box-shadow:0 4px 18px rgba(0,0,0,.045);
}
.sp-main-calendar > .sp-section-heading h3 { font-size:24px; }
.sp-main-calendar .sp-calendar-row { padding:17px 16px; margin:14px 0; }
.sp-main-calendar .sp-calendar-toolbar { margin-top:4px; }
.sp-next-section { margin-bottom:22px; }
.sp-admin-support { margin-top:28px; padding-top:18px; border-top:1px solid #e7e7e7; }
.sp-admin-support .sp-section-heading h3 { color:#666; font-size:16px; }
.sp-admin-support .sp-menu-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:9px; }
.sp-admin-support .sp-menu-item { background:#f7f7f7; border:1px solid #e8e8e8; padding:13px 15px; }
.sp-calendar-count { color:#777; font-size:13px; }
@media (max-width:600px) {
    .sp-main-calendar { padding:13px; margin-left:-2px; margin-right:-2px; }
    .sp-main-calendar > .sp-section-heading h3 { font-size:21px; }
    .sp-admin-support .sp-menu-list { grid-template-columns:1fr; }
}


/* Prominent Season Calendar navigation card on the planner landing page */
.sp-season-calendar-launch {
    width:100%;
    display:flex;
    align-items:center;
    gap:16px;
    margin:20px 0 26px;
    padding:21px 20px;
    text-align:left;
    color:inherit;
    background:#fff;
    border:1px solid #d9e2dc;
    border-left:1px solid #d9e2dc;
    border-radius:13px;
    box-shadow:0 3px 13px rgba(0,0,0,.055);
    cursor:pointer;
}
.sp-season-calendar-launch:hover { background:#f8fbf9; border-color:#b9d2c2; }
.sp-season-calendar-icon {
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 48px;
    height:48px;
    border-radius:11px;
    background:#d1e7dd;
    color:#0f5132;
    font-size:27px;
}
.sp-season-calendar-icon svg { width:34px; height:34px; display:block; }
.sp-season-calendar-copy { display:flex; flex:1; flex-direction:column; gap:4px; }
.sp-season-calendar-copy strong { font-size:19px; }
.sp-season-calendar-copy small { color:#666; font-size:13px; }
.sp-season-calendar-arrow { color:#198754; font-size:30px; line-height:1; }
@media (max-width:600px) {
    .sp-season-calendar-launch { padding:17px 14px; gap:12px; }
    .sp-season-calendar-copy strong { font-size:17px; }
}


/* Dedicated full-page event editor */
.sp-event-editor-page { max-width:760px; margin:0 auto; }
.sp-editor-page-heading { display:flex; align-items:flex-start; justify-content:space-between; margin:8px 0 18px; }
.sp-editor-page-heading h2 { margin:5px 0; font-size:23px; }
.sp-editor-page-heading p { margin:0; color:#666; font-size:14px; }
.sp-event-editor-page .sp-form-panel { padding:20px; }
.sp-editor-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:20px; }
@media (max-width:600px) {
    .sp-event-editor-page .sp-form-panel { padding:14px; }
    .sp-editor-page-heading h2 { font-size:21px; }
}

/* Season Planner availability on/off switch */
.sp-availability-setting{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;cursor:pointer}
.sp-availability-setting>span:first-child{display:flex;flex-direction:column;gap:4px}
.sp-availability-setting small{opacity:.72;font-size:.88em}
.sp-switch{position:relative;display:inline-flex;flex:0 0 54px;width:54px;height:30px}
.sp-switch input{position:absolute;opacity:0;width:1px;height:1px}
.sp-switch-track{position:absolute;inset:0;border-radius:999px;background:#929292;transition:background .2s;cursor:pointer}
.sp-switch-track:before{content:"";position:absolute;width:22px;height:22px;left:4px;top:4px;border-radius:50%;background:#fff;transition:transform .2s}
.sp-switch input:checked+.sp-switch-track{background:#287a4b}
.sp-switch input:checked+.sp-switch-track:before{transform:translateX(24px)}
.sp-switch input:focus-visible+.sp-switch-track{outline:3px solid #e3b341;outline-offset:3px}
.sp-switch input:disabled+.sp-switch-track{opacity:.45;cursor:not-allowed}

/* Season calendar integrated availability review */
.sp-calendar-toolbar{display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.sp-calendar-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.sp-calendar-actions button,.sp-review-toolbar button{min-height:38px}
.sp-review-toolbar{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.sp-response-parent{padding:12px 0;border-top:1px solid var(--border-color,#ddd)}
.sp-response-parent-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.sp-response-parent-head small,.sp-response-child small{display:block;opacity:.7;margin-top:3px}
.sp-response-child{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0}
.sp-response-child-details{min-width:0;flex:1}
.sp-response-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:nowrap;flex-shrink:0}
.sp-response-actions select{width:130px;min-width:110px;padding:8px;border-radius:8px}
.sp-delete-duplicate{min-height:36px;padding:7px 10px;font-size:.85rem;background:#c62828!important;border:1px solid #b71c1c!important;color:#fff!important;white-space:nowrap}
.sp-delete-duplicate:hover{background:#b71c1c!important}
@media(max-width:520px){
    .sp-response-child{align-items:center;flex-direction:row;gap:8px}
    .sp-response-actions{width:auto;justify-content:flex-end}
    .sp-response-actions select{width:112px;min-width:100px}
    .sp-delete-duplicate{padding:7px 8px;font-size:.8rem}
}


/* Season Calendar compact control and action alignment */
.sp-main-calendar .sp-calendar-toolbar {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
    gap:10px;
}
.sp-main-calendar .sp-calendar-toolbar .form-group {
    min-width:0;
}
.sp-main-calendar .sp-calendar-toolbar select {
    width:100%;
    min-width:0;
}
.sp-main-calendar .sp-calendar-toolbar > button {
    white-space:nowrap;
    min-height:40px;
}
.sp-main-calendar .sp-calendar-actions {
    display:flex;
    flex-wrap:nowrap;
    align-items:stretch;
    gap:8px;
    margin-top:12px;
}
.sp-main-calendar .sp-calendar-actions button {
    flex:1 1 0;
    min-width:0;
    padding:9px 10px;
    white-space:nowrap;
}
@media(max-width:520px) {
    .sp-main-calendar .sp-calendar-toolbar {
        grid-template-columns:minmax(0,1fr) auto;
        align-items:end;
        gap:8px;
    }
    .sp-main-calendar .sp-calendar-toolbar > button {
        padding:9px 10px;
        font-size:12px;
    }
    .sp-main-calendar .sp-calendar-actions {
        gap:6px;
    }
    .sp-main-calendar .sp-calendar-actions button {
        padding:8px 5px;
        font-size:11px;
    }
}

/* Season Calendar controls: consistent sizing with labels kept inside their buttons */
.season-planner-shell #seasonPlannerContent .sp-calendar-toolbar{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
    gap:10px;
    margin:4px 0 0;
}
.season-planner-shell #seasonPlannerContent .sp-calendar-toolbar .form-group{min-width:0;margin:0!important}
.season-planner-shell #seasonPlannerContent .sp-calendar-toolbar select{width:100%;min-width:0}
.season-planner-shell #seasonPlannerContent .sp-calendar-toolbar>button{
    box-sizing:border-box;
    min-height:44px;
    max-width:100%;
    padding:9px 12px;
    white-space:normal;
    line-height:1.2;
    text-align:center;
}
.season-planner-shell #seasonPlannerContent .sp-calendar-filter-row{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px 22px;
    padding:12px 0 15px;
}
.season-planner-shell #seasonPlannerContent .sp-calendar-actions{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:stretch;
    gap:8px;
    width:100%;
    margin-top:12px;
}
.season-planner-shell #seasonPlannerContent .sp-calendar-actions button{
    box-sizing:border-box;
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-width:0;
    min-height:44px;
    margin:0;
    padding:8px 5px;
    white-space:normal;
    overflow-wrap:anywhere;
    text-align:center;
    line-height:1.2;
    font-size:12px;
}
.season-planner-shell #seasonPlannerContent .sp-calendar-actions .sp-field-hint{grid-column:1/-1}
.season-planner-shell #seasonPlannerContent .sp-calendar-actions button:only-child{grid-column:1/-1}
.sp-response-summary-head,.sp-response-summary{display:grid;grid-template-columns:minmax(74px,1.2fr) repeat(3,minmax(62px,.8fr));align-items:center;gap:8px}
.sp-response-summary-head{padding:10px 0 7px;color:#666;font-size:11px;font-weight:700;text-align:center}
.sp-response-summary-head span:first-child{text-align:left}
.sp-response-summary{padding:9px 0;border-top:1px solid var(--border-color,#ddd)}
.sp-response-summary>strong{font-size:13px}
.sp-response-count{justify-self:center;min-width:30px;padding:5px 8px;border-radius:7px;background:#f0f0f0;color:#555;font-size:12px;font-weight:800;text-align:center;font-variant-numeric:tabular-nums}
.sp-count-available{background:#d1e7dd;color:#0f5132}
.sp-count-unavailable{background:#f8d7da;color:#842029}
.sp-count-unsure{background:#fff3cd;color:#664d03}
@media(max-width:520px){
.season-planner-shell #seasonPlannerContent .sp-calendar-toolbar{grid-template-columns:minmax(0,1fr) auto;gap:7px}
.season-planner-shell #seasonPlannerContent .sp-calendar-toolbar>button{padding:8px 9px;font-size:11px}
.season-planner-shell #seasonPlannerContent .sp-calendar-filter-row{flex-direction:row;align-items:center;gap:10px 16px}
.season-planner-shell #seasonPlannerContent .sp-calendar-actions{gap:5px}
.season-planner-shell #seasonPlannerContent .sp-calendar-actions button{min-height:44px;padding:7px 3px;font-size:11px}
.sp-response-summary-head,.sp-response-summary{grid-template-columns:minmax(55px,1.1fr) repeat(3,minmax(45px,.8fr));gap:5px}
.sp-response-summary-head{font-size:10px}
.sp-response-summary>strong{font-size:12px}
.sp-response-count{min-width:26px;padding:5px 6px}
}


.coach-upcoming-availability {
    display:flex;
    flex-wrap:wrap;
    gap:5px 14px;
    margin-top:3px;
    font-size:13px;
    font-weight:700;
    line-height:1.4;
}
.coach-upcoming-available { color:#287a4b; }
.coach-upcoming-unavailable { color:#b4232f; }

.sp-available-count{margin-top:8px;color:#287a4b;font-size:13px;line-height:1.4}
.sp-available-count strong{font-weight:800}


/* PRIVACY & DATA PROTECTION LINKS */
.policy-link { display:block; margin-top:16px; color:#555; font-size:13px; text-decoration:underline; text-underline-offset:3px; }
.app-policy-footer { text-align:center; padding:8px 16px 22px; font-size:12px; }
.app-policy-footer a { color:#666; text-decoration:underline; text-underline-offset:3px; }


/* SYSTEM ADMIN / RETENTION */
.retention-heading,.retention-policy-title,.retention-actions,.retention-edit-row {
    display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;
}
.retention-policy { border:1px solid #ddd; border-radius:10px; padding:13px; margin:12px 0; }
.retention-policy-title { margin-bottom:8px; }
.retention-status { font-size:12px; color:#555; }
.retention-edit-row label { display:flex; flex-direction:column; gap:5px; flex:1; min-width:110px; font-size:13px; }
.retention-edit-row input { width:100%; padding:10px; border:1px solid #ccc; border-radius:8px; }
.retention-actions { justify-content:flex-start; margin-top:12px; }
.retention-history { border-bottom:1px solid #ddd; padding:10px 0; overflow-wrap:anywhere; }
.retention-history pre { white-space:pre-wrap; font-size:11px; background:#f4f4f4; padding:9px; border-radius:7px; }
.retention-admin h3 { margin-top:24px; }


/* Discreet System Admin access at the bottom of the Senior dashboard */
.system-admin-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}
.system-admin-small-button {
    border: 1px solid #c9c9c9;
    border-radius: 7px;
    background: transparent;
    color: #666;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 10px;
    min-height: 30px;
    width: auto;
}
.system-admin-small-button:active { opacity: .7; }

/* System Admin retention screen */
.retention-admin{max-width:850px;margin-left:auto;margin-right:auto}
.retention-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.retention-heading .subtitle{margin-bottom:0}
.retention-intro{background:#f5f5f5;border:1px solid #e2e2e2;border-radius:12px;padding:14px 16px;margin:12px 0 22px;line-height:1.45}
.retention-intro p{margin:6px 0 0;color:#444}
.retention-policy-list{display:grid;gap:12px;margin:12px 0 24px}
.retention-policy{border:1px solid #e1e5e2;border-radius:12px;padding:15px;background:#fff}
.retention-policy-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.retention-policy-title strong{font-size:16px;line-height:1.35}
.retention-status{flex:0 0 auto;background:#f0f0f0;color:#444;border-radius:20px;padding:5px 9px;font-size:11px;font-weight:700}
.retention-status.is-on{background:#fff0d8;color:#805000}
.retention-description{color:#505a53;font-size:13px;line-height:1.5;margin:9px 0 13px}
.retention-period-line{display:flex;align-items:center;gap:9px;margin:10px 0}
.retention-period-line label{font-weight:700;font-size:13px}
.retention-period-line input{width:78px;padding:9px;border:1px solid #cfd5d1;border-radius:8px}
.retention-unit{color:#444;font-size:13px}
.retention-active{display:flex;align-items:center;gap:8px;font-size:13px;margin:12px 0}
.retention-active input{width:18px;height:18px}
.retention-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.retention-manual-note{background:#fff8e8;border-radius:8px;padding:9px 11px;margin:12px 0 0;color:#684b12;font-size:12px;line-height:1.4}
.retention-section{border-top:1px solid #e4e7e5;padding-top:20px;margin-top:20px}
.retention-section>p{color:#555;font-size:13px;line-height:1.45}
.retention-history{border:1px solid #e5e8e6;border-radius:10px;padding:12px;margin:9px 0}
.retention-history .subtitle{margin:5px 0 8px;font-size:12px}
.retention-history p{margin:5px 0 0;font-size:13px}
.retention-result-list{list-style:none;padding:0;margin:12px 0}
.retention-result-list li{display:flex;justify-content:space-between;gap:15px;padding:8px 0;border-bottom:1px solid #edf0ee;text-transform:capitalize;font-size:13px}
.retention-no-changes{background:#f5f5f5;border-radius:8px;padding:10px 12px;font-size:13px;line-height:1.4}
.retention-preview-result{border:1px solid #ddd;border-radius:10px;padding:13px;margin-top:12px}
.retention-preview-result>strong{color:#111}
.retention-running,.retention-error{padding:10px 0;font-size:13px}
.retention-error{color:#b42332}
@media(max-width:520px){.retention-admin{padding:14px}.retention-heading{flex-direction:column}.retention-policy-title{flex-direction:column;gap:7px}.retention-actions{flex-direction:column}.retention-actions button{width:100%}}


/* System Admin accordions — neutral monochrome app styling */
.retention-admin .admin-collapse{display:block;border:1px solid #dedede;border-radius:11px;background:#fff;margin:13px 0;overflow:hidden}
.retention-admin .admin-collapse>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:54px;padding:15px 17px;background:#f5f5f5;color:#111;font-size:15px;font-weight:700;cursor:pointer;list-style:none}
.retention-admin .admin-collapse>summary::-webkit-details-marker,.retention-admin .admin-policy-item>summary::-webkit-details-marker{display:none}
.retention-admin .admin-collapse>summary::after{content:"+";flex:0 0 24px;width:24px;height:24px;display:grid;place-items:center;border:1px solid #cfcfcf;border-radius:50%;background:#fff;color:#222;font-size:18px;font-weight:400}
.retention-admin .admin-collapse[open]>summary{border-bottom:1px solid #e3e3e3;background:#f1f1f1}
.retention-admin .admin-collapse[open]>summary::after{content:"−"}
.retention-admin .admin-collapse-body{padding:15px 17px}
.retention-admin .admin-policy-item{margin:0;padding:0;border:1px solid #e2e2e2;border-radius:9px;background:#fff;overflow:hidden}
.retention-admin .admin-policy-item>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;margin:0;cursor:pointer;list-style:none}
.retention-admin .admin-policy-item>summary::after{content:"+";flex:0 0 22px;width:22px;height:22px;display:grid;place-items:center;border:1px solid #d5d5d5;border-radius:50%;color:#333;font-size:16px;font-weight:400}
.retention-admin .admin-policy-item[open]>summary{border-bottom:1px solid #e5e5e5;background:#fafafa}
.retention-admin .admin-policy-item[open]>summary::after{content:"−"}
.retention-admin .admin-policy-item>p,.retention-admin .admin-policy-item>.retention-period-line,.retention-admin .admin-policy-item>.retention-active,.retention-admin .admin-policy-item>.retention-actions,.retention-admin .admin-policy-item>.retention-manual-note{margin-left:14px;margin-right:14px}
.retention-admin .admin-policy-item>p:first-of-type{margin-top:13px}
.retention-admin .admin-policy-item>.retention-actions{margin-bottom:14px}
.retention-admin #club-policy-editor>.admin-collapse-body{padding:0 17px 17px}
.retention-admin #club-policy-editor .retention-section{border:0;padding:0;margin:0}
@media(max-width:520px){.retention-admin .admin-collapse>summary{padding:14px;font-size:14px}.retention-admin .admin-collapse-body{padding:12px}.retention-admin .admin-policy-item>summary{align-items:flex-start}}


/* Personal login: reuse the existing monochrome welcome and PIN styling */
.personal-user-select {
    width: 100%;
    min-height: 50px;
    padding: 13px 14px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font: inherit;
}
.personal-login-secondary {
    width: 100%;
    margin-top: 12px;
}


/* Keep PIN digit spacing out of ordinary text-entry controls */
input:not([type="password"]):not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    letter-spacing: normal;
}


/* Coach dashboard navigation actions share one top row */
.coach-dashboard-top-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}
.coach-dashboard-top-actions .back-button {
    margin: 0;
}
.coach-dashboard-admin-button {
    width: auto;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid #c9c9c9;
    border-radius: 8px;
    background: #e5e5e5;
    color: #222;
    font-size: 13px;
    font-weight: 600;
}


/* Session inactivity warning */
.session-timeout-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.68);
}
.session-timeout-dialog {
    width: 100%;
    max-width: 420px;
    padding: 26px;
    border-radius: 16px;
    background: #fff;
    color: #111;
    box-shadow: 0 12px 40px rgba(0,0,0,.28);
    text-align: center;
}
.session-timeout-dialog h2 { margin: 0 0 12px; color: #111; }
.session-timeout-dialog p { margin: 0 0 22px; color: #555; line-height: 1.5; }
.session-timeout-actions { display: flex; flex-direction: column; gap: 10px; }
.session-timeout-actions button { width: 100%; }
