/* ============================================================
   Sport Manager Pro — Frontend Styles
   v2.3.38 — De-duplicated stylesheet.
   The file previously contained two near-complete copies of
   the stylesheet. The stale first copy was removed; this is
   the live (second) copy, which already won the cascade.
   A small set of properties that only existed in the removed
   copy but still reached the computed style (bulk-test team
   checkbox grid; sort-button leftovers) were reconciled in
   place so rendering is unchanged. The v2.3.21–v2.3.37
   override blocks at the end are intentionally left as-is.
   ============================================================ */

/* ============================================================
   Player & Coach Management System – Frontend Styles v1.2.0
   Modern, sports-inspired design
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --pcs-primary:       #0a6ebd;
    --pcs-primary-dark:  color-mix(in srgb, var(--pcs-primary) 72%, #000);
    --pcs-primary-light: color-mix(in srgb, var(--pcs-primary) 12%, #ffffff);
    --pcs-accent:        #ff6b35;
    --pcs-success:       #27ae60;
    --pcs-success-light: #eafaf1;
    --pcs-danger:        #e74c3c;
    --pcs-danger-light:  #fdf0ef;
    --pcs-warning:       #f39c12;
    --pcs-warning-light: #fef9e7;
    --pcs-text:          #1a1a2e;
    --pcs-text-muted:    #6b7280;
    --pcs-border:        #d8e4f0;
    --pcs-bg:            color-mix(in srgb, var(--pcs-primary) 8%, #ffffff);
    --pcs-page-bg:       color-mix(in srgb, var(--pcs-primary) 14%, #ffffff);
    --pcs-card:          #ffffff;
    --pcs-radius:        12px;
    --pcs-radius-sm:     8px;
    --pcs-shadow:        0 2px 12px rgba(0,0,0,0.08);
    --pcs-shadow-lg:     0 8px 32px rgba(0,0,0,0.12);
    --pcs-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --pcs-transition:    0.2s ease;
}

/* ── Base ──────────────────────────────────────────────────── */
/* =============================================================
   DESIGN STANDARD — v2.9.18
   One consistent layout, typography, and colour system
   for every page in Sport Manager Pro.
   ─────────────────────────────────────────────────────────────
   BREAKPOINTS:  single mobile breakpoint at 640px.
   All the scattered 480/520/600/700/768/800 overrides that
   existed from Sinatra-era patches are removed below and
   replaced with these consolidated rules.
   ============================================================= */

/* ── Standard design tokens (extend :root) ── */
:root {
    --std-page-bg:      color-mix(in srgb, var(--pcs-primary) 7%, #ffffff);
    --std-gap:          12px;        /* standard spacing unit             */
    --std-gap-lg:       20px;        /* large spacing                     */
    --std-content-max:  1080px;      /* max content width                 */
    --std-page-pad:     16px;        /* horizontal page padding desktop   */
    --std-page-pad-mob: 12px;        /* horizontal page padding mobile    */
    --std-title-size:   1.75rem;      /* .it-title — page heading          */
    --std-subtitle-size:0.9rem;      /* .it-subtitle — page subheading    */
    --std-body-size:    0.95rem;     /* body text                         */
    --std-meta-size:    0.82rem;     /* muted/meta text                   */
    --std-toggle-size:  0.95rem;     /* section toggle label              */
    --std-card-radius:  var(--pcs-radius);     /* 12px */
    --std-inner-radius: var(--pcs-radius-sm);  /* 8px  */
}

/* ── ALL PAGE WRAPPERS — unified base ── */
.pcs-profile-form-wrapper, .pcs-testing-form-wrapper, .pcs-registration-form-wrapper,
.pcs-login-form-wrapper, .pcs-player-dashboard, .pcs-coach-dashboard,
.pcs-coach-player-details, .pcs-coach-player-profile, .pcs-progress-charts,
.pcs-homepage, .pcs-team-sheet-wrapper, .pcs-bulk-test-wrapper,
.pcs-reminders-wrapper, .pcs-coaches-directory-page, .pcs-csv-manager,
.pcs-player-information-page, .pcs-players-selection-list, .pcs-archived-wrapper,
.pcs-injury-tracker, .pcs-gameday-wrap, .pcs-team-mgmt-wrap,
.pcs-help-wrap, .pcs-weekly-report-wrap, .pcs-guardian-dashboard,
.pcs-privacy-centre-wrap, .pcs-consent-wrap {
    font-family: var(--pcs-font);
    font-size: var(--std-body-size);
    color: var(--pcs-text);
    line-height: 1.6;
    max-width: var(--std-content-max);
    margin: 0 auto;
    padding: 0 var(--std-page-pad);
    box-sizing: border-box;
}

/* ── PAGE HEADER — title + subtitle every page ── */
.it-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--std-gap);
    margin-bottom: var(--std-gap-lg);
    padding: 0;
}
.it-title {
    font-size: var(--std-title-size);
    font-weight: 800;
    color: var(--pcs-text);
    margin: 0 0 4px;
    line-height: 1.25;
}
.it-subtitle {
    font-size: var(--std-subtitle-size);
    color: var(--pcs-text-muted);
    margin: 0;
    line-height: 1.5;
    font-style: italic;
}

/* ── SECTION CARDS — white card with shadow ── */
.dashboard-section, .player-section,
.pcs-profile-form-wrapper > .form-section,
.pcs-testing-form-wrapper > .form-section {
    background: var(--pcs-card);
    border: 1px solid var(--pcs-border);
    border-radius: var(--std-card-radius);
    padding: 0;
    margin-bottom: var(--std-gap);
    box-shadow: var(--pcs-shadow);
    overflow: hidden;
}

/* ── SECTION TOGGLE HEADERS — green full-width bar ── */
.pcs-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--std-page-pad);
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    border: none;
    cursor: pointer;
    font-family: var(--pcs-font);
    font-size: var(--std-toggle-size);
    font-weight: 700;
    color: #fff;
    text-align: left;
    transition: background 0.15s;
    gap: 10px;
    box-sizing: border-box;
    border-radius: 0;
}
.pcs-section-toggle:hover {
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark));
}
.pcs-section-toggle-label { flex: 1; }
.pcs-section-toggle-icon {
    font-size: 0.8rem;
    color: #fff;
    flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 3px 10px;
    transition: background 0.15s;
}

/* ── SECTION BODY — content below toggle ── */
.pcs-section-body {
    padding: var(--std-gap-lg) var(--std-page-pad);
}

/* ── TEAM / GROUP HEADINGS in player list ── */
.pcs-psl-team-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    padding: 10px var(--std-page-pad);
    border-radius: 0;
    margin: 10px 0 0;
    font-size: var(--std-toggle-size);
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}
.pcs-psl-group-wrap:first-child .pcs-psl-team-heading { margin-top: 0; }

/* ── COLLAPSIBLE SECTIONS (e.g. leaderboard) ── */
.pcs-collapsible-section {
    background: var(--pcs-card);
    border: 1px solid var(--pcs-border);
    border-radius: var(--std-card-radius);
    margin-bottom: var(--std-gap);
    box-shadow: var(--pcs-shadow);
    overflow: hidden;
}

/* ── BODY TEXT standard ── */
.dashboard-section p,
.player-section p,
.pcs-section-body p {
    font-size: var(--std-body-size);
    line-height: 1.6;
    color: var(--pcs-text);
}
.it-subtitle {
    font-style: italic;
}

/* ── META / MUTED TEXT ── */
.pcs-text-muted,
.entry-meta,
.it-year-label,
.pcs-psl-team-count {
    font-size: var(--std-meta-size);
    color: rgba(255,255,255,0.75);
    font-weight: 400;
}

/* ── PAGE BACKGROUND ── */
.pcs-page-bg,
body.pcs-dashboard-page,
body.pcs-light-page {
    background: var(--std-page-bg);
}

/* =============================================================
   UNIFIED MOBILE STANDARD — max-width: 640px
   Single breakpoint replacing all scattered 480/520/600/640/
   700/768/800 overrides. All pages get identical treatment.
   ============================================================= */
@media (max-width: 640px) {

    /* All page wrappers — full width, no side padding */
    .pcs-profile-form-wrapper, .pcs-testing-form-wrapper, .pcs-registration-form-wrapper,
    .pcs-login-form-wrapper, .pcs-player-dashboard, .pcs-coach-dashboard,
    .pcs-coach-player-details, .pcs-coach-player-profile, .pcs-progress-charts,
    .pcs-homepage, .pcs-team-sheet-wrapper, .pcs-bulk-test-wrapper,
    .pcs-reminders-wrapper, .pcs-coaches-directory-page, .pcs-csv-manager,
    .pcs-player-information-page, .pcs-players-selection-list, .pcs-archived-wrapper,
    .pcs-injury-tracker, .pcs-gameday-wrap, .pcs-team-mgmt-wrap,
    .pcs-help-wrap, .pcs-weekly-report-wrap, .pcs-guardian-dashboard,
    .pcs-privacy-centre-wrap, .pcs-consent-wrap {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Page header — side padding so title doesn't touch screen edge */
    .it-page-header {
        padding: 12px 8px 8px;
        margin-bottom: 10px;
        flex-direction: column;
        gap: 4px;
    }
    .it-title  { font-size: 1.4rem; font-weight: 800; margin: 0; }
    .it-subtitle { font-size: 0.88rem; font-style: italic; margin: 0; }

    /* Section cards — full bleed on mobile */
    .dashboard-section,
    .player-section,
    .pcs-collapsible-section {
        border-radius: var(--std-card-radius) !important;
        margin-bottom: 12px !important;
        border: 2px solid var(--pcs-primary) !important;
        overflow: hidden;
    }

    /* Section toggles — standard mobile padding */
    .pcs-section-toggle {
        padding: 13px var(--std-page-pad-mob);
        font-size: 0.92rem;
    }

    /* Section body padding */
    .pcs-section-body {
        padding: 14px var(--std-page-pad-mob);
    }

    /* Team/group headings */
    .pcs-psl-team-heading {
        padding: 10px var(--std-page-pad-mob);
        font-size: 0.92rem;
    }

    /* Sort bar */
    .pcs-psl-sort-bar {
        padding: 8px 0;
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Help page — sections full bleed, header padded */
    .pcs-help-section {
        border-radius: 0 !important;
        margin-bottom: 8px !important;
    }
    .pcs-help-section-header {
        padding: 13px var(--std-page-pad-mob) !important;
        font-size: 0.92rem !important;
    }
    .pcs-help-header {
        border-radius: 0 !important;
        margin-bottom: 8px !important;
        padding: 16px var(--std-page-pad-mob) !important;
    }
    .pcs-help-section-body {
        padding: 14px var(--std-page-pad-mob);
    }

    /* Stat cards — 2 column grid on mobile */
    .pcs-coach-stats-bar,
    .pcs-team-stats-panel.pcs-team-stats-active {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin-bottom: 16px;
        padding: 0 var(--std-page-pad-mob);
    }
    .pcs-coach-stat { padding: 12px 8px; }
    .pcs-coach-stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1; display: block; }
    .pcs-coach-stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--pcs-text-muted); font-weight: 600; display: block; }

    .pcs-stats-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin-bottom: 16px;
        padding: 0 var(--std-page-pad-mob);
    }
    .pcs-stat-card { padding: 12px 8px; }
    .pcs-stat-card .stat-value { font-size: 1.6rem; }
    .pcs-stat-card .stat-label { font-size: 0.72rem; }

    /* Buttons */
    .btn { font-size: 0.88rem; padding: 10px 16px; }
    .btn-small { font-size: 0.78rem; padding: 6px 12px; }

    /* Forms */
    .form-group { margin-bottom: 14px; }
    .form-group label { font-size: 0.82rem; }
    .form-group input,
    .form-group select,
    .form-group textarea { font-size: 0.92rem; padding: 10px 12px; }

    /* Tables */
    .pcs-table-wrap,
    .results-table-wrap,
    .players-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Charts */
    .charts-grid, .pcs-charts-grid { grid-template-columns: 1fr; gap: 12px; }
    .chart-card, .pcs-chart-card { padding: 12px var(--std-page-pad-mob); }

    /* Action buttons */
    .action-buttons { flex-direction: column; gap: 6px; }
    .action-buttons .btn,
    .action-buttons a.btn { width: 100%; justify-content: center; text-align: center; }

    /* Player mobile card */
    .pcs-player-mobile-card { padding: 12px var(--std-page-pad-mob); }

} /* end @media (max-width: 640px) — unified mobile standard */ Buttons ───────────────────────────────────────────────── */
.btn,
button.btn,
button[type="submit"].btn,
button[type="button"].btn,
a.btn,
input.btn {
    display:inline-flex;align-items:center;gap:6px;
    padding:10px 22px;font-size:0.9rem;font-weight:600;
    font-family:var(--pcs-font);border:none;border-radius:var(--pcs-radius-sm);
    cursor:pointer;text-decoration:none;transition:all var(--pcs-transition);
    white-space:nowrap;letter-spacing:0.02em;
    background:linear-gradient(135deg,var(--pcs-primary),var(--pcs-primary-dark)) !important;
    color:#fff !important;
    box-shadow:0 2px 8px rgba(10,110,189,0.3);
}
.btn:hover{background:linear-gradient(135deg,var(--pcs-primary-dark),var(--pcs-primary-dark));box-shadow:0 4px 14px rgba(10,110,189,0.4);transform:translateY(-1px);color:#fff;}
.btn:focus-visible{outline:3px solid var(--pcs-primary);outline-offset:2px;}
/* btn-primary is identical to base .btn */
.btn-primary,
.btn-primary[style],
body.pcs-dashboard-page .btn-primary,
body.pcs-light-page .btn-primary,
body.pcs-login-active .btn-primary {
    background:linear-gradient(135deg,var(--pcs-primary),var(--pcs-primary-dark)) !important;
    color:#fff !important;
    box-shadow:0 2px 8px rgba(10,110,189,0.3) !important;
    border:none !important;
}
.btn-primary:hover{background:linear-gradient(135deg,var(--pcs-primary-dark),var(--pcs-primary-dark));box-shadow:0 4px 14px rgba(10,110,189,0.4);transform:translateY(-1px);color:#fff;}
/* btn-secondary: deep-green variant — distinct from primary but on-brand (no blue) */
.btn-secondary{background:linear-gradient(135deg,var(--pcs-primary),var(--pcs-primary-dark));color:#fff;box-shadow:0 2px 8px rgba(10,110,189,0.25);}
.btn-secondary:hover{background:linear-gradient(135deg,var(--pcs-primary-dark),var(--pcs-primary-dark));box-shadow:0 4px 14px rgba(10,110,189,0.4);transform:translateY(-1px);color:#fff;}
/* btn-danger: genuinely red for destructive actions (delete / remove / permanently delete) */
.btn-danger{background:linear-gradient(135deg,var(--pcs-danger),#c0392b);color:#fff;box-shadow:0 2px 8px rgba(192,57,43,0.3);}
.btn-danger:hover{background:linear-gradient(135deg,#c0392b,#a93226);box-shadow:0 4px 14px rgba(192,57,43,0.4);transform:translateY(-1px);color:#fff;}
.btn-export{background:linear-gradient(135deg,var(--pcs-primary),var(--pcs-primary-dark));color:#fff;box-shadow:0 2px 8px rgba(10,110,189,0.3);}
.btn-export:hover{background:linear-gradient(135deg,var(--pcs-primary-dark),var(--pcs-primary-dark));box-shadow:0 4px 14px rgba(10,110,189,0.4);transform:translateY(-1px);color:#fff;}
.btn-small{padding:6px 14px;font-size:0.8rem;background:linear-gradient(135deg,var(--pcs-primary),var(--pcs-primary-dark)) !important;color:#fff !important;}
/* Action buttons: side-by-side with gap by default */
.action-buttons{display:flex;flex-direction:row;gap:6px;flex-wrap:wrap;align-items:center;}
.btn-warning{background:linear-gradient(135deg,var(--pcs-primary),var(--pcs-primary-dark));color:#fff;box-shadow:0 2px 8px rgba(10,110,189,0.3);}
.btn-warning:hover{background:linear-gradient(135deg,var(--pcs-primary-dark),var(--pcs-primary-dark));color:#fff;}
.dashboard-actions{display:flex;gap:12px;flex-wrap:wrap;background:var(--pcs-bg);border:1px dashed var(--pcs-border);padding:20px 24px;border-radius:var(--pcs-radius);margin-bottom:24px;}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group{margin-bottom:18px;}
.form-group label{display:block;margin-bottom:6px;font-weight:600;font-size:0.88rem;color:var(--pcs-text);text-transform:uppercase;letter-spacing:0.04em;}
.form-group label .required{color:var(--pcs-danger);margin-left:2px;}
.form-group input,.form-group select,.form-group textarea {
    width:100%;padding:11px 14px;border:1.5px solid var(--pcs-border);
    border-radius:var(--pcs-radius-sm);font-size:0.95rem;
    font-family:var(--pcs-font);color:var(--pcs-text);background:#fff;
    transition:border-color var(--pcs-transition),box-shadow var(--pcs-transition);
}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus {
    outline:none;border-color:var(--pcs-primary);box-shadow:0 0 0 3px rgba(10,110,189,0.12);
}
.form-group input[readonly]{background:var(--pcs-bg);color:var(--pcs-text-muted);}
.form-group small{display:block;margin-top:5px;font-size:0.8rem;color:var(--pcs-text-muted);}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.form-section-title{font-size:var(--std-meta-size);font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:var(--pcs-text);border-bottom:1px solid var(--pcs-border);padding-bottom:8px;margin:28px 0 16px;}

/* ── Notices ───────────────────────────────────────────────── */
.notice,.notice-success,.notice-warning,.notice-error,.notice-info {
    display:flex;align-items:flex-start;gap:12px;padding:14px 18px;
    border-radius:var(--pcs-radius-sm);margin-bottom:20px;font-size:0.93rem;font-weight:500;
}
.notice-success{background:var(--pcs-success-light);border-left:4px solid var(--pcs-success);color:#1e6e42;}
.notice-error{background:var(--pcs-danger-light);border-left:4px solid var(--pcs-danger);color:#7b1e1e;}
.notice-warning{background:var(--pcs-warning-light);border-left:4px solid var(--pcs-warning);color:#7d5a00;}
.notice-info{background:var(--pcs-primary-light);border-left:4px solid var(--pcs-primary);color:#0a3d6b;}
.notice p{margin:0;}

/* ── Profile Display ───────────────────────────────────────── */
.profile-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:20px;}
.profile-title-with-status{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
.profile-title-with-status h2{margin:0;color:var(--pcs-text);font-size:1.5rem;border:none;padding:0;}
.injury-status-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 14px;border-radius:20px;font-size:0.78rem;font-weight:700;text-transform:uppercase;letter-spacing:0.06em;}
.profile-picture-display{text-align:center;margin-bottom:24px;}
.profile-picture-display img{width:120px;height:120px;object-fit:cover;border-radius:50%;border:4px solid var(--pcs-primary);box-shadow:0 4px 16px rgba(10,110,189,0.2);}
.info-section{margin-bottom:24px;}
.info-section h3{font-size:var(--std-meta-size);font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:var(--pcs-text);border-bottom:1px solid var(--pcs-border);padding-bottom:8px;margin-bottom:14px;}
.info-row{display:flex;flex-direction:column;padding:9px 0;border-bottom:1px solid var(--pcs-bg);font-size:0.93rem;gap:3px;}
.info-row strong{color:var(--pcs-text-muted);font-weight:600;font-size:0.78rem;text-transform:uppercase;letter-spacing:.04em;}
.info-row span{color:var(--pcs-text);font-weight:500;word-break:break-word;}
.pcs-masked-field{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.pcs-reveal-btn{font-size:0.78rem!important;padding:3px 10px!important;white-space:nowrap;cursor:pointer;border:1px solid #ccc;border-radius:4px;background:#f5f5f5;color:#333;flex-shrink:0;}
.btn-toggle-profile{display:inline-flex;align-items:center;gap:8px;padding:8px 18px;border:none;background:linear-gradient(135deg,var(--pcs-primary),var(--pcs-primary-dark));color:#fff;border-radius:var(--pcs-radius-sm);cursor:pointer;font-size:0.85rem;font-weight:600;font-family:var(--pcs-font);transition:all var(--pcs-transition);box-shadow:0 2px 8px rgba(10,110,189,0.3);}
.btn-toggle-profile:hover{background:linear-gradient(135deg,var(--pcs-primary-dark),var(--pcs-primary-dark));transform:translateY(-1px);color:#fff;}
.toggle-icon{font-size:1.2rem;line-height:1;}
.profile-info.hidden{display:none;}

/* ── Tables ────────────────────────────────────────────────── */
.results-table,.best-results-table,.players-table,.category-results-table {
    width:100%;border-collapse:separate;border-spacing:0;font-size:0.9rem;
    border-radius:var(--pcs-radius-sm);overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,0.06);
}
.results-table thead th,.best-results-table thead th,.players-table thead th,.category-results-table thead th {
    background:var(--pcs-primary);color:#fff;padding:11px 14px;text-align:left;
    font-size:0.8rem;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;
}
.category-results-table thead th.pcs-exercise-table-header {
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

/* Desktop: border + rounded corners around each exercise block */
.pcs-exercise-block {
    border: 1.5px solid var(--pcs-primary);
    border-radius: var(--pcs-radius);
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 16px;
}
.pcs-exercise-block .category-results-table {
    border-radius: 0;
    box-shadow: none;
}

/* Tighten unit column on desktop */
.category-results-table tbody td:nth-child(3) {
    white-space: nowrap;
    padding-left: 4px;
    color: var(--pcs-text-muted);
    font-size: 0.82rem;
}
.results-table tbody td,.best-results-table tbody td,.players-table tbody td,.category-results-table tbody td {
    padding:10px 14px;border-bottom:1px solid var(--pcs-border);color:var(--pcs-text);vertical-align:middle;
}
.results-table tbody tr:last-child td,.best-results-table tbody tr:last-child td,.players-table tbody tr:last-child td,.category-results-table tbody tr:last-child td{border-bottom:none;}
.results-table tbody tr:nth-child(even) td,.best-results-table tbody tr:nth-child(even) td,.players-table tbody tr:nth-child(even) td,.category-results-table tbody tr:nth-child(even) td{background:var(--pcs-bg);}
.results-table tbody tr:hover td,.best-results-table tbody tr:hover td,.players-table tbody tr:hover td,.category-results-table tbody tr:hover td{background:var(--pcs-primary-light);}
.result-value{font-weight:700;color:var(--pcs-primary);}
.result-best-badge{display:inline-block;background:var(--pcs-success-light);color:var(--pcs-success);border:1px solid var(--pcs-success);border-radius:20px;padding:2px 10px;font-size:0.75rem;font-weight:700;letter-spacing:0.04em;}

/* Results by category */
.results-category-block{margin-bottom:28px;}
.results-category-block h3{display:flex;align-items:center;gap:8px;font-size:0.9rem;text-transform:uppercase;letter-spacing:0.06em;color:#000;background:var(--pcs-primary-light);padding:8px 14px;border-radius:var(--pcs-radius-sm);margin-bottom:12px;}

/* ── Player Cards Grid ─────────────────────────────────────── */
.players-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin-top:16px;}
.player-card{background:var(--pcs-card);border:1.5px solid var(--pcs-border);border-radius:var(--pcs-radius);padding:20px;text-decoration:none;color:var(--pcs-text);transition:all var(--pcs-transition);display:flex;flex-direction:column;gap:10px;box-shadow:var(--pcs-shadow);}
.player-card:hover{border-color:var(--pcs-primary);box-shadow:0 6px 24px rgba(10,110,189,0.15);transform:translateY(-3px);color:var(--pcs-text);}
.player-card-avatar{width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,var(--pcs-primary),var(--pcs-primary-dark));color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.3rem;font-weight:700;}
.player-card-name{font-weight:700;font-size:1rem;}
.player-card-meta{font-size:0.82rem;color:var(--pcs-text-muted);}
.player-card-team{font-size:0.78rem;font-weight:600;color:var(--pcs-primary);background:var(--pcs-primary-light);border-radius:20px;padding:3px 10px;align-self:flex-start;}
.player-card-injured{border-color:var(--pcs-danger);}
.player-card-injured .player-card-avatar{background:linear-gradient(135deg,var(--pcs-danger),#c0392b);}

/* ── Charts ────────────────────────────────────────────────── */
.chart-filter-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px;}
.chart-tab{padding:7px 18px;border:1.5px solid var(--pcs-border);background:#fff;color:var(--pcs-text-muted);border-radius:20px;cursor:pointer;font-size:0.85rem;font-weight:600;font-family:var(--pcs-font);transition:all var(--pcs-transition);}
.chart-tab:hover{border-color:var(--pcs-primary);color:var(--pcs-primary);}
.chart-tab.active{background:var(--pcs-primary);border-color:var(--pcs-primary);color:#fff;}
.charts-grid,.pcs-charts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:20px;}

@media (max-width: 640px) {
    .charts-grid,.pcs-charts-grid { grid-template-columns: 1fr; gap: 12px; }
    .chart-card,.pcs-chart-card { padding: 12px 10px; }
    .chart-card-header,.pcs-chart-header { margin-bottom: 8px; gap: 6px; }
    .chart-card-header h3,.pcs-chart-title { font-size: 0.82rem; }
    .chart-unit,.pcs-chart-note { font-size: 0.68rem; }
    .chart-canvas-wrapper,.pcs-chart-container { height: 130px; }
    .chart-meta-row { margin-top: 6px; gap: 4px; }
    .chart-best-note { font-size: 0.72rem; }
    .chart-session-count { font-size: 0.68rem; padding: 1px 8px; }
    .chart-trend { font-size: 0.72rem; padding: 4px 8px; margin-top: 6px; }
}
.chart-card,.pcs-chart-card{background:var(--pcs-card);border:1.5px solid var(--pcs-primary);border-radius:var(--pcs-radius);padding:20px;box-shadow:var(--pcs-shadow);transition:box-shadow var(--pcs-transition);}
.chart-card:hover,.pcs-chart-card:hover{box-shadow:var(--pcs-shadow-lg);}
.chart-card-header,.pcs-chart-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px;gap:10px;}
.chart-card-header h3,.pcs-chart-title{margin:0;font-size:0.95rem;font-weight:700;color:var(--pcs-text);}
.chart-unit,.pcs-chart-note{font-size:0.76rem;color:var(--pcs-text-muted);text-align:right;flex-shrink:0;font-style:italic;}
.chart-canvas-wrapper,.pcs-chart-container{position:relative;height:180px;}
.chart-canvas-wrapper canvas,.pcs-chart-container canvas{width:100%!important;height:100%!important;}
.chart-trend{display:flex;align-items:center;gap:6px;margin-top:12px;padding:6px 12px;border-radius:var(--pcs-radius-sm);font-size:0.82rem;font-weight:600;}
.trend-positive{background:var(--pcs-success-light);color:var(--pcs-success);}
.trend-negative{background:var(--pcs-danger-light);color:var(--pcs-danger);}
.trend-arrow{font-size:1rem;}
.pcs-no-charts,.pcs-no-charts p{text-align:center;color:var(--pcs-text-muted);padding:32px;background:var(--pcs-bg);border-radius:var(--pcs-radius);font-style:italic;}
.pcs-progress-charts-section h3{color:var(--pcs-primary);font-size:1.1rem;margin-bottom:16px;}

/* ── Homepage / Auth ───────────────────────────────────────── */
.pcs-registration-form-wrapper,.pcs-login-form-wrapper{max-width:520px;margin:32px auto;}
.pcs-homepage{display:flex;flex-direction:column;align-items:center;padding:40px 16px;}
.pcs-welcome{text-align:center;padding:40px;background:var(--pcs-card);border-radius:var(--pcs-radius);box-shadow:var(--pcs-shadow-lg);max-width:480px;width:100%;}
.pcs-welcome h2{font-size:1.6rem;margin-bottom:20px;color:var(--pcs-primary);border:none;}
.pcs-registration-prompt{margin-top:16px;font-size:0.9rem;color:var(--pcs-text-muted);}
.pcs-registration-prompt a{color:var(--pcs-primary);font-weight:600;}
.back-link{margin-bottom:18px;}

/* ── Stats Cards ───────────────────────────────────────────── */
.pcs-stats-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:16px;margin-bottom:24px;}
.pcs-stat-card{background:var(--pcs-card);border:1px solid var(--pcs-border);border-radius:var(--pcs-radius);padding:20px;text-align:center;box-shadow:var(--pcs-shadow);}
.pcs-stat-card .stat-value{font-size:2rem;font-weight:800;color:var(--pcs-primary);line-height:1;margin-bottom:6px;}
.pcs-stat-card .stat-label{font-size:0.8rem;text-transform:uppercase;letter-spacing:0.06em;color:var(--pcs-text-muted);font-weight:600;}

/* ── Coach/Details sections ────────────────────────────────── */
.details-section{margin-bottom:24px;}
.details-section h3{font-size:0.8rem;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:var(--pcs-primary);border-bottom:1px solid var(--pcs-border);padding-bottom:8px;margin-bottom:14px;}
.details-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 20px;}
.detail-item{display:flex;flex-direction:column;gap:2px;}
.detail-item label{font-size:0.78rem;color:var(--pcs-text-muted);font-weight:600;text-transform:uppercase;}
.detail-item span{font-size:0.95rem;font-weight:500;color:var(--pcs-text);}
.details-actions{display:flex;gap:10px;margin-top:20px;flex-wrap:wrap;}
.coaches-directory{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;margin-top:16px;}
.coach-card{background:var(--pcs-card);border:1px solid var(--pcs-border);border-radius:var(--pcs-radius-sm);padding:16px;display:flex;flex-direction:column;gap:6px;box-shadow:var(--pcs-shadow);}
.coach-card-name{font-weight:700;}
.coach-card-team{font-size:0.82rem;color:var(--pcs-primary);font-weight:600;}
.coach-card-contact{font-size:0.82rem;color:var(--pcs-text-muted);}
.register-coach-section{background:var(--pcs-bg);border:1.5px dashed var(--pcs-border);border-radius:var(--pcs-radius);padding:24px 28px;margin-bottom:28px;}
.players-selection h2{color:var(--pcs-primary);margin-bottom:16px;font-size:1.2rem;}
.pcs-user-menu{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:0.9rem;}
.pcs-user-menu .user-name{font-weight:600;color:var(--pcs-text);}
.pcs-login-menu{display:flex;gap:10px;align-items:center;}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px){


    .details-grid{grid-template-columns:1fr;}
    .charts-grid,.pcs-charts-grid{grid-template-columns:1fr;}
    .info-row{flex-direction:row;gap:12px;align-items:baseline;}
    .info-row strong{min-width:160px;font-size:0.93rem;text-transform:none;letter-spacing:0;flex-shrink:0;}
    .info-row span{word-break:normal;}
    .form-row { grid-template-columns: 1fr; overflow: hidden; }
    .form-row input, .form-row select, .form-row input[type="date"] { max-width: 100%; box-sizing: border-box; }
}
@media (max-width: 640px){
    .players-grid{grid-template-columns:1fr;}
    .chart-tab{padding:6px 12px;font-size:0.8rem;}
}

/* ── Coaches Directory Page ────────────────────────────────── */
.pcs-coaches-directory-page .dashboard-section { }

.coaches-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.coach-dir-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--pcs-card);
    border: 2px solid var(--pcs-primary);
    border-radius: var(--pcs-radius);
    padding: 14px 16px;
    box-shadow: var(--pcs-shadow);
    transition: all var(--pcs-transition);
}
.coach-dir-card:hover {
    border-color: var(--pcs-primary);
    box-shadow: 0 6px 24px rgba(10,110,189,0.13);
    transform: translateY(-2px);
}

.coach-dir-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 700;
    flex-shrink: 0;
}

.coach-dir-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.coach-dir-name {
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--pcs-text);
}

.coach-dir-team {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.coach-dir-team .team-badge {
    display: inline-block;
    background: var(--pcs-primary-light);
    color: var(--pcs-primary);
    border: 1px solid rgba(10,110,189,0.2);
    border-radius: 20px;
    padding: 1px 9px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.coach-dir-contact {
    font-size: 0.85rem;
    color: var(--pcs-text-muted);
    font-weight: 500;
}

/* WhatsApp contact button */
.coach-dir-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #25D366;
    color: #fff !important;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: background 0.18s;
    width: fit-content;
}
.coach-dir-wa-btn:hover {
    background: #1ebe57;
    color: #fff !important;
}

/* ── Chart best-result note ────────────────────────────────── */
.chart-best-note {
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--pcs-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
.chart-best-note strong {
    color: #f39c12;
    font-weight: 700;
}

@media (max-width: 640px) {
    .coaches-directory-grid { grid-template-columns: 1fr; }
}

/* ── Chart meta row (best + session count) ─────────────────── */
.chart-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 6px;
}
.chart-best-note {
    font-size: 0.82rem;
    color: var(--pcs-text-muted);
}
.chart-best-note strong {
    color: #f39c12;
    font-weight: 700;
}
.chart-session-count {
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--pcs-primary-light);
    color: var(--pcs-primary);
    border-radius: 20px;
    padding: 2px 10px;
}

/* ── Unit field auto-filled style ─────────────────────────── */
.form-group input[readonly] {
    background: #f8fafc;
    color: #6b7280;
    cursor: default;
}

/* ── Injury Report Cards ───────────────────────────────────── */
.pcs-injury-reports {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.injury-card {
    background: #fff8f8;
    border: 1.5px solid #fca5a5;
    border-left: 4px solid var(--pcs-danger);
    border-radius: var(--pcs-radius-sm);
    padding: 16px 20px;
}

.injury-card-header {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.injury-date { color: var(--pcs-text-muted); }
.injury-recovery { color: var(--pcs-danger); }

.injury-card-body {
    font-size: 0.93rem;
    color: var(--pcs-text);
    line-height: 1.6;
}

/* ── Body Fat Card ─────────────────────────────────────────── */
.body-fat-results { }

.body-fat-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 28px;
    align-items: start;
}

.bf-pct-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    border-radius: var(--pcs-radius);
    padding: 20px 24px;
    text-align: center;
    min-width: 110px;
}
.bf-pct-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}
.bf-pct-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 5px;
    opacity: 0.88;
    font-weight: 600;
}

.bf-measurements {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bf-meas-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--pcs-bg);
    font-size: 0.9rem;
}
.bf-meas-label { color: var(--pcs-text-muted); font-weight: 500; }
.bf-meas-value { font-weight: 600; color: var(--pcs-text); }
.bf-total-row .bf-meas-label,
.bf-total-row .bf-meas-value {
    font-weight: 700;
    color: var(--pcs-primary);
}

.bf-history summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--pcs-primary);
    font-weight: 600;
    margin-top: 12px;
    padding: 4px 0;
}
.bf-history summary:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .body-fat-card { grid-template-columns: 1fr; }
    .bf-pct-display { flex-direction: row; gap: 14px; padding: 14px 18px; justify-content: flex-start; }
}

/* ── Injury Cards — structured headings ────────────────────── */
.pcs-injury-reports { display: flex; flex-direction: column; gap: 18px; }

.injury-card {
    background: #fff8f8;
    border: 1.5px solid #fca5a5;
    border-left: 4px solid var(--pcs-danger);
    border-radius: var(--pcs-radius);
    overflow: hidden;
}

.injury-card-headings {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: linear-gradient(135deg, #fef2f2, #fff8f8);
    border-bottom: 1px solid #fca5a5;
    padding: 14px 20px;
    gap: 10px;
}

.injury-heading-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.injury-heading-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--pcs-danger);
}
.injury-heading-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pcs-text);
}
.injury-heading-value small.days-note {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--pcs-text-muted);
    margin-top: 2px;
}
.injury-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.recovery-upcoming { color: var(--pcs-danger); }
.recovery-past     { color: var(--pcs-success); }

.injury-card-body {
    padding: 14px 20px;
    font-size: 0.93rem;
    color: var(--pcs-text);
    line-height: 1.6;
    border-bottom: 1px solid rgba(252,165,165,0.4);
}
.injury-card-body strong {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pcs-text-muted);
    display: block;
    margin-bottom: 4px;
}
.injury-card-body p { margin: 0; }

/* Recovery date edit form */
.injury-recovery-edit {
    padding: 12px 20px;
    background: #fff;
}
.recovery-edit-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pcs-text-muted);
    display: block;
    margin-bottom: 8px;
}
.recovery-edit-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.recovery-date-input {
    padding: 7px 12px;
    border: 1.5px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    font-size: 0.88rem;
    font-family: var(--pcs-font);
    color: var(--pcs-text);
    background: #fff;
}
.recovery-date-input:focus {
    outline: none;
    border-color: var(--pcs-primary);
    box-shadow: 0 0 0 3px rgba(10,110,189,0.12);
}
.injury-recovery-form .btn-small {
    padding: 7px 16px;
    font-size: 0.83rem;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--pcs-radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-family: var(--pcs-font);
    transition: all 0.2s;
}
.injury-recovery-form .btn-small:hover {
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark));
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .injury-card-headings { grid-template-columns: 1fr; }
}

/* ── Availability Badges & Editor ──────────────────────────── */
.avail-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.avail-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.avail-toggle-btn {
    align-self: flex-start;
    margin-top: 4px;
    background: transparent !important;
    border: 1.5px solid var(--pcs-primary) !important;
    color: var(--pcs-primary) !important;
    box-shadow: none !important;
    font-size: 0.78rem !important;
    padding: 4px 10px !important;
}
.avail-toggle-btn:hover {
    background: var(--pcs-primary-light) !important;
    transform: none !important;
}
.avail-form { margin-top: 6px; }
.avail-form.hidden { display: none; }
.avail-form-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.avail-select {
    padding: 6px 10px;
    border: 1.5px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    font-size: 0.85rem;
    font-family: var(--pcs-font);
}
.avail-note-input {
    padding: 6px 10px;
    border: 1.5px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    font-size: 0.85rem;
    font-family: var(--pcs-font);
    min-width: 200px;
    flex: 1;
}
.avail-note-display {
    font-size: 0.8rem;
    color: var(--pcs-text-muted);
    font-style: italic;
}

/* ── Bulk Test Entry ───────────────────────────────────────── */
.pcs-bulk-test-wrapper { }
.bulk-intro {
    color: var(--pcs-text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}
.bulk-setup-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: var(--pcs-bg);
    border: 2px solid var(--pcs-primary);
    border-radius: var(--pcs-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}
.bulk-setup-bar .form-group { margin-bottom: 0; min-width: 160px; flex: 1; }
/* Top fields (date/category/exercise) share one row; team takes full width */
.bulk-setup-bar .form-group[style*=100%] { flex: 0 0 100%; min-width: 100%; }
.bulk-unit-pill {
    display: inline-block;
    background: var(--pcs-primary-light);
    color: var(--pcs-primary);
    border-radius: 20px;
    padding: 4px 14px;
    font-weight: 700;
    font-size: 0.9rem;
}
.bulk-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.bulk-grid-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--pcs-primary);
}
.bulk-entry-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--pcs-radius-sm);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    table-layout: auto;
}
.bulk-entry-table thead th {
    background: var(--pcs-primary);
    color: #fff;
    padding: 10px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.bulk-entry-table thead th:first-child { width: 38%; }
.bulk-entry-table thead th:nth-child(2) { width: 18%; }
.bulk-entry-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--pcs-border);
    vertical-align: middle;
}
.bulk-entry-table tbody tr:nth-child(even) td { background: var(--pcs-bg); }
.bulk-entry-table tbody tr:hover td { background: var(--pcs-primary-light); }
.bulk-player-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    word-break: break-word;
    min-width: 0;
}
.bulk-player-name span {
    word-break: break-word;
    white-space: normal;
    line-height: 1.3;
}
.bulk-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pcs-border);
}
.bulk-value-input {
    width: 110px;
    padding: 7px 10px;
    border: 1.5px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    font-size: 0.9rem;
    font-family: var(--pcs-font);
    transition: border-color 0.2s;
}
.bulk-value-input:focus {
    outline: none;
    border-color: var(--pcs-primary);
    box-shadow: 0 0 0 3px rgba(10,110,189,0.12);
}
.bulk-unit-cell { color: var(--pcs-text-muted); font-size: 0.85rem; }
.bulk-submit-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}
.bulk-submit-btn { font-size: 1rem; padding: 12px 28px; }
.bulk-count-note { color: var(--pcs-text-muted); font-size: 0.88rem; }

/* ── Test Reminders ────────────────────────────────────────── */
.pcs-reminders-wrapper { }
.reminders-intro {
    color: var(--pcs-text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}
.reminder-add-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}
.reminder-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}
.reminder-badge.overdue {
    background: var(--pcs-danger-light);
    color: var(--pcs-danger);
}
.reminder-badge.upcoming {
    background: var(--pcs-success-light);
    color: var(--pcs-success);
}
.reminders-table th, .reminders-table td { vertical-align: middle; }
.reminders-table thead th {
    background: var(--pcs-primary-dark, #053a6a) !important;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 14px;
    text-align: left;
}
/* Green border on all cards on the Schedule & Sessions page */
.pcs-reminders-wrapper .dashboard-section {
    border: 2px solid var(--pcs-primary) !important;
}

@media (max-width: 640px) {
    .bulk-setup-bar { flex-direction: column; }
    .bulk-setup-bar .form-group { min-width: 100%; }
    .bulk-value-input { width: 90px; }
}

/* ═══════════════════════════════════════════════════════════
   UX IMPROVEMENTS v1.5.0
   ═══════════════════════════════════════════════════════════ */

/* ── Profile Header Photo ──────────────────────────────────── */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}
.profile-header-photo {
    flex-shrink: 0;
}
.profile-header-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--pcs-primary);
    box-shadow: 0 4px 14px rgba(10,110,189,0.2);
    display: block;
}
.profile-header-initials {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -1px;
    box-shadow: 0 4px 14px rgba(10,110,189,0.2);
}
.profile-header-right {
    flex: 1;
    min-width: 0;
}

/* ── Photo Upload ──────────────────────────────────────────── */
.photo-upload-area {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.photo-preview-wrap {
    flex-shrink: 0;
}
.photo-preview-wrap img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--pcs-primary);
    display: block;
}
.photo-preview-initials {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
}
.photo-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.photo-upload-btn {
    cursor: pointer;
    align-self: flex-start;
}

/* ── Dark Mode Toggle Button ───────────────────────────────── */
.dark-mode-toggle {
    background: transparent !important;
    border: 1.5px solid rgba(255,255,255,0.4) !important;
    color: inherit !important;
    box-shadow: none !important;
    font-size: 1rem !important;
    padding: 6px 10px !important;
    line-height: 1 !important;
}
.dark-mode-toggle:hover {
    background: rgba(255,255,255,0.15) !important;
    transform: none !important;
}

/* ── Dark Mode Theme ───────────────────────────────────────── */
body.pcs-dark {
    --pcs-primary:       #4da6ff;
    --pcs-primary-dark:  #2080d0;
    --pcs-primary-light: #0d2a45;
    --pcs-text:          #e8edf2;
    --pcs-text-muted:    #8fa3b8;
    --pcs-border:        #2a3a4a;
    --pcs-bg:            #0f1923;
    --pcs-card:          #1a2535;
}
body.pcs-dark .dashboard-section,
body.pcs-dark .player-section,
body.pcs-dark .pcs-profile-form-wrapper,
body.pcs-dark .pcs-testing-form-wrapper,
body.pcs-dark .pcs-registration-form-wrapper,
body.pcs-dark .pcs-login-form-wrapper {
    background: var(--pcs-card);
    border-color: var(--pcs-border);
}
body.pcs-dark .form-group input,
body.pcs-dark .form-group select,
body.pcs-dark .form-group textarea {
    background: #0f1923;
    border-color: var(--pcs-border);
    color: var(--pcs-text);
}
body.pcs-dark .results-table thead th,
body.pcs-dark .best-results-table thead th,
body.pcs-dark .players-table thead th,
body.pcs-dark .bulk-entry-table thead th {
    background: var(--pcs-primary-dark);
}
body.pcs-dark .results-table tbody tr:nth-child(even) td,
body.pcs-dark .best-results-table tbody tr:nth-child(even) td,
body.pcs-dark .bulk-entry-table tbody tr:nth-child(even) td {
    background: rgba(255,255,255,0.03);
}
body.pcs-dark .results-table tbody tr:hover td,
body.pcs-dark .best-results-table tbody tr:hover td {
    background: rgba(77,166,255,0.08);
}
body.pcs-dark .pcs-chart-card,
body.pcs-dark .chart-card,
body.pcs-dark .coach-dir-card,
body.pcs-dark .injury-card {
    background: var(--pcs-card);
    border-color: var(--pcs-border);
}
body.pcs-dark .injury-card {
    background: #1f1010;
    border-color: #6b2222;
}
body.pcs-dark .bulk-setup-bar,
body.pcs-dark .register-coach-section {
    background: #0f1923;
    border-color: var(--pcs-border);
}
body.pcs-dark .bf-pct-display {
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark));
}
body.pcs-dark .pcs-no-charts p {
    background: #0f1923;
}
body.pcs-dark .notice-success { background: #0d2a1a; }
body.pcs-dark .notice-info    { background: #0d1f30; }
body.pcs-dark .notice-warning { background: #2a1f00; }
body.pcs-dark .notice-error   { background: #2a0d0d; }

/* ── Mobile UX ─────────────────────────────────────────────── */

/* Larger touch targets on mobile */
@media (max-width: 640px) {
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        min-height: 44px;
    }
    .btn-small {
        padding: 9px 14px;
        font-size: 0.85rem;
        min-height: 40px;
    }

    /* Submit button — inline full-width, same style as other action buttons */
    .pcs-testing-form-wrapper .pcs-testing-form {
        padding-bottom: 20px;
    }
    .pcs-testing-form-wrapper button[type="submit"] {
        position: static !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-top: 8px !important;
        padding: 14px 20px !important;
        background: var(--pcs-primary) !important;
        color: #fff !important;
        border: none !important;
        border-radius: 7px !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        letter-spacing: .03em !important;
        cursor: pointer !important;
        box-shadow: none !important;
    }

    /* Larger number inputs on mobile */
    .form-group input[type="number"],
    .form-group input[type="tel"],
    .bulk-value-input {
        font-size: 1rem;
        padding: 13px 14px;
    }

    /* Profile header on small screens */
    .profile-header-img,
    .profile-header-initials { width: 90px; height: 90px; font-size: 1.8rem; }

    /* Team sheet on mobile */
    .team-sheet-toolbar { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── Team Sheet ────────────────────────────────────────────── */
.pcs-team-sheet-wrapper { }

.team-sheet-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.team-sheet-toolbar h2 { margin: 0; }
.team-sheet-toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.team-sheet-group {
    margin-bottom: 32px;
    border: 2px solid var(--pcs-primary);
    border-radius: var(--pcs-radius-sm);
    overflow: hidden;
}

.team-sheet-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    padding: 12px 18px;
    border-radius: 0;
}
.ts-team-name { font-weight: 700; font-size: 1.05rem; }
.ts-player-count { font-size: 0.85rem; opacity: 0.85; }

.team-sheet-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-radius: 0 0 var(--pcs-radius-sm) var(--pcs-radius-sm);
    overflow: hidden;
}
.team-sheet-table thead th {
    background: #f1f5f9;
    color: var(--pcs-text);
    padding: 10px 12px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--pcs-border);
}
.team-sheet-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--pcs-border);
    vertical-align: middle;
}
.team-sheet-table tbody tr:last-child td { border-bottom: none; }
.team-sheet-table tbody tr:nth-child(even) td { background: var(--pcs-bg); }
.team-sheet-table tbody tr:hover td { background: var(--pcs-primary-light); }
.ts-row-injured td { background: #fff8f8 !important; }
.ts-row-suspended td { background: #fff8f0 !important; }
.ts-num { color: var(--pcs-text-muted); font-size: 0.8rem; width: 32px; }
.ts-photo { width: 44px; }
.ts-name { font-weight: 600; }
.ts-player-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pcs-border);
    display: block;
}
.ts-player-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}
.ts-status-badge { font-weight: 600; font-size: 0.82rem; }

.team-sheet-footer { margin-top: 24px; text-align: center; color: var(--pcs-text-muted); font-size: 0.82rem; }

/* ── Print Styles ──────────────────────────────────────────── */
.print-only { display: none; }

@media print {
    /* Hide everything except the team sheet */
    body * { visibility: hidden; }
    .pcs-team-sheet-wrapper,
    .pcs-team-sheet-wrapper * { visibility: visible; }
    .pcs-team-sheet-wrapper { position: absolute; top: 0; left: 0; width: 100%; }

    .no-print { display: none !important; }
    .print-only { display: table-cell !important; }
    .print-only.team-sheet-print-header { display: block !important; }

    /* Print header layout */
    .team-sheet-print-header {
        display: flex !important;
        justify-content: space-between;
        align-items: flex-start;
        border-bottom: 2px solid #000;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    .ts-print-title h1 { font-size: 16pt; margin: 0 0 4px; }
    .ts-print-title h2 { font-size: 12pt; margin: 0; color: #555; }
    .ts-print-meta p  { margin: 2px 0; font-size: 9pt; }

    .team-sheet-group-header {
        background: #000 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .team-sheet-table { font-size: 8pt; }
    .team-sheet-table thead th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .ts-row-injured td  { background: #fff0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .team-sheet-group { page-break-inside: avoid; margin-bottom: 16px; }
    .team-sheet-footer { display: block; margin-top: 16px; }
}

/* Dark mode table overrides */
body.pcs-dark .team-sheet-table thead th { background: #1a2535; color: var(--pcs-text); border-color: var(--pcs-border); }
body.pcs-dark .team-sheet-table tbody td { border-color: var(--pcs-border); }
body.pcs-dark .team-sheet-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.03); }
body.pcs-dark .ts-row-injured td  { background: #1f1010 !important; }
body.pcs-dark .ts-row-suspended td { background: #1f1500 !important; }

/* ── Recovered Injury Cards ────────────────────────────────── */
.injury-card-recovered {
    background: #f6fef6;
    border-color: #86efac;
    border-left-color: var(--pcs-success);
    opacity: 0.85;
}
.injury-card-recovered .injury-card-headings {
    background: linear-gradient(135deg, #f0fdf4, #f6fef6);
    border-bottom-color: #86efac;
}
.injury-card-recovered .injury-heading-label {
    color: var(--pcs-success);
}
.injury-recovered-stamp {
    padding: 10px 20px;
    font-size: 0.83rem;
    color: var(--pcs-success);
    font-weight: 600;
    background: #f0fdf4;
    border-top: 1px solid #86efac;
}

/* ── Schedule form grid ────────────────────────────────────── */
.sched-form-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    align-items: flex-start;
}
.sched-btn-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.sched-row-editing td {
    background: var(--pcs-primary-light) !important;
    font-weight: 600;
}

/* Dark mode recovered card */
body.pcs-dark .injury-card-recovered {
    background: #0d1f0d;
    border-color: #1e5c1e;
}
body.pcs-dark .injury-card-recovered .injury-card-headings {
    background: #0d1f0d;
    border-bottom-color: #1e5c1e;
}
body.pcs-dark .injury-recovered-stamp {
    background: #0d1f0d;
    border-top-color: #1e5c1e;
}

/* ── CSV Import / Export ───────────────────────────────────── */
.pcs-csv-manager { }

.csv-section { }

.csv-intro {
    color: var(--pcs-text-muted);
    font-size: 0.93rem;
    margin-bottom: 18px;
    line-height: 1.6;
}

.csv-template-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
    color: var(--pcs-primary);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
}
.csv-template-link:hover { text-decoration: underline; }

.csv-export-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.csv-columns-guide {
    margin-bottom: 18px;
    border: 1px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    overflow: hidden;
}
.csv-columns-guide summary {
    padding: 10px 16px;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--pcs-primary);
    cursor: pointer;
    background: var(--pcs-bg);
    list-style: none;
}
.csv-columns-guide summary::-webkit-details-marker { display: none; }
.csv-columns-guide summary::before { content: '▶ '; font-size: 0.7rem; }
.csv-columns-guide[open] summary::before { content: '▼ '; }
.csv-columns-guide summary:hover { background: var(--pcs-primary-light); }

.csv-guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.csv-guide-table th {
    background: var(--pcs-primary);
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.csv-guide-table td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--pcs-border);
}
.csv-guide-table code {
    background: var(--pcs-bg);
    border: 1px solid var(--pcs-border);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.82rem;
    font-family: monospace;
    color: var(--pcs-primary);
}
.csv-required { color: var(--pcs-success); font-weight: 600; font-size: 0.82rem; }
.csv-optional  { color: var(--pcs-text-muted); font-size: 0.82rem; }

.csv-import-form { }

.csv-upload-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.csv-file-label input[type="file"] {
    padding: 9px 12px;
    border: 1.5px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    background: var(--pcs-bg);
    font-family: var(--pcs-font);
    font-size: 0.88rem;
    color: var(--pcs-text);
    cursor: pointer;
    min-width: 220px;
}
.csv-file-label input[type="file"]:focus {
    outline: none;
    border-color: var(--pcs-primary);
    box-shadow: 0 0 0 3px rgba(10,110,189,0.12);
}

.csv-error-detail {
    color: var(--pcs-danger);
    font-size: 0.85rem;
    margin-top: 6px;
    word-break: break-word;
}

/* Dark mode */
body.pcs-dark .csv-columns-guide { border-color: var(--pcs-border); }
body.pcs-dark .csv-columns-guide summary { background: #0f1923; }
body.pcs-dark .csv-guide-table td { border-color: var(--pcs-border); }
body.pcs-dark .csv-guide-table code { background: #0f1923; border-color: var(--pcs-border); }
body.pcs-dark .csv-file-label input[type="file"] { background: #0f1923; border-color: var(--pcs-border); }

@media (max-width: 640px) {
    .csv-upload-row { flex-direction: column; align-items: flex-start; }
    .csv-file-label input[type="file"] { min-width: 100%; }
}

/* ============================================================
   MOBILE RESPONSIVE OVERHAUL — v1.6.7
   Fixes all wide tables and oversized text on small screens
   ============================================================ */

/* ── Global: stop all tables rotating text on mobile ──────── */
@media (max-width: 640px) {

    /* Wrap every plugin table so it scrolls instead of squashing */
    .reminders-table,
    .players-selection-table,
    .coach-players-table,
    .simple-players-table,
    .results-table,
    .best-results-table,
    .players-table,
    .admin-table,
    .csv-guide-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        font-size: 0.85rem;
    }

    /* Tighten cell padding on mobile so more fits */
    .reminders-table th,
    .reminders-table td,
    .players-selection-table th,
    .players-selection-table td,
    .coach-players-table th,
    .coach-players-table td,
    .simple-players-table th,
    .simple-players-table td,
    .results-table th,
    .results-table td,
    .best-results-table th,
    .best-results-table td {
        padding: 8px 10px;
        white-space: nowrap;
    }

    /* ── Player Selection — card layout on mobile ── */
    .pcs-players-selection-list table,
    .pcs-simple-players-list table {
        display: none;
    }
    .pcs-players-selection-list::after,
    .pcs-simple-players-list::after {
        content: '';
    }
}

/* ── Player selection cards (mobile only) ─────────────────── */
/* Player selection list — team group headings */
.pcs-psl-team-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--pcs-primary, #0a6ebd), var(--pcs-primary-dark, #053a6a));
    color: #fff;
    padding: 10px 14px;
    border-radius: 0;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    user-select: none;
}
/* Wrap each team group in a green-bordered card matching the Leaderboard style */
.pcs-psl-group-wrap {
    border: 2px solid var(--pcs-primary, #0a6ebd);
    border-radius: var(--std-card-radius, 10px);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: none;
}
.pcs-psl-team-heading:hover { filter: brightness(0.9); }
.pcs-psl-team-heading:first-child { margin-top: 0; }
.pcs-psl-team-name { flex: 1; }
.pcs-psl-team-count { font-size: 0.78rem; color: rgba(255,255,255,0.75) !important; font-weight: 400; }
.pcs-psl-toggle-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 8px;
}
.pcs-psl-toggle-btn:hover { background: rgba(255,255,255,0.35); }
.pcs-psl-team-body.pcs-psl-collapsed { display: none !important; }
.pcs-psl-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    padding: 0;
}
.pcs-psl-sort-btn {
    background: var(--pcs-primary);
    color: #fff;
    border: 1px solid var(--pcs-primary);
    border-radius: var(--pcs-radius-sm);
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(10,110,189,0.2);
}
.pcs-psl-sort-btn:hover { background: var(--pcs-primary); color: #fff; }
.pcs-psl-squad-nr {
    display: inline-block;
    background: var(--pcs-primary, #0a6ebd);
    color: #fff;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 2px;
    vertical-align: middle;
}

.pcs-player-mobile-cards { display: none; }

@media (max-width: 640px) {
    .pcs-player-mobile-cards { display: block; }

    .pcs-player-mobile-card {
        background: #fff;
        border: 1px solid #e0e8f0;
        border-radius: 10px;
        margin-bottom: 12px;
        overflow: hidden;
        box-shadow: 0 1px 6px rgba(10,110,189,0.08);
        display: block; /* stack vertically like team-sheet card */
    }

    /* Header: avatar + name + position + status */
    .pcs-player-mobile-card .pmc-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        background: #f7f9fc;
        border-bottom: 1px solid #e8edf2;
    }
    .pcs-player-mobile-card .pmc-avatar {
        width: 46px; height: 46px; border-radius: 50%;
        background: var(--pcs-primary); color: #fff;
        display: flex; align-items: center; justify-content: center;
        font-weight: 700; font-size: 1rem; flex-shrink: 0;
        overflow: hidden;
    }
    .pcs-player-mobile-card .pmc-avatar img {
        width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
    }
    .pcs-player-mobile-card .pmc-info { flex: 1; min-width: 0; }
    .pcs-player-mobile-card .pmc-name {
        font-weight: 700; font-size: 1rem; color: #1a1a2e;
        white-space: normal; word-break: break-word; line-height: 1.2;
    }
    .pcs-player-mobile-card .pmc-position {
        font-size: 0.78rem; color: #888; margin-top: 1px;
    }
    .pcs-player-mobile-card .pmc-status {
        font-size: 0.78rem; margin-top: 4px;
    }

    /* Actions row: full width buttons below the header */
    .pcs-player-mobile-card .pmc-actions {
        display: flex;
        gap: 0;
        border-top: 1px solid #e8edf2;
    }
    .pcs-player-mobile-card .pmc-actions .btn {
        flex: 1;
        padding: 10px 8px;
        font-size: 0.82rem;
        white-space: nowrap;
        border-radius: 0;
        justify-content: center;
        box-shadow: none;
        border-right: 1px solid rgba(255,255,255,0.2);
    }
    .pcs-player-mobile-card .pmc-actions .btn:last-child {
        border-right: none;
    }
}

/* ── Homepage / Welcome text too large ────────────────────── */
@media (max-width: 640px) {
    /* Theme paragraph text that's too big */
    .pcs-homepage p,
    .pcs-homepage .entry-content p,
    .entry-content p,
    article p,
    .wp-block-paragraph,
    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* Fix headings scaling too large from theme */
    h1 { font-size: 1.6rem !important; line-height: 1.25 !important; }
    h2 { font-size: 1.3rem !important; line-height: 1.3 !important; }
    h3 { font-size: 1.1rem !important; line-height: 1.35 !important; }

    /* WordPress block editor sometimes sets huge font-size inline */
    [style*="font-size"] {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* Plugin wrappers font normalisation */
    .pcs-homepage,
    .pcs-player-dashboard,
    .pcs-coach-dashboard,
    .pcs-coach-player-details,
    .pcs-reminders-wrapper,
    .pcs-coaches-directory-page,
    .pcs-csv-manager,
    .pcs-team-sheet-wrapper {
        font-size: 0.95rem;
        padding: 0 12px;
        margin: 12px auto;
    }

    /* Dashboard sections padding */
    .dashboard-section {
        padding: 16px 14px;
        margin-bottom: 16px;
    }

    /* Action buttons — stack vertically when space is tight */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .action-buttons .btn,
    .action-buttons a.btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Back-link bar on player dashboard */
    .back-link {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .back-link .btn {
        width: 100%;
        justify-content: center;
    }

    /* Schedules / Reminders: replace table with card layout */
    .reminders-table {
        display: none !important;
    }
}

/* ── Schedules mobile card layout ─────────────────────────── */
.pcs-sched-mobile-cards { display: none; }

@media (max-width: 640px) {
    .pcs-sched-mobile-cards { display: block; }

    .pcs-sched-card {
        background: #fff;
        border: 1px solid #e0e8f0;
        border-radius: 10px;
        margin-bottom: 12px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    .pcs-sched-card-header {
        background: var(--pcs-primary);
        color: #fff;
        padding: 10px 14px;
        font-weight: 700;
        font-size: 0.95rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .pcs-sched-card-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    .pcs-sched-field {
        padding: 9px 14px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.85rem;
    }
    .pcs-sched-field:nth-child(odd) { border-right: 1px solid #f0f0f0; }
    .pcs-sched-field label {
        display: block;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #888;
        margin-bottom: 2px;
        font-weight: 600;
    }
    .pcs-sched-field span { font-weight: 600; color: #222; }
    .pcs-sched-card-actions {
        padding: 10px 14px;
        display: flex;
        gap: 8px;
        background: #fafafa;
        border-top: 1px solid #f0f0f0;
    }
    .pcs-sched-card-actions .btn {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.82rem;
    }
}

/* ── Sched form on mobile ─────────────────────────────────── */
@media (max-width: 640px) {
    .sched-form-grid {
        grid-template-columns: 1fr !important;
    }
    .sched-btn-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .sched-btn-group .btn { width: 100%; justify-content: center; }
}

/* ── Coaches directory: single column on mobile ───────────── */
@media (max-width: 640px) {
    .coaches-directory-grid {
        grid-template-columns: 1fr;
    }
    .coach-dir-card {
        padding: 14px;
    }
}

/* ── CSV manager on mobile ────────────────────────────────── */
@media (max-width: 640px) {
    .csv-export-buttons {
        flex-direction: column;
    }
    .csv-export-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   HOMEPAGE / LOGIN PAGE — v1.7.1
   ============================================================ */

/* ── Full login page layout ───────────────────────────────── */
.pcs-login-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    gap: 24px;
    max-width: 520px;
    margin: 0 auto;
}

/* ── Brand header ─────────────────────────────────────────── */
.pcs-login-brand {
    text-align: center;
}
.pcs-login-brand-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 10px;
}
.pcs-login-brand-name {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    color: var(--pcs-primary) !important;
    margin: 0 0 6px !important;
    line-height: 1.2 !important;
    border: none !important;
}
.pcs-login-brand-desc {
    font-size: 0.95rem !important;
    color: var(--pcs-text-muted) !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* ── Login card ───────────────────────────────────────────── */
.pcs-login-card {
    width: 100%;
}
.pcs-login-card .pcs-login-form-wrapper {
    max-width: 100%;
    margin: 0;
    border-radius: var(--pcs-radius);
    box-shadow: var(--pcs-shadow-lg);
    border: 1px solid var(--pcs-border);
    padding: 32px;
}

/* ── Login form elements ──────────────────────────────────── */
.pcs-login-error {
    background: var(--pcs-danger-light);
    border: 1px solid var(--pcs-danger);
    border-radius: var(--pcs-radius-sm);
    padding: 12px 16px;
    color: var(--pcs-danger);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.pcs-login-remember {
    margin: 4px 0 20px;
    font-size: 0.88rem;
    color: var(--pcs-text-muted);
}
.pcs-login-remember input[type="checkbox"] {
    width: auto;
    margin: 0;
}
.pcs-login-btn {
    width: 100%;
    justify-content: center;
    padding: 13px;
    font-size: 1rem;
    letter-spacing: 0.03em;
}

/* ── Feature pills ────────────────────────────────────────── */
.pcs-login-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.pcs-login-feature {
    background: var(--pcs-primary-light);
    color: var(--pcs-primary);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 640px) {
    .pcs-login-page { padding: 24px 12px; gap: 18px; }
    .pcs-login-card .pcs-login-form-wrapper { padding: 22px 18px; }
    .pcs-login-brand-name { font-size: 1.5rem !important; }
    .pcs-login-features { gap: 6px; }
    .pcs-login-feature { font-size: 0.78rem; padding: 4px 10px; }
}

/* ── Dark mode ────────────────────────────────────────────── */
body.pcs-dark .pcs-login-card .pcs-login-form-wrapper {
    background: var(--pcs-card);
    border-color: var(--pcs-border);
}
body.pcs-dark .pcs-login-feature {
    background: rgba(10,110,189,0.15);
}

/* ── Login page register prompt ───────────────────────────── */
.pcs-login-register-prompt {
    text-align: center;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--pcs-border);
    font-size: 0.9rem;
    color: var(--pcs-text-muted);
}
.pcs-login-register-link {
    color: var(--pcs-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}
.pcs-login-register-link:hover {
    text-decoration: underline;
}

/* ── Progress Charts — Year Selector ──────────────────────── */
.pcs-year-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: var(--pcs-bg-alt, #f8fafc);
    border-radius: 10px;
    border: 1px solid var(--pcs-border, #e5e7eb);
}
.pcs-year-label {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--pcs-text-muted, #6b7280);
    margin-right: 4px;
}
.pcs-year-btn {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.88em;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid var(--pcs-border, #d1d5db);
    background: #fff;
    color: var(--pcs-text, #374151);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pcs-year-btn:hover {
    border-color: var(--pcs-primary, #0a6ebd);
    color: var(--pcs-primary, #0a6ebd);
    text-decoration: none;
}
.pcs-year-btn--active {
    background: var(--pcs-primary, #0a6ebd);
    border-color: var(--pcs-primary, #0a6ebd);
    color: #fff !important;
    font-weight: 700;
    pointer-events: none;
}

/* ============================================================
   PROFESSIONAL BACKGROUND & BUTTON FIXES — v1.2.15
   ============================================================ */

/* ── Page background: targets the WordPress content area
      when any plugin page is rendered inside it ─────────────── */
.entry-content:has(.pcs-team-sheet-wrapper),
.entry-content:has(.pcs-bulk-test-wrapper),
.entry-content:has(.pcs-reminders-wrapper),
.entry-content:has(.pcs-coaches-directory-page),
.entry-content:has(.pcs-csv-manager),
.entry-content:has(.pcs-player-information-page),
.entry-content:has(.pcs-player-dashboard),
.entry-content:has(.pcs-coach-dashboard),
.entry-content:has(.pcs-coach-player-details),
.entry-content:has(.pcs-players-selection-list),
.entry-content:has(.pcs-archived-wrapper),
.entry-content:has(.pcs-profile-form-wrapper),
.entry-content:has(.pcs-testing-form-wrapper),
.entry-content:has(.pcs-registration-form-wrapper),
/* Common WP theme content classes */
.page-content:has(.pcs-player-dashboard),
.post-content:has(.pcs-player-dashboard),
.site-content:has(.pcs-player-dashboard),
.wp-block-post-content:has(.pcs-player-dashboard) {
    background: color-mix(in srgb, var(--pcs-primary) 7%, #ffffff) !important;
    padding: 24px 20px 40px !important;
    margin: 0 !important;
    min-height: auto;
}
@media (max-width: 640px) {
    .entry-content:has(.pcs-player-dashboard),
    .entry-content:has(.pcs-coach-player-details),
    .entry-content:has(.pcs-coach-player-profile),
    .entry-content:has(.pcs-profile-form-wrapper),
    .entry-content:has(.pcs-testing-form-wrapper),
    .page-content:has(.pcs-player-dashboard),
    .post-content:has(.pcs-player-dashboard) {
        padding: 0 !important;
    }
}

/* Broader fallback — target the page wrapper itself */
.pcs-team-sheet-wrapper,
.pcs-bulk-test-wrapper,
.pcs-reminders-wrapper,
.pcs-coaches-directory-page,
.pcs-csv-manager,
.pcs-player-information-page,
.pcs-players-selection-list,
.pcs-archived-wrapper {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    min-height: auto;
}

/* Player and coach dashboards — same treatment */
.pcs-player-dashboard,
.pcs-coach-dashboard,
.pcs-coach-player-details,
.pcs-coach-player-profile {
    background: transparent;
    padding: 0;
    margin: 0;
    min-height: auto;
    border: none !important;
    box-shadow: none !important;
}

/* Profile and form wrappers — keep card styling but on coloured bg */
.pcs-profile-form-wrapper,
.pcs-testing-form-wrapper,
.pcs-registration-form-wrapper,
.pcs-login-form-wrapper {
    background: var(--pcs-card) !important;
    box-shadow: 0 4px 24px rgba(10,110,189,0.12) !important;
}

/* ── Dark mode: keep dark bg, don't apply light gradient ────── */
body.pcs-dark .pcs-team-sheet-wrapper,
body.pcs-dark .pcs-bulk-test-wrapper,
body.pcs-dark .pcs-reminders-wrapper,
body.pcs-dark .pcs-coaches-directory-page,
body.pcs-dark .pcs-csv-manager,
body.pcs-dark .pcs-player-information-page,
body.pcs-dark .pcs-players-selection-list,
body.pcs-dark .pcs-archived-wrapper,
body.pcs-dark .pcs-player-dashboard,
body.pcs-dark .pcs-coach-dashboard,
body.pcs-dark .pcs-coach-player-details,
body.pcs-dark .pcs-coach-player-profile {
    background: var(--pcs-bg) !important;
}

/* ── Team Sheet — Archive & Delete Selected buttons ─────────── */
.pcs-bulk-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--pcs-font);
    border: none;
    border-radius: var(--pcs-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--pcs-transition);
    white-space: nowrap;
    color: #fff !important;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    box-shadow: 0 2px 8px rgba(10,110,189,0.3);
}
.pcs-bulk-submit-btn:hover {
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark));
    box-shadow: 0 4px 14px rgba(10,110,189,0.4);
    transform: translateY(-1px);
    color: #fff !important;
}
/* Delete stays blue not red — the confirmation dialog handles the danger warning */
.pcs-bulk-submit-btn.delete {
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff !important;
}
.pcs-bulk-submit-btn.delete:hover {
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark));
    color: #fff !important;
}

/* ── Universal button white-text enforcement ────────────────── */
/* Catch any .btn that WordPress theme might override with dark text */
a.btn, button.btn, input.btn,
.btn, .btn-primary, .btn-secondary, .btn-small,
.btn-export, .btn-warning {
    color: #fff !important;
}
a.btn:hover, button.btn:hover,
.btn:hover, .btn-primary:hover, .btn-secondary:hover,
.btn-small:hover, .btn-export:hover, .btn-warning:hover {
    color: #fff !important;
}

/* ── Dark mode bulk buttons ─────────────────────────────────── */
body.pcs-dark .pcs-bulk-submit-btn {
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff !important;
}

/* ============================================================
   PLAYER HEADER CARD & BULK ENTRY CARDS — v1.2.16
   Matches the team-sheet card style throughout the plugin
   ============================================================ */

/* ── Player profile header card ──────────────────────────── */
.pcs-player-header-card {
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    border-radius: var(--pcs-radius);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(10,110,189,0.25);
}

/* Simple centred layout: avatar on top, name below, team below that */
.pcs-player-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px 20px;
    gap: 12px;
}

.pcs-player-header-avatar {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: 3px solid rgba(255,255,255,0.5);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem; font-weight: 700; color: #fff;
    flex-shrink: 0; overflow: hidden;
}
.pcs-player-header-avatar .profile-header-img,
.pcs-player-header-avatar .profile-header-initials {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 700; color: #fff;
    background: transparent;
    border: none; box-shadow: none;
}

.pcs-player-header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.pcs-player-header-name {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
}

.pcs-player-header-team {
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.35);
    display: inline-block;
}

.pcs-player-header-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
}

.pcs-player-header-toggle {
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.pcs-player-header-toggle .btn-toggle-profile {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
}

/* ── Bulk test entry — team-sheet style player name cell ─── */
.bulk-player-name {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.bulk-ts-avatar {
    flex-shrink: 0;
}

.bulk-avatar-initials {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.88rem;
}

.bulk-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pcs-border);
    display: block;
}

.bulk-player-info {
    min-width: 0;
}

.bulk-player-fullname {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--pcs-text);
    word-break: break-word;
    line-height: 1.3;
}

.bulk-player-pos {
    display: block;
    font-size: 0.75rem;
    color: var(--pcs-text-muted);
    margin-top: 1px;
}


/* ── Best Results: mobile card layout ──────────────────────── */
.pcs-best-results-by-category .category-results { margin-bottom: 20px; }
.pcs-best-results-by-category h4 {
    font-size: 1rem; font-weight: 700; margin: 0 0 10px;
    color: var(--pcs-text); text-align: center;
}
.not-tested { color: var(--pcs-text-muted); font-style: italic; font-size: 0.9rem; margin: 0 0 8px; }

/* ── Results: desktop = table, mobile = cards ── */
/* Desktop default: table visible, cards hidden */
.pcs-result-cards { display: none; }

@media (max-width: 640px) {
    /* Hide table, show cards */
    .category-results-table { display: none !important; }
    .pcs-result-cards { display: flex; flex-direction: column; gap: 16px; }
    .pcs-exercise-block { margin-bottom: 16px; }

    /* One card per exercise — best result + all previous inside */
    .pcs-result-card {
        background: #fff;
        border: 1.5px solid var(--pcs-primary);
        border-radius: 8px;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        overflow: hidden;
    }
    .pcs-exercise-card-header {
        background: var(--pcs-primary);
        color: #fff;
        font-size: 0.9rem;
        font-weight: 700;
        padding: 8px 14px;
        border-radius: 6px 6px 0 0;
        line-height: 1.3;
    }
    .pcs-result-card-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 14px 4px;
    }
    .pcs-result-card-name {
        font-weight: 600;
        font-size: 0.88rem;
        color: var(--pcs-text);
        flex: 1;
        min-width: 0;
    }
    .pcs-result-card-meta {
        font-size: 0.76rem;
        color: var(--pcs-text-muted);
        margin-top: 2px;
    }
    .pcs-result-card-value {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--pcs-primary);
        text-align: right;
        flex-shrink: 0;
        white-space: nowrap;
        display: flex;
        align-items: baseline;
        gap: 3px;
    }
    .pcs-result-card-unit {
        font-size: 0.72rem;
        font-weight: 500;
        color: var(--pcs-text-muted);
    }
    /* Admin edit/delete buttons row inside card */
    .pcs-result-card > div[style*="display:flex"][style*="gap:6px"] {
        padding: 4px 14px 10px;
    }
    .pcs-result-card-badge {
        margin-top: 4px;
        padding: 0 14px;
    }
    /* Previous results list inside same card */
    .pcs-prev-results-list {
        margin-top: 8px;
        border-top: 1px solid var(--pcs-border, #e8e8e8);
        padding: 8px 14px 10px;
    }
    .pcs-prev-results-label {
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: var(--pcs-text-muted);
        margin-bottom: 6px;
    }
    .pcs-prev-result-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 5px 0;
        border-bottom: 1px solid var(--pcs-border, #f0f0f0);
        gap: 8px;
    }
    .pcs-prev-result-row:last-child { border-bottom: none; }
    .pcs-prev-result-date {
        font-size: 0.8rem;
        color: #666;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .pcs-prev-result-val {
        font-weight: 600;
        font-size: 0.86rem;
        color: #333;
        white-space: nowrap;
        margin-left: auto;
    }
    .pcs-prev-result-val small {
        color: #999;
        font-weight: 400;
    }
}
/* ── Dark mode adjustments ───────────────────────────────── */
body.pcs-dark .pcs-player-header-card {
    background: linear-gradient(135deg, #1a4a7a, #0d2d4d);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
body.pcs-dark .bulk-avatar-initials {
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
}

/* ── Mobile: player header responsive ──────────── */
@media (max-width: 640px) {
    .pcs-player-header-inner { padding: 18px 16px 16px; gap: 10px; }
    .pcs-player-header-avatar { width: 90px; height: 90px; font-size: 2rem; }
    .pcs-player-header-name { font-size: 1.2rem; }
}

/* ============================================================
   MOBILE CARD LAYOUTS — BULK ENTRY, EXERCISES — v1.2.17
   ============================================================ */

/* ── Bulk entry: hide table on mobile, show cards ─────────── */
.bulk-cards-mobile { display: none; }

@media (max-width: 640px) {
    .bulk-entry-table { display: none; }
    .bulk-cards-mobile { display: block; }

    .bulk-player-card {
        background: #fff;
        border: 1px solid var(--pcs-border);
        border-radius: 10px;
        margin-bottom: 12px;
        overflow: hidden;
        box-shadow: 0 1px 6px rgba(10,110,189,0.07);
    }

    .bulk-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        background: #f7f9fc;
        border-bottom: 1px solid var(--pcs-border);
    }

    .bulk-card-avatar {
        flex-shrink: 0;
    }
    .bulk-card-avatar .bulk-avatar-initials {
        width: 44px; height: 44px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
        color: #fff;
        display: flex; align-items: center; justify-content: center;
        font-weight: 700; font-size: 1rem;
    }
    .bulk-card-avatar .bulk-avatar {
        width: 44px; height: 44px;
        border-radius: 50%; object-fit: cover;
        border: 2px solid var(--pcs-border);
    }

    .bulk-card-info { flex: 1; min-width: 0; }
    .bulk-card-name {
        font-weight: 700; font-size: 1rem; color: var(--pcs-text);
        word-break: break-word; line-height: 1.2;
    }
    .bulk-card-meta {
        font-size: 0.78rem; color: var(--pcs-text-muted); margin-top: 2px;
    }

    .bulk-card-input-row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px;
    }
    .bulk-card-input {
        flex: 1;
        font-size: 1.1rem !important;
        padding: 12px 14px !important;
        border: 1.5px solid var(--pcs-border);
        border-radius: var(--pcs-radius-sm);
        width: auto !important;
    }
    .bulk-card-unit {
        font-size: 0.9rem;
        color: var(--pcs-text-muted);
        font-weight: 600;
        min-width: 32px;
    }
}

/* ── Manage exercises: hide table on mobile, show cards ────── */
.pcs-ex-mobile-cards { display: none; }

@media (max-width: 640px) {
    .pcs-ex-mobile-cards { display: block; }
    /* Hide the table on mobile — it's too wide */
    .pcs-exercise-list-card .wp-list-table { display: none; }

    .pcs-ex-card {
        background: #fff;
        border: 1px solid var(--pcs-border, #e0e0e0);
        border-radius: 8px;
        margin-bottom: 10px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }

    .pcs-ex-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 14px;
        background: #f7f9fc;
        border-bottom: 1px solid #eee;
        font-size: 0.95rem;
        font-weight: 700;
        color: #1a1a2e;
        word-break: break-word;
    }

    .pcs-ex-card-actions {
        display: flex;
        gap: 4px;
        flex-shrink: 0;
    }

    .pcs-ex-card-body {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .pcs-ex-field {
        padding: 8px 12px;
        border-right: 1px solid #f0f0f0;
        font-size: 0.82rem;
    }
    .pcs-ex-field:last-child { border-right: none; }

    .pcs-ex-field label {
        display: block;
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #999;
        margin-bottom: 2px;
        font-weight: 600;
    }
    .pcs-ex-field span { font-weight: 600; color: #222; }
}

/* ── Player Appearances ──────────────────────────────────────── */
.pcs-appearances-section { margin-top: 8px; }
.pcs-appearances-bar-wrap { margin-top: 8px; }
.pcs-appearances-numbers { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.pcs-apps-played { font-size: 2rem; font-weight: 700; color: var(--pcs-primary); line-height: 1; }
.pcs-apps-divider { font-size: 1.2rem; color: #ccc; }
.pcs-apps-total { font-size: 1.1rem; font-weight: 600; color: #888; }
.pcs-apps-label { font-size: 0.82rem; color: #aaa; margin-left: 4px; }
.pcs-appearances-bar { background: #e8f0f8; border-radius: 20px; height: 10px; overflow: hidden; }
.pcs-appearances-fill { background: linear-gradient(90deg, var(--pcs-primary), var(--pcs-primary-dark)); height: 100%; border-radius: 20px; transition: width 0.6s ease; }

/* ══════════════════════════════════════════════════════════════
   GAME DAY — Front-end Styles
   ══════════════════════════════════════════════════════════════ */

.pcs-gameday-wrap { margin: 0 auto; }

.pcs-gameday-header {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.pcs-gameday-header h1 { margin: 0; font-size: 1.5rem; }

.pcs-gameday-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

/* Sidebar */
.pcs-gameday-sidebar {
    background: var(--pcs-card);
    border: 1px solid var(--pcs-border);
    border-radius: var(--pcs-radius);
    padding: 16px;
    box-shadow: var(--pcs-shadow);
}
.pcs-gameday-sidebar h3 { margin: 0 0 12px; font-size: 0.88rem; color: var(--pcs-text-muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--pcs-border); padding-bottom: 8px; }

.pcs-match-list { display: flex; flex-direction: column; gap: 5px; }
.pcs-match-row { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.pcs-match-item {
    display: flex; flex-direction: column; gap: 2px;
    padding: 9px 12px; border-radius: 6px;
    border: 1px solid var(--pcs-border);
    background: var(--pcs-bg);
    text-decoration: none; color: var(--pcs-text);
    transition: all 0.15s;
}
.pcs-match-item:hover { background: var(--pcs-primary-light); border-color: var(--pcs-primary); color: var(--pcs-text); }
.pcs-match-item.active { background: var(--pcs-primary); border-color: var(--pcs-primary); color: #fff; }
.pcs-match-item-date { font-size: 0.72rem; color: var(--pcs-text-muted); font-weight: 600; text-transform: uppercase; }
.pcs-match-item.active .pcs-match-item-date { color: rgba(255,255,255,0.7); }
.pcs-match-item-opp { font-weight: 700; font-size: 0.88rem; }
.pcs-match-item-coach { font-size: 0.72rem; color: var(--pcs-text-muted); }
.pcs-quick-score-wrap { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; padding: 6px 0; }
.pcs-score-form { display: none; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 4px; }

/* Form card */
.pcs-gameday-form-card { padding: 24px; }
.pcs-gameday-form-card h2 { margin: 0 0 18px; font-size: 1.2rem; }

.pcs-gameday-match-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px; margin-bottom: 4px;
}
.pcs-notes-group { grid-column: 1 / -1; }
.pcs-score-inputs { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.pcs-score-inputs input { width: 70px; padding: 6px 8px; border: 1px solid var(--pcs-border); border-radius: 4px; text-align: center; font-size: 0.9rem; }

.pcs-field-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; color: var(--pcs-text-muted); }
.pcs-field-group input[type="text"],
.pcs-field-group input[type="date"],
.pcs-field-group textarea { width: 100%; max-width: 100%; padding: 7px 10px; border: 1px solid var(--pcs-border); border-radius: 4px; font-size: 0.9rem; font-family: var(--pcs-font); box-sizing: border-box; }
.pcs-field-group input:focus,
.pcs-field-group textarea:focus { border-color: var(--pcs-primary); outline: none; box-shadow: 0 0 0 2px rgba(10,110,189,0.1); }

/* Player group heading */
.pcs-player-group-heading {
    margin: 16px 0 8px; font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--pcs-primary); border-bottom: 1px solid #e0eaf5; padding-bottom: 4px;
}

/* Player grid */
.pcs-gameday-player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 8px; margin-bottom: 10px;
}
.pcs-gameday-player-card {
    background: var(--pcs-card);
    border: 2px solid var(--pcs-border);
    border-radius: 8px; padding: 10px 12px;
    display: flex; align-items: center;
    justify-content: space-between; gap: 10px;
    transition: border-color 0.15s, background 0.15s;
}
.pcs-gameday-player-card.pcs-gd-selected-starting { border-color: #27ae60; background: #f0faf4; }
.pcs-gameday-player-card.pcs-gd-selected-bench    { border-color: #f39c12; background: #fffbf0; }

.pcs-gd-player-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.pcs-gd-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--pcs-primary); flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.pcs-gd-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pcs-gd-avatar-sm { width: 30px; height: 30px; }
.pcs-gd-initials { color: #fff; font-weight: 700; font-size: 0.82rem; }
.pcs-gd-details { min-width: 0; }
.pcs-gd-details strong { display: block; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcs-gd-position { font-size: 0.72rem; color: var(--pcs-text-muted); display: block; }

.pcs-gd-checkboxes { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.pcs-gd-check-label {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.75rem; font-weight: 600; cursor: pointer;
    padding: 3px 8px; border-radius: 4px;
    border: 1.5px solid var(--pcs-border); background: var(--pcs-card);
    transition: all 0.12s; white-space: nowrap; user-select: none;
}
.pcs-gd-starting.checked, .pcs-gd-starting:hover { border-color: #27ae60; background: #eafaf1; color: #27ae60; }
.pcs-gd-bench.checked,    .pcs-gd-bench:hover    { border-color: #f39c12; background: #fef9e7; color: #d68910; }
.pcs-gd-check-label input[type="checkbox"] { margin: 0; cursor: pointer; }

.pcs-gameday-form-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--pcs-border); display: flex; gap: 10px; flex-wrap: wrap; }

/* View card */
.pcs-gameday-view-card { padding: 20px; }
.pcs-gameday-view-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.pcs-gameday-view-header h2 { font-size: 1.2rem; margin: 0 0 4px; }
.pcs-gameday-view-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.83rem; color: var(--pcs-text-muted); margin-top: 4px; }
.pcs-gameday-score { font-weight: 700; color: var(--pcs-primary); font-size: 0.95rem; }
.pcs-gameday-view-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.pcs-gameday-view-players { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.pcs-gameday-view-player {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; background: var(--pcs-bg);
    border-radius: 6px; border: 1px solid var(--pcs-border);
}
.pcs-gameday-view-player span { font-weight: 600; font-size: 0.88rem; }

/* Game day view — print-style table (desktop) */
.pcs-gdv-section-title {
    font-size: 0.9rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 6px 14px; border-radius: 5px;
    display: inline-flex; align-items: center; gap: 6px;
    margin: 14px 0 8px; color: #fff;
    background: var(--pcs-primary, #0a6ebd);
}
.pcs-gdv-section-title.pcs-gdv-bench { background: #f39c12; }
.pcs-gdv-count { font-size: 0.82em; opacity: 0.85; }

/* Desktop table */
.pcs-gdv-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.88rem; margin-bottom: 4px;
}
.pcs-gdv-table thead tr {
    background: #f0f5fb;
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; color: #555;
}
.pcs-gdv-table th, .pcs-gdv-table td {
    padding: 8px 10px; border-bottom: 1px solid var(--pcs-border, #e5e7eb);
    text-align: left; vertical-align: middle;
}
.pcs-gdv-table tbody tr:nth-child(even) { background: #f9fafc; }
.pcs-gdv-table tbody tr:hover { background: #eef4fb; }
.pcs-gdv-col-nr   { width: 44px; font-weight: 700; color: var(--pcs-primary, #0a6ebd); text-align: center; }
.pcs-gdv-col-name { min-width: 140px; }
.pcs-gdv-col-pos  { width: 160px; color: #555; }
.pcs-gdv-col-dob  { width: 150px; color: #666; white-space: nowrap; text-align: right; }
.pcs-gdv-age      { color: #aaa; font-size: 0.85em; }
.pcs-gdv-empty    { padding: 14px 10px; color: #999; font-style: italic; }

/* Mobile card list — hidden on desktop */
.pcs-gdv-cards { display: none; }

@media (max-width: 640px) {
    /* Hide desktop table, show cards */
    .pcs-gdv-table { display: none; }
    .pcs-gdv-cards { display: block; }

    /* Make section title full-width on mobile */
    .pcs-gdv-section-title { display: flex; border-radius: 5px; margin: 14px 0 6px; }

    /* Each player card */
    .pcs-gdv-card {
        display: flex; align-items: center; gap: 10px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--pcs-border, #e8edf2);
        background: #fff;
    }
    .pcs-gdv-cards > .pcs-gdv-card:nth-child(even) { background: #f9fafc; }
    .pcs-gdv-card-nr {
        font-size: 1rem; font-weight: 800;
        color: var(--pcs-primary, #0a6ebd);
        min-width: 28px; text-align: center; flex-shrink: 0;
    }
    .pcs-gdv-card-body { flex: 1; min-width: 0; }
    .pcs-gdv-card-name {
        font-weight: 700; font-size: 0.92rem;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .pcs-gdv-card-pos {
        font-size: 0.78rem; color: #666; margin-top: 1px;
    }
    .pcs-gdv-card-dob {
        font-size: 0.75rem; color: #888;
        text-align: right; flex-shrink: 0; white-space: nowrap;
        line-height: 1.4;
    }
    .pcs-gdv-card-age { color: #bbb; font-size: 0.70rem; display: block; }
}

/* Additional notes lines */
.pcs-gdv-notes-section { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--pcs-border, #e5e7eb); }
.pcs-gdv-notes-label   { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pcs-text-muted, #888); margin-bottom: 10px; }
.pcs-gdv-note-line     { border-bottom: 1px solid #ccc; margin-bottom: 18px; height: 18px; }

/* Responsive */
@media (max-width: 640px) {
    .pcs-gameday-layout { grid-template-columns: 1fr; }
    .pcs-gameday-sidebar { order: 2; }
    .pcs-gameday-main   { order: 1; }
    .pcs-gameday-player-grid { grid-template-columns: 1fr; }
    .pcs-gameday-match-fields { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .pcs-gameday-match-fields { grid-template-columns: 1fr; }
    .pcs-gameday-view-header { flex-direction: column; }
}

.pcs-gd-squad-num {
    display: inline-block;
    background: var(--pcs-primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════
   COLLAPSIBLE DASHBOARD SECTIONS
   ══════════════════════════════════════════════════════════════ */

.pcs-collapsible-section {
    background: var(--pcs-card);
    border: 1.5px solid var(--pcs-primary);
    border-radius: var(--pcs-radius);
    margin-bottom: 12px;
    box-shadow: var(--pcs-shadow);
    overflow: hidden;
}

.pcs-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    border: none;
    cursor: pointer;
    font-family: var(--pcs-font);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    text-align: left;
    transition: background 0.15s;
    gap: 10px;
}
.pcs-section-toggle:hover {
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark));
}
.pcs-collapsible-section.pcs-section-open .pcs-section-toggle {
    border-bottom: 1px solid rgba(255,255,255,0.15);
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark));
    color: #fff;
}
.pcs-section-toggle-label {
    flex: 1;
}
/* Game Day header bars: no independent radius — parent pcs-gd-section clips top corners */
.pcs-gd-section-header { border-radius: 0; }
.pcs-section-toggle-icon {
    font-size: 0.8rem;
    color: #fff;
    flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 3px 10px;
    transition: background 0.15s;
}
.pcs-collapsible-section.pcs-section-open .pcs-section-toggle-icon {
    color: #fff;
}
.pcs-section-body {
    padding: 16px 18px;
}

/* Coach Notes styles */
.pcs-notes-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pcs-border);
    border-radius: 6px;
    font-family: var(--pcs-font);
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 100px;
    color: var(--pcs-text);
    background: var(--pcs-bg);
    transition: border-color 0.15s;
}
.pcs-notes-textarea:focus {
    border-color: var(--pcs-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(10,110,189,0.1);
}
.pcs-notes-readonly {
    background: var(--pcs-bg);
    border-left: 3px solid var(--pcs-primary);
    border-radius: 0 6px 6px 0;
    padding: 12px 16px;
}
.pcs-notes-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pcs-text-muted);
    margin: 0 0 8px;
}
.pcs-notes-content {
    font-size: 0.9rem;
    color: var(--pcs-text);
    line-height: 1.6;
}

@media (max-width: 640px) {
    .pcs-section-toggle { padding: 12px 14px; font-size: 0.9rem; }
    .pcs-section-body   { padding: 12px 14px; }
}

/* ══════════════════════════════════════════════════════════════
   COACH DASHBOARD — Stats Bar & Notifications
   ══════════════════════════════════════════
.pcs-team-tab {
    padding: 6px 16px;
    border: 2px solid var(--pcs-primary, #0a6ebd);
    border-radius: 20px;
    background: transparent;
    color: var(--pcs-primary, #0a6ebd);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.pcs-team-tab:hover {
    background: var(--pcs-primary, #0a6ebd);
    color: #fff;
}
.pcs-team-tab.pcs-team-tab-active {
    background: var(--pcs-primary, #0a6ebd) !important;
    color: #fff !important;
}

.pcs-coach-stats-bar,
.pcs-team-stats-panel.pcs-team-stats-active {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.pcs-coach-stat {
    background: var(--pcs-card);
    border: 1px solid var(--pcs-border);
    border-radius: var(--pcs-radius);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--pcs-shadow);
    border-top: 3px solid var(--pcs-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.pcs-coach-stat.pcs-stat-available { border-top-color: #27ae60; }
.pcs-coach-stat.pcs-stat-injured   { border-top-color: #e74c3c; }
.pcs-coach-stat.pcs-stat-notest    { border-top-color: #f39c12; }

.pcs-coach-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--pcs-primary);
    line-height: 1;
    margin-bottom: 4px;
}
.pcs-stat-available .pcs-coach-stat-value { color: #27ae60; }
.pcs-stat-injured   .pcs-coach-stat-value { color: #e74c3c; }
.pcs-stat-notest    .pcs-coach-stat-value { color: #f39c12; }

.pcs-coach-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pcs-text-muted);
}

/* Upcoming tests notification list */
.pcs-upcoming-tests {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.pcs-upcoming-test-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--pcs-bg);
    border-radius: 6px;
    border: 1px solid var(--pcs-border);
    flex-wrap: wrap;
}
.pcs-upcoming-test-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.pcs-upcoming-test-info strong {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pcs-upcoming-team {
    font-size: 0.82rem;
    color: var(--pcs-primary);
    font-weight: 600;
}
.pcs-upcoming-test-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pcs-upcoming-date {
    font-size: 0.82rem;
    color: var(--pcs-text-muted);
    font-weight: 600;
}
.pcs-upcoming-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid;
    white-space: nowrap;
}
.pcs-upcoming-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: filter 0.15s, transform 0.1s;
}
.pcs-upcoming-badge-link:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(192,57,43,0.18);
}
.pcs-view-all-link {
    font-size: 0.82rem;
    color: var(--pcs-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 4px;
}
.pcs-view-all-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .pcs-coach-stats-bar,
    .pcs-team-stats-panel.pcs-team-stats-active {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .pcs-coach-stat { padding: 12px 8px !important; }
    .pcs-coach-stat-value { font-size: 1.6rem !important; font-weight: 800; line-height: 1; display: block; }
    .pcs-upcoming-test-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── Inline form validation errors ─────────────────────────── */
.pcs-field-error {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 2px rgba(192,57,43,0.15) !important;
}
.pcs-inline-error {
    color: #c0392b;
    font-size: 0.82em;
    display: block;
    margin-top: 3px;
    line-height: 1.3;
}

/* ── Benchmark above/below average badges ───────────────────── */
.pcs-bench-badge {
    display: inline-block;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}
.pcs-bench-above {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}
.pcs-bench-below {
    background: #fef9e7;
    color: #b7770d;
    border: 1px solid #f9e4a0;
}

/* Group average comparison badge on personal best row */
.pcs-grp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 3px 10px;
    line-height: 1.4;
    white-space: nowrap;
}
.pcs-grp-badge small {
    font-weight: 400;
    font-size: 0.82em;
    opacity: 0.85;
}
.pcs-grp-above {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}
.pcs-grp-below {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}
.pcs-grp-avg {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* ═══════════════════════════════════════════════════════════
   FIXTURES PANEL
   ═══════════════════════════════════════════════════════════ */
.pcs-fixtures-panel {
    background: #fff;
    border: 1px solid var(--pcs-border, #d0dcea);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.pcs-fixtures-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.pcs-fixtures-panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--pcs-heading, #0a2a4a);
}
.pcs-fx-add-btn {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a7a3c;
    background: #eafaf1;
    border: 1px solid #a9dfbf;
    border-radius: 5px;
    padding: 5px 12px;
    text-decoration: none;
    white-space: nowrap;
}
.pcs-fx-add-btn:hover { background: #d5f5e3; }

/* Fixture list */
.pcs-fixture-list { display: flex; flex-direction: column; gap: 10px; }
.pcs-fixture-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--pcs-border, #d0dcea);
    border-radius: 7px;
    background: #f9fbfd;
    flex-wrap: wrap;
}
.pcs-fixture-item:hover { border-color: var(--pcs-primary); background: #f0f6ff; }

/* Countdown badge */
.pcs-fx-countdown {
    flex-shrink: 0;
    min-width: 68px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 5px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}
.pcs-fx-soon   { background: #fde8e8; color: #c0392b; border: 1px solid #f5c6c6; }
.pcs-fx-near   { background: #fef3cd; color: #856404; border: 1px solid #fde68a; }
.pcs-fx-future { background: #eafaf1; color: #1a7a3c; border: 1px solid #a9dfbf; }

.pcs-fx-main { flex: 1; min-width: 180px; }
.pcs-fx-date-opp {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.pcs-fx-date     { font-size: 0.78rem; color: var(--pcs-text-muted, #6b7280); font-weight: 600; }
.pcs-fx-vs       { font-size: 0.78rem; color: #aaa; }
.pcs-fx-opponent { font-size: 1rem; font-weight: 800; color: var(--pcs-heading, #0a2a4a); }

.pcs-fx-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.pcs-fx-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.pcs-fx-competition { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.pcs-fx-ha          { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.pcs-fx-venue       { background: #fafafa; color: #555; border: 1px solid #e5e7eb; }
.pcs-fx-team-tag    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.pcs-fx-notes { font-size: 0.8rem; color: #666; margin-top: 5px; font-style: italic; }

.pcs-fx-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    align-items: flex-end;
}
.pcs-fx-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 5px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.pcs-fx-btn-start  { background: var(--pcs-primary, #0a6ebd); color: #fff; }
.pcs-fx-btn-start:hover { background: #0856a0; color: #fff; }
.pcs-fx-btn-edit   { background: #f0f0f0; color: #333; border: 1px solid #ccc; }
.pcs-fx-btn-edit:hover { background: #e0e0e0; }
.pcs-fx-btn-delete { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.pcs-fx-btn-delete:hover { background: #fee2e2; }

/* Fixture form */
.pcs-fixture-form-card {
    background: #f9fbfd;
    border: 1px solid var(--pcs-border, #d0dcea);
    border-radius: 7px;
    padding: 20px;
}
.pcs-fixture-form-card h3 { margin: 0 0 16px; font-size: 1.05rem; }
.pcs-fx-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.pcs-fx-teams-group { margin-bottom: 14px; }
.pcs-fx-team-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.pcs-fx-team-check-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px 12px;
    border: 1px solid #d0dcea;
    border-radius: 20px;
    cursor: pointer;
    background: #fff;
    transition: all 0.15s;
    user-select: none;
}
.pcs-fx-team-check-label:hover { border-color: var(--pcs-primary); background: #eff6ff; }
.pcs-fx-team-check-label.checked,
.pcs-fx-team-check-label input:checked ~ * { color: #1d4ed8; }
.pcs-fx-team-check-label input[type="checkbox"]:checked + * { font-weight: 700; }
.pcs-fx-team-check-label input[type="checkbox"] { accent-color: var(--pcs-primary); }

/* Pre-fill notice in game form */
.pcs-fx-prefill-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 9px 14px;
    font-size: 0.84rem;
    color: #1d4ed8;
    font-weight: 600;
    margin-bottom: 14px;
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .pcs-fixture-item { flex-direction: column; gap: 10px; }
    .pcs-fx-actions { flex-direction: row; align-items: center; width: 100%; }
    .pcs-fx-countdown { min-width: unset; width: auto; }
    .pcs-fx-form-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   INJURY TRACKER  v1.2.56
   ═══════════════════════════════════════════════════════════ */

/* ── Page header ───────────────────────────────────────────── */
.pcs-injury-tracker { }

.it-year-form { display: flex; align-items: center; gap: 10px; }
.it-year-label { font-size: 0.85rem; font-weight: 600; color: var(--pcs-text-muted); }
.it-year-select {
    padding: 8px 12px;
    border: 1.5px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    font-family: var(--pcs-font);
    font-size: 0.9rem;
    background: var(--pcs-card);
    color: var(--pcs-text);
}

/* ── Summary cards row ─────────────────────────────────────── */
.it-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.it-summary-card {
    background: var(--pcs-card);
    border: 2px solid var(--pcs-primary);
    border-radius: var(--pcs-radius);
    overflow: hidden;
    box-shadow: var(--pcs-shadow);
}
.it-card-group {
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 14px;
    letter-spacing: 0.03em;
}
.it-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px 0;
}
.it-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    border-right: 1px solid var(--pcs-border);
    border-bottom: 1px solid var(--pcs-border);
}
.it-stat:nth-child(2n) { border-right: none; }
.it-stat:nth-child(3),
.it-stat:nth-child(4) { border-bottom: none; }
.it-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pcs-text);
    line-height: 1;
}
.it-stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--pcs-text-muted);
    font-weight: 600;
    margin-top: 4px;
}
.it-stat-active .it-stat-val  { color: var(--pcs-danger); }
.it-stat-recovered .it-stat-val { color: var(--pcs-success); }

/* ── Charts row ────────────────────────────────────────────── */
.it-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.it-chart-section { }
.it-chart-section h3 { margin-bottom: 16px; }
.it-chart-wrap {
    position: relative;
    height: 260px;
}
.it-chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* ── Contact breakdown ─────────────────────────────────────── */
.it-contact-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.it-contact-card {
    background: var(--pcs-bg);
    border: 1px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    overflow: hidden;
}
.it-contact-group {
    font-weight: 700;
    font-size: 0.82rem;
    padding: 7px 12px;
    background: var(--pcs-primary-light);
    color: var(--pcs-primary);
    letter-spacing: 0.03em;
}
.it-contact-bars { padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.it-bar-row { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; }
.it-bar-label { width: 80px; flex-shrink: 0; color: var(--pcs-text-muted); font-weight: 500; }
.it-bar-track {
    flex: 1;
    height: 10px;
    background: var(--pcs-border);
    border-radius: 6px;
    overflow: hidden;
}
.it-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
    min-width: 4px;
}
.it-bar-contact    { background: #e74c3c; }
.it-bar-noncontact { background: #f39c12; }
.it-bar-unknown    { background: #bdc3c7; }
.it-bar-count { font-weight: 700; color: var(--pcs-text); width: 20px; text-align: right; }

/* ── Table header & filters ────────────────────────────────── */
.it-table-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.it-table-header h3 { margin: 0; }
.it-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.it-filters select {
    padding: 7px 10px;
    border: 1.5px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    font-family: var(--pcs-font);
    font-size: 0.83rem;
    background: var(--pcs-card);
    color: var(--pcs-text);
}

/* ── Table ─────────────────────────────────────────────────── */
.it-table-wrap { overflow-x: auto; }
.it-table { min-width: 900px; }
.it-table td { font-size: 0.82rem; vertical-align: top; }
.it-desc { max-width: 220px; white-space: normal; line-height: 1.4; }

.it-group-chip {
    display: inline-block;
    color: #fff;
    border-radius: 12px;
    padding: 2px 9px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* Severity badges */
.it-sev-badge {
    display: inline-block;
    border-radius: 12px;
    padding: 2px 9px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.it-sev-minor        { background: #fef3c7; color: #92400e; }
.it-sev-moderate     { background: #fee2e2; color: #991b1b; }
.it-sev-severe       { background: #fde8e8; color: #7f1d1d; font-weight: 800; }
.it-sev-season_ending{ background: #1e0010; color: #f87171; font-weight: 800; }

/* Status */
.it-status {
    display: inline-block;
    border-radius: 12px;
    padding: 2px 9px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.it-status-active    { background: var(--pcs-danger-light); color: var(--pcs-danger); }
.it-status-recovered { background: var(--pcs-success-light); color: var(--pcs-success); }

/* ── Incidence per 1000 player hours ───────────────────────── */
.it-incidence-table-wrap { overflow-x: auto; }
.it-incidence-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.it-incidence-table th,
.it-incidence-table td { padding: 8px 12px; border-bottom: 1px solid var(--pcs-border, #e0e0e0); }
.it-incidence-table thead th { background: color-mix(in srgb, var(--pcs-primary) 8%, #ffffff); font-weight: 600; text-align: left; }
.it-risk-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.8em; font-weight: 600; }
.it-risk-low      { background: #e8f8f1; color: #1e8449; }
.it-risk-moderate { background: #fef9e7; color: #b7770d; }
.it-risk-high     { background: #fdedec; color: #c0392b; }

/* ── Dark mode ─────────────────────────────────────────────── */
body.pcs-dark .it-summary-card { background: var(--pcs-card); border-color: var(--pcs-border); }
body.pcs-dark .it-stat { border-color: var(--pcs-border); }
body.pcs-dark .it-contact-card { background: #0f1923; border-color: var(--pcs-border); }
body.pcs-dark .it-contact-group { background: #0d2a45; }
body.pcs-dark .it-bar-track { background: var(--pcs-border); }
body.pcs-dark .it-year-select { background: var(--pcs-card); border-color: var(--pcs-border); }
body.pcs-dark .it-filters select { background: var(--pcs-card); border-color: var(--pcs-border); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
    .it-charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .it-page-header { flex-direction: column; }
    .it-summary-row { grid-template-columns: 1fr 1fr; }
    .it-table-header { flex-direction: column; }
}
@media (max-width: 400px) {
    .it-summary-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   TEAM PERFORMANCE TRACKER — Card layout  v1.2.56
   ═══════════════════════════════════════════════════════════ */

.pcs-bench-category-block {
    margin-bottom: 22px;
}

.pcs-bench-cat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pcs-primary, #0a6ebd);
    border-bottom: 2px solid var(--pcs-primary, #0a6ebd);
    padding-bottom: 5px;
    margin-bottom: 12px;
}

/* Responsive card grid — 2 cols on mobile, 3–4 on desktop */
.pcs-bench-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (min-width: 480px)  { .pcs-bench-cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px)  { .pcs-bench-cards-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .pcs-bench-cards-grid { grid-template-columns: repeat(5, 1fr); } }

.pcs-bench-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.pcs-bench-card-title {
    background: var(--pcs-primary, #0a6ebd);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 7px 10px;
    line-height: 1.3;
    min-height: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.pcs-bench-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}
.pcs-bench-stat:nth-child(2n) { border-right: none; }
.pcs-bench-stat:nth-child(3),
.pcs-bench-stat:nth-child(4)  { border-bottom: none; }

.pbs-val {
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.1;
    color: #1a1a2e;
}
.pbs-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8a98a8;
    margin-top: 3px;
    font-weight: 600;
}

/* Colour-code each stat */
.pcs-bench-avg  .pbs-val { color: var(--pcs-primary); }
.pcs-bench-best .pbs-val { color: #27ae60; }
.pcs-bench-worst .pbs-val { color: #e67e22; }
.pcs-bench-tested .pbs-val { color: #8a98a8; }

/* Dark mode */
body.pcs-dark .pcs-bench-card { background: var(--pcs-card); border-color: var(--pcs-border); }
body.pcs-dark .pcs-bench-stat { border-color: var(--pcs-border); }
body.pcs-dark .pbs-val { color: var(--pcs-text); }
body.pcs-dark .pcs-bench-avg  .pbs-val { color: #4da6ff; }
body.pcs-dark .pcs-bench-best .pbs-val { color: #52d68a; }

/* ═══════════════════════════════════════════════════════════════
   GAME DAY — BEAUTIFIED SECTIONS
   Upcoming Fixtures · History · Team Standings
═══════════════════════════════════════════════════════════════ */

/* ── Upcoming Fixtures ────────────────────────────────────────── */
.pcs-fixture-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(10,42,74,0.07);
    overflow: hidden;
    margin-bottom: 14px;
    transition: box-shadow 0.2s, transform 0.15s;
}
.pcs-fixture-card:hover {
    box-shadow: 0 6px 20px rgba(10,42,74,0.13);
    transform: translateY(-2px);
}
.pcs-fixture-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f0f4f8;
    background: linear-gradient(135deg, #f8fafd 0%, #edf3fa 100%);
}
.pcs-fx-date {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.pcs-fx-opponent {
    font-size: 1.08rem;
    font-weight: 800;
    color: #0a2a4a;
    flex: 1;
}
.pcs-fx-ha-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pcs-fx-ha-tag.home { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.pcs-fx-ha-tag.away { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.pcs-fixture-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    align-items: center;
}
.pcs-fx-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.pcs-fx-team-tag { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.pcs-fixture-card-actions {
    display: flex;
    gap: 8px;
    padding: 10px 16px 14px;
    flex-wrap: wrap;
    border-top: 1px solid #f0f4f8;
    background: #fafbfd;
}
.pcs-fixture-card-actions .btn,
.pcs-fixture-card-actions a.pcs-sched-toggle.btn {
    font-size: 0.82rem;
    padding: 7px 14px;
    border-radius: 7px;
    font-weight: 700;
    text-decoration: none;
}
.pcs-fx-notes {
    padding: 8px 16px 12px;
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
    border-top: 1px dashed #e2e8f0;
}

/* ── History / Match List ─────────────────────────────────────── */
.pcs-match-list { display: flex; flex-direction: column; gap: 8px; }
.pcs-match-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(10,42,74,0.05);
    transition: box-shadow 0.18s, transform 0.15s;
    flex-wrap: nowrap;
}
.pcs-match-row:hover {
    box-shadow: 0 4px 14px rgba(10,42,74,0.11);
    transform: translateY(-1px);
}
.pcs-match-row.active {
    border-color: var(--pcs-primary);
    box-shadow: 0 0 0 2px rgba(10,110,189,0.18);
}
.pcs-match-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: none;
    border-radius: 0;
}
.pcs-match-item:hover { background: transparent; border-color: transparent; }
.pcs-match-item-date {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pcs-match-item-opp {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0a2a4a;
}
.pcs-match-item-coach {
    font-size: 0.72rem;
    color: #94a3b8;
}
.pcs-match-row.active .pcs-match-item-date { color: rgba(10,110,189,0.6); }
.pcs-match-row.active .pcs-match-item-opp  { color: var(--pcs-primary); }

/* Score column — right side of history card */
.pcs-quick-score-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 86px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fb 100%);
    border-left: 1px solid #e2e8f0;
    gap: 4px;
}
.pcs-score-display {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: var(--pcs-primary) !important;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
}
/* Win/loss colour coding on score */
.pcs-match-row.pcs-result-win  .pcs-quick-score-wrap { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-left-color: #86efac; }
.pcs-match-row.pcs-result-win  .pcs-score-display { color: #166534 !important; }
.pcs-match-row.pcs-result-loss .pcs-quick-score-wrap { background: linear-gradient(135deg, #fff1f2, #ffe4e6); border-left-color: #fca5a5; }
.pcs-match-row.pcs-result-loss .pcs-score-display { color: #991b1b !important; }
.pcs-match-row.pcs-result-draw .pcs-quick-score-wrap { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-left-color: #fde68a; }
.pcs-match-row.pcs-result-draw .pcs-score-display { color: #92400e !important; }

.pcs-score-form {
    display: none;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Team Standings ──────────────────────────────────────────── */
/* The standings cards live in inline styles on game-day.php.
   We override / enhance them here for a polished look. */
#gd-standings .pcs-section-body,
#gd-standings {
    padding: 14px 16px;
}
#gd-standings > div > div[style*="border-radius:8px"] {
    box-shadow: 0 2px 8px rgba(10,42,74,0.07);
    transition: box-shadow 0.18s, transform 0.15s;
}
#gd-standings > div > div[style*="border-radius:8px"]:hover {
    box-shadow: 0 5px 16px rgba(10,42,74,0.13);
    transform: translateY(-2px);
}

/* ── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 640px) {
    .pcs-fixture-card-header { padding: 12px 12px 8px; }
    .pcs-fixture-card-meta   { padding: 8px 12px; }
    .pcs-fixture-card-actions{ padding: 8px 12px 12px; }
    .pcs-fx-opponent { font-size: 0.98rem; }
    .pcs-quick-score-wrap { min-width: 72px; padding: 8px 8px; }
    .pcs-score-display { font-size: 0.92rem !important; }
}

/* ============================================================
   LOGIN PAGE — Mobile Polish (v1.3)
   ============================================================ */

/* 1. Hide the WordPress page title "Login" — use high-specificity selectors
      to beat any theme that adds its own h1 styling */
body .pcs-login-form-wrapper ~ * h1,
.entry-header:has(+ * .pcs-login-form-wrapper) .entry-title,
.entry-header .entry-title {
    /* Fallback — hidden by JS below if :has() not supported */
}
/* JS-free approach: hide ALL h1 on the page when login form is present.
   We use the adjacent/sibling combinator trick. Actual hiding done via
   the .pcs-login-page-active class added to <body> by inline JS in auth.php */
body.pcs-login-active .entry-title,
body.pcs-login-active h1.page-title,
body.pcs-login-active .page-header,
body.pcs-login-active .entry-header {
    display: none !important;
}

/* 2. Full-screen gradient background */
body.pcs-login-active,
body.pcs-login-active .site-content,
body.pcs-login-active #content,
body.pcs-login-active #primary,
body.pcs-login-active .pcs-page-bg {
    background: linear-gradient(160deg, color-mix(in srgb, var(--pcs-primary) 40%, #05111f) 0%, var(--pcs-primary-dark) 60%, color-mix(in srgb, var(--pcs-primary) 55%, #05111f) 100%) !important;
    min-height: 100vh;
}

/* 3. Make the content area a full-height flex container */
body.pcs-login-active .entry-content,
body.pcs-login-active .wp-block-post-content,
body.pcs-login-active #content .entry-content {
    min-height: 100vh;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px !important;
    margin: 0 !important;
    max-width: 100% !important;
    background: transparent !important;
}

/* 4. The card */
.pcs-login-form-wrapper {
    width: 100%;
    max-width: 420px !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    padding: 36px 28px 28px !important;
    background: #fff !important;
    position: relative;
}

/* 5. Branding block — sits inside the card as a real div via PHP */
.pcs-login-branding {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--pcs-border);
}
.pcs-login-branding-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--pcs-primary);
    margin: 0 0 6px;
    text-align: center;
    line-height: 1.2;
}
.pcs-login-branding-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pcs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    text-align: center;
}

/* 6. Form elements */
.pcs-login-form-wrapper h2 {
    font-size: 1.2rem !important;
    text-align: center !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: none !important;
    color: var(--pcs-text) !important;
}
.pcs-login-form-wrapper .form-group label {
    font-size: 0.78rem !important;
}
.pcs-login-form-wrapper .form-group input {
    padding: 13px 14px !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
}
.pcs-login-btn,
.pcs-login-form-wrapper button[type="submit"] {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 16px rgba(10,110,189,0.4) !important;
    margin-top: 4px;
}

/* 7. Logged-in state buttons */
.pcs-login-form-wrapper .btn[href*="dashboard"],
.pcs-login-form-wrapper a[style*="0073aa"] {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 13px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(10,110,189,0.35) !important;
}
.pcs-login-form-wrapper a[href*="logout"] {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 13px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg,#e74c3c,#c0392b) !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(231,76,60,0.35) !important;
    margin-top: 4px;
}

/* 8. Register prompt */
.pcs-login-register-prompt {
    font-size: 0.85rem !important;
    margin-top: 16px !important;
}

/* 9. WP Admin link — de-emphasised */
.pcs-login-form-wrapper a[href*="wp-admin"] {
    font-size: 0.78rem !important;
    color: var(--pcs-text-muted) !important;
    opacity: 0.7;
    display: block;
    text-align: center;
    margin: 8px 0 4px;
}

/* 10. Mobile tightening */
@media (max-width: 400px) {
    .pcs-login-form-wrapper { padding: 28px 18px 22px !important; }
    .pcs-login-branding-title { font-size: 1.5rem; }
}

/* Logout button class (replaces inline style) */
.pcs-login-logout-btn {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 13px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(231,76,60,0.3) !important;
    font-family: var(--pcs-font);
    font-size: 0.95rem !important;
}
.pcs-login-logout-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    color: #fff !important;
}
.pcs-login-admin-link {
    display: block;
    text-align: center;
    font-size: 0.8rem !important;
    color: var(--pcs-text-muted) !important;
    text-decoration: none;
    opacity: 0.7;
    padding: 4px 0;
}
.pcs-login-admin-link:hover { opacity: 1; color: var(--pcs-primary) !important; }

/* Coaches directory — same gradient background as login, but normal page layout */
body.pcs-login-active:has(.pcs-coaches-directory-page) .entry-content,
body.pcs-login-active:has(.pcs-coaches-directory-page) .wp-block-post-content {
    display: block !important;
    min-height: unset !important;
    padding: 24px 16px !important;
}

/* Coach dashboard & other full pages — gradient bg, normal layout */
body.pcs-login-active.pcs-full-page .entry-content,
body.pcs-login-active.pcs-full-page .wp-block-post-content {
    display: block !important;
    min-height: unset !important;
    padding: 20px 16px 40px !important;
}

/* Compare Teams button — match primary blue not red */
.pcs-tvt-compare-btn,
button[onclick*="compare"],
.pcs-season-report-section .btn-danger,
form .btn-danger {
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark)) !important;
    box-shadow: 0 4px 14px rgba(10,110,189,0.35) !important;
    color: #fff !important;
}
.pcs-tvt-compare-btn:hover,
.pcs-season-report-section .btn-danger:hover {
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark)) !important;
}

/* Stat cards — slightly elevated on gradient bg */
body.pcs-login-active .pcs-coach-stat {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* ── Bulk Test Entry — Team Checkbox Grid ─────────────────── */
.bulk-team-cb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.bulk-team-cb-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 10px;
    border: 1.5px solid var(--pcs-border);
    border-radius: 8px;
    cursor: pointer;
    background: var(--pcs-card);
    user-select: none;
    transition: border-color 0.15s, background 0.15s;
    text-transform: none;
    text-align: center;
    min-height: 54px;
    max-width: 90px;
}

.bulk-team-cb-label input[type="checkbox"] {
    accent-color: var(--pcs-primary);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin: 0;
}

.bulk-team-cb-label:has(input:checked) {
    border-color: var(--pcs-primary);
    background: var(--pcs-primary-light);
    color: var(--pcs-primary);
}

.bulk-team-cb-label:hover {
    border-color: var(--pcs-primary);
}

/* Mobile: 4 per row down to 600px (reconciled from de-duped copy) */
@media (max-width: 640px) {
    .bulk-team-cb-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .bulk-team-cb-label { max-width: unset; }
}

@media (max-width: 400px) {
    .bulk-team-cb-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Test Reminders — Force primary blue on card headers ───── */
.pcs-sched-card-header {
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark)) !important;
}
.pcs-sched-team-badge {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    font-size: 0.75rem;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 700;
}
/* Fix category cell wrapping — allow wrap but limit height */
.pcs-sched-field span {
    display: block;
    line-height: 1.3;
}
/* Sched toggle — reuse collapsible section styles */
.pcs-sched-toggle {
    border-radius: 8px 8px 0 0;
}

/* ── Player dashboard — consistent width for leaderboard and player list ── */
/* Player dashboard width — mobile only constraint */
@media (max-width: 640px) {
    .pcs-player-dashboard,
    .pcs-players-selection-list {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ── Injury Tracker fixes ────────────────────────────────── */

/* Table — show only key columns on mobile, hide less important ones */
@media (max-width: 640px) {
    .it-table { min-width: unset !important; width: 100%; }
    .it-table th:nth-child(3),  /* Team */
    .it-table td:nth-child(3),
    .it-table th:nth-child(4),  /* Group */
    .it-table td:nth-child(4),
    .it-table th:nth-child(6),  /* Severity */
    .it-table td:nth-child(6),
    .it-table th:nth-child(10), /* Description */
    .it-table td:nth-child(10) {
        display: none;
    }
    .it-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Group card headers — use brand colour */
.it-card-group {
    background: var(--pcs-primary) !important;
}

/* Group chip in table — use brand colour */
.it-group-chip {
    background: var(--pcs-primary) !important;
}

/* ── Injury Tracker — Header & Chart & Mobile Card fixes ─── */

/* Force brand colour on section toggle inside dashboard-section wrapper.
   Negative margins make the toggle bleed edge-to-edge regardless of
   the parent padding, so green always touches both sides of the card. */
.dashboard-section .pcs-section-toggle,
.pcs-injury-tracker .pcs-section-toggle {
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark)) !important;
    color: #fff !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-section .pcs-section-toggle:hover,
.pcs-injury-tracker .pcs-section-toggle:hover {
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark)) !important;
}
.pcs-injury-tracker .pcs-section-toggle-label { color: #fff !important; }
.pcs-injury-tracker .pcs-section-toggle-icon { color: rgba(255,255,255,0.85) !important; }

/* Chart containers — fixed height so charts don't distort */
.it-chart-wrap {
    position: relative;
    height: 220px !important;
    width: 100%;
}
.it-chart-wrap canvas {
    max-width: 100%;
}

/* Mobile: stack charts vertically */
@media (max-width: 640px) {
    .it-charts-row {
        flex-direction: column !important;
        gap: 12px;
    }
    .it-chart-section {
        width: 100% !important;
        flex: unset !important;
    }
    .it-chart-wrap { height: 200px !important; }
}

/* Mobile injury cards */
.it-mobile-cards { display: none; }

@media (max-width: 640px) {
    .it-mobile-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
    .it-desktop-table { display: none; }
}

.it-mobile-card {
    background: var(--pcs-card);
    border: 1px solid var(--pcs-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(10,110,189,0.08);
}
.it-mc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    border-bottom: none;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}
.it-mc-header strong { color: #fff; }
.it-mc-body { padding: 0; }
.it-mc-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 16px;
    font-size: 0.84rem;
    border-bottom: 1px solid var(--pcs-border);
    gap: 12px;
}
.it-mc-row:last-child { border-bottom: none; }
.it-mc-row span:first-child {
    color: var(--pcs-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
    min-width: 90px;
    padding-top: 2px;
}
.it-mc-row span:last-child {
    color: var(--pcs-text);
    font-weight: 500;
    text-align: right;
    flex: 1;
}

/* ── Light page background (injury tracker, CSV, etc.) ─────── */
body.pcs-light-page .entry-content,
body.pcs-light-page .wp-block-post-content {
    background: var(--pcs-bg) !important;
    min-height: 100vh;
    padding: 20px 16px 40px !important;
    display: block !important;
}
body.pcs-light-page {
    background: var(--pcs-bg) !important;
}

/* Section toggles on light pages — brand colour header */
body.pcs-light-page .pcs-section-toggle,
body.pcs-light-page .
body.pcs-light-page .pcs-section-toggle-label { color: #fff !important; }
body.pcs-light-page .pcs-section-toggle-icon  { color: rgba(255,255,255,0.85) !important; }

/* v2.3.41: injury toggles fill their card edge-to-edge (match Test Reminders) */
.pcs-injury-tracker .dashboard-section > .pcs-section-toggle { border-radius: 0 !important; }
/* Green border on all cards in injury tracker and game day */
.pcs-injury-tracker .dashboard-section,
.pcs-gameday-wrap .dashboard-section {
    border: 2px solid var(--pcs-primary) !important;
}

/* Status badges for injury cards */
.it-status-active    { color: #e74c3c; font-weight: 700; font-size: 0.8rem; }
.it-status-recovered { color: #27ae60; font-weight: 700; font-size: 0.8rem; }

/* ── CSV page — force template link to brand colour ─────── */
.pcs-csv-manager .csv-template-link,
.csv-section .csv-template-link {
    color: var(--pcs-primary) !important;
}
.pcs-csv-manager .csv-template-link:hover {
    color: var(--pcs-primary-dark) !important;
}

/* Style the file input to look consistent */
.csv-file-label {
    display: block;
    margin: 8px 0;
}
.csv-file-label input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px dashed var(--pcs-border);
    border-radius: 8px;
    background: var(--pcs-bg);
    font-size: 0.88rem;
    cursor: pointer;
    box-sizing: border-box;
}
.csv-file-label input[type="file"]:focus {
    border-color: var(--pcs-primary);
    outline: none;
}

/* Injury card status badges on dark header */
.it-mc-header .it-status-active {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.it-mc-header .it-status-recovered {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Desktop — checkbox grid fills available width with more columns */
@media (min-width: 601px) {
    .bulk-team-cb-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
    }
    .bulk-team-cb-label {
        max-width: unset !important;
        font-size: 0.8rem;
    }
}
@media (min-width: 900px) {
    .bulk-team-cb-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)) !important;
    }
}

/* ── Player dashboard — match full width of player list ─────── */
/* On desktop, the leaderboard section should be as wide as the player table */
@media (min-width: 641px) {
    .pcs-player-dashboard {
        max-width: 1080px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}
/* On mobile, strip the extra horizontal padding added by the global wrapper rule */
@media (max-width: 640px) {
    .pcs-player-dashboard,
    .pcs-players-selection-list {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Dashboard-style pages — let the theme background show through */
body.pcs-dashboard-page .entry-content,
body.pcs-dashboard-page .wp-block-post-content {
    background: transparent !important;
    padding: 0 !important;
    display: block !important;
}
body.pcs-dashboard-page .pcs-section-toggle-label { color: #fff !important; }
body.pcs-dashboard-page .pcs-section-toggle-icon  { color: rgba(255,255,255,0.85) !important; }

/* Force theme background colour to show on dashboard-style pages */
body.pcs-dashboard-page #page,
body.pcs-dashboard-page #content,
body.pcs-dashboard-page #primary,
body.pcs-dashboard-page main,
body.pcs-dashboard-page .site-main,
body.pcs-dashboard-page article,
body.pcs-dashboard-page .entry-content,
body.pcs-dashboard-page .wp-block-post-content {
    background: transparent !important;
}

/* Test reminders — centred content on desktop */


/* Injury tracker & dashboard pages — force theme blue to show */
body.pcs-dashboard-page {
    background: var(--std-page-bg) !important;
}


/* Injury tracker wrapper — centred card on desktop */


/* ───────────────────────────────────────────────────────────
   v2.3.21 — Coach Dashboard & Coaches Directory width parity.
   Both pages were narrower than the other coach tools:
   the directory was missing the full-page body class, and
   the dashboard had no width override to beat the theme's
   default content cap. Widen both to a consistent column.
   ─────────────────────────────────────────────────────────── */
body .entry-content:has(.pcs-bulk-test-wrapper),
body .entry-content:has(.pcs-reminders-wrapper),
body .entry-content:has(.pcs-team-sheet-wrapper),
body .entry-content:has(.pcs-players-selection-list),
body .entry-content:has(.pcs-player-dashboard),
body .entry-content:has(.pcs-injury-tracker),
body .entry-content:has(.pcs-gameday-wrap),
body .entry-content:has(.pcs-team-mgmt-wrap),
body .entry-content:has(.pcs-archived-wrapper),
body .entry-content:has(.pcs-csv-manager),
body .entry-content:has(.pcs-help-wrap),
body .entry-content:has(.pcs-frontend-section),
body .wp-block-post-content:has(.pcs-bulk-test-wrapper),
body .wp-block-post-content:has(.pcs-reminders-wrapper),
body .wp-block-post-content:has(.pcs-team-sheet-wrapper),
body .wp-block-post-content:has(.pcs-players-selection-list),
body .wp-block-post-content:has(.pcs-player-dashboard),
body .wp-block-post-content:has(.pcs-injury-tracker),
body .wp-block-post-content:has(.pcs-gameday-wrap),
body .wp-block-post-content:has(.pcs-team-mgmt-wrap),
body .wp-block-post-content:has(.pcs-archived-wrapper),
body .wp-block-post-content:has(.pcs-csv-manager),
body .wp-block-post-content:has(.pcs-help-wrap),
body .wp-block-post-content:has(.pcs-frontend-section),
body .page-content:has(.pcs-bulk-test-wrapper),
body .page-content:has(.pcs-reminders-wrapper),
body .page-content:has(.pcs-team-sheet-wrapper),
body .page-content:has(.pcs-players-selection-list),
body .page-content:has(.pcs-player-dashboard),
body .page-content:has(.pcs-injury-tracker),
body .page-content:has(.pcs-gameday-wrap),
body .page-content:has(.pcs-team-mgmt-wrap),
body .page-content:has(.pcs-archived-wrapper),
body .page-content:has(.pcs-csv-manager),
body .page-content:has(.pcs-help-wrap),
body .page-content:has(.pcs-frontend-section),
body .post-content:has(.pcs-bulk-test-wrapper),
body .post-content:has(.pcs-reminders-wrapper),
body .post-content:has(.pcs-team-sheet-wrapper),
body .post-content:has(.pcs-players-selection-list),
body .post-content:has(.pcs-player-dashboard),
body .post-content:has(.pcs-injury-tracker),
body .post-content:has(.pcs-gameday-wrap),
body .post-content:has(.pcs-team-mgmt-wrap),
body .post-content:has(.pcs-archived-wrapper),
body .post-content:has(.pcs-csv-manager),
body .post-content:has(.pcs-help-wrap),
body .post-content:has(.pcs-frontend-section) {
    max-width: none !important;
}
.pcs-bulk-test-wrapper,
.pcs-reminders-wrapper,
.pcs-team-sheet-wrapper,
.pcs-players-selection-list,
.pcs-player-dashboard,
.pcs-injury-tracker,
.pcs-gameday-wrap,
.pcs-team-mgmt-wrap,
.pcs-archived-wrapper,
.pcs-csv-manager,
.pcs-help-wrap,
.pcs-frontend-section {
    max-width: 1280px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
/* Green borders on Game Day cards */
.pcs-gd-section { border: 2px solid var(--pcs-primary) !important; border-radius: var(--std-card-radius, 10px); overflow: hidden; }
/* Green borders on CSV, Archived Players, Manage Teams sections */
.pcs-csv-manager .dashboard-section,
.pcs-archived-wrapper .pcs-archived-card,
.pcs-team-mgmt-wrap .pcs-tm-group {
    border: 2px solid var(--pcs-primary) !important;
}
/* Green borders on Exercises page cards */
.pcs-frontend-section .pcs-card,
.pcs-frontend-section .pcs-category-form-card,
.pcs-frontend-section .pcs-exercise-list-card {
    border: 2px solid var(--pcs-primary) !important;
}
body .wp-block-post-content:has(.pcs-coach-dashboard),
body .wp-block-post-content:has(.pcs-coaches-directory-page),
body .page-content:has(.pcs-coach-dashboard),
body .page-content:has(.pcs-coaches-directory-page),
body .post-content:has(.pcs-coach-dashboard),
body .post-content:has(.pcs-coaches-directory-page) {
    max-width: none !important;
}
.pcs-coach-dashboard,
.pcs-coaches-directory-page {
    max-width: 1280px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ───────────────────────────────────────────────────────────
   v2.3.29 — UNIVERSAL mobile width.
   Every top-level block on the plugin's pages breaks out to the SAME
   near-full width with a small 12px border on each side. The width is
   measured from the viewport (100vw), so it is identical no matter how
   the active theme sizes its content wrapper — and identical for every
   section, so Test Results / Injury Rep

/* ───────────────────────────────────────────────────────────
   v2.3.30 — Solid, branded page background.
   The page background is now a solid tint of the branding primary
   colour (Settings → Club Branding) instead of a fixed gradient, so
   it follows the chosen colour. On mobile the same solid colour is
   laid behind the full-bleed sections so there are no patchy gaps.
   Dark mode keeps its own background.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    body.pcs-full-page:not(.pcs-dark),
    body.pcs-login-active:not(.pcs-dark) {
        background: #eef4fb !important; /* fallback */
        background: color-mix(in srgb, var(--pcs-primary) 7%, #ffffff) !important;
    }
}

/* ============================================================
   v2.3.32 — Page consistency
   Injury Tracker & Game Day were never added to the shared
   light-card background rule, so they rendered dark headings on
   the dark gradient. Injury Tracker, Game Day and Manage Teams
   also lacked the shared 1080px width cap. Both fixed below so
   every plugin page uses the same light card and the same width.
   ============================================================ */

/* 1) Same light card background as the other pages (beats the
      dashboard-page transparent rule via the body prefix). */
body.pcs-dashboard-page .entry-content:has(.pcs-injury-tracker),
body.pcs-dashboard-page .entry-content:has(.pcs-gameday-wrap),
body.pcs-dashboard-page .wp-block-post-content:has(.pcs-injury-tracker),
body.pcs-dashboard-page .wp-block-post-content:has(.pcs-gameday-wrap) {
    background: color-mix(in srgb, var(--pcs-primary) 7%, #ffffff) !important;
    padding: 24px 20px 40px !important;
    min-height: auto;
}
.pcs-injury-tracker,
.pcs-gameday-wrap {
    background: color-mix(in srgb, var(--pcs-primary) 7%, #ffffff) !important;
    border-radius: 0;
    padding: 20px 16px 40px;
}

/* 2) One shared max-width for every plugin page (incl. the three
      that were uncapped or set to a different value). */
.pcs-profile-form-wrapper, .pcs-testing-form-wrapper, .pcs-registration-form-wrapper,
.pcs-player-dashboard, .pcs-coach-dashboard, .pcs-coach-player-details,
.pcs-coach-player-profile, .pcs-progress-charts, .pcs-homepage,
.pcs-team-sheet-wrapper, .pcs-bulk-test-wrapper, .pcs-reminders-wrapper,



/* ============================================================
   v2.3.35 — Mobile layout (authoritative)
   Replaces the v2.3.34 block. The pages were rendering wider
   than the screen (negative wrapper margins + nothing clamping
   the page), so the whole layout scrolled sideways and clipped
   on both edges. This block: (1) clamps the page so it can't
   scroll sideways, (2) makes every plugin page full-width with
   one symmetric gutter and no negative margins, (3) gives every
   app page a light edge-to-edge background (no dark gutter),
   (4) keeps the injury-card / fixture text wrapping by word.
   Scoped to <=640px; desktop and the login screen are untouched.
   ============================================================ */
@media (max-width: 640px) {

    /* (1) Clamp the page — only on plugin pages — so nothing shifts off-screen */
    html:has(body.pcs-login-active),
    html:has(body.pcs-dashboard-page),
    html:has(body.pcs-light-page) { overflow-x: hidden !important; }
    body.pcs-login-active,
    body.pcs-dashboard-page,
    body.pcs-light-page { overflow-x: hidden !important; max-width: 100% !important; }

    /* (2a) Theme containers: clamp width for every plugin page */
    body.pcs-login-active   #content, body.pcs-login-active   #primary, body.pcs-login-active   .site-content,
    body.pcs-dashboard-page #content, body.pcs-dashboard-page #primary, body.pcs-dashboard-page .site-content,
    body.pcs-light-page     #content, body.pcs-light-page     #primary, body.pcs-light-page     .site-content {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    /* (2b) Light edge-to-edge background for app pages only — NOT the pure login screen */
    body.pcs-login-active.pcs-full-page #content, body.pcs-login-active.pcs-full-page #primary, body.pcs-login-active.pcs-full-page .site-content,
    body.pcs-dashboard-page #content, body.pcs-dashboard-page #primary, body.pcs-dashboard-page .site-content,
    body.pcs-light-page     #content, body.pcs-light-page     #primary, body.pcs-light-page     .site-content {
        background: color-mix(in srgb, var(--pcs-primary) 7%, #ffffff) !important;
    }
    body.pcs-dashboard-page,
    body.pcs-light-page {
        background: color-mix(in srgb, var(--pcs-primary) 7%, #ffffff) !important;
    }

    /* (3) Content area: full width, ONE symmetric gutter, no negative margins */
    body.pcs-login-active   .entry-content, body.pcs-login-active   .wp-block-post-content,
    body.pcs-dashboard-page .entry-content, body.pcs-dashboard-page .wp-block-post-content,
    body.pcs-light-page     .entry-content, body.pcs-light-page     .wp-block-post-content {
        width: auto !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 14px 12px 32px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* (4) Plugin wrappers: fill the content box, no negative margins, no centring offset.
       Padding lives on .entry-content above, so wrappers add none. */
    .pcs-injury-tracker, .pcs-gameday-wrap, .pcs-team-mgmt-wrap,
    .pcs-team-sheet-wrapper, .pcs-bulk-test-wrapper, .pcs-reminders-wrapper,
    .pcs-coaches-directory-page, .pcs-csv-manager, .pcs-coach-dashboard,
    .pcs-player-dashboard, .pcs-homepage, .pcs-players-selection-list,
    .pcs-archived-wrapper, .pcs-coach-player-details, .pcs-coach-player-profile,
    .pcs-profile-form-wrapper, .pcs-testing-form-wrapper, .pcs-registration-form-wrapper,
    .pcs-help-wrap, .pcs-weekly-report-wrap, .pcs-guardian-dashboard,
    .pcs-privacy-centre-wrap, .pcs-consent-wrap, .pcs-frontend-section {
        width: auto !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }

    /* Inner section padding shouldn't add a second gutter */
    #it-all-injuries { padding-left: 0 !important; padding-right: 0 !important; }

    /* Injury mobile cards: value uses available width, wraps by word */
    .it-mc-row { gap: 10px; }
    .it-mc-row > span:first-child { flex: 0 0 auto; max-width: 42%; }
    .it-mc-row > span:last-child  {
        flex: 1 1 auto; min-width: 0; text-align: right;
        white-space: normal; word-break: normal; overflow-wrap: anywhere;
    }

    /* Game Day fixture header: opponent on its own line, never per-char */
    .pcs-fx-opponent {
        flex: 1 1 100% !important; min-width: 0 !important;
        white-space: normal !important; word-break: normal !important; overflow-wrap: anywhere;
    }

    /* Bars / pickers must never exceed the content width */
    .pcs-section-toggle, .pcs-gd-section-header,
    #lb-group-picker, #lb-exercise-picker, #lb-submit-btn {
        max-width: 100% !important; box-sizing: border-box;
    }
}


@media (max-width: 640px) {
    /* Rudster theme layout — full width on plugin pages */
    body.pcs-login-active   .site-content-inner,
    body.pcs-dashboard-page .site-content-inner,
    body.pcs-light-page     .site-content-inner {
        display: block !important;
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }
    body.pcs-login-active   .content-area,
    body.pcs-dashboard-page .content-area,
    body.pcs-light-page     .content-area {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    body.pcs-login-active   #content,
    body.pcs-login-active   article,
    body.pcs-dashboard-page #content,
    body.pcs-dashboard-page article,
    body.pcs-light-page     #content,
    body.pcs-light-page     article {
        min-height: 0 !important;
    }
}

/* ── Team Sheet Card Layout ── */
.ts-cards { display: none; }
.ts-table-wrap { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ts-card {
    background: var(--pcs-card);
    border: 1px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    margin-bottom: var(--std-gap);
    overflow: hidden;
    box-shadow: var(--pcs-shadow);
}
.ts-card-header {
    display: flex;
    align-items: center;
    gap: var(--std-gap);
    padding: 12px 14px;
    background: var(--pcs-bg);
    border-bottom: 1px solid var(--pcs-border);
}
.ts-card-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--pcs-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem;
    flex-shrink: 0;
}
.ts-card-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ts-card-name { font-weight: 700; font-size: var(--std-body-size); color: var(--pcs-text); line-height: 1.2; }
.ts-card-num { margin-left: auto; font-size: var(--std-meta-size); color: var(--pcs-text-muted); flex-shrink: 0; }
.ts-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.ts-card-field {
    padding: 9px 14px;
    border-bottom: 1px solid var(--pcs-border);
    font-size: var(--std-body-size);
}
.ts-card-field:nth-child(odd) { border-right: 1px solid var(--pcs-border); }
.ts-card-field label {
    display: block;
    font-size: var(--std-meta-size);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pcs-text-muted);
    margin-bottom: 2px;
    font-weight: 600;
}
.ts-card-field span { font-weight: 600; color: var(--pcs-text); }
.ts-card-status {
    grid-column: 1 / -1;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--std-body-size);
    background: var(--pcs-bg);
}
.ts-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: var(--std-meta-size);
    font-weight: 600;
    background: var(--pcs-success-light);
    color: var(--pcs-success);
}
@media (max-width: 640px) {
    .ts-table-wrap { display: none; }
    .ts-cards { display: block; }
    .ts-photo { display: none !important; }
}

/* ── Team Sheet Filter Bar ── */
.ts-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}
.ts-filter-bar input[type="text"] {
    flex: 1;
    min-width: 140px;
    padding: 8px 12px;
    border: 1.5px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    font-size: 0.88rem;
    font-family: var(--pcs-font);
    background: #fff;
    color: var(--pcs-text);
    box-sizing: border-box;
}
#ts-position-filter,
#ts-status-filter {
    padding: 8px 14px;
    border: 1.5px solid var(--pcs-primary);
    border-radius: var(--pcs-radius-sm);
    font-size: 0.88rem;
    font-weight: 400;
    font-weight: 600;
    font-family: var(--pcs-font);
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    cursor: pointer;
    appearance: auto;
    min-height: 38px;
}
#ts-position-filter option,
#ts-status-filter option {
    background: #fff;
    color: var(--pcs-text);
}

/* ── Team sheet mobile filter bar: one row ── */
@media (max-width: 640px) {
    .ts-filter-bar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    /* Row 1: search input full width */
    .ts-filter-bar > div:first-child,
    .ts-filter-bar input[type="text"] {
        width: 100%;
        box-sizing: border-box;
    }
    /* Row 2: Clear + All positions + All statuses on one line */
    .ts-filter-bar .ts-filter-row-2 {
        display: flex;
        gap: 6px;
        align-items: center;
        flex-wrap: wrap;
    }
    .ts-filter-bar .ts-filter-row-2 .btn,
    .ts-filter-bar .ts-filter-row-2 select {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.8rem;
        padding: 8px 6px;
        box-sizing: border-box;
    }
}
/* ── Bulk action buttons: Transfer + Archive on one row, Delete (red) on same row ── */
@media (max-width: 640px) {
    .pcs-bulk-action-bar .pcs-bulk-btn-row {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    .pcs-bulk-action-bar .pcs-bulk-btn-row .btn {
        flex: 1;
        min-width: 0;
        text-align: center;
        justify-content: center;
    }
    /* Delete stays red */
    .pcs-bulk-action-bar .btn-danger {
        background: linear-gradient(135deg,#e74c3c,#c0392b) !important;
    }
}
/* ── Bulk action bar buttons — green style ── */
.pcs-bulk-action-bar button.btn,
.pcs-bulk-action-bar a.btn {
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark)) !important;
    color: #fff !important;
    border: none !important;
    min-height: 40px;
    font-size: 0.88rem;
    font-weight: 600;
}
/* Delete must stay red — override the green rule above */
.pcs-bulk-action-bar button.btn.btn-danger,
.pcs-bulk-action-bar .btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}


/* ═══ NUCLEAR BUTTON OVERRIDE ═══════════════════════════════════════
   Forces ALL .btn elements on plugin pages to use the branding colour
   regardless of WordPress/theme CSS load order. */
body.pcs-dashboard-page .btn,
body.pcs-light-page .btn,
body.pcs-login-active .btn,
body.pcs-dashboard-page button.btn,
body.pcs-light-page button.btn,
body.pcs-login-active button.btn,
body.pcs-dashboard-page button[type="submit"].btn,
body.pcs-light-page button[type="submit"].btn,
body.pcs-login-active button[type="submit"].btn,
body.pcs-dashboard-page button[type="button"].btn,
body.pcs-light-page button[type="button"].btn,
body.pcs-login-active button[type="button"].btn,
body.pcs-dashboard-page a.btn,
body.pcs-light-page a.btn,
body.pcs-login-active a.btn {
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark)) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--pcs-radius-sm) !important;
}
body.pcs-dashboard-page .btn-danger,
body.pcs-light-page .btn-danger,
body.pcs-login-active .btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}
body.pcs-dashboard-page .btn-secondary,
body.pcs-light-page .btn-secondary,
body.pcs-login-active .btn-secondary {
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark)) !important;
}
/* ═══════════════════════════════════════════════════════════════════ */

/* Print: always show table */

@media print {
    .ts-cards { display: none !important; }
    .ts-table-wrap { display: block !important; overflow: visible !important; }
}

/* ── Team Sheet Group Toggle (v2.3.71 addition) ── */
.team-sheet-group-header {
    cursor: pointer;
    user-select: none;
}
.team-sheet-group-header:hover { background: var(--pcs-primary-dark); }
.ts-toggle-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.78rem;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 10px;
}
.ts-toggle-btn:hover { background: rgba(255,255,255,0.35); }
.team-sheet-group-body.ts-collapsed { display: none; }

/* ── Game Day Detail / Print View (v2.3.73 addition) ── */
.pcs-gdv-print-wrap { font-family: Arial, sans-serif; font-size: 14px; color: #111; }
.pcs-gdv-print-wrap .gdv-actions { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.pcs-gdv-print-wrap .gdv-match-title { font-size:1.25rem; font-weight:700; color:#0a2a4a; margin:0 0 14px; padding-bottom:10px; border-bottom:3px solid #0a6ebd; }
.pcs-gdv-print-wrap .gdv-details { border:1px solid #d0dcea; border-radius:4px; margin-bottom:22px; overflow:hidden; }
.pcs-gdv-print-wrap .gdv-detail-row { display:flex; align-items:stretch; border-bottom:1px solid #e8eef6; }
.pcs-gdv-print-wrap .gdv-detail-row:last-child { border-bottom:none; }
.pcs-gdv-print-wrap .gdv-detail-label { flex:0 0 110px; padding:9px 12px; font-weight:700; font-size:0.72rem; text-transform:uppercase; letter-spacing:0.07em; color:var(--pcs-primary); background:#f4f7fb; display:flex; align-items:center; border-right:1px solid #d0dcea; }
.pcs-gdv-print-wrap .gdv-detail-value { flex:1; padding:9px 14px; font-size:0.88rem; color:#1a1a1a; display:flex; align-items:center; min-height:40px; }
.pcs-gdv-print-wrap .gdv-detail-score { font-weight:700; color:var(--pcs-primary); }
.pcs-gdv-print-wrap .gdv-notes-box { background:#f9f9f9; border-left:3px solid #0a6ebd; padding:9px 14px; margin-bottom:22px; font-size:0.85rem; color:#444; line-height:1.5; }
.pcs-gdv-print-wrap .gdv-notes-label { font-weight:700; color:var(--pcs-primary); text-transform:uppercase; font-size:0.70rem; letter-spacing:0.07em; display:block; margin-bottom:4px; }
.pcs-gdv-print-wrap .gdv-section-title { font-size:0.78rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; background:#0a2a4a; color:#fff; padding:8px 12px; display:block; width:100%; margin-bottom:0; }
.pcs-gdv-print-wrap .gdv-section-title.bench { background:#5a6a7a; }
.pcs-gdv-print-wrap .gdv-player-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:0; border:1px solid #d0dcea; border-top:none; margin-bottom:22px; }
.pcs-gdv-print-wrap .gdv-player-row { display:flex; align-items:center; gap:10px; padding:8px 12px; border-bottom:1px solid #eef2f7; font-size:0.85rem; }
.pcs-gdv-print-wrap .gdv-player-row:last-child { border-bottom:none; }
.pcs-gdv-print-wrap .gdv-player-num { font-weight:700; color:var(--pcs-primary); min-width:24px; text-align:center; font-size:0.8rem; }
.pcs-gdv-print-wrap .gdv-player-name { font-weight:600; flex:1; }
.pcs-gdv-print-wrap .gdv-player-pos { color:#888; font-size:0.78rem; }
.pcs-gdv-print-wrap .gdv-avatar-sm { width:28px; height:28px; border-radius:50%; background:#0a2a4a; color:#fff; display:flex; align-items:center; justify-content:center; font-size:0.65rem; font-weight:700; flex-shrink:0; overflow:hidden; }
.pcs-gdv-print-wrap .gdv-avatar-sm img { width:100%; height:100%; object-fit:cover; }

@media print {
    .pcs-gdv-print-wrap .gdv-actions { display: none; }
    .pcs-gdv-print-wrap { border-top: none !important; padding-top: 0 !important; }
}

/* ============================================================
   DESKTOP BUTTON FIXES — v2.9.27
   Fixes full-width buttons and oversized sort/action buttons
   that look wrong on desktop (min-width: 641px).
   ============================================================ */

@media (min-width: 641px) {

    /* 1. Show Leaderboard button — override inline width:100%
          The PHP sets width:100% inline; on desktop it should
          be auto-width like a normal action button. */
    #lb-submit-btn,
    button#lb-submit-btn {
        width: auto !important;
        min-width: 200px;
        align-self: flex-start;
    }

    /* 2. Player dashboard leaderboard form — row layout on desktop
          The three pickers (group, exercise, button) should sit
          side by side on wide screens, not stacked. */
    .pcs-player-dashboard .pcs-section-body > div[style*="flex-direction:column"] > div,
    .pcs-coach-dashboard  .pcs-section-body > div[style*="flex-direction:column"] > div {
        /* Keep stacked — only the button width changes */
    }

    /* 3. Sort button on player list / bulk test — tighter on desktop */
    .pcs-psl-sort-btn {
        padding: 6px 14px;
        font-size: 0.82rem;
        font-weight: 600;
        border-radius: var(--pcs-radius-sm);
        white-space: nowrap;
    }

    /* 4. Sort bar — left-align, no extra padding on desktop */
    .pcs-psl-sort-bar {
        padding: 0 0 12px 0;
        gap: 8px;
    }

    /* 5. Team sheet toolbar — consistent button sizing */
    .team-sheet-toolbar-actions .btn {
        padding: 8px 18px;
        font-size: 0.88rem;
    }

    /* 6. Bulk test — "Load Players" button width: auto, not stretched */
    .bulk-setup-bar button[type="submit"],
    .bulk-setup-bar .btn {
        width: auto !important;
        align-self: flex-end;
    }

    /* 7. Game Day form footer buttons — consistent sizing */
    .pcs-gameday-form-footer .btn {
        padding: 10px 22px;
        font-size: 0.9rem;
    }

    /* 8. Fixture form action buttons — compact on desktop */
    .pcs-fixture-card-actions .btn {
        font-size: 0.82rem;
        padding: 7px 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   COACH PROFESSIONAL PROFILE — v2.9.59
   Matches existing SMP card/section design language exactly.
   ═══════════════════════════════════════════════════════════════ */

/* ── Page wrapper — registered alongside other SMP wrappers ── */
.pcs-coach-pro-page {
    font-family: var(--pcs-font);
    font-size: var(--std-body-size);
    color: var(--pcs-text);
    line-height: 1.6;
    max-width: var(--std-content-max);
    margin: 0 auto;
    padding: 0 var(--std-page-pad);
    box-sizing: border-box;
}

/* ── Profile header card ─────────────────────────────────────── */
.pcs-pro-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--pcs-card);
    border: 1px solid var(--pcs-border);
    border-radius: var(--std-card-radius);
    padding: 18px var(--std-page-pad);
    margin-bottom: var(--std-gap);
    box-shadow: var(--pcs-shadow);
}

.pcs-pro-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.04em;
}

.pcs-pro-header-info { flex: 1; min-width: 0; }

.pcs-pro-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pcs-text);
    margin: 0 0 2px;
    line-height: 1.2;
}

.pcs-pro-title {
    font-size: 0.88rem;
    color: var(--pcs-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.pcs-pro-back {
    font-size: 0.82rem;
    color: var(--pcs-primary);
    text-decoration: none;
    font-weight: 600;
}
.pcs-pro-back:hover { text-decoration: underline; }

/* Expiry alert badges in header */
.pcs-pro-alert {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.pcs-pro-alert-expired  { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.pcs-pro-alert-expiring { background: #fff8e1; color: #e65100; border: 1px solid #ffcc80; }

/* ── Section cards — match .dashboard-section style ─────────── */
.pcs-pro-section {
    background: var(--pcs-card);
    border: 1px solid var(--pcs-border);
    border-radius: var(--std-card-radius);
    margin-bottom: var(--std-gap);
    box-shadow: var(--pcs-shadow);
    overflow: hidden;
}

.pcs-pro-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--std-page-pad);
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    font-weight: 700;
    font-size: var(--std-toggle-size);
    gap: 10px;
}

/* ── Toggle / action buttons in section header ───────────────── */
.pcs-pro-toggle-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    border-radius: var(--pcs-radius-sm);
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--pcs-font);
    transition: background 0.15s;
    white-space: nowrap;
}
.pcs-pro-toggle-btn:hover { background: rgba(255,255,255,0.35); }

/* ── Read-only info grid ─────────────────────────────────────── */
.pcs-pro-read-view {
    padding: var(--std-page-pad);
}

.pcs-pro-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pcs-pro-info-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 8px;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid var(--pcs-border);
    font-size: 0.9rem;
}
.pcs-pro-info-row:last-child { border-bottom: none; }
.pcs-pro-info-row.pcs-pro-info-full { grid-template-columns: 1fr; }

.pcs-pro-info-label {
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pcs-text-muted);
}

/* ── Edit forms ──────────────────────────────────────────────── */
.pcs-pro-edit-form {
    padding: var(--std-page-pad);
    border-top: 1px solid var(--pcs-border);
    background: var(--pcs-bg);
}

.pcs-pro-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.pcs-pro-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pcs-pro-field.pcs-pro-field-full {
    grid-column: 1 / -1;
}

.pcs-pro-field label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pcs-text-muted);
}

.pcs-pro-field .pcs-req { color: var(--pcs-danger); margin-left: 2px; }

.pcs-pro-input,
.pcs-pro-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    font-size: 0.92rem;
    font-family: var(--pcs-font);
    color: var(--pcs-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pcs-pro-input:focus,
.pcs-pro-textarea:focus {
    outline: none;
    border-color: var(--pcs-primary);
    box-shadow: 0 0 0 3px rgba(10,110,189,0.1);
}
.pcs-pro-textarea { min-height: 80px; resize: vertical; }

.pcs-pro-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--pcs-text);
    cursor: pointer;
}
.pcs-pro-checkbox-label input[type="checkbox"] {
    accent-color: var(--pcs-primary);
    width: 15px;
    height: 15px;
}

.pcs-pro-field-hint {
    font-size: 0.78rem;
    color: var(--pcs-text-muted);
    font-style: italic;
    margin: 2px 0 0;
}

.pcs-pro-form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* ── Buttons — inherit SMP btn system ───────────────────────── */
.pcs-pro-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 20px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--pcs-font);
    border: none;
    border-radius: var(--pcs-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.pcs-pro-btn-primary {
    background: linear-gradient(135deg, var(--pcs-primary), var(--pcs-primary-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(10,110,189,0.25);
}
.pcs-pro-btn-primary:hover {
    background: linear-gradient(135deg, var(--pcs-primary-dark), var(--pcs-primary-dark));
    box-shadow: 0 4px 14px rgba(10,110,189,0.35);
    transform: translateY(-1px);
    color: #fff;
}

.pcs-pro-btn-secondary {
    background: var(--pcs-bg);
    color: var(--pcs-text);
    border: 1px solid var(--pcs-border);
}
.pcs-pro-btn-secondary:hover {
    background: var(--pcs-border);
    color: var(--pcs-text);
}

.pcs-pro-btn-danger {
    background: linear-gradient(135deg, var(--pcs-danger), #c0392b);
    color: #fff;
    box-shadow: 0 2px 8px rgba(192,57,43,0.25);
}
.pcs-pro-btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    color: #fff;
}

.pcs-pro-btn-sm { padding: 5px 12px; font-size: 0.78rem; }

/* ── Feedback messages ───────────────────────────────────────── */
.pcs-pro-msg {
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: var(--pcs-radius-sm);
    font-size: 0.86rem;
    font-weight: 600;
}
.pcs-pro-msg.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.pcs-pro-msg.error   { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }

/* ── Empty state ─────────────────────────────────────────────── */
.pcs-pro-empty {
    padding: var(--std-page-pad);
    color: var(--pcs-text-muted);
    font-style: italic;
    font-size: 0.9rem;
    margin: 0;
}

/* ── Qualification cards ─────────────────────────────────────── */
.pcs-qual-card {
    border-bottom: 1px solid var(--pcs-border);
    padding: 14px var(--std-page-pad);
    transition: background 0.1s;
}
.pcs-qual-card:last-child { border-bottom: none; }
.pcs-qual-card:hover { background: var(--pcs-bg); }

.pcs-qual-card.pcs-qual-expired  { border-left: 3px solid var(--pcs-danger); }
.pcs-qual-card.pcs-qual-expiring { border-left: 3px solid #e65100; }

.pcs-qual-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.pcs-qual-name-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.pcs-qual-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--pcs-text);
}

.pcs-qual-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ── Qualification status badges ─────────────────────────────── */
.pcs-qual-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
}
.pcs-qual-badge-verified   { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.pcs-qual-badge-unverified { background: #fff8e1; color: #856404; border: 1px solid #ffd700; }
.pcs-qual-badge-expired    { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.pcs-qual-badge-expiring   { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }

/* ── Qualification detail rows ───────────────────────────────── */
.pcs-qual-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pcs-qual-detail {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 6px;
    font-size: 0.88rem;
    align-items: baseline;
}

.pcs-qual-detail.pcs-qual-detail-full { grid-template-columns: 1fr; }

.pcs-qual-detail-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pcs-text-muted);
}

.pcs-qual-date-expired  { color: var(--pcs-danger); font-weight: 700; }
.pcs-qual-date-expiring { color: #e65100; font-weight: 700; }
.pcs-qual-no-expiry     { color: #2e7d32; font-weight: 600; }

/* ── Verification stamp ──────────────────────────────────────── */
.pcs-qual-verified-stamp {
    margin-top: 10px;
    padding: 7px 12px;
    background: #e8f5e9;
    border-radius: var(--pcs-radius-sm);
    font-size: 0.8rem;
    color: #2e7d32;
    font-weight: 600;
    border: 1px solid #a5d6a7;
}

/* ── Admin verification controls ────────────────────────────── */
.pcs-qual-admin-controls {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--pcs-bg);
    border-radius: var(--pcs-radius-sm);
    border: 1px dashed var(--pcs-border);
}

.pcs-qual-verify-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pcs-qual-review-date {
    padding: 6px 10px;
    border: 1.5px solid var(--pcs-border);
    border-radius: var(--pcs-radius-sm);
    font-size: 0.85rem;
    font-family: var(--pcs-font);
}

.pcs-qual-verify-msg {
    margin-top: 6px;
    font-size: 0.82rem;
}

/* ── Expiry alert banner on coach dashboard ─────────────────── */
.pcs-qual-alert-banner {
    border-radius: var(--std-card-radius);
    overflow: hidden;
    margin-bottom: var(--std-gap);
    box-shadow: var(--pcs-shadow);
}

.pcs-qual-alert-item {
    padding: 12px var(--std-page-pad);
    font-size: 0.88rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pcs-qual-alert-item span {
    padding-left: 20px;
    font-size: 0.83rem;
    color: inherit;
    opacity: 0.9;
}

.pcs-qual-alert-red    { background: #ffebee; color: #b71c1c; border-left: 4px solid var(--pcs-danger); }
.pcs-qual-alert-yellow { background: #fff8e1; color: #856404; border-left: 4px solid #f0a500; }

/* ── Coach directory profile link ───────────────────────────── */
.coach-dir-profile-link {
    color: var(--pcs-text);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.15s;
}
.coach-dir-profile-link:hover { color: var(--pcs-primary); text-decoration: underline; }

/* ── Mobile responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
    .pcs-pro-form-grid { grid-template-columns: 1fr; }
    .pcs-pro-field.pcs-pro-field-full { grid-column: 1; }
    .pcs-pro-info-row { grid-template-columns: 100px 1fr; font-size: 0.85rem; }
    .pcs-qual-detail  { grid-template-columns: 100px 1fr; font-size: 0.83rem; }
    .pcs-pro-header   { padding: 14px 12px; }
    .pcs-pro-avatar   { width: 46px; height: 46px; font-size: 1.1rem; }
    .pcs-pro-name     { font-size: 1.15rem; }
    .pcs-qual-verify-wrap { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════════════
   PIN Login System
   ══════════════════════════════════════════════════════════════ */

/* ── Shared wrappers ────────────────────────────────────────── */
.pcs-pin-login-wrapper,
.pcs-pin-setup-wrapper {
    max-width: 360px;
    margin: 32px auto;
    background: var(--pcs-card-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* ── Branding block (reuses login branding tokens) ──────────── */
.pcs-pin-branding {
    text-align: center;
    width: 100%;
}

/* ── User banner (PIN login screen) ────────────────────────── */
.pcs-pin-user-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: color-mix(in srgb, var(--pcs-primary) 8%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--pcs-primary) 20%, #ffffff);
    border-radius: 12px;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
}
.pcs-pin-avatar {
    font-size: 2rem;
    line-height: 1;
}
.pcs-pin-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pcs-pin-welcome {
    font-size: 0.78rem;
    color: var(--pcs-text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pcs-pin-username {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pcs-text, #111827);
}

/* ── Prompt text ────────────────────────────────────────────── */
.pcs-pin-prompt {
    font-size: 0.92rem;
    color: var(--pcs-text-muted, #6b7280);
    text-align: center;
}

/* ── PIN dot indicator ──────────────────────────────────────── */
.pcs-pin-dots {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.pcs-pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--pcs-primary, #0073aa);
    background: transparent;
    transition: background 0.15s, transform 0.1s;
}
.pcs-pin-dot.pcs-pin-dot-filled {
    background: var(--pcs-primary, #0073aa);
    transform: scale(1.15);
}

/* ── PIN entry group (setup) ────────────────────────────────── */
.pcs-pin-entry-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.pcs-pin-entry-group label {
    font-size: 0.88rem;
    color: var(--pcs-text-muted, #6b7280);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Hidden input for PIN (accessible) ─────────────────────── */
.pcs-pin-hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* ── Numeric pad ────────────────────────────────────────────── */
.pcs-pin-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 280px;
}
.pcs-pin-key {
    aspect-ratio: 1;
    border: 2px solid var(--pcs-border, #e5e7eb);
    border-radius: 50%;
    background: var(--pcs-card-bg, #fff);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--pcs-text, #111827);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, border-color 0.12s, transform 0.08s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.pcs-pin-key:active,
.pcs-pin-key:focus {
    background: color-mix(in srgb, var(--pcs-primary) 12%, #ffffff);
    border-color: var(--pcs-primary, #0073aa);
    transform: scale(0.93);
    outline: none;
}
.pcs-pin-key:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.pcs-pin-key-empty {
    border: none;
    background: transparent;
    cursor: default;
    pointer-events: none;
}
.pcs-pin-key-del {
    font-size: 1.15rem;
    color: var(--pcs-text-muted, #6b7280);
}

/* ── Error / success messages ───────────────────────────────── */
.pcs-pin-error {
    width: 100%;
    box-sizing: border-box;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    text-align: center;
}
.pcs-pin-success {
    width: 100%;
    box-sizing: border-box;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    text-align: center;
}
@keyframes pcs-pin-shake {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}
.pcs-pin-shake {
    animation: pcs-pin-shake 0.35s ease;
}

/* ── Remember device checkbox ───────────────────────────────── */
.pcs-pin-remember-row {
    width: 100%;
}
.pcs-pin-remember-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.4;
    font-size: 0.92rem;
}
.pcs-pin-remember-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--pcs-primary, #0073aa);
    width: 18px;
    height: 18px;
}
.pcs-pin-remember-note {
    font-size: 0.78rem;
    color: var(--pcs-text-muted, #6b7280);
    margin: 6px 0 0 28px;
}

/* ── Actions row (save button) ──────────────────────────────── */
.pcs-pin-actions {
    width: 100%;
}
.pcs-pin-actions .pcs-login-btn {
    width: 100%;
}

/* ── Switch / skip links ────────────────────────────────────── */
.pcs-pin-switch-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}
.pcs-pin-switch-sep {
    color: var(--pcs-border, #d1d5db);
}
.pcs-pin-password-link,
.pcs-pin-diff-account {
    font-size: 0.85rem;
    color: var(--pcs-primary, #0073aa);
    text-decoration: none;
}
.pcs-pin-password-link:hover,
.pcs-pin-diff-account:hover {
    text-decoration: underline;
}
.pcs-pin-skip-row {
    text-align: center;
    width: 100%;
}
.pcs-pin-skip-link {
    font-size: 0.82rem;
    color: var(--pcs-text-muted, #6b7280);
    text-decoration: none;
}
.pcs-pin-skip-link:hover {
    color: var(--pcs-primary, #0073aa);
    text-decoration: underline;
}

/* ── PIN setup header ───────────────────────────────────────── */
.pcs-pin-setup-header {
    text-align: center;
    width: 100%;
}
.pcs-pin-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}
.pcs-pin-setup-header h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: var(--pcs-text, #111827);
}
.pcs-pin-setup-header p {
    font-size: 0.9rem;
    color: var(--pcs-text-muted, #6b7280);
    margin: 0;
}

/* ── Dark mode overrides ────────────────────────────────────── */
body.pcs-dark .pcs-pin-login-wrapper,
body.pcs-dark .pcs-pin-setup-wrapper {
    background: var(--pcs-card-bg);
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
body.pcs-dark .pcs-pin-key {
    border-color: var(--pcs-border);
    background: var(--pcs-card-bg);
    color: var(--pcs-text);
}
body.pcs-dark .pcs-pin-key:active,
body.pcs-dark .pcs-pin-key:focus {
    background: color-mix(in srgb, var(--pcs-primary) 18%, #1e293b);
}
body.pcs-dark .pcs-pin-user-banner {
    background: color-mix(in srgb, var(--pcs-primary) 12%, #1e293b);
    border-color: color-mix(in srgb, var(--pcs-primary) 25%, #1e293b);
}
body.pcs-dark .pcs-pin-error {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fca5a5;
}
body.pcs-dark .pcs-pin-success {
    background: #052e16;
    border-color: #14532d;
    color: #86efac;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .pcs-pin-login-wrapper,
    .pcs-pin-setup-wrapper {
        margin: 16px auto;
        padding: 22px 16px 20px;
        border-radius: 12px;
    }
    .pcs-pin-numpad {
        max-width: 260px;
        gap: 8px;
    }
    .pcs-pin-key {
        font-size: 1.2rem;
    }
}
