

/* =========================================================
   Bundled from app.css
========================================================= */

/* Core/shared stylesheet. Coach, athlete and calendar-specific sections were split out in iteration 06. */

* {
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

@supports (scrollbar-gutter: stable) {
    html {
        overflow-y: auto;
        scrollbar-gutter: stable;
    }
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

a {
    color: #2563eb;
    text-decoration: none;
}

.site-header {
    background: #111827;
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header a {
    color: #fff;
    margin-left: 16px;
}

.logo {
    font-weight: 700;
    margin-left: 0 !important;
}

/* Progress dashboards */

.progress-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.progress-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.progress-page-header h1 {
    margin-top: 0;
}

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

.progress-summary-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    min-width: 0;
}

.progress-summary-label {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.progress-summary-card strong {
    display: block;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1;
    margin-bottom: 6px;
}

.progress-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.progress-chart-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    min-width: 0;
}

.progress-chart-card-wide {
    grid-column: span 2;
}

.progress-chart-header {
    margin-bottom: 16px;
}

.progress-chart-header h2 {
    margin: 0 0 6px;
}

.progress-chart-canvas-wrap {
    position: relative;
    height: 340px;
    width: 100%;
}

.progress-chart-canvas-wrap-small {
    height: 300px;
}

.progress-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    text-align: center;
}

.acwr-guide-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.acwr-guide-grid div {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
}

.acwr-guide-grid strong {
    display: block;
    margin-bottom: 4px;
}

.acwr-guide-grid span {
    color: #6b7280;
}

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

    .progress-chart-grid {
        grid-template-columns: 1fr;
    }

    .progress-chart-card-wide {
        grid-column: span 1;
    }

    .acwr-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .progress-page {
        padding: 14px;
    }

    .progress-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .progress-page-header .button {
        width: 100%;
        text-align: center;
    }

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

    .progress-chart-card {
        padding: 14px;
    }

    .progress-chart-canvas-wrap {
        height: 280px;
    }

    .progress-chart-canvas-wrap-small {
        height: 260px;
    }

    .acwr-guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .progress-page {
        padding: 10px;
    }

    .progress-chart-canvas-wrap {
        height: 250px;
    }

    .progress-summary-card strong {
        font-size: 28px;
    }
}

/* Responsive application navigation */

.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #111827;
    color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.app-header-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.app-brand {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: clamp(18px, 2vw, 22px);
    white-space: nowrap;
}

.primary-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.primary-nav a,
.nav-group-toggle {
    color: #fff;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
}

.nav-link,
.nav-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.nav-link:hover,
.nav-link:focus,
.nav-group-toggle:hover,
.nav-group-toggle:focus,
.nav-group.is-open .nav-group-toggle {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.nav-group {
    position: relative;
}

.nav-chevron {
    font-size: 12px;
    opacity: 0.75;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    display: none;
    min-width: 230px;
    padding: 8px;
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.nav-dropdown-right {
    left: auto;
    right: 0;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown,
.nav-group.is-open .nav-dropdown {
    display: grid;
    gap: 4px;
}

.nav-dropdown a {
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus {
    background: #f3f4f6;
    outline: none;
}

.nav-notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 999px;
    margin: 5px 0;
}

/* Navigation alignment fix */

.primary-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.primary-nav > .nav-link,
.primary-nav > .nav-group {
    display: flex;
    align-items: center;
    height: 44px;
}

.nav-link,
.nav-group-toggle {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    line-height: 1;
    box-sizing: border-box;
}

.nav-group-toggle {
    appearance: none;
    -webkit-appearance: none;
}

.nav-chevron {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transform: translateY(1px);
}

@media (max-width: 1050px) {
    .app-header-inner {
        padding: 12px 16px;
    }

    .primary-nav a,
    .nav-group-toggle {
        font-size: 14px;
    }

    .nav-link,
    .nav-group-toggle {
        padding: 8px 10px;
    }
}

@media (max-width: 900px) {
    body.nav-open {
        overflow: hidden;
    }

    .nav-toggle {
        display: block;
    }

    .primary-nav {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        bottom: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;
        padding: 16px;
        background: #111827;
        overflow-y: auto;
    }

    body.nav-open.primary-nav {
        align-items: stretch;
        gap: 10px;
    }

    .primary-nav > .nav-link,
    .primary-nav > .nav-group {
        height: auto;
        display: block;
    }

    .nav-link,
    .nav-group-toggle {
        width: 100%;
        height: 48px;
        justify-content: space-between;
        padding: 0 14px;
    }
}

    .nav-group {
        width: 100%;
    }

    .nav-dropdown,
    .nav-dropdown-right {
        position: static;
        display: none;
        min-width: 0;
        width: 100%;
        margin-top: 8px;
        padding: 8px;
        background: rgba(255, 255, 255, 0.08);
        border: 0;
        border-radius: 12px;
        box-shadow: none;
    }

    .nav-group:hover .nav-dropdown,
    .nav-group:focus-within .nav-dropdown {
        display: none;
    }

    .nav-group.is-open .nav-dropdown {
        display: grid;
        gap: 6px;
    }

    .nav-dropdown a {
        color: #fff;
        background: rgba(255, 255, 255, 0.06);
        white-space: normal;
    }

    .nav-dropdown a:hover,
    .nav-dropdown a:focus {
        background: rgba(255, 255, 255, 0.14);
    }

@media (max-width: 420px) {
    .app-header-inner {
        padding: 10px 12px;
    }

    .app-brand {
        max-width: 230px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .primary-nav {
        top: 64px;
        padding: 12px;
    }
}

/* Final responsive nav override */

.app-header {
    position: sticky !important;
    top: 0;
    z-index: 1000;
    background: #111827;
    color: #fff;
}

.app-header .app-header-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.app-header .app-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 20px;
    line-height: 1;
    white-space: nowrap;
}

.app-header .primary-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.app-header .primary-nav > .nav-link,
.app-header .primary-nav > .nav-group {
    display: flex;
    align-items: center;
    height: 44px;
    margin: 0;
    padding: 0;
}

.app-header .nav-link,
.app-header .nav-group-toggle {
    height: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.app-header .nav-link:hover,
.app-header .nav-link:focus,
.app-header .nav-group-toggle:hover,
.app-header .nav-group-toggle:focus,
.app-header .nav-group.is-open .nav-group-toggle {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.app-header .nav-group {
    position: relative;
}

.app-header .nav-chevron {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    font-size: 12px;
    opacity: 0.8;
    transform: translateY(1px);
}

.app-header .nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1001;
    display: none;
    min-width: 230px;
    padding: 8px;
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.app-header .nav-dropdown-right {
    left: auto;
    right: 0;
}

.app-header .nav-group:hover .nav-dropdown,
.app-header .nav-group:focus-within .nav-dropdown,
.app-header .nav-group.is-open .nav-dropdown {
    display: grid;
    gap: 4px;
}

.app-header .nav-dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #111827;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.app-header .nav-dropdown a:hover,
.app-header .nav-dropdown a:focus {
    background: #f3f4f6;
    outline: none;
}

.app-header .nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    padding: 10px;
}

.app-header .nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    margin: 5px 0;
    background: #fff;
    border-radius: 999px;
}

@media (max-width: 900px) {
    body.nav-open {
        overflow: hidden;
    }

    .app-header .app-header-inner {
        padding: 12px 16px;
    }

    .app-header .nav-toggle {
        display: block;
    }

    .app-header .primary-nav {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        display: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;
        padding: 16px;
        background: #111827;
        overflow-y: auto;
    }

    body.nav-open .app-header .primary-nav {
        display: flex;
    }

    .app-header .primary-nav > .nav-link,
    .app-header .primary-nav > .nav-group {
        display: block;
        width: 100%;
        height: auto;
    }

    .app-header .nav-link,
    .app-header .nav-group-toggle {
        width: 100%;
        height: 48px;
        min-height: 48px;
        justify-content: space-between;
        padding: 0 14px;
        background: rgba(255, 255, 255, 0.06);
    }

    .app-header .nav-group {
        width: 100%;
    }

    .app-header .nav-dropdown,
    .app-header .nav-dropdown-right {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        margin-top: 8px;
        padding: 8px;
        background: rgba(255, 255, 255, 0.08);
        border: 0;
        border-radius: 12px;
        box-shadow: none;
    }

    .app-header .nav-group:hover .nav-dropdown,
    .app-header .nav-group:focus-within .nav-dropdown {
        display: none;
    }

    .app-header .nav-group.is-open .nav-dropdown {
        display: grid;
        gap: 6px;
    }

    .app-header .nav-dropdown a {
        color: #fff;
        background: rgba(255, 255, 255, 0.06);
        white-space: normal;
    }

    .app-header .nav-dropdown a:hover,
    .app-header .nav-dropdown a:focus {
        background: rgba(255, 255, 255, 0.14);
    }
}

@media (max-width: 420px) {
    .app-header .app-header-inner {
        padding: 10px 12px;
    }

    .app-header .app-brand {
        max-width: 230px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-header .primary-nav {
        top: 64px;
        padding: 12px;
    }
}

/* Mobile nav open fallback */

html.nav-open,
body.nav-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .app-header.is-open .primary-nav,
    body.nav-open .app-header .primary-nav,
    html.nav-open .app-header .primary-nav {
        display: flex !important;
    }
}

/* Strong mobile hamburger fallback */

.app-header {
    z-index: 5000 !important;
}

.app-header .app-header-inner {
    position: relative;
    z-index: 5002;
}

.app-header .nav-toggle {
    position: relative;
    z-index: 5003;
    touch-action: manipulation;
}

@media (max-width: 900px) {
    .app-header .primary-nav {
        z-index: 5001 !important;
        pointer-events: auto;
    }

    html.nav-open,
    body.nav-open {
        overflow: hidden !important;
    }

    .app-header.is-open .primary-nav,
    body.nav-open .app-header .primary-nav,
    html.nav-open .app-header .primary-nav {
        display: flex !important;
    }
}

/* Refined resource library styling */

.library-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.library-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.library-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.library-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.library-card h3 {
    margin: 0 0 6px;
    font-size: 21px;
    line-height: 1.25;
}

.library-card p {
    margin: 0;
    line-height: 1.55;
}

.library-card .badge {
    white-space: nowrap;
}

.library-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.library-meta-grid div {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 13px;
    min-width: 0;
}

.library-meta-grid span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.library-meta-grid strong {
    display: block;
    margin: 7px 0 4px;
    font-size: 16px;
    line-height: 1.2;
    color: #111827;
    overflow-wrap: anywhere;
}

.library-meta-grid small {
    display: block;
    color: #64748b;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.library-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.library-upload-form {
    display: grid;
    gap: 26px;
}

.library-upload-form label {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.library-upload-form input[type="text"],
.library-upload-form input[type="url"],
.library-upload-form input[type="file"],
.library-upload-form select,
.library-upload-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 11px 12px;
    background: #fff;
    font: inherit;
}

.library-upload-form textarea {
    resize: vertical;
    min-height: 120px;
}

.library-upload-form input:focus,
.library-upload-form select:focus,
.library-upload-form textarea:focus {
    outline: 2px solid rgba(37, 99, 235, 0.25);
    border-color: #2563eb;
}

.library-access-section {
    display: grid;
    gap: 14px;
    padding-top: 6px;
}

.library-access-section h2 {
    margin-bottom: 0;
}

.checkbox-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.checkbox-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: 0.15s ease;
}

.checkbox-card:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.checkbox-card input {
    margin-top: 4px;
    accent-color: #2563eb;
}

.checkbox-card span,
.checkbox-card small {
    display: block;
}

.checkbox-card small {
    color: #64748b;
    margin-top: 3px;
}

.library-edit-resource-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.library-active-toggle {
    display: inline-flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
    cursor: pointer;
    white-space: nowrap;
}

.library-active-toggle input {
    accent-color: #2563eb;
}

.library-resource-view {
    display: grid;
    gap: 24px;
}

.library-resource-summary {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.library-resource-preview {
    display: grid;
    gap: 16px;
}

.library-video-player {
    width: 100%;
    max-height: 70vh;
    background: #000;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.library-image-preview {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.library-pdf-preview {
    width: 100%;
    height: 75vh;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

@media (max-width: 1100px) {
    .library-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .library-card {
        padding: 18px;
        border-radius: 18px;
    }

    .library-card-header,
    .library-edit-resource-header {
        flex-direction: column;
    }

    .library-meta-grid,
    .checkbox-card-grid {
        grid-template-columns: 1fr;
    }

    .library-actions,
    .form-actions {
        flex-direction: column;
    }

    .library-actions .button,
    .form-actions .button {
        width: 100%;
        text-align: center;
    }

    .library-pdf-preview {
        height: 60vh;
    }

    .library-active-toggle {
        white-space: normal;
    }
}

/* Resource library page spacing */

.library-page-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.library-page-shell .page-header {
    margin-bottom: 24px;
}

.library-page-shell .panel {
    margin-bottom: 24px;
}

@media (max-width: 760px) {
    .library-page-shell {
        width: calc(100% - 28px);
        padding-top: 20px;
        padding-bottom: 36px;
    }

    .library-page-shell .page-header {
        gap: 14px;
    }
}

/* Social wall */

.social-wall-page-shell {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.social-wall-page-shell .page-header {
    margin-bottom: 24px;
}

.social-compose-panel {
    margin-bottom: 24px;
}

.social-compose-form {
    display: grid;
    gap: 16px;
}

.social-compose-form label,
.social-coach-switcher label {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.social-compose-form textarea,
.social-reply-form textarea,
.social-compose-form select,
.social-coach-switcher select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    font: inherit;
}

.social-compose-form textarea:focus,
.social-reply-form textarea:focus,
.social-compose-form select:focus,
.social-coach-switcher select:focus {
    outline: 2px solid rgba(37, 99, 235, 0.22);
    border-color: #2563eb;
}

.social-feed {
    display: grid;
    gap: 18px;
}

.social-post-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.social-post-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
}

.social-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    font-weight: 900;
}

.social-avatar-small {
    width: 32px;
    height: 32px;
    font-size: 13px;
    background: #64748b;
}

.social-post-header h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.social-post-message {
    line-height: 1.65;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 18px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.social-replies {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.social-reply {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
}

.social-reply-body p {
    margin: 6px 0 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.social-reply-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.social-reply-meta span {
    color: #64748b;
    font-size: 13px;
}

.social-reply-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.social-delete-form {
    margin-top: 12px;
}

.link-button {
    border: 0;
    background: none;
    padding: 0;
    color: #64748b;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.link-button:hover {
    color: #dc2626;
}

.inline-form {
    margin: 0;
}

@media (max-width: 760px) {
    .social-wall-page-shell {
        width: calc(100% - 28px);
        padding-top: 20px;
        padding-bottom: 36px;
    }

    .social-post-card {
        padding: 16px;
        border-radius: 18px;
    }

    .social-post-header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .social-post-audience {
        grid-column: 1 / -1;
    }

    .social-reply {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .social-reply .inline-form {
        grid-column: 2;
    }

    .social-reply-form {
        grid-template-columns: 1fr;
    }

    .social-reply-form .button {
        width: 100%;
        text-align: center;
    }
}

/* Notifications */

.notification-page-shell {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.notification-list {
    display: grid;
    gap: 14px;
}

.notification-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    background: #fff;
}

.notification-card.is-unread {
    border-color: #93c5fd;
    background: #eff6ff;
}

.notification-card.is-read {
    opacity: 0.82;
}

.notification-card-header {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.notification-card h3 {
    margin: 0;
    font-size: 18px;
}

.notification-card p {
    margin: 8px 0 0;
    line-height: 1.5;
}

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width: 760px) {
    .notification-page-shell {
        width: calc(100% - 28px);
        padding-top: 20px;
        padding-bottom: 36px;
    }

    .notification-card {
        grid-template-columns: 1fr;
    }

    .notification-actions {
        flex-direction: column;
        justify-content: stretch;
    }

    .notification-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Notification nav badge */

.notification-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

/* Garmin pages */

.garmin-page-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.garmin-status-panel {
    margin-bottom: 24px;
}

.garmin-status-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.garmin-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 800;
    margin: 8px 0;
}

.garmin-status-connected {
    background: #dcfce7;
    color: #166534;
}

.garmin-status-disconnected {
    background: #e5e7eb;
    color: #374151;
}

.garmin-status-error {
    background: #fee2e2;
    color: #991b1b;
}

.garmin-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.garmin-athlete-grid,
.garmin-activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.garmin-athlete-card,
.garmin-activity-card {
    display: grid;
    gap: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.garmin-athlete-card-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.garmin-athlete-card h3,
.garmin-activity-card h3 {
    margin: 0 0 5px;
}

.garmin-activity-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.garmin-activity-metrics div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 11px;
}

.garmin-activity-metrics span,
.garmin-activity-metrics small {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.garmin-activity-metrics strong {
    display: block;
    margin: 5px 0;
    font-size: 17px;
}

.garmin-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 1000px) {
    .garmin-athlete-grid,
    .garmin-activity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .garmin-page-shell {
        width: calc(100% - 28px);
        padding-top: 20px;
        padding-bottom: 36px;
    }

    .garmin-status-header,
    .garmin-athlete-card-header {
        flex-direction: column;
    }

    .garmin-status-actions,
    .garmin-card-actions {
        flex-direction: column;
        width: 100%;
    }

    .garmin-status-actions .button,
    .garmin-card-actions .button {
        width: 100%;
        text-align: center;
    }

    .garmin-activity-metrics {
        grid-template-columns: 1fr;
    }
}

/* Final mobile navigation and athlete calendar safety rules */

html.nav-open,
body.nav-open {
    overflow: hidden !important;
}

.app-header {
    z-index: 5000 !important;
}

.app-header .app-header-inner {
    position: relative;
    z-index: 5002;
}

.app-header .nav-toggle {
    position: relative;
    z-index: 5003;
    touch-action: manipulation;
}

@media (max-width: 900px) {
    .app-header.is-open .primary-nav,
    body.nav-open .app-header .primary-nav,
    html.nav-open .app-header .primary-nav {
        display: flex !important;
    }
}

.athlete-calendar-mobile {
    display: none;
}

@media (max-width: 760px) {
    .athlete-calendar-desktop {
        display: none !important;
    }

    .athlete-calendar-mobile {
        display: block !important;
    }

    .athlete-mobile-week-strip {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 8px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 2px 10px;
        margin-bottom: 16px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .athlete-mobile-day {
        flex: 0 0 76px;
        width: 76px;
        min-width: 76px;
        min-height: 74px;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: #ffffff !important;
        color: #111827 !important;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: 8px 4px;
        text-align: center;
        scroll-snap-align: center;
    }

    .athlete-mobile-day.is-selected {
        flex-basis: 82px;
        width: 82px;
        min-width: 82px;
        background: #2563eb !important;
        border-color: #2563eb !important;
        color: #ffffff !important;
    }

    .athlete-mobile-day-name,
    .athlete-mobile-day-number {
        display: block !important;
        color: inherit !important;
        line-height: 1.1;
    }

    .athlete-mobile-day-name {
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        margin-bottom: 6px;
    }

    .athlete-mobile-day-number {
        font-size: 22px;
        font-weight: 900;
    }

    .athlete-mobile-day-dot {
        display: block !important;
        width: 6px;
        height: 6px;
        margin: 7px auto 0;
        border-radius: 999px;
        background: currentColor;
        opacity: 0.8;
    }
}

/* Final coach/athlete mobile nav safety */

html.nav-open,
body.nav-open {
    overflow: hidden !important;
}

.app-header {
    z-index: 5000 !important;
}

.app-header .app-header-inner {
    position: relative;
    z-index: 5002;
}

.app-header .nav-toggle {
    position: relative;
    z-index: 5003;
    touch-action: manipulation;
    cursor: pointer;
}

@media (max-width: 900px) {
    .app-header .primary-nav {
        z-index: 5001 !important;
        pointer-events: auto !important;
    }

    .app-header.is-open .primary-nav,
    body.nav-open .app-header .primary-nav,
    html.nav-open .app-header .primary-nav {
        display: flex !important;
    }
}

/* Garmin workout push panel */

.garmin-push-panel {
    display: grid;
    gap: 16px;
}

.garmin-push-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.garmin-push-header h2 {
    margin-bottom: 4px;
}

@media (max-width: 760px) {
    .garmin-push-header {
        flex-direction: column;
    }

    .garmin-push-panel .button {
        width: 100%;
        text-align: center;
    }
}

/* Heart rate zones */

.hr-zone-form {
    display: grid;
    gap: 24px;
}

.hr-zone-table input {
    width: 100%;
    min-width: 90px;
}

.hr-zone-table input[name="zone_name[]"] {
    min-width: 160px;
}

.hr-zone-table input[name="description[]"] {
    min-width: 220px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

@media (max-width: 760px) {
    .section-header {
        flex-direction: column;
    }

    .section-header .button,
    .hr-zone-form .form-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Training paces */

.training-pace-page {
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
}

.training-pace-form {
    display: grid;
    gap: 24px;
    min-width: 0;
    width: 100%;
}

.training-pace-form .panel {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.training-pace-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    min-width: 0;
    width: 100%;
}

.training-pace-form label,
.training-pace-form input,
.training-pace-form select,
.training-pace-form textarea {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.training-pace-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.training-pace-table {
    width: max-content;
    min-width: 1120px;
    max-width: none;
}

.training-pace-table input {
    width: 100%;
    min-width: 80px;
}

.training-pace-table input[name="pace_name[]"] {
    min-width: 150px;
}

.training-pace-table input[name="description[]"] {
    min-width: 220px;
}

.training-pace-table td,
.training-pace-table th {
    white-space: nowrap;
}

.training-pace-table td[data-distance] {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

@media (max-width: 760px) {
    .training-pace-page {
        width: calc(100% - 28px);
    }

    .training-pace-form .form-actions {
        display: grid;
        gap: 10px;
    }

    .training-pace-form .form-actions .button,
    .section-header .button {
        width: 100%;
        text-align: center;
    }

    .training-pace-table {
        min-width: 1050px;
    }
}

/* Training pace table refinements */

.training-pace-table input[name="pace_per_km[]"] {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.training-pace-table {
    min-width: 1040px;
}

@media (max-width: 760px) {
    .training-pace-table {
        min-width: 980px;
    }
}

/* Training pace table alignment fix */

.training-pace-table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 10px;
    min-width: 1160px;
}

.training-pace-table th,
.training-pace-table td {
    vertical-align: middle;
    white-space: nowrap;
    padding: 6px 5px;
}

.training-pace-table .pace-name-col {
    width: 200px;
}

.training-pace-table .pace-km-col {
    width: 90px;
}

.training-pace-table .pace-split-col {
    width: 66px;
    text-align: center;
}

.training-pace-table .pace-description-col {
    width: 230px;
}

.training-pace-table .pace-action-col {
    width: 88px;
}

.training-pace-table input[name="pace_name[]"] {
    width: 100%;
    min-width: 0;
}

.training-pace-table input[name="pace_per_km[]"] {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.training-pace-table input[name="description[]"] {
    width: 100%;
    min-width: 0;
}

.training-pace-table .pace-split-cell,
.training-pace-table td[data-distance] {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.training-pace-table .delete-pace-row {
    min-width: 76px;
    padding-left: 10px;
    padding-right: 10px;
}

@media (max-width: 760px) {
    .training-pace-table {
        min-width: 1080px;
    }
}

/* Final training pace table width fix */

.training-pace-scroll {
    overflow-x: hidden !important;
}

.training-pace-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}

.training-pace-table th,
.training-pace-table td {
    padding-left: 4px !important;
    padding-right: 4px !important;
}

.training-pace-table .pace-name-col {
    width: 155px !important;
}

.training-pace-table .pace-km-col {
    width: 78px !important;
}

.training-pace-table .pace-split-col {
    width: 54px !important;
}

.training-pace-table .pace-description-col {
    width: 185px !important;
}

.training-pace-table .pace-action-col {
    width: 68px !important;
}

.training-pace-table input[name="pace_name[]"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 155px !important;
}

.training-pace-table input[name="pace_per_km[]"] {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
}

.training-pace-table input[name="description[]"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 185px !important;
}

.training-pace-table .pace-split-cell,
.training-pace-table td[data-distance] {
    font-size: 14px;
    text-align: center;
}

.training-pace-table .delete-pace-row {
    min-width: 56px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    font-size: 12px;
}

/* Workout training target display */

.target-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.target-summary-card {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 14px;
    padding: 16px;
}

.target-summary-card span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.target-summary-card strong {
    display: block;
    color: #111827;
    font-size: 17px;
}

.target-summary-card p {
    margin: 6px 0 0;
    color: #374151;
}

/* Shared training tools styling: coach-style layout for athlete-owned HR zones and paces */

.training-tools-page {
    max-width: 1180px;
    margin: 0 auto;
}

.training-tools-page .page-header {
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.training-tools-page .page-header h1 {
    margin-bottom: 8px;
}

.training-tool-card {
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.training-tool-card h2 {
    margin: 0 0 18px;
    font-size: 20px;
}

.training-tool-card hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 28px 0;
}

.training-tool-card label span {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
    color: #374151;
}

.training-tool-card input,
.training-tool-card select,
.training-tool-card textarea {
    width: 100%;
}

.training-tool-card .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.training-tool-scroll {
    width: 100%;
    overflow-x: auto;
    margin-top: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

.training-tool-table {
    width: 100%;
    border-collapse: collapse;
}

.training-tool-table th {
    background: #f8fafc;
    color: #374151;
    font-size: 13px;
    font-weight: 900;
    text-align: left;
    white-space: nowrap;
}

.training-tool-table th,
.training-tool-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.training-tool-table tbody tr:last-child td {
    border-bottom: 0;
}

.training-tool-table input {
    min-width: 0;
}

.training-tool-table input[type="number"] {
    max-width: 95px;
}

.hr-zone-table th:nth-child(1),
.hr-zone-table td:nth-child(1) {
    width: 80px;
}

.hr-zone-table th:nth-child(2),
.hr-zone-table td:nth-child(2) {
    width: 180px;
}

.hr-zone-table th:nth-child(3),
.hr-zone-table td:nth-child(3),
.hr-zone-table th:nth-child(4),
.hr-zone-table td:nth-child(4) {
    width: 120px;
}

.training-pace-table {
    table-layout: fixed;
}

.training-pace-table .pace-name-col {
    width: 155px;
}

.training-pace-table .pace-km-col {
    width: 90px;
}

.training-pace-table .pace-split-col {
    width: 70px;
    text-align: center;
}

.training-pace-table .pace-description-col {
    width: 240px;
}

.training-pace-table .pace-split-cell {
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: #374151;
}

.training-pace-table input[name="pace_name[]"] {
    max-width: 155px;
}

.training-pace-table input[name="pace_per_unit[]"] {
    max-width: 78px;
    font-weight: 800;
}

.training-pace-table input[name="description[]"] {
    max-width: 100%;
}

@media (max-width: 760px) {
    .training-tool-card {
        padding: 18px;
        border-radius: 16px;
    }

    .training-tools-page .page-header {
        gap: 14px;
    }

    .training-tool-table th,
    .training-tool-table td {
        padding: 8px;
    }

    .training-pace-table {
        min-width: 760px;
    }

    .hr-zone-table {
        min-width: 720px;
    }
}

/* View switch */

.view-switch-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.view-switch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.view-switch-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
    .view-switch-form {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .view-switch-button {
        width: 100%;
        max-width: 240px;
    }
}

/* Athlete training settings */

.training-settings-page {
    max-width: 1240px;
    margin: 0 auto;
}

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

.training-settings-summary-card {
    padding: 18px;
    border-radius: 18px;
}

.training-settings-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.training-settings-summary-card strong {
    display: block;
    font-size: 24px;
    line-height: 1.1;
}

.training-settings-summary-card p {
    margin: 8px 0 0;
}

.training-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 18px;
    align-items: start;
}

.training-settings-card {
    padding: 22px;
    border-radius: 18px;
}

.training-settings-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.training-settings-card-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.training-settings-card-header p {
    margin: 0;
}

.compact-settings-table {
    width: 100%;
}

.compact-settings-table th,
.compact-settings-table td {
    padding: 9px 10px;
    vertical-align: top;
}

.compact-settings-table th {
    font-size: 12px;
    white-space: nowrap;
}

.settings-mobile-list {
    display: none;
}

.settings-mobile-card {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

.settings-mobile-card + .settings-mobile-card {
    margin-top: 10px;
}

.settings-mobile-card div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.settings-mobile-card span {
    font-weight: 900;
    white-space: nowrap;
}

.settings-mobile-card p {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.settings-status-list {
    display: grid;
    gap: 10px;
}

.settings-status-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.settings-status-list > div:last-child {
    border-bottom: 0;
}

.settings-status-list span {
    color: #6b7280;
    font-weight: 800;
}

.settings-status-list strong {
    text-align: right;
}

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

    .training-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .training-settings-summary-grid {
        grid-template-columns: 1fr;
    }

    .training-settings-card {
        padding: 18px;
    }

    .training-settings-card-header {
        display: grid;
        gap: 12px;
    }

    .training-settings-card-header .button {
        width: 100%;
    }

    .settings-desktop-table {
        display: none;
    }

    .settings-mobile-list {
        display: block;
    }

    .settings-status-list > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .settings-status-list strong {
        text-align: left;
    }
}

/* Training settings summary cards */

.training-settings-summary-grid {
    padding: 18px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.training-settings-summary-card {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb;
    box-shadow: none;
}

.training-settings-summary-card strong {
    color: #111827;
}

.training-settings-distance-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.distance-unit-form {
    margin: 0;
}

.distance-unit-control {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.distance-unit-control select {
    height: 42px;
    min-height: 42px;
    width: 100%;
    max-width: 180px;
    margin: 0;
}

.distance-unit-control .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    min-height: 42px;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .training-settings-summary-grid {
        padding: 14px;
    }

    .distance-unit-control {
        align-items: stretch;
        flex-direction: column;
    }

    .distance-unit-control select,
    .distance-unit-control .button {
        width: 100%;
        max-width: none;
    }
}

/* Training settings header card */

.training-settings-page .page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    margin-bottom: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.training-settings-page .page-header h1 {
    margin-bottom: 8px;
}

.training-settings-page .page-header .muted {
    margin-bottom: 0;
}

.training-settings-page .page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.training-settings-page .page-actions .button {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .training-settings-page .page-header {
        display: grid;
        gap: 16px;
        padding: 18px;
    }

    .training-settings-page .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .training-settings-page .page-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Logo-anchored view switch */

.brand-switch-group {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 12px;
    min-width: 0;
}

.brand-switch-group .app-logo {
    flex: 0 0 auto;
}

.brand-switch-group .view-switch-form {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

.brand-switch-group .view-switch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 116px;
    max-width: none;
    min-height: 36px;
    padding: 8px 14px;
    margin: 0;
    white-space: nowrap;
}

/* Keep navigation separate from the logo/switch area */
.app-header .primary-nav {
    margin-left: auto;
}

/* Prevent the earlier mobile switch style from pushing it into the menu */
@media (max-width: 900px) {
    .brand-switch-group {
        gap: 8px;
    }

    .brand-switch-group .view-switch-form {
        width: auto !important;
        justify-content: flex-start !important;
        margin: 0 !important;
    }

    .brand-switch-group .view-switch-button {
        width: auto !important;
        min-width: auto;
        max-width: none !important;
        padding: 8px 10px;
        font-size: 12px;
    }

    .app-header .nav-toggle {
        margin-left: auto;
    }
}

@media (max-width: 420px) {
    .brand-switch-group {
        gap: 6px;
    }

    .brand-switch-group .view-switch-button {
        padding: 7px 9px;
        font-size: 11px;
    }
}

/* Training settings child pages */

.training-tools-page .page-header,
.training-child-page .page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    margin-bottom: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.training-tools-page .page-header h1,
.training-child-page .page-header h1 {
    margin-bottom: 8px;
}

.training-tools-page .page-header .muted,
.training-child-page .page-header .muted {
    margin-bottom: 0;
}

.training-tools-page .page-actions,
.training-child-page .page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

@media (max-width: 760px) {
    .training-tools-page .page-header,
    .training-child-page .page-header {
        display: grid;
        gap: 16px;
        padding: 18px;
    }

    .training-tools-page .page-actions,
    .training-child-page .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .training-tools-page .page-actions .button,
    .training-child-page .page-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Account password page */

.account-password-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.account-password-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.account-password-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.account-password-summary-card p {
    margin: 8px 0 0;
}

.account-password-form {
    display: block;
}

.account-password-panel,
.account-password-submit-panel {
    margin-bottom: 18px;
}

.account-password-form-grid {
    margin-bottom: 0;
}

.account-password-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.account-password-submit-content p {
    margin: 6px 0 0;
}

.account-password-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.account-password-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .account-password-submit-content {
        display: grid;
    }

    .account-password-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .account-password-page {
        width: min(100% - 20px, 1280px);
    }

    .account-password-summary-grid {
        grid-template-columns: 1fr;
    }

    .account-password-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .account-password-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Account login page */

.account-login-page {
    width: min(100% - 32px, 960px);
    max-width: 960px;
    margin: 0 auto;
}

.account-login-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.account-login-panel,
.account-login-help-panel {
    margin-bottom: 18px;
}

.account-login-form-grid {
    grid-template-columns: 1fr;
    margin-bottom: 0;
}

.account-login-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.account-login-submit-content p {
    margin: 6px 0 0;
}

.account-login-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.account-login-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.account-login-links {
    margin-top: 16px;
}

.account-login-links a {
    font-weight: 800;
}

.account-login-help-list {
    display: grid;
    gap: 10px;
}

.account-login-help-list > div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.account-login-help-list span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.account-login-help-list strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
}

@media (max-width: 900px) {
    .account-login-grid {
        grid-template-columns: 1fr;
    }

    .account-login-submit-content {
        display: grid;
    }

    .account-login-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .account-login-page {
        width: min(100% - 20px, 960px);
    }

    .account-login-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .account-login-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Account forgot password page */

.account-forgot-password-page {
    width: min(100% - 32px, 960px);
    max-width: 960px;
    margin: 0 auto;
}

.account-forgot-password-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.account-forgot-password-panel,
.account-forgot-password-help-panel,
.account-forgot-password-dev-panel {
    margin-bottom: 18px;
}

.account-forgot-password-form-grid {
    grid-template-columns: 1fr;
    margin-bottom: 0;
}

.account-forgot-password-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.account-forgot-password-submit-content p {
    margin: 6px 0 0;
}

.account-forgot-password-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.account-forgot-password-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.account-forgot-password-help-list {
    display: grid;
    gap: 10px;
}

.account-forgot-password-help-list > div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.account-forgot-password-help-list span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.account-forgot-password-help-list strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
}

.account-forgot-password-reset-link {
    overflow-wrap: anywhere;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.account-forgot-password-reset-link a {
    font-weight: 800;
}

@media (max-width: 900px) {
    .account-forgot-password-grid {
        grid-template-columns: 1fr;
    }

    .account-forgot-password-submit-content {
        display: grid;
    }

    .account-forgot-password-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .account-forgot-password-page {
        width: min(100% - 20px, 960px);
    }

    .account-forgot-password-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .account-forgot-password-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Account reset password page */

.account-reset-password-page {
    width: min(100% - 32px, 960px);
    max-width: 960px;
    margin: 0 auto;
}

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

.account-reset-password-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.account-reset-password-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.account-reset-password-summary-card p {
    margin: 8px 0 0;
}

.account-reset-password-form {
    display: block;
}

.account-reset-password-panel,
.account-reset-password-submit-panel {
    margin-bottom: 18px;
}

.account-reset-password-form-grid {
    margin-bottom: 0;
}

.account-reset-password-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.account-reset-password-submit-content p {
    margin: 6px 0 0;
}

.account-reset-password-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.account-reset-password-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .account-reset-password-submit-content {
        display: grid;
    }

    .account-reset-password-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .account-reset-password-page {
        width: min(100% - 20px, 960px);
    }

    .account-reset-password-summary-grid {
        grid-template-columns: 1fr;
    }

    .account-reset-password-form-grid {
        grid-template-columns: 1fr;
    }

    .account-reset-password-submit-actions,
    .account-reset-password-panel .coach-standard-panel-header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .account-reset-password-submit-actions .button,
    .account-reset-password-panel .button {
        width: 100%;
        justify-content: center;
    }
}

/* Login remember me */

.account-login-remember .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #111827;
    font-weight: 900;
    cursor: pointer;
}

.account-login-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
}

.account-login-remember .muted {
    margin: 6px 0 0 28px;
}

@media (max-width: 640px) {
    .account-login-remember .muted {
        margin-left: 0;
    }
}

/* Account register and invite pages */

.account-register-page,
.account-accept-invite-page {
    width: min(100% - 32px, 960px);
    max-width: 960px;
    margin: 0 auto;
}

.account-register-panel,
.account-accept-invite-panel {
    margin-bottom: 18px;
}

.account-register-form-grid,
.account-accept-invite-form-grid {
    margin-bottom: 0;
}

.account-register-submit-content,
.account-accept-invite-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.account-register-submit-content p,
.account-accept-invite-submit-content p {
    margin: 6px 0 0;
}

.account-register-submit-actions,
.account-accept-invite-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.account-register-submit-actions .button,
.account-accept-invite-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

.account-accept-invite-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.account-accept-invite-summary-card strong {
    display: block;
    color: #111827;
    font-size: 22px;
    line-height: 1.2;
    word-break: break-word;
}

.account-accept-invite-summary-card p {
    margin: 8px 0 0;
}

.account-accept-invite-existing-box {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.account-accept-invite-existing-box strong {
    display: block;
    color: #111827;
    font-size: 18px;
}

.account-accept-invite-existing-box p {
    margin: 6px 0 0;
}

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

    .account-register-submit-content,
    .account-accept-invite-submit-content {
        display: grid;
    }

    .account-register-submit-actions,
    .account-accept-invite-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .account-register-page,
    .account-accept-invite-page {
        width: min(100% - 20px, 960px);
    }

    .account-register-form-grid,
    .account-accept-invite-form-grid,
    .account-accept-invite-summary-grid {
        grid-template-columns: 1fr;
    }

    .account-register-submit-actions,
    .account-accept-invite-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .account-register-submit-actions .button,
    .account-accept-invite-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* FuelAssist phase 1 */

.fuelassist-page {
    width: min(100% - 32px, 1240px);
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

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

.fuelassist-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fuelassist-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.fuelassist-list {
    display: grid;
    gap: 14px;
}

.fuelassist-card {
    display: grid;
    gap: 16px;
    border-left: 6px solid #cbd5e1;
}

.fuelassist-demand-high {
    border-left-color: #dc2626;
}

.fuelassist-demand-moderate {
    border-left-color: #f59e0b;
}

.fuelassist-demand-low {
    border-left-color: #10b981;
}

.fuelassist-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.fuelassist-card-header h3 {
    margin: 0 0 6px;
}

.fuelassist-guidance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fuelassist-guidance-grid > div {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.fuelassist-guidance-grid span {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fuelassist-guidance-grid p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.fuelassist-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

@media (max-width: 640px) {
    .fuelassist-page {
        width: min(100% - 20px, 1240px);
    }

    .fuelassist-summary-grid,
    .fuelassist-guidance-grid {
        grid-template-columns: 1fr;
    }

    .fuelassist-card-header {
        display: grid;
        gap: 10px;
    }

    .fuelassist-card-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .fuelassist-card-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Iteration 02: CoachAssist load monitor and FuelAssist profile/logging */

.coach-load-monitor-page,
.athlete-readiness-page {
    width: min(100% - 32px, 1240px);
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

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

.coach-load-summary-card .summary-label,
.athlete-readiness-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-load-summary-card strong,
.athlete-readiness-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.coach-load-list {
    display: grid;
    gap: 16px;
}

.coach-load-card,
.athlete-readiness-summary-card {
    border-left: 6px solid #cbd5e1;
}

.coach-load-card-high,
.athlete-readiness-risk-high {
    border-left-color: #dc2626;
}

.coach-load-card-moderate,
.athlete-readiness-risk-moderate {
    border-left-color: #f59e0b;
}

.coach-load-card-low,
.athlete-readiness-risk-low {
    border-left-color: #10b981;
}

.coach-load-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.coach-load-card-header h3 {
    margin: 0 0 6px;
}

.coach-load-risk-badge,
.coach-load-risk-low,
.coach-load-risk-moderate,
.coach-load-risk-high {
    white-space: nowrap;
}

.coach-load-risk-low {
    background: #dcfce7;
    color: #166534;
}

.coach-load-risk-moderate {
    background: #fef3c7;
    color: #92400e;
}

.coach-load-risk-high {
    background: #fee2e2;
    color: #991b1b;
}

.coach-load-metric-grid,
.coach-load-signal-grid,
.athlete-readiness-signal-grid,
.fuelassist-context-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.coach-load-metric-grid > div,
.coach-load-signal-grid > div,
.athlete-readiness-signal-grid > div,
.athlete-readiness-load-list > div,
.fuelassist-context-grid > div {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
    min-width: 0;
}

.coach-load-metric-grid span,
.coach-load-signal-grid span,
.athlete-readiness-signal-grid span,
.athlete-readiness-load-list span,
.fuelassist-context-grid span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.coach-load-metric-grid strong,
.coach-load-signal-grid strong,
.athlete-readiness-signal-grid strong,
.athlete-readiness-load-list strong,
.fuelassist-context-grid strong {
    display: block;
    color: #111827;
    font-size: 18px;
    line-height: 1.2;
}

.coach-load-metric-grid small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
}

.coach-load-reason-list,
.athlete-readiness-reason-list {
    display: grid;
    gap: 8px;
    margin: 14px 0;
    padding-left: 20px;
    color: #374151;
}

.coach-load-card-actions,
.fuelassist-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-readiness-detail-grid {
    margin-bottom: 18px;
}

.athlete-readiness-detail-card h2 {
    margin-top: 0;
}

.athlete-readiness-load-list {
    display: grid;
    gap: 12px;
}

.fuelassist-management-grid {
    align-items: start;
    margin-bottom: 18px;
}

.fuelassist-profile-form .checkbox-label {
    margin-top: 0;
}

.fuelassist-log-list,
.fuelassist-athlete-context-list {
    display: grid;
    gap: 14px;
}

.fuelassist-log-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
}

.fuelassist-log-row h3,
.fuelassist-athlete-context-card h3 {
    margin: 0 0 6px;
}

.fuelassist-log-row p {
    margin: 8px 0 0;
}

.fuelassist-log-macros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.fuelassist-log-macros span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f8fafc;
    color: #374151;
    font-size: 12px;
    font-weight: 800;
}

.fuelassist-recent-log-preview {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.fuelassist-recent-log-preview > div {
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.fuelassist-recent-log-preview p {
    margin: 6px 0 0;
    color: #374151;
}

@media (max-width: 1100px) {
    .coach-load-summary-grid,
    .athlete-readiness-summary-grid,
    .coach-load-metric-grid,
    .coach-load-signal-grid,
    .athlete-readiness-signal-grid,
    .fuelassist-context-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .coach-load-monitor-page,
    .athlete-readiness-page {
        width: min(100% - 20px, 1240px);
    }

    .coach-load-summary-grid,
    .athlete-readiness-summary-grid,
    .coach-load-metric-grid,
    .coach-load-signal-grid,
    .athlete-readiness-signal-grid,
    .fuelassist-context-grid {
        grid-template-columns: 1fr;
    }

    .coach-load-card-header,
    .fuelassist-log-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .coach-load-card-actions,
    .coach-load-card-actions .button,
    .fuelassist-card-actions,
    .fuelassist-card-actions .button,
    .fuelassist-log-row .button {
        width: 100%;
        justify-content: center;
    }

    .coach-load-card-actions,
    .fuelassist-card-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Iteration 03: CoachAssist recommendations and FuelAssist workout guidance */

.coach-load-recommendation-panel {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f8fafc;
}

.coach-load-recommendation-panel h4 {
    margin: 0 0 10px;
    color: #111827;
}

.coach-load-recommendation-panel ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.coach-load-recommendation-panel li {
    display: grid;
    gap: 5px;
    padding: 12px;
    border-radius: 12px;
    background: #ffffff;
}

.coach-load-recommendation-panel li span,
.coach-load-recommendation-panel li small {
    color: #6b7280;
    line-height: 1.45;
}

.coach-load-generate-form {
    margin: 0;
}

.fuelassist-workout-panel {
    margin-bottom: 18px;
}

.fuelassist-guidance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.fuelassist-guidance-grid article {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f8fafc;
}

.fuelassist-guidance-grid span {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fuelassist-guidance-grid p {
    margin: 0;
    color: #374151;
    line-height: 1.55;
}

.fuelassist-guidance-note {
    margin: 14px 0 0;
}

.athlete-dashboard-readiness-list {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
    padding-left: 18px;
    color: #374151;
    line-height: 1.5;
}

.athlete-dashboard-fuelassist-card {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.athlete-dashboard-fuelassist-card p {
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .fuelassist-guidance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .coach-load-card-actions .coach-load-generate-form,
    .coach-load-card-actions .coach-load-generate-form .button {
        width: 100%;
    }
}

/* Iteration 04: CoachAssist weekly planner */

.coach-weekly-planner-page,
.athlete-weekly-plan-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.coach-weekly-filter-panel {
    margin-bottom: 18px;
}

.coach-weekly-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.coach-weekly-nav-bar strong {
    color: #111827;
    font-size: 18px;
    text-align: center;
}

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

.coach-weekly-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-weekly-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.coach-weekly-summary-card.risk-high {
    border-left: 6px solid #dc2626;
}

.coach-weekly-summary-card.risk-moderate {
    border-left: 6px solid #f59e0b;
}

.coach-weekly-summary-card.risk-low {
    border-left: 6px solid #10b981;
}

.coach-weekly-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 18px;
    align-items: start;
}

.coach-weekly-side-grid {
    display: grid;
    gap: 18px;
}

.coach-weekly-day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.coach-weekly-day-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.coach-weekly-day-card.is-hard-day {
    border-color: #f59e0b;
    background: #fffbeb;
}

.coach-weekly-day-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.coach-weekly-day-header strong,
.coach-weekly-day-header span {
    display: block;
}

.coach-weekly-day-header strong {
    color: #111827;
    font-size: 16px;
}

.coach-weekly-day-header span:not(.badge) {
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

.coach-weekly-workout-item,
.coach-weekly-race-item {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    background: #f8fafc;
}

.coach-weekly-race-item {
    background: #111827;
    color: #ffffff;
}

.coach-weekly-race-item span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.coach-weekly-workout-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.coach-weekly-workout-title strong {
    color: #111827;
    font-size: 14px;
    line-height: 1.25;
}

.coach-weekly-workout-item p {
    margin: 0;
}

.coach-weekly-fuel-note {
    color: #047857;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.coach-weekly-flag-list {
    display: grid;
    gap: 10px;
}

.coach-weekly-flag {
    padding: 14px;
    border-radius: 14px;
    border-left: 5px solid #10b981;
    background: #f8fafc;
}

.coach-weekly-flag.risk-high {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.coach-weekly-flag.risk-moderate {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.coach-weekly-flag strong {
    display: block;
    color: #111827;
    margin-bottom: 6px;
}

.coach-weekly-flag p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.coach-weekly-recommendation-list {
    margin: 0 0 16px;
    padding-left: 20px;
    color: #374151;
    line-height: 1.6;
}

.coach-weekly-action-form,
.coach-weekly-review-form {
    margin-top: 14px;
}

.athlete-dashboard-side-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-dashboard-side-actions .button {
    margin-top: 0;
}

@media (max-width: 1180px) {
    .coach-weekly-layout {
        grid-template-columns: 1fr;
    }

    .coach-weekly-day-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .coach-weekly-planner-page,
    .athlete-weekly-plan-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-weekly-summary-grid {
        grid-template-columns: 1fr;
    }

    .coach-weekly-nav-bar {
        display: grid;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .coach-weekly-nav-bar .button {
        width: 100%;
        justify-content: center;
    }

    .coach-weekly-day-grid {
        grid-template-columns: 1fr;
    }

    .athlete-dashboard-side-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-dashboard-side-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Iteration 05: Race planner and race fuelling */

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

.race-planner-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.race-planner-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.race-planner-summary-card.risk-high,
.race-planner-summary-card.risk-moderate,
.race-planner-summary-card.risk-low {
    border-left: 6px solid #d1d5db;
}

.race-planner-summary-card.risk-high {
    border-left-color: #dc2626;
}

.race-planner-summary-card.risk-moderate {
    border-left-color: #f59e0b;
}

.race-planner-summary-card.risk-low {
    border-left-color: #10b981;
}

.race-planner-grid {
    align-items: start;
}

.race-planner-metric-grid,
.race-fuelling-grid,
.race-planner-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.race-planner-metric-grid {
    margin-bottom: 18px;
}

.race-planner-metric-grid > div,
.race-fuelling-grid > div {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.race-planner-metric-grid span,
.race-fuelling-grid span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.race-planner-metric-grid strong {
    display: block;
    color: #111827;
    font-size: 20px;
    line-height: 1.2;
}

.race-fuelling-grid p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.race-risk-list {
    margin-top: 12px;
}

.race-risk-row {
    border-left: 5px solid #f59e0b;
}

.race-planner-actions-panel form {
    margin: 0;
}

.race-planner-actions-panel textarea,
.race-fuelling-save-form textarea {
    resize: vertical;
}

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

    .race-planner-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .race-planner-summary-grid,
    .race-planner-metric-grid,
    .race-fuelling-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   Bundled from calendar.css
========================================================= */

/* Calendar stylesheet split from app.css in iteration 06. */

/* Coach calendar layout fix */

.coach-calendar-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

.planner-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.template-library {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    position: sticky;
    top: 16px;
}

.calendar-panel {
    min-width: 0;
}

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

.calendar-grid {
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
}

.calendar-day,
.calendar-day-empty {
    min-height: 150px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px;
    box-sizing: border-box;
}

.calendar-day-empty {
    background: #f9fafb;
}

.calendar-week-total {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    background: #f3f4f6;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #d1d5db;
    border-left: 1px solid #e5e7eb;
    padding: 12px 14px;
    box-sizing: border-box;
    font-size: 13px;
}

.calendar-week-total-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
}

.calendar-week-total-info strong {
    white-space: nowrap;
}

.calendar-week-total .button,
.calendar-week-total .button-small {
    margin: 0;
    white-space: nowrap;
}

.calendar-workout,
.calendar-race,
.calendar-warning {
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

/* Do not stack the workout library too early */
@media (max-width: 900px) {
    .planner-layout {
        grid-template-columns: 1fr;
    }

    .template-library {
        position: static;
    }

    .calendar-panel {
        overflow-x: auto;
    }

    .calendar-weekdays,
    .calendar-grid {
        min-width: 900px;
    }
}

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

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    width: 100%;
}

.calendar-weekdays {
    background: #111827;
    color: #fff;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.calendar-weekdays div {
    padding: 12px;
    font-weight: 700;
    text-align: center;
}


@media (max-width: 600px) {
    .feedback-page,
    .diagnostics-page {
        padding: 12px;
    }

    .feedback-page .stats-grid,
    .diagnostics-page .stats-grid {
        grid-template-columns: 1fr;
    }
} 
 
@media (max-width: 900px) {
    .calendar-weekdays {
        display: none;
    }

    .calendar-grid {
        display: block;
        border-top: 0;
    }

    .calendar-day,
    .calendar-day-empty {
        min-height: auto;
        border: 1px solid #e5e7eb;
        margin-bottom: 12px;
        border-radius: 10px;
    }

    .calendar-day-empty {
        display: none;
    }

    .calendar-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

.planner-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.template-library {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    position: sticky;
    top: 16px;
}

.template-library h2 {
    margin-top: 0;
}

.template-list {
    display: grid;
    gap: 10px;
    margin: 16px 0;
}

.template-item {
    border-radius: 10px;
    padding: 10px;
    cursor: grab;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.template-item:active {
    cursor: grabbing;
}

.template-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.template-meta {
    font-size: 12px;
    opacity: 0.85;
}

.calendar-day-drop-target::after {
    content: "Drop here";
    display: block;
    border: 2px dashed #2563eb;
    border-radius: 8px;
    color: #2563eb;
    font-weight: 700;
    text-align: center;
    padding: 8px;
    margin-top: 8px;
    background: #eff6ff;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-weight: 600;
}

.checkbox-label input {
    width: auto;
}

.calendar-week-total {
    grid-column: 1 / -1;
    background: #f3f4f6;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #d1d5db;
    border-left: 1px solid #e5e7eb;
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.calendar-week-total-info {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.calendar-week-total strong {
    color: #111827;
}

.calendar-week-total span {
    color: #374151;
}

.button-small {
    padding: 6px 10px;
    font-size: 13px;
    margin-top: 0;
}

 .feedback-page,
    .diagnostics-page {
        padding: 16px;
    }

    .feedback-page .panel,
    .diagnostics-page .panel {
        overflow-x: auto;
    }

    .feedback-page table,
    .diagnostics-page table {
        min-width: 900px;
    }
	}

@media (max-width: 1100px) {
    .planner-layout {
        grid-template-columns: 1fr;
    }

    .template-library {
        position: static;
    }
}

@media (max-width: 800px) {
    .site-header {
        display: block;
    }

    .site-header nav {
        margin-top: 12px;
    }

    .site-header a {
        display: inline-block;
        margin: 6px 10px 6px 0;
    }

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

/* Final coach calendar column alignment fix */

.calendar-panel {
    min-width: 0;
}

.calendar-weekdays {
    background: #111827;
    color: #fff;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.calendar-weekdays {
    padding: 12px;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}

.calendar-day,
.calendar-day-empty {
    box-sizing: border-box;
}

.calendar-week-total {
    grid-column: 1 / -1 !important;
    width: 100%;
    box-sizing: border-box;
}
/* Coach calendar 7-column fit fix */

.calendar-scroll {
    width: 100%;
    overflow-x: visible;
}

.calendar-weekdays,
.calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

.calendar-weekdays {
    background: #111827;
    color: #fff;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.calendar-weekdays > div {
    padding: 12px 6px;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}

.calendar-day,
.calendar-day-empty {
    min-width: 0 !important;
    box-sizing: border-box;
}

.calendar-week-total {
    grid-column: 1 / -1 !important;
    width: 100%;
    box-sizing: border-box;
}

.nav-notification-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.workout-list {
    display: grid;
    gap: 18px;
}

.workout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.workout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.feedback-submitted-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.feedback-submitted-status {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.feedback-submitted-date {
    font-size: 14px;
}

@media (max-width: 600px) {
    .workout-actions,
    .feedback-submitted-actions,
    .feedback-submitted-status {
        align-items: flex-start;
        flex-direction: column;
    }
}

.feedback-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.feedback-signal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.feedback-action-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

.feedback-notes {
    margin-top: 10px;
}

.feedback-notes summary {
    cursor: pointer;
    font-weight: 700;
}

@media (max-width: 900px) {
    .feedback-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Calendar team filter */

.calendar-filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(220px, 1fr) auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 24px;
}

.calendar-filter-panel .form-group {
    margin-bottom: 0;
}

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

@media (max-width: 900px) {
    .calendar-filter-panel {
        grid-template-columns: 1fr;
    }

    .calendar-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-filter-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Athlete mobile calendar view */

.athlete-calendar-mobile {
    display: none;
}

.athlete-mobile-week-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.athlete-mobile-day {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: 0.15s ease;
}

.athlete-mobile-day:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.athlete-mobile-day.is-selected {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.athlete-mobile-day.is-outside-month {
    opacity: 0.55;
}

.athlete-mobile-day-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.athlete-mobile-day-number {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.athlete-mobile-day-panel {
    display: grid;
    gap: 14px;
}

.athlete-mobile-day-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.athlete-mobile-day-heading h3 {
    margin: 0;
    font-size: 20px;
}

.athlete-mobile-agenda-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.athlete-mobile-agenda-card h4 {
    margin: 0 0 10px;
    font-size: 19px;
}

.athlete-mobile-agenda-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.athlete-mobile-agenda-meta div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
}

.athlete-mobile-agenda-meta span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.athlete-mobile-agenda-meta strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
}

.athlete-mobile-agenda-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #1e293b;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 12px;
}

.athlete-mobile-agenda-notes {
    color: #475569;
    line-height: 1.5;
    margin-top: 8px;
}

.athlete-mobile-empty {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 18px;
    color: #64748b;
}

@media (max-width: 760px) {
    .athlete-calendar-desktop {
        display: none;
    }

    .athlete-calendar-mobile {
        display: block;
    }

    .athlete-mobile-agenda-meta {
        grid-template-columns: 1fr;
    }
}

.athlete-mobile-day-dot {
    display: block;
    width: 6px;
    height: 6px;
    margin: 7px auto 0;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
}

.athlete-mobile-race-card {
    border-color: #f59e0b;
}

.athlete-mobile-agenda-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

@media (max-width: 760px) {
    .athlete-mobile-agenda-actions {
        flex-direction: column;
    }

    .athlete-mobile-agenda-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Athlete mobile calendar day-strip visibility fix */

.athlete-mobile-week-strip {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 6px;
    width: 100%;
}

.athlete-mobile-day {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 74px;
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 8px 4px;
    text-align: center;
}

.athlete-mobile-day-name,
.athlete-mobile-day-number {
    display: block !important;
    color: inherit !important;
    line-height: 1.1;
}

.athlete-mobile-day-name {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.athlete-mobile-day-number {
    font-size: 22px;
    font-weight: 900;
}

.athlete-mobile-day.is-selected {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

.athlete-mobile-day.is-outside-month {
    opacity: 0.45;
}

.athlete-mobile-day-dot {
    display: block !important;
    width: 6px;
    height: 6px;
    margin: 7px auto 0;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.8;
}

/* Athlete mobile calendar horizontal day strip */

@media (max-width: 760px) {
    .athlete-mobile-week-strip {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 8px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 2px 10px;
        margin-bottom: 16px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .athlete-mobile-week-strip::-webkit-scrollbar {
        height: 6px;
    }

    .athlete-mobile-week-strip::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 999px;
    }

    .athlete-mobile-day {
        flex: 0 0 76px;
        width: 76px;
        min-width: 76px;
        scroll-snap-align: center;
    }

    .athlete-mobile-day.is-selected {
        flex-basis: 82px;
        width: 82px;
        min-width: 82px;
    }
}

@media (max-width: 390px) {
    .athlete-mobile-day {
        flex-basis: 72px;
        width: 72px;
        min-width: 72px;
    }

    .athlete-mobile-day.is-selected {
        flex-basis: 78px;
        width: 78px;
        min-width: 78px;
    }
}

/* Coach mobile calendar agenda view */

.coach-calendar-mobile {
    display: none;
}

.coach-mobile-day-strip {
    display: flex;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 10px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.coach-mobile-day-strip::-webkit-scrollbar {
    height: 6px;
}

.coach-mobile-day-strip::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.coach-mobile-day {
    flex: 0 0 76px;
    width: 76px;
    min-width: 76px;
    min-height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    background: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
}

.coach-mobile-day.is-selected {
    flex-basis: 82px;
    width: 82px;
    min-width: 82px;
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.coach-mobile-day-name {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.coach-mobile-day-number {
    display: block;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
}

.coach-mobile-day-dot {
    display: block;
    width: 6px;
    height: 6px;
    margin: 7px auto 0;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.8;
}

.coach-mobile-day-panel {
    display: grid;
    gap: 14px;
}

.coach-mobile-day-heading h3 {
    margin: 0 0 4px;
    font-size: 20px;
}

.coach-mobile-agenda-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.coach-mobile-agenda-card h4 {
    margin: 0 0 10px;
    font-size: 19px;
}

.coach-mobile-agenda-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #1e293b;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 12px;
}

.coach-mobile-agenda-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.coach-mobile-agenda-meta div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
}

.coach-mobile-agenda-meta span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.coach-mobile-agenda-meta strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
}

.coach-mobile-agenda-notes {
    color: #475569;
    line-height: 1.5;
    margin-top: 8px;
}

.coach-mobile-agenda-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.coach-mobile-empty {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 18px;
    color: #64748b;
}

.coach-mobile-race-card {
    border-color: #f59e0b;
}

.coach-mobile-warning-card {
    border-color: #f97316;
    background: #fff7ed;
}

@media (max-width: 760px) {
    .coach-calendar-desktop {
        display: none !important;
    }

    .coach-calendar-mobile {
        display: block;
    }

    .coach-mobile-agenda-meta {
        grid-template-columns: 1fr;
    }

    .coach-mobile-agenda-actions {
        flex-direction: column;
    }

    .coach-mobile-agenda-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Garmin calendar items */

.calendar-garmin-activity {
    display: block;
    margin-top: 6px;
    padding: 8px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #14532d;
    font-size: 13px;
    line-height: 1.35;
}

.calendar-garmin-activity strong,
.calendar-garmin-activity span {
    display: block;
}

.calendar-garmin-activity span {
    margin-top: 3px;
    color: #166534;
    font-size: 12px;
}

.athlete-mobile-garmin-card,
.coach-mobile-garmin-card {
    border-color: #86efac;
    background: #f0fdf4;
}

.athlete-mobile-garmin-card .athlete-mobile-agenda-status,
.coach-mobile-garmin-card .coach-mobile-agenda-status {
    background: #dcfce7;
    color: #166534;
}

/* Calendar workout training targets */

.calendar-workout-target {
    display: block;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    opacity: 0.95;
}

.athlete-mobile-training-target,
.coach-mobile-training-target {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 6px 0 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

/* Calendar Garmin push status */

.calendar-garmin-push-status {
    display: block;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    opacity: 0.95;
}

.calendar-garmin-push-not_pushed {
    opacity: 0.85;
}

.calendar-garmin-push-pending {
    color: #fef3c7;
}

.calendar-garmin-push-pushed {
    color: #dcfce7;
}

.calendar-garmin-push-failed {
    color: #fee2e2;
}

.coach-mobile-garmin-push-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 10px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    background: #f3f4f6;
    color: #374151;
}

.coach-mobile-garmin-push-not_pushed {
    background: #f3f4f6;
    color: #374151;
}

.coach-mobile-garmin-push-pending {
    background: #fef3c7;
    color: #92400e;
}

.coach-mobile-garmin-push-pushed {
    background: #dcfce7;
    color: #166534;
}

.coach-mobile-garmin-push-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Calendar quick Garmin push */

.calendar-workout {
    cursor: pointer;
}

.calendar-garmin-push-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 6px;
    padding: 5px 7px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
}

.calendar-garmin-push-button:hover {
    background: #ffffff;
}

.calendar-garmin-push-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

/* Coach calendar page */

.coach-calendar-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.calendar-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.calendar-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.calendar-summary-card p {
    margin: 8px 0 0;
}

.calendar-filter-panel {
    margin-bottom: 18px;
}

.calendar-empty-panel {
    margin-bottom: 18px;
}

.calendar-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.coach-calendar-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    width: 100%;
}

.coach-calendar-library,
.coach-calendar-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.coach-calendar-library-header {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.coach-calendar-library-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.coach-calendar-library-header .muted {
    margin: 0;
}

.coach-calendar-library-header .button {
    width: 100%;
    justify-content: center;
}

.template-list {
    display: grid;
    gap: 10px;
}

.coach-calendar-panel {
    overflow: hidden;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.calendar-toolbar h2 {
    margin: 0;
    color: #111827;
    font-size: 22px;
    text-align: center;
}

.calendar-toolbar .button {
    min-height: 38px;
    white-space: nowrap;
}

.calendar-scroll {
    overflow-x: auto;
    width: 100%;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calendar-weekdays > div {
    padding: 8px 10px;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
}

.calendar-grid {
    min-width: 840px;
}

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

    .coach-calendar-layout {
        grid-template-columns: 1fr;
    }

    .coach-calendar-library-header {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }

    .coach-calendar-library-header .button {
        width: auto;
    }
}

@media (max-width: 640px) {
    .coach-calendar-page {
        width: min(100% - 20px, 1280px);
    }

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

    .coach-calendar-library,
    .coach-calendar-panel {
        padding: 16px;
    }

    .coach-calendar-library-header {
        grid-template-columns: 1fr;
    }

    .coach-calendar-library-header .button {
        width: 100%;
    }

    .calendar-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .calendar-toolbar h2 {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .calendar-toolbar #calendar-prev {
        grid-column: 1;
        grid-row: 2;
    }

    .calendar-toolbar #calendar-next {
        grid-column: 2;
        grid-row: 2;
    }

    .calendar-toolbar .button,
    .calendar-empty-actions .button {
        width: 100%;
        justify-content: center;
    }

    .calendar-empty-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Athlete calendar page */

.athlete-calendar-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.athlete-calendar-status-panel,
.athlete-calendar-panel {
    margin-bottom: 18px;
}

.athlete-calendar-status-message {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.athlete-calendar-status-message strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 16px;
}

.athlete-calendar-status-message p {
    margin: 0;
}

.athlete-calendar-status-alert {
    margin-bottom: 0;
}

.athlete-calendar-panel {
    padding: 20px;
    overflow: hidden;
}

.athlete-calendar-action-row {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.athlete-calendar-action-row .button {
    min-height: 38px;
    white-space: nowrap;
}

.athlete-calendar-desktop {
    overflow-x: auto;
    width: 100%;
}

.athlete-calendar-shell .calendar-grid {
    min-width: 840px;
}

@media (max-width: 640px) {
    .athlete-calendar-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-calendar-panel {
        padding: 16px;
    }

    .athlete-calendar-action-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-calendar-action-row .button {
        width: 100%;
        justify-content: center;
    }
}

/* Calendar JS loading state */

#custom-calendar.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

#custom-calendar.is-loading .calendar-toolbar {
    pointer-events: auto;
}

.calendar-toolbar button:disabled {
    cursor: wait;
    opacity: 0.6;
}

/* Athlete calendar JS loading state */

#athlete-calendar.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

#athlete-calendar.is-loading .calendar-toolbar {
    pointer-events: auto;
}

#athlete-calendar .calendar-toolbar button:disabled {
    cursor: wait;
    opacity: 0.6;
}

/* Coach calendar day grid borders */

.coach-calendar-page .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 0;
    min-width: 840px;
    border-top: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
}

.coach-calendar-page .calendar-day {
    min-height: 150px;
    padding: 10px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    background: #ffffff;
}

.coach-calendar-page .calendar-day-empty {
    background: #f8fafc;
}

.coach-calendar-page .calendar-day.is-drag-over {
    outline: 2px solid #111827;
    outline-offset: -2px;
    background: #f3f4f6;
}

.coach-calendar-page .calendar-week-total {
    grid-column: 1 / -1;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
}

/* Coach calendar outside-month visible days */

.calendar-day-outside-month {
    background: #f8fafc;
}

.calendar-day-outside-month .calendar-day-number {
    color: #9ca3af;
}

/* Mobile calendar scrolling stability */

@media (max-width: 760px) {
    .calendar-page,
    .calendar-panel,
    .coach-calendar-panel,
    .athlete-calendar-panel,
    #custom-calendar,
    #athlete-calendar {
        max-width: 100%;
        overflow-x: hidden;
    }

    .coach-calendar-mobile,
    .athlete-calendar-mobile {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .coach-mobile-day-strip,
    .athlete-mobile-day-strip {
        display: flex;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scroll-behavior: auto;
        touch-action: pan-x;
    }

    .coach-mobile-day-panel,
    .athlete-mobile-day-panel {
        overflow: visible;
        touch-action: pan-y;
    }

    .calendar-scroll,
    .coach-calendar-desktop,
    .athlete-calendar-desktop {
        max-width: 100%;
    }
}


/* =========================================================
   Bundled from coach.css
========================================================= */

/* Coach stylesheet split from app.css in iteration 06. */

/* Coach feedback and diagnostics pages */

.feedback-page,
.diagnostics-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.feedback-page h1,
.diagnostics-page h1 {
    margin-top: 0;
}

.feedback-page .panel,
.diagnostics-page .panel {
    margin-bottom: 24px;
}

.feedback-page .stats-grid,
.diagnostics-page .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.feedback-page .stat-card,
.diagnostics-page .stat-card {
    padding: 22px;
}

.feedback-page .button-row,
.diagnostics-page .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feedback-page table,
.diagnostics-page table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.feedback-page th,
.feedback-page td,
.diagnostics-page th,
.diagnostics-page td {
    padding: 14px 16px;
    vertical-align: top;
}

.feedback-page th,
.diagnostics-page th {
    white-space: nowrap;
}

.feedback-page tbody tr + tr td,
.diagnostics-page tbody tr + tr td {
    border-top: 1px solid #e5e7eb;
}

.feedback-page details {
    margin-top: 12px;
}

.feedback-page details summary {
    cursor: pointer;
    font-weight: 700;
}

.feedback-page .badge {
    display: inline-block;
    margin-top: 6px;
}

.feedback-page .button-small {
    display: inline-block;
    margin: 4px 4px 4px 0;
}

main {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 20px;
}

.auth-card,
.panel,
.card,
.workout-card,
.suggestion-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.auth-card {
    max-width: 420px;
    margin: 80px auto;
}

label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

button,
.button {
    display: inline-block;
    margin-top: 20px;
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    cursor: pointer;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.card h2 {
    margin: 0;
    font-size: 36px;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.suggestion-card {
    margin-top: 16px;
    border-left: 6px solid #d1d5db;
}

.risk-high {
    border-left-color: #dc2626;
}

.risk-moderate {
    border-left-color: #f59e0b;
}

.risk-low {
    border-left-color: #10b981;
}

.site-footer {
    text-align: center;
    color: #6b7280;
    padding: 32px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

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

.data-table th,
.data-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    text-align: left;
}

.data-table th {
    color: #374151;
    font-size: 14px;
}

.simple-chart {
    margin-top: 20px;
}

.chart-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.chart-label {
    font-size: 14px;
    color: #4b5563;
}

.chart-bar-wrap {
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.chart-bar {
    background: #2563eb;
    color: #fff;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
    min-width: 44px;
}

.panel {
    margin-bottom: 24px;
}

.coachassist-action-preview {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0;
}

.coachassist-action-preview h3 {
    margin-top: 0;
    font-size: 16px;
}

.coachassist-action-preview p {
    margin-bottom: 0;
}

.button-secondary {
    background: #4b5563;
}

.button-danger {
    background: #dc2626;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
}

.form-actions button,
.form-actions .button {
    margin-top: 0;
}

.login-details-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin: 18px 0;
}

.login-details-box code {
    font-size: 18px;
    background: #111827;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
}

.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-paused {
    background: #fef3c7;
    color: #92400e;
}

.status-archived {
    background: #e5e7eb;
    color: #374151;
}

.notification-card {
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 0;
}

.notification-card:last-child {
    border-bottom: 0;
}

.muted {
    color: #6b7280;
    font-size: 14px;
}

.race-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 6px solid #2563eb;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}

.race-card h2,
.race-card h3 {
    margin-top: 0;
}

.race-past {
    opacity: 0.7;
    border-left-color: #9ca3af;
}

.priority-a {
    background: #fee2e2;
    color: #991b1b;
}

.priority-b {
    background: #fef3c7;
    color: #92400e;
}

.priority-c {
    background: #e0f2fe;
    color: #075985;
}

.muted-row {
    opacity: 0.65;
}

#coach-calendar {
    min-height: 720px;
}

.fc {
    font-size: 14px;
}

.fc-event {
    cursor: pointer;
    border: 0;
    padding: 2px 4px;
}

.workout-event {
    border-radius: 6px;
}

.workout-easy,
.workout-recovery {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.workout-long_run {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.workout-intervals,
.workout-tempo,
.workout-threshold,
.workout-hills {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.workout-strength,
.workout-mobility,
.workout-cross_training {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.workout-rest {
    background: #e5e7eb !important;
    color: #374151 !important;
}

.status-completed {
    opacity: 0.7;
}

.status-skipped,
.status-cancelled {
    text-decoration: line-through;
    opacity: 0.65;
}

.race-event {
    background: #111827 !important;
    color: #fff !important;
    border-radius: 6px;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.calendar-toolbar h2 {
    margin: 0;
}

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

.calendar-weekdays {
    background: #111827;
    color: #fff;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.calendar-weekdays div {
    padding: 12px;
    font-weight: 700;
    text-align: center;
}

.calendar-grid {
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
}

.calendar-day {
    min-height: 140px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px;
}

.calendar-day-empty {
    background: #f9fafb;
}

.calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.calendar-day-number {
    font-weight: 700;
    color: #111827;
}

.calendar-add-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-weight: 700;
}

.calendar-workout,
.calendar-race {
    border-radius: 8px;
    padding: 7px 8px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 13px;
}

.calendar-workout-title {
    font-weight: 700;
}

.calendar-workout-meta {
    font-size: 12px;
    opacity: 0.85;
}

.calendar-race {
    background: #111827;
    color: #fff;
}

.calendar-day-drop-target {
    outline: 3px dashed #2563eb;
    outline-offset: -6px;
    background: #eff6ff;
}

.is-dragging {
    opacity: 0.5;
}

.calendar-loading,
.calendar-error {
    grid-column: 1 / -1;
    padding: 24px;
}

.workout-easy,
.workout-recovery {
    background: #dcfce7;
    color: #166534;
}

.workout-long_run {
    background: #dbeafe;
    color: #1e40af;
}

.workout-intervals,
.workout-tempo,
.workout-threshold,
.workout-hills {
    background: #fee2e2;
    color: #991b1b;
}

.workout-strength,
.workout-mobility,
.workout-cross_training {
    background: #fef3c7;
    color: #92400e;
}

.workout-rest {
    background: #e5e7eb;
    color: #374151;
}

.status-completed {
    opacity: 0.7;
}

.status-skipped,
.status-cancelled {
    text-decoration: line-through;
    opacity: 0.65;
}

.calendar-warning {
    border-radius: 8px;
    padding: 7px 8px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 13px;
    border-left: 5px solid #6b7280;
    background: #f9fafb;
}

.calendar-warning-title {
    font-weight: 800;
}

.calendar-warning-meta {
    font-size: 12px;
    opacity: 0.9;
}

.warning-high {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #dc2626;
}

.warning-moderate {
    background: #fef3c7;
    color: #92400e;
    border-left-color: #f59e0b;
}

.warning-low {
    background: #dcfce7;
    color: #166534;
    border-left-color: #10b981;
}

.calendar-day-risk-high {
    box-shadow: inset 0 0 0 2px #dc2626;
}

.calendar-day-risk-moderate {
    box-shadow: inset 0 0 0 2px #f59e0b;
}

.calendar-day-risk-low {
    box-shadow: inset 0 0 0 2px #10b981;
}
.stat-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.stat-card-link:hover {
    transform: translateY(-2px);
}

.feedback-stats-grid {
    margin-bottom: 28px;
}

.feedback-page .panel table {
    margin-top: 10px;
}

.feedback-page td p {
    margin: 8px 0;
}

.feedback-page td strong {
    display: inline-block;
    margin-bottom: 2px;
}

.feedback-page .muted {
    line-height: 1.45;
}

/* Coach progress overview */

.coach-progress-overview-page .progress-chart-card {
    min-height: 420px;
}

.progress-table-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.progress-table-header h2 {
    margin-top: 0;
}

.responsive-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.progress-overview-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.progress-overview-table th,
.progress-overview-table td {
    padding: 14px 16px;
    vertical-align: top;
}

.risk-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    text-transform: capitalize;
}

.risk-pill-stable {
    background: #dcfce7;
    color: #166534;
}

.risk-pill-elevated {
    background: #fef3c7;
    color: #92400e;
}

.risk-pill-high {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 900px) {
    .progress-table-header {
        flex-direction: column;
    }

    .coach-progress-overview-page .progress-chart-card {
        min-height: auto;
    }
}

@media (max-width: 700px) {
    .progress-overview-table {
        min-width: 860px;
    }

    .risk-pill {
        min-width: auto;
    }
}

/* Teams */

.teams-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.team-form {
    max-width: 720px;
}

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

.team-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    min-width: 0;
}

.team-card h3 {
    margin-top: 0;
}

.team-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.team-card-actions form {
    margin: 0;
}

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

@media (max-width: 700px) {
    .teams-page {
        padding: 14px;
    }

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

    .team-card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .team-card-actions .button,
    .team-card-actions form,
    .team-card-actions button {
        width: 100%;
    }
}

/* Team management */

.team-management-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 24px;
    align-items: start;
}

.team-members-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.team-members-header h2 {
    margin-top: 0;
}

.team-member-list {
    display: grid;
    gap: 14px;
}

.team-member-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
}

.team-member-card h3 {
    margin: 0 0 6px;
}

.team-member-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.team-member-actions form {
    margin: 0;
}

@media (max-width: 1000px) {
    .team-management-grid {
        grid-template-columns: 1fr;
    }

    .team-member-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .team-member-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .team-members-header {
        flex-direction: column;
    }

    .team-member-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .team-member-actions .button,
    .team-member-actions form,
    .team-member-actions button {
        width: 100%;
    }
}

/* Team filters */

.team-filter-panel {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
}

.team-filter-panel .form-group {
    flex: 1;
    margin-bottom: 0;
}

.team-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 700px) {
    .team-filter-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .team-filter-actions {
        flex-direction: column;
    }

    .team-filter-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Feedback team filters */

.feedback-filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(220px, 320px) auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 24px;
}

.feedback-filter-panel .form-group {
    margin-bottom: 0;
}

.feedback-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feedback-filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.feedback-filter-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.feedback-filter-links a.is-active {
    background: #111827;
    color: #fff;
}

.feedback-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .feedback-filter-panel {
        grid-template-columns: 1fr;
    }

    .feedback-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .feedback-filter-actions .button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 700px) {
    .feedback-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Coach athlete cards */

.athlete-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.coach-athlete-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    min-width: 0;
}

.coach-athlete-card-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.coach-athlete-card h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.coach-athlete-card p {
    margin: 4px 0;
}

.coach-athlete-status {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.coach-athlete-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.coach-athlete-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.coach-athlete-metrics div {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    min-width: 0;
}

.coach-athlete-metrics span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 6px;
}

.coach-athlete-metrics strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
}

.coach-athlete-metrics small {
    display: block;
    color: #6b7280;
    margin-top: 3px;
}

.coach-athlete-meta {
    color: #6b7280;
    font-size: 14px;
}

.coach-athlete-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 1200px) {
    .athlete-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .coach-athlete-card {
        padding: 16px;
    }

    .coach-athlete-card-header {
        flex-direction: column;
    }

    .coach-athlete-status {
        justify-content: flex-start;
    }

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

    .coach-athlete-actions {
        flex-direction: column;
    }

    .coach-athlete-actions .button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 430px) {
    .coach-athlete-metrics {
        grid-template-columns: 1fr;
    }
}

/* CoachAssist diagnostics team filter */

.diagnostics-filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(220px, 1fr) auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 24px;
}

.diagnostics-filter-panel .form-group {
    margin-bottom: 0;
}

.diagnostics-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 900px) {
    .diagnostics-filter-panel {
        grid-template-columns: 1fr;
    }

    .diagnostics-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .diagnostics-filter-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Team workout assignment */

.team-workout-page .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.team-athlete-preview {
    margin-top: 12px;
}

.team-athlete-preview summary {
    cursor: pointer;
    font-weight: 800;
}

.team-athlete-preview ul {
    margin: 12px 0 0;
    padding-left: 20px;
}

.team-workout-form {
    margin-top: 24px;
}

@media (max-width: 760px) {
    .team-workout-page .form-grid {
        grid-template-columns: 1fr;
    }

    .team-workout-form .button {
        width: 100%;
        text-align: center;
    }
}

/* Coach resource library */

.library-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.library-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
}

.library-card-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.library-card h3 {
    margin: 0 0 6px;
}

.library-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.library-meta-grid div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
}

.library-meta-grid span,
.library-meta-grid small {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.library-meta-grid strong {
    display: block;
    margin: 5px 0;
}

.library-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.library-upload-form {
    display: grid;
    gap: 24px;
}

.library-access-section {
    display: grid;
    gap: 12px;
}

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

.checkbox-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
}

.checkbox-card input {
    margin-top: 4px;
}

.checkbox-card span,
.checkbox-card small {
    display: block;
}

.checkbox-card small {
    color: #64748b;
    margin-top: 3px;
}

@media (max-width: 1000px) {
    .library-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .library-meta-grid,
    .checkbox-card-grid {
        grid-template-columns: 1fr;
    }

    .library-actions,
    .form-actions {
        flex-direction: column;
    }

    .library-actions .button,
    .form-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Coach training setup index */

.training-settings-athlete-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.training-settings-athlete-card {
    padding: 22px;
    border-radius: 18px;
}

.training-settings-athlete-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.training-settings-athlete-card-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.training-settings-athlete-card-header p {
    margin: 0;
}

@media (max-width: 900px) {
    .training-settings-athlete-grid {
        grid-template-columns: 1fr;
    }

    .training-settings-athlete-card-header {
        display: grid;
        gap: 12px;
    }

    .training-settings-athlete-card-header .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach athletes page */

.athletes-page {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
}

.athletes-panel {
    width: 100%;
    padding: 24px;
}

.athletes-panel .page-header {
    margin-bottom: 20px;
}

.athlete-list-wide {
    display: grid;
    gap: 14px;
    width: 100%;
}

.athlete-wide-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.athlete-wide-main {
    min-width: 0;
}

.athlete-wide-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.athlete-wide-title h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.athlete-wide-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.athlete-wide-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-wide-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

@media (max-width: 900px) {
    .athlete-wide-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .athlete-wide-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .athletes-page {
        width: min(100% - 20px, 1280px);
    }

    .athletes-panel {
        padding: 16px;
    }

    .athlete-wide-card {
        padding: 16px;
    }

    .athlete-wide-title {
        display: grid;
        gap: 8px;
    }

    .athlete-wide-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-wide-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach athletes page */

.athletes-page {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
}

.athletes-panel {
    width: 100%;
    padding: 24px;
}

.athletes-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.athlete-team-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.team-filter-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.team-filter-pill:hover,
.team-filter-pill.active {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
}

.athlete-list-wide {
    display: grid;
    gap: 14px;
    width: 100%;
}

.athlete-wide-card {
    display: block;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

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

.athlete-wide-main {
    min-width: 0;
}

.athlete-wide-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.athlete-wide-title h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.athlete-wide-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.coach-athlete-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.team-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 900;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.athlete-wide-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 420px;
}

.athlete-wide-actions .button {
    min-height: 38px;
    margin: 0;
    white-space: nowrap;
}

.athlete-wide-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.athlete-wide-metrics > div {
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.athlete-wide-metrics span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.athlete-wide-metrics strong {
    display: inline-block;
    color: #111827;
    font-size: 18px;
    line-height: 1.2;
}

.athlete-wide-metrics small {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 1000px) {
    .athlete-wide-top {
        grid-template-columns: 1fr;
    }

    .athlete-wide-actions {
        justify-content: flex-start;
        max-width: none;
    }

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

@media (max-width: 640px) {
    .athletes-page {
        width: min(100% - 20px, 1280px);
    }

    .athletes-panel {
        padding: 16px;
    }

    .athletes-page-header {
        display: grid;
    }

    .athletes-page-header .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .athletes-page-header .button {
        width: 100%;
        justify-content: center;
    }

    .athlete-wide-card {
        padding: 16px;
    }

    .athlete-wide-title {
        display: grid;
        gap: 8px;
    }

    .athlete-wide-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-wide-actions .button {
        width: 100%;
        justify-content: center;
    }

    .athlete-wide-metrics {
        grid-template-columns: 1fr;
    }
}

/* Coach teams page */

.teams-page {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
}

.teams-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    margin-bottom: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.teams-page-header h1 {
    margin-bottom: 8px;
}

.teams-page-header .muted {
    margin-bottom: 0;
}

.teams-page-header .page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
}

.teams-create-panel,
.teams-list-panel {
    width: 100%;
    padding: 24px;
    margin-bottom: 18px;
}

.teams-create-header,
.teams-list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.teams-create-header h2,
.teams-list-header h2 {
    margin-bottom: 6px;
}

.team-form-wide {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.4fr) auto;
    align-items: end;
    gap: 16px;
}

.team-form-wide .form-group {
    margin-bottom: 0;
}

.team-form-wide textarea {
    min-height: 42px;
    resize: vertical;
}

.team-form-actions {
    display: flex;
    justify-content: flex-end;
}

.team-form-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.team-list-wide {
    display: grid;
    gap: 14px;
    width: 100%;
}

.team-wide-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.team-wide-main {
    min-width: 0;
}

.team-wide-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.team-wide-title h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.team-count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.team-wide-description {
    margin: 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.team-wide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 10px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.team-wide-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.team-wide-actions .button {
    min-height: 38px;
    margin: 0;
    white-space: nowrap;
}

.team-delete-form {
    margin: 0;
}

@media (max-width: 1050px) {
    .team-form-wide {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .team-form-actions {
        justify-content: flex-start;
    }

    .team-wide-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .team-wide-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .teams-page {
        width: min(100% - 20px, 1280px);
    }

    .teams-page-header {
        display: grid;
        padding: 18px;
    }

    .teams-page-header .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .teams-page-header .button {
        width: 100%;
        justify-content: center;
    }

    .teams-create-panel,
    .teams-list-panel {
        padding: 16px;
    }

    .teams-create-header,
    .teams-list-header {
        display: grid;
        gap: 8px;
    }

    .team-form-actions,
    .team-form-actions .button {
        width: 100%;
    }

    .team-form-actions .button {
        justify-content: center;
    }

    .team-wide-card {
        padding: 16px;
    }

    .team-wide-title {
        display: grid;
        gap: 8px;
    }

    .team-wide-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .team-wide-actions .button,
    .team-delete-form,
    .team-delete-form .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach training setup index */

.coach-training-setup-page {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
}

.coach-training-setup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    margin-bottom: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.coach-training-setup-header h1 {
    margin-bottom: 8px;
}

.coach-training-setup-header .muted {
    margin-bottom: 0;
}

.coach-training-setup-header .page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
}

.coach-training-setup-panel {
    width: 100%;
    padding: 24px;
}

.coach-training-setup-list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.coach-training-setup-list-header h2 {
    margin-bottom: 6px;
}

.training-setup-list {
    display: grid;
    gap: 12px;
    width: 100%;
}

.training-setup-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.training-setup-main {
    min-width: 0;
}

.training-setup-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.training-setup-title h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.training-setup-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.training-setup-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.training-setup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.training-setup-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .training-setup-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .training-setup-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .coach-training-setup-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-training-setup-header {
        display: grid;
        padding: 18px;
    }

    .coach-training-setup-header .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .coach-training-setup-header .button {
        width: 100%;
        justify-content: center;
    }

    .coach-training-setup-panel {
        padding: 16px;
    }

    .coach-training-setup-list-header {
        display: grid;
        gap: 8px;
    }

    .training-setup-row {
        padding: 16px;
    }

    .training-setup-title {
        display: grid;
        gap: 8px;
    }

    .training-setup-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .training-setup-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Shared coach page layout */

.coach-standard-page {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
}

.coach-standard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    margin-bottom: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.coach-standard-header h1,
.coach-standard-header h2 {
    margin-bottom: 8px;
}

.coach-standard-header .muted {
    margin-bottom: 0;
}

.coach-standard-header .page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.coach-standard-panel {
    width: 100%;
    padding: 24px;
    margin-bottom: 18px;
}

.coach-standard-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.coach-standard-panel-header h2 {
    margin-bottom: 6px;
}

.coach-standard-list {
    display: grid;
    gap: 14px;
    width: 100%;
}

.coach-standard-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.coach-standard-row-main {
    min-width: 0;
}

.coach-standard-row-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.coach-standard-row-title h2,
.coach-standard-row-title h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.coach-standard-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.coach-standard-row-description {
    margin: 8px 0 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.coach-standard-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.coach-standard-row-actions .button {
    min-height: 38px;
    margin: 0;
    white-space: nowrap;
}

.coach-standard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.coach-standard-card {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.coach-standard-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.coach-standard-form-grid .form-group {
    margin-bottom: 0;
}

.coach-standard-form-grid .form-group-full {
    grid-column: 1 / -1;
}

.coach-standard-filter-bar {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f8fafc;
}

.coach-standard-filter-bar .form-group {
    min-width: 220px;
    margin-bottom: 0;
}

.coach-standard-filter-actions {
    display: flex;
    gap: 8px;
}

.coach-standard-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.coach-standard-table {
    width: 100%;
    border-collapse: collapse;
}

.coach-standard-table th,
.coach-standard-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.coach-standard-table th {
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 1000px) {
    .coach-standard-grid,
    .coach-standard-form-grid {
        grid-template-columns: 1fr;
    }

    .coach-standard-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .coach-standard-row-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .coach-standard-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-standard-header {
        display: grid;
        padding: 18px;
    }

    .coach-standard-header .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .coach-standard-header .button {
        width: 100%;
        justify-content: center;
    }

    .coach-standard-panel {
        padding: 16px;
    }

    .coach-standard-panel-header {
        display: grid;
        gap: 8px;
    }

    .coach-standard-row {
        padding: 16px;
    }

    .coach-standard-row-title {
        display: grid;
        gap: 8px;
    }

    .coach-standard-row-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coach-standard-row-actions .button {
        width: 100%;
        justify-content: center;
    }

    .coach-standard-filter-bar {
        display: grid;
    }

    .coach-standard-filter-bar .form-group,
    .coach-standard-filter-actions,
    .coach-standard-filter-actions .button {
        width: 100%;
    }

    .coach-standard-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coach-standard-filter-actions .button {
        justify-content: center;
    }
}

/* Coach feedback page */

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

.feedback-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.feedback-summary-card strong {
    display: block;
    color: #111827;
    font-size: 30px;
    line-height: 1.1;
}

.feedback-summary-card p {
    margin: 8px 0 0;
}

.feedback-list-panel {
    margin-top: 18px;
}

.feedback-filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.feedback-filter-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.feedback-filter-links a:hover,
.feedback-filter-links a.is-active {
    border-color: #111827;
    background: #111827;
    color: #ffffff;
}

.feedback-list-wide {
    display: grid;
    gap: 14px;
    width: 100%;
}

.feedback-wide-card {
    display: block;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.feedback-wide-card.has-flags {
    border-color: #f59e0b;
}

.feedback-wide-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
}

.feedback-wide-main {
    min-width: 0;
}

.feedback-wide-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.feedback-wide-title h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.feedback-wide-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.feedback-workout-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 12px;
    color: #374151;
    font-size: 14px;
}

.feedback-workout-summary span {
    color: #6b7280;
    font-weight: 700;
}

.feedback-wide-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 520px;
}

.feedback-wide-actions .button {
    min-height: 38px;
    margin: 0;
    white-space: nowrap;
}

.feedback-wide-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.feedback-wide-metrics > div {
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.feedback-wide-metrics span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.feedback-wide-metrics strong {
    display: inline-block;
    color: #111827;
    font-size: 15px;
    line-height: 1.3;
}

.feedback-wide-lower {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.feedback-wide-lower > div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.feedback-wide-lower h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.feedback-signal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.feedback-notes {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.feedback-notes summary {
    cursor: pointer;
    font-weight: 900;
}

.feedback-notes p {
    margin: 10px 0 0;
}

@media (max-width: 1000px) {
    .feedback-wide-top {
        grid-template-columns: 1fr;
    }

    .feedback-wide-actions {
        justify-content: flex-start;
        max-width: none;
    }

    .feedback-wide-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .feedback-wide-card {
        padding: 16px;
    }

    .feedback-wide-title {
        display: grid;
        gap: 8px;
    }

    .feedback-wide-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .feedback-wide-actions .button {
        width: 100%;
        justify-content: center;
    }

    .feedback-wide-metrics,
    .feedback-wide-lower {
        grid-template-columns: 1fr;
    }
}

/* Keep feedback page aligned with athletes page width */

.feedback-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
}

.feedback-page .coach-standard-header,
.feedback-page .coach-standard-filter-bar,
.feedback-page .coach-standard-panel,
.feedback-page .feedback-summary-grid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.feedback-page .feedback-wide-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.athletes-page,
.feedback-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}
.feedback-wide-actions {
    max-width: 430px;
}

/* Coach team workout create page */

.team-workout-create-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.team-workout-team-selector {
    margin-bottom: 18px;
}

.selected-team-panel {
    margin-bottom: 18px;
}

.selected-team-count {
    min-width: 150px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    text-align: center;
}

.selected-team-count span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.selected-team-count strong {
    display: block;
    color: #111827;
    font-size: 30px;
    line-height: 1;
}

.team-athlete-preview {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.team-athlete-preview summary {
    cursor: pointer;
    font-weight: 900;
}

.team-athlete-preview-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.team-athlete-preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.team-athlete-preview-row:last-child {
    border-bottom: 0;
}

.team-workout-form-grid {
    margin-bottom: 18px;
}

.team-workout-submit-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.team-workout-submit-panel p {
    margin: 6px 0 0;
}

.team-workout-submit-panel .button {
    min-height: 42px;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .selected-team-count {
        width: 100%;
        text-align: left;
    }

    .team-workout-submit-panel {
        display: grid;
        gap: 14px;
    }

    .team-workout-submit-panel .button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .team-workout-create-page {
        width: min(100% - 20px, 1280px);
    }

    .team-athlete-preview-row {
        display: grid;
        gap: 4px;
    }
}

/* Coach athlete progress page */

.athlete-progress-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.athlete-progress-selector {
    margin-bottom: 18px;
}

.selected-athlete-progress-panel {
    margin-bottom: 18px;
}

.selected-athlete-progress-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.selected-athlete-progress-main h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.selected-athlete-progress-main .muted {
    margin-bottom: 0;
}

.selected-athlete-progress-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-athlete-progress-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

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

.athlete-progress-summary-grid .progress-summary-card {
    min-height: 130px;
}

.progress-summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.progress-summary-card strong {
    display: block;
    color: #111827;
    font-size: 30px;
    line-height: 1.1;
}

.progress-summary-card .muted {
    display: block;
    margin-top: 8px;
}

.athlete-progress-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.progress-chart-card {
    min-width: 0;
}

.progress-chart-card-wide {
    grid-column: span 2;
}

.progress-chart-header {
    margin-bottom: 14px;
}

.progress-chart-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.progress-chart-header .muted {
    margin-bottom: 0;
}

.progress-chart-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 320px;
}

.progress-chart-canvas-wrap-small {
    min-height: 260px;
}

.progress-chart-canvas-wrap canvas {
    width: 100% !important;
    max-width: 100%;
}

.acwr-guide-panel {
    margin-bottom: 18px;
}

.acwr-guide-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.acwr-guide-grid > div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.acwr-guide-grid strong {
    display: block;
    margin-bottom: 5px;
    color: #111827;
    font-size: 18px;
}

.acwr-guide-grid span {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 1000px) {
    .athlete-progress-summary-grid,
    .athlete-progress-chart-grid,
    .acwr-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .progress-chart-card-wide {
        grid-column: span 2;
    }

    .selected-athlete-progress-main {
        display: grid;
    }

    .selected-athlete-progress-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-progress-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-progress-summary-grid,
    .athlete-progress-chart-grid,
    .acwr-guide-grid {
        grid-template-columns: 1fr;
    }

    .progress-chart-card-wide {
        grid-column: auto;
    }

    .selected-athlete-progress-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .selected-athlete-progress-actions .button {
        width: 100%;
        justify-content: center;
    }

    .progress-chart-canvas-wrap {
        min-height: 260px;
    }
}

/* CoachAssist diagnostics page */

.coachassist-diagnostics-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.diagnostics-filter-panel,
.diagnostics-selected-athlete-panel,
.diagnostics-run-panel,
.diagnostics-list-panel {
    margin-bottom: 18px;
}

.diagnostics-selected-athlete-main,
.diagnostics-run-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.diagnostics-selected-athlete-main h2,
.diagnostics-run-content h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.diagnostics-selected-athlete-main .muted,
.diagnostics-run-content .muted {
    margin-bottom: 0;
}

.diagnostics-selected-athlete-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.diagnostics-selected-athlete-actions .button,
.diagnostics-run-content .button {
    min-height: 38px;
    white-space: nowrap;
}

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

.diagnostics-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.diagnostics-summary-card strong {
    display: block;
    color: #111827;
    font-size: 30px;
    line-height: 1.1;
}

.diagnostics-summary-card p {
    margin: 8px 0 0;
}

.diagnostics-card-list {
    display: grid;
    gap: 14px;
}

.diagnostics-wide-card {
    display: block;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.diagnostics-wide-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.diagnostics-wide-top h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.2;
}

.diagnostics-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.diagnostics-title-row h3 {
    margin: 0;
}

.diagnostics-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.diagnostics-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.diagnostics-card-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

.diagnostics-description {
    margin: 12px 0 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.diagnostics-metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.diagnostics-metric-grid > div {
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.diagnostics-metric-grid span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.diagnostics-metric-grid strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.3;
    word-break: break-word;
}

.diagnostics-metric-grid small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.diagnostics-notes {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.diagnostics-notes summary {
    cursor: pointer;
    font-weight: 900;
}

.diagnostics-notes p {
    margin: 10px 0 0;
}

@media (max-width: 1100px) {
    .diagnostics-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 800px) {
    .diagnostics-selected-athlete-main,
    .diagnostics-run-content,
    .diagnostics-wide-top {
        display: grid;
    }

    .diagnostics-selected-athlete-actions,
    .diagnostics-card-actions {
        justify-content: flex-start;
    }

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

@media (max-width: 640px) {
    .coachassist-diagnostics-page {
        width: min(100% - 20px, 1280px);
    }

    .diagnostics-wide-card {
        padding: 16px;
    }

    .diagnostics-selected-athlete-actions,
    .diagnostics-card-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .diagnostics-selected-athlete-actions .button,
    .diagnostics-card-actions .button,
    .diagnostics-run-content .button {
        width: 100%;
        justify-content: center;
    }

    .diagnostics-metric-grid {
        grid-template-columns: 1fr;
    }
}

/* Coach progress overview page */

.coach-progress-overview-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.coach-progress-filter-panel {
    margin-bottom: 18px;
}

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

.coach-progress-summary-grid .progress-summary-card {
    min-height: 130px;
}

.coach-progress-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.coach-progress-risk-panel {
    margin-bottom: 18px;
}

.coach-progress-overview-page .progress-chart-card {
    min-width: 0;
}

.coach-progress-overview-page .progress-chart-header {
    margin-bottom: 14px;
}

.coach-progress-overview-page .progress-chart-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.coach-progress-overview-page .progress-chart-header .muted {
    margin-bottom: 0;
}

.coach-progress-overview-page .progress-chart-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 300px;
}

.coach-progress-overview-page .progress-chart-canvas-wrap-small {
    min-height: 280px;
}

.coach-progress-overview-page .progress-chart-canvas-wrap canvas {
    width: 100% !important;
    max-width: 100%;
}

.coach-progress-overview-page .progress-overview-table td:last-child {
    white-space: nowrap;
}

.coach-progress-overview-page .progress-overview-table .button,
.coach-progress-overview-page .progress-overview-table a.button {
    min-height: 34px;
    margin: 2px;
}

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

@media (max-width: 640px) {
    .coach-progress-overview-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-progress-summary-grid,
    .coach-progress-chart-grid {
        grid-template-columns: 1fr;
    }

    .coach-progress-overview-page .progress-chart-canvas-wrap {
        min-height: 260px;
    }
}

/* Coach feedback detail page */

.feedback-detail-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.feedback-detail-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.feedback-detail-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.feedback-detail-summary-card p {
    margin: 8px 0 0;
}

.feedback-detail-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.feedback-detail-card-actions .button {
    min-height: 36px;
}

.feedback-comparison-panel,
.feedback-suggestions-panel {
    margin-bottom: 18px;
}

.feedback-comparison-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.feedback-comparison-grid > div,
.feedback-detail-info-list > div,
.feedback-suggestion-metrics > div {
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.feedback-comparison-grid span,
.feedback-detail-info-list span,
.feedback-suggestion-metrics span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.feedback-comparison-grid strong,
.feedback-detail-info-list strong,
.feedback-suggestion-metrics strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.3;
    word-break: break-word;
}

.feedback-detail-info-list small,
.feedback-suggestion-metrics small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.feedback-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.feedback-detail-panel {
    margin-bottom: 0;
}

.feedback-detail-info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.feedback-text-block {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.feedback-text-block h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.feedback-text-block p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.feedback-suggestion-list {
    display: grid;
    gap: 14px;
}

.feedback-suggestion-card {
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.feedback-suggestion-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.feedback-suggestion-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.feedback-suggestion-title h3 {
    margin: 0;
    font-size: 20px;
}

.feedback-suggestion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.feedback-suggestion-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.feedback-suggestion-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

.feedback-suggestion-description {
    margin: 12px 0 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.feedback-suggestion-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 1000px) {
    .feedback-detail-summary-grid {
        grid-template-columns: 1fr;
    }

    .feedback-detail-grid {
        grid-template-columns: 1fr;
    }

    .feedback-comparison-grid,
    .feedback-suggestion-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feedback-suggestion-top {
        display: grid;
    }

    .feedback-suggestion-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .feedback-detail-page {
        width: min(100% - 20px, 1280px);
    }

    .feedback-comparison-grid,
    .feedback-detail-info-list,
    .feedback-suggestion-metrics {
        grid-template-columns: 1fr;
    }

    .feedback-suggestion-card {
        padding: 16px;
    }

    .feedback-suggestion-actions,
    .feedback-detail-card-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .feedback-suggestion-actions .button,
    .feedback-detail-card-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach workout edit page */

.workout-edit-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.workout-edit-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.workout-edit-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.workout-edit-summary-card p {
    margin: 8px 0 0;
}

.workout-edit-form-panel,
.workout-target-reference-panel,
.garmin-push-panel,
.workout-danger-panel {
    margin-bottom: 18px;
}

.workout-edit-form-grid {
    margin-bottom: 18px;
}

.workout-edit-submit-panel,
.workout-danger-content,
.garmin-push-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.workout-edit-submit-panel,
.workout-danger-content {
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.workout-edit-submit-panel p,
.workout-danger-content p,
.garmin-push-header p {
    margin: 6px 0 0;
}

.workout-edit-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.workout-edit-submit-actions .button,
.workout-danger-content .button,
.garmin-push-form .button {
    min-height: 42px;
    white-space: nowrap;
}

.workout-reference-block {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.workout-reference-block + .workout-reference-block {
    margin-top: 14px;
}

.workout-reference-block h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.garmin-push-form {
    margin-top: 14px;
}

@media (max-width: 900px) {
    .workout-edit-summary-grid {
        grid-template-columns: 1fr;
    }

    .workout-edit-submit-panel,
    .workout-danger-content,
    .garmin-push-header {
        display: grid;
    }

    .workout-edit-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .workout-edit-page {
        width: min(100% - 20px, 1280px);
    }

    .workout-edit-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .workout-edit-submit-actions .button,
    .workout-danger-content .button,
    .garmin-push-form .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach athlete view page */

.athlete-view-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-view-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-view-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-view-summary-card p {
    margin: 8px 0 0;
}

.athlete-view-profile-panel,
.athlete-team-management-panel {
    margin-bottom: 18px;
}

.athlete-view-panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-view-panel-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

.athlete-profile-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.athlete-profile-detail-grid > div,
.athlete-add-team-panel,
.athlete-view-text-block {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.athlete-profile-detail-grid span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.athlete-profile-detail-grid strong {
    color: #111827;
    font-size: 15px;
}

.athlete-view-text-block {
    margin-top: 14px;
}

.athlete-view-text-block h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.athlete-view-text-block p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.athlete-team-list,
.athlete-view-list {
    display: grid;
    gap: 12px;
}

.athlete-team-row,
.athlete-view-list-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.athlete-team-row h3,
.athlete-view-list-row h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.athlete-team-row p,
.athlete-view-list-row p {
    margin: 6px 0 0;
}

.athlete-team-row-actions,
.athlete-view-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-team-row-actions form {
    margin: 0;
}

.athlete-team-row-actions .button,
.athlete-view-row-actions .button {
    min-height: 36px;
    white-space: nowrap;
}

.athlete-add-team-panel {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-top: 16px;
}

.athlete-add-team-panel h3 {
    margin: 0 0 6px;
}

.athlete-add-team-panel p {
    margin: 0;
}

.athlete-add-team-form {
    display: flex;
    align-items: end;
    gap: 10px;
    margin: 0;
}

.athlete-add-team-form .form-group {
    min-width: 220px;
    margin-bottom: 0;
}

.athlete-view-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.athlete-view-two-column > .panel {
    margin-bottom: 0;
}

.athlete-view-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

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

    .athlete-view-two-column,
    .athlete-profile-detail-grid {
        grid-template-columns: 1fr;
    }

    .athlete-team-row,
    .athlete-view-list-row,
    .athlete-add-team-panel {
        display: grid;
    }

    .athlete-team-row-actions,
    .athlete-view-row-actions,
    .athlete-view-panel-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-view-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-view-summary-grid {
        grid-template-columns: 1fr;
    }

    .athlete-add-team-form,
    .athlete-team-row-actions,
    .athlete-view-row-actions,
    .athlete-view-panel-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-add-team-form .form-group,
    .athlete-add-team-form .button,
    .athlete-team-row-actions .button,
    .athlete-view-row-actions .button,
    .athlete-view-panel-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach team view page */

.team-view-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.team-view-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.team-view-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.team-view-summary-card p {
    margin: 8px 0 0;
}

.team-view-management-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 18px;
    margin-bottom: 18px;
}

.team-view-management-grid > .panel,
.team-view-members-panel {
    margin-bottom: 0;
}

.team-view-form-grid {
    margin-bottom: 18px;
}

.team-view-form-actions,
.team-view-panel-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.team-view-form-actions .button,
.team-view-panel-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

.team-view-member-list {
    display: grid;
    gap: 14px;
}

.team-view-member-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.team-view-member-main {
    min-width: 0;
}

.team-view-member-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.team-view-member-title h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.team-view-member-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.team-view-member-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.team-view-member-actions form {
    margin: 0;
}

.team-view-member-actions .button {
    min-height: 38px;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .team-view-summary-grid {
        grid-template-columns: 1fr;
    }

    .team-view-management-grid,
    .team-view-member-card {
        grid-template-columns: 1fr;
    }

    .team-view-form-actions,
    .team-view-panel-actions,
    .team-view-member-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .team-view-page {
        width: min(100% - 20px, 1280px);
    }

    .team-view-member-card {
        padding: 16px;
    }

    .team-view-member-title {
        display: grid;
        gap: 8px;
    }

    .team-view-form-actions,
    .team-view-panel-actions,
    .team-view-member-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .team-view-form-actions .button,
    .team-view-panel-actions .button,
    .team-view-member-actions .button,
    .team-view-member-actions form {
        width: 100%;
        justify-content: center;
    }
}

/* Coach assign workout page */

.assign-workout-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.assign-workout-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.assign-workout-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.assign-workout-summary-card p {
    margin: 8px 0 0;
}

.assign-workout-form {
    display: block;
}

.assign-workout-panel,
.assign-workout-submit-panel {
    margin-bottom: 18px;
}

.assign-workout-form-grid {
    margin-bottom: 0;
}

.assign-workout-method-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
    gap: 18px;
    margin-bottom: 18px;
}

.assign-workout-method-grid > .panel {
    margin-bottom: 0;
}

.assign-workout-help-box {
    margin-top: 16px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.assign-workout-help-box p {
    margin: 6px 0 0;
}

.assign-workout-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.assign-workout-submit-content p {
    margin: 6px 0 0;
}

.assign-workout-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.assign-workout-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .assign-workout-summary-grid,
    .assign-workout-method-grid {
        grid-template-columns: 1fr;
    }

    .assign-workout-submit-content {
        display: grid;
    }

    .assign-workout-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .assign-workout-page {
        width: min(100% - 20px, 1280px);
    }

    .assign-workout-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .assign-workout-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach athlete edit page */

.athlete-edit-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-edit-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-edit-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-edit-summary-card p {
    margin: 8px 0 0;
}

.athlete-edit-form {
    display: block;
}

.athlete-edit-panel,
.athlete-edit-submit-panel {
    margin-bottom: 18px;
}

.athlete-edit-form-grid {
    margin-bottom: 0;
}

.athlete-edit-checkbox {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    width: auto;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    font-weight: 800;
}

.athlete-edit-checkbox input {
    width: auto;
    margin-top: 3px;
}

.athlete-edit-notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.athlete-edit-notes-grid .panel {
    margin-bottom: 0;
}

.athlete-edit-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.athlete-edit-submit-content p {
    margin: 6px 0 0;
}

.athlete-edit-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-edit-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .athlete-edit-submit-content {
        display: grid;
    }

    .athlete-edit-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-edit-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-edit-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-edit-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach race create page */

.race-create-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.race-create-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.race-create-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.race-create-summary-card p {
    margin: 8px 0 0;
}

.race-create-form {
    display: block;
}

.race-create-panel,
.race-create-submit-panel {
    margin-bottom: 18px;
}

.race-create-form-grid {
    margin-bottom: 0;
}

.race-create-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.race-create-submit-content p {
    margin: 6px 0 0;
}

.race-create-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.race-create-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .race-create-summary-grid {
        grid-template-columns: 1fr;
    }

    .race-create-submit-content {
        display: grid;
    }

    .race-create-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .race-create-page {
        width: min(100% - 20px, 1280px);
    }

    .race-create-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .race-create-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach race edit page */

.race-edit-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.race-edit-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.race-edit-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.race-edit-summary-card p {
    margin: 8px 0 0;
}

.race-edit-form {
    display: block;
}

.race-edit-panel,
.race-edit-submit-panel,
.race-edit-danger-panel {
    margin-bottom: 18px;
}

.race-edit-form-grid {
    margin-bottom: 0;
}

.race-edit-submit-content,
.race-edit-danger-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.race-edit-submit-content p,
.race-edit-danger-content p {
    margin: 6px 0 0;
}

.race-edit-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.race-edit-submit-actions .button,
.race-edit-danger-content .button {
    min-height: 42px;
    white-space: nowrap;
}

.race-edit-danger-panel {
    border-color: #fecaca;
}

.race-edit-danger-content {
    background: #fff7f7;
}

@media (max-width: 1000px) {
    .race-edit-summary-grid {
        grid-template-columns: 1fr;
    }

    .race-edit-submit-content,
    .race-edit-danger-content {
        display: grid;
    }

    .race-edit-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .race-edit-page {
        width: min(100% - 20px, 1280px);
    }

    .race-edit-submit-actions,
    .race-edit-danger-content form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .race-edit-submit-actions .button,
    .race-edit-danger-content .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach races index page */

.races-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.races-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.races-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.races-summary-card p {
    margin: 8px 0 0;
}

.races-list-panel {
    margin-bottom: 18px;
}

.races-panel-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.races-list {
    display: grid;
    gap: 14px;
}

.race-list-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.race-list-card.is-past {
    opacity: 0.72;
}

.race-list-main {
    min-width: 0;
}

.race-list-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.race-list-title h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.race-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.race-list-meta a {
    color: inherit;
    font-weight: 900;
}

.race-list-notes {
    margin: 12px 0 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.race-list-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.race-list-actions .button,
.races-panel-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

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

    .race-list-card {
        grid-template-columns: 1fr;
    }

    .race-list-actions,
    .races-panel-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .races-page {
        width: min(100% - 20px, 1280px);
    }

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

    .race-list-card {
        padding: 16px;
    }

    .race-list-title {
        display: grid;
        gap: 8px;
    }

    .race-list-actions,
    .races-panel-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .race-list-actions .button,
    .races-panel-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* CoachAssist suggestions page */

.coachassist-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.coachassist-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coachassist-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.coachassist-summary-card p {
    margin: 8px 0 0;
}

.coachassist-intro-panel,
.coachassist-list-panel {
    margin-bottom: 18px;
}

.coachassist-suggestion-list {
    display: grid;
    gap: 14px;
}

.coachassist-suggestion-card {
    display: block;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.coachassist-suggestion-card.risk-high {
    border-color: #fca5a5;
}

.coachassist-suggestion-card.risk-moderate {
    border-color: #fbbf24;
}

.coachassist-suggestion-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.coachassist-suggestion-main {
    min-width: 0;
}

.coachassist-suggestion-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.coachassist-suggestion-title h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.coachassist-suggestion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.coachassist-suggestion-actions,
.coachassist-decision-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.coachassist-suggestion-actions .button,
.coachassist-decision-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

.coachassist-linked-workout,
.coachassist-action-preview,
.coachassist-response-notes {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.coachassist-linked-workout span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coachassist-linked-workout strong {
    display: block;
    color: #111827;
    font-size: 16px;
}

.coachassist-linked-workout small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-weight: 700;
}

.coachassist-reason {
    margin: 14px 0 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.coachassist-suggestion-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.coachassist-suggestion-metrics > div {
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.coachassist-suggestion-metrics span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coachassist-suggestion-metrics strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.3;
}

.coachassist-action-preview h4,
.coachassist-response-notes h4 {
    margin: 0 0 8px;
    font-size: 14px;
}

.coachassist-action-preview p,
.coachassist-response-notes p {
    margin: 0;
}

.coachassist-decision-form {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.coachassist-decision-form .form-group {
    margin-bottom: 12px;
}

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

    .coachassist-suggestion-top {
        display: grid;
    }

    .coachassist-suggestion-actions,
    .coachassist-decision-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .coachassist-page {
        width: min(100% - 20px, 1280px);
    }

    .coachassist-summary-grid,
    .coachassist-suggestion-metrics {
        grid-template-columns: 1fr;
    }

    .coachassist-suggestion-card {
        padding: 16px;
    }

    .coachassist-suggestion-title {
        display: grid;
        gap: 8px;
    }

    .coachassist-suggestion-actions,
    .coachassist-decision-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coachassist-suggestion-actions .button,
    .coachassist-decision-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* CoachAssist suggestion edit page */

.coachassist-edit-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.coachassist-edit-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coachassist-edit-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.coachassist-edit-summary-card p {
    margin: 8px 0 0;
}

.coachassist-edit-context-panel,
.coachassist-edit-workout-panel,
.coachassist-edit-submit-panel {
    margin-bottom: 18px;
}

.coachassist-edit-reason,
.coachassist-edit-preview {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.coachassist-edit-preview {
    margin-top: 14px;
}

.coachassist-edit-reason h3,
.coachassist-edit-preview h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.coachassist-edit-reason p,
.coachassist-edit-preview p {
    margin: 0;
    line-height: 1.5;
}

.coachassist-edit-form {
    display: block;
}

.coachassist-edit-form-grid {
    margin-bottom: 0;
}

.coachassist-edit-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.coachassist-edit-submit-content p {
    margin: 6px 0 0;
}

.coachassist-edit-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.coachassist-edit-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .coachassist-edit-summary-grid {
        grid-template-columns: 1fr;
    }

    .coachassist-edit-submit-content {
        display: grid;
    }

    .coachassist-edit-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .coachassist-edit-page {
        width: min(100% - 20px, 1280px);
    }

    .coachassist-edit-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coachassist-edit-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach social wall page */

.social-wall-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.social-wall-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.social-wall-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.social-wall-summary-card p {
    margin: 8px 0 0;
}

.social-compose-panel,
.social-feed-panel {
    margin-bottom: 18px;
}

.social-compose-grid {
    margin-top: 14px;
}

.social-compose-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.social-compose-actions .button {
    min-height: 42px;
}

.social-feed {
    display: grid;
    gap: 16px;
}

.social-post-card {
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.social-post-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.social-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
}

.social-avatar-small {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.social-post-author h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.social-post-author .muted {
    margin: 0;
}

.social-post-audience {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.social-post-message {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
    color: #111827;
    line-height: 1.6;
}

.social-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 12px;
}

.social-delete-form,
.social-reply-remove-form {
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: underline;
}

.link-button:hover {
    color: #111827;
}

.social-replies {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.social-reply {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.social-reply-body {
    min-width: 0;
}

.social-reply-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.social-reply-meta strong {
    color: #111827;
    font-size: 14px;
}

.social-reply-meta span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.social-reply-body p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.social-reply-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    margin-top: 16px;
}

.social-reply-form textarea {
    min-height: 44px;
    resize: vertical;
}

.social-reply-form .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .social-post-header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .social-post-audience {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .social-wall-page {
        width: min(100% - 20px, 1280px);
    }

    .social-wall-summary-grid {
        grid-template-columns: 1fr;
    }

    .social-post-card {
        padding: 16px;
    }

    .social-post-footer {
        display: grid;
        gap: 8px;
    }

    .social-reply {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .social-reply-remove-form {
        grid-column: 2 / -1;
    }

    .social-reply-form {
        grid-template-columns: 1fr;
    }

    .social-reply-form .button,
    .social-compose-actions .button {
        width: 100%;
        justify-content: center;
    }

    .social-compose-actions {
        justify-content: stretch;
    }
}

/* Coach library page */

.library-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.library-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.library-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.library-summary-card p {
    margin: 8px 0 0;
}

.library-list-panel {
    margin-bottom: 18px;
}

.library-panel-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.library-list {
    display: grid;
    gap: 14px;
}

.library-list-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.library-list-card.is-inactive {
    opacity: 0.72;
}

.library-list-main {
    min-width: 0;
}

.library-list-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.library-list-title h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.library-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.library-list-description {
    margin: 12px 0 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.library-list-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.library-list-metrics > div {
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.library-list-metrics span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.library-list-metrics strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.3;
    word-break: break-word;
}

.library-list-metrics small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    word-break: break-word;
}

.library-list-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 260px;
}

.library-list-actions .button,
.library-panel-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

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

    .library-list-card {
        grid-template-columns: 1fr;
    }

    .library-list-actions,
    .library-panel-actions {
        justify-content: flex-start;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .library-page {
        width: min(100% - 20px, 1280px);
    }

    .library-summary-grid,
    .library-list-metrics {
        grid-template-columns: 1fr;
    }

    .library-list-card {
        padding: 16px;
    }

    .library-list-title {
        display: grid;
        gap: 8px;
    }

    .library-list-actions,
    .library-panel-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .library-list-actions .button,
    .library-panel-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach library upload page */

.library-upload-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.library-upload-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.library-upload-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.library-upload-summary-card p {
    margin: 8px 0 0;
}

.library-upload-form {
    display: block;
}

.library-upload-panel,
.library-access-panel,
.library-upload-submit-panel {
    margin-bottom: 18px;
}

.library-upload-form-grid {
    margin-bottom: 0;
}

.library-upload-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.library-upload-access-grid > .panel {
    margin-bottom: 0;
}

.library-checkbox-grid {
    display: grid;
    gap: 10px;
}

.library-checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
    cursor: pointer;
}

.library-checkbox-card input {
    width: auto;
    margin-top: 3px;
}

.library-checkbox-card span {
    display: grid;
    gap: 3px;
}

.library-checkbox-card strong {
    color: #111827;
    font-size: 14px;
}

.library-checkbox-card small {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.library-upload-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.library-upload-submit-content p {
    margin: 6px 0 0;
}

.library-upload-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.library-upload-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .library-upload-submit-content {
        display: grid;
    }

    .library-upload-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .library-upload-access-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .library-upload-page {
        width: min(100% - 20px, 1280px);
    }

    .library-upload-summary-grid {
        grid-template-columns: 1fr;
    }

    .library-upload-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .library-upload-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach library edit page */

.library-edit-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.library-edit-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.library-edit-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.library-edit-summary-card p {
    margin: 8px 0 0;
}

.library-edit-form {
    display: block;
}

.library-edit-panel,
.library-access-panel,
.library-edit-submit-panel {
    margin-bottom: 18px;
}

.library-edit-form-grid {
    margin-top: 16px;
    margin-bottom: 0;
}

.library-edit-resource-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.library-edit-resource-meta strong {
    color: #111827;
}

.library-active-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
    padding: 10px 12px;
    border-radius: 999px;
    background: #f8fafc;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.library-active-toggle input {
    width: auto;
    margin: 0;
}

.library-edit-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.library-edit-access-grid > .panel {
    margin-bottom: 0;
}

.library-edit-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.library-edit-submit-content p {
    margin: 6px 0 0;
}

.library-edit-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.library-edit-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .library-edit-submit-content {
        display: grid;
    }

    .library-edit-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .library-edit-access-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .library-edit-page {
        width: min(100% - 20px, 1280px);
    }

    .library-edit-summary-grid {
        grid-template-columns: 1fr;
    }

    .library-active-toggle {
        width: 100%;
        justify-content: center;
        border-radius: 14px;
    }

    .library-edit-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .library-edit-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach athlete invite page */

.coach-athlete-invite-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.coach-athlete-invite-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-athlete-invite-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.coach-athlete-invite-summary-card p {
    margin: 8px 0 0;
}

.coach-athlete-invite-form {
    display: block;
}

.coach-athlete-invite-panel,
.coach-athlete-invite-link-panel {
    margin-bottom: 18px;
}

.coach-athlete-invite-form-grid {
    margin-bottom: 0;
}

.coach-athlete-invite-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.coach-athlete-invite-submit-content p {
    margin: 6px 0 0;
}

.coach-athlete-invite-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.coach-athlete-invite-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.coach-athlete-invite-link-box {
    overflow-wrap: anywhere;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.coach-athlete-invite-link-box a {
    font-weight: 800;
}

.coach-athlete-invite-list {
    gap: 14px;
}

.coach-athlete-invite-row {
    align-items: start;
}

.coach-athlete-invite-row .inline-form {
    margin: 0;
}

.coach-athlete-invite-static-action {
    pointer-events: none;
}

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

    .coach-athlete-invite-submit-content {
        display: grid;
    }

    .coach-athlete-invite-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .coach-athlete-invite-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-athlete-invite-summary-grid {
        grid-template-columns: 1fr;
    }

    .coach-athlete-invite-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coach-athlete-invite-submit-actions .button,
    .coach-athlete-invite-row .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach dashboard page */

.coach-dashboard-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.coach-dashboard-summary-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.coach-dashboard-summary-card:hover {
    transform: translateY(-1px);
}

.coach-dashboard-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-dashboard-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.coach-dashboard-summary-card p {
    margin: 8px 0 0;
}

.coach-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 18px;
    align-items: start;
}

.coach-dashboard-main-panel,
.coach-dashboard-side-panel {
    margin-bottom: 18px;
}

.coach-dashboard-side-grid {
    display: grid;
    gap: 18px;
}

.coach-dashboard-side-grid .coach-dashboard-side-panel {
    margin-bottom: 0;
}

.coach-dashboard-suggestion-list {
    gap: 14px;
}

.coach-dashboard-suggestion-row {
    align-items: start;
}

.coach-dashboard-suggestion-row.risk-high {
    border-left: 5px solid #ef4444;
}

.coach-dashboard-suggestion-row.risk-moderate {
    border-left: 5px solid #f59e0b;
}

.coach-dashboard-suggestion-row.risk-low {
    border-left: 5px solid #22c55e;
}

.coach-dashboard-action-list {
    display: grid;
    gap: 10px;
}

.coach-dashboard-action-list .button {
    width: 100%;
    justify-content: center;
}

.coach-dashboard-notification-list {
    display: grid;
    gap: 12px;
}

.coach-dashboard-notification-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.coach-dashboard-notification-card.is-unread {
    border-left: 5px solid #22c55e;
}

.coach-dashboard-notification-card h3 {
    margin: 0;
    color: #111827;
    font-size: 16px;
}

.coach-dashboard-notification-card p {
    margin: 6px 0 0;
    line-height: 1.5;
}

.coach-dashboard-notification-card .button {
    width: fit-content;
}

.coach-dashboard-snapshot-list {
    display: grid;
    gap: 10px;
}

.coach-dashboard-snapshot-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.coach-dashboard-snapshot-list span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.coach-dashboard-snapshot-list strong {
    color: #111827;
    font-size: 22px;
    line-height: 1;
}

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

    .coach-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .coach-dashboard-side-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .coach-dashboard-side-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .coach-dashboard-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-dashboard-summary-grid {
        grid-template-columns: 1fr;
    }

    .coach-dashboard-notification-card .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach training setup page */

.coach-training-setup-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.coach-training-setup-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-training-setup-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.coach-training-setup-summary-card p {
    margin: 8px 0 0;
}

.coach-training-setup-panel {
    margin-bottom: 18px;
}

.coach-training-setup-list {
    gap: 14px;
}

.coach-training-setup-row {
    align-items: start;
}

.coach-training-setup-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.coach-training-setup-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

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

@media (max-width: 640px) {
    .coach-training-setup-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-training-setup-summary-grid {
        grid-template-columns: 1fr;
    }

    .coach-training-setup-empty-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coach-training-setup-empty-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach teams page */

.coach-teams-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.coach-teams-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-teams-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.coach-teams-summary-card p {
    margin: 8px 0 0;
}

.coach-teams-create-panel,
.coach-teams-list-panel {
    margin-bottom: 18px;
}

.coach-teams-form {
    display: block;
}

.coach-teams-form-grid {
    margin-bottom: 0;
}

.coach-teams-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.coach-teams-submit-content p {
    margin: 6px 0 0;
}

.coach-teams-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.coach-teams-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.coach-teams-list {
    gap: 14px;
}

.coach-teams-row {
    align-items: start;
}

.coach-teams-row .inline-form {
    margin: 0;
}

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

    .coach-teams-submit-content {
        display: grid;
    }

    .coach-teams-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .coach-teams-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-teams-summary-grid {
        grid-template-columns: 1fr;
    }

    .coach-teams-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coach-teams-submit-actions .button,
    .coach-teams-row .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach team workout create page */

.team-workout-create-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.team-workout-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.team-workout-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.team-workout-summary-card p {
    margin: 8px 0 0;
}

.team-workout-team-selector,
.team-workout-create-panel,
.team-workout-form {
    margin-bottom: 18px;
}

.selected-team-count {
    min-width: 140px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    text-align: center;
}

.selected-team-count span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.selected-team-count strong {
    display: block;
    color: #111827;
    font-size: 26px;
    line-height: 1;
}

.team-athlete-preview {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.team-athlete-preview summary {
    cursor: pointer;
    color: #111827;
    font-weight: 900;
}

.team-athlete-preview-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.team-athlete-preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #ffffff;
}

.team-workout-form-grid {
    margin-bottom: 0;
}

.team-workout-submit-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.team-workout-submit-panel p {
    margin: 6px 0 0;
}

.team-workout-submit-panel .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .selected-team-panel .coach-standard-panel-header,
    .team-workout-submit-panel {
        display: grid;
    }

    .selected-team-count {
        text-align: left;
    }

    .team-athlete-preview-row {
        display: grid;
    }
}

@media (max-width: 640px) {
    .team-workout-create-page {
        width: min(100% - 20px, 1280px);
    }

    .team-workout-summary-grid {
        grid-template-columns: 1fr;
    }

    .team-workout-submit-panel .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach athlete progress page */



.coach-standard-header,
 .coach-standard-filter-bar,
.coach-standard-panel,
.coach-standard-card {
    box-sizing: border-box;
}

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

.coach-athlete-progress-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.coach-athlete-progress-chart-grid .progress-chart-card-wide {
    grid-column: 1 / -1;
}

 .progress-summary-card .progress-summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

 .progress-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

 .progress-summary-card .muted {
    display: block;
    margin-top: 8px;
}

 .progress-chart-card {
    min-width: 0;
}

 .progress-chart-header {
    margin-bottom: 16px;
}

 .progress-chart-header h2 {
    margin: 0 0 6px;
}

 .progress-chart-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 320px;
}

 .progress-chart-canvas-wrap-small {
    min-height: 280px;
}

 .progress-chart-canvas-wrap canvas {
    width: 100% !important;
    max-width: 100%;
}

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

    .coach-athlete-progress-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    
    .coach-athlete-progress-summary-grid {
        grid-template-columns: 1fr;
    }

 .progress-chart-canvas-wrap {
        min-height: 260px;
    }

 .progress-chart-canvas-wrap-small {
        min-height: 240px;
    }
}

/* Coach athlete progress page - alignment override */

main.coach-standard-page{
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

.coach-athlete-progress-dashboard,
.coach-athlete-progress-dashboard > * {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.c .coach-standard-header,
 .coach-standard-filter-bar,
 .coach-standard-panel {
    margin-left: 0;
    margin-right: 0;
}

.coach-athlete-progress-summary-grid,
.coach-athlete-progress-chart-grid {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

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

.coach-athlete-progress-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.coach-athlete-progress-chart-grid .progress-chart-card-wide {
    grid-column: 1 / -1;
}

 .progress-chart-card,
 .progress-summary-card {
    min-width: 0;
}

 .progress-chart-canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 320px;
    overflow: hidden;
}

 .progress-chart-canvas-wrap canvas {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
}

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

    .coach-athlete-progress-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    main.coach-standard-page.coach-athlete-progress-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-athlete-progress-summary-grid {
        grid-template-columns: 1fr;
    }

    .coach-athlete-progress-page .progress-chart-canvas-wrap {
        min-height: 260px;
    }
}

/* Coach athlete progress page */

.coach-athlete-progress-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.coach-athlete-progress-page *,
.coach-athlete-progress-page *::before,
.coach-athlete-progress-page *::after {
    box-sizing: border-box;
}

.coach-athlete-progress-summary-grid,
.coach-athlete-progress-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin-bottom: 18px;
}

.coach-athlete-progress-summary-card .summary-label,
.coach-athlete-progress-page .progress-summary-card .progress-summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-athlete-progress-summary-card strong,
.coach-athlete-progress-page .progress-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.coach-athlete-progress-summary-card p,
.coach-athlete-progress-page .progress-summary-card .muted {
    display: block;
    margin: 8px 0 0;
    word-break: break-word;
}

.coach-athlete-progress-selector,
.coach-athlete-progress-empty-panel,
.coach-athlete-progress-selected-panel,
.coach-athlete-progress-guide-panel {
    margin-bottom: 18px;
}

.coach-athlete-progress-selected-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.coach-athlete-progress-dashboard {
    width: 100%;
    max-width: 100%;
}

.coach-athlete-progress-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin-bottom: 18px;
}

.coach-athlete-progress-chart-grid .progress-chart-card {
    min-width: 0;
    margin-bottom: 0;
}

.coach-athlete-progress-chart-grid .progress-chart-card-wide {
    grid-column: 1 / -1;
}

.coach-athlete-progress-page .progress-chart-canvas-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 320px;
    overflow: hidden;
}

.coach-athlete-progress-page .progress-chart-canvas-wrap-small {
    min-height: 280px;
}

.coach-athlete-progress-page .progress-chart-canvas-wrap canvas {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
}

.coach-athlete-progress-acwr-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.coach-athlete-progress-acwr-grid > div {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.coach-athlete-progress-acwr-grid strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 18px;
}

.coach-athlete-progress-acwr-grid span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 1000px) {
    .coach-athlete-progress-summary-grid,
    .coach-athlete-progress-metric-grid,
    .coach-athlete-progress-acwr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coach-athlete-progress-chart-grid {
        grid-template-columns: 1fr;
    }

    .coach-athlete-progress-selected-panel .coach-standard-panel-header {
        display: grid;
    }

    .coach-athlete-progress-selected-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .coach-athlete-progress-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-athlete-progress-summary-grid,
    .coach-athlete-progress-metric-grid,
    .coach-athlete-progress-acwr-grid {
        grid-template-columns: 1fr;
    }

    .coach-athlete-progress-selected-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coach-athlete-progress-selected-actions .button {
        width: 100%;
        justify-content: center;
    }

    .coach-athlete-progress-page .progress-chart-canvas-wrap {
        min-height: 260px;
    }

    .coach-athlete-progress-page .progress-chart-canvas-wrap-small {
        min-height: 240px;
    }
}

/* Coach feedback page */

.coach-feedback-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.coach-feedback-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-feedback-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.coach-feedback-summary-card p {
    margin: 8px 0 0;
    word-break: break-word;
}

.coach-feedback-filter-panel,
.coach-feedback-list-panel {
    margin-bottom: 18px;
}

.coach-feedback-list {
    display: grid;
    gap: 16px;
}

.coach-feedback-card {
    width: 100%;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-left: 5px solid transparent;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    box-sizing: border-box;
}

.coach-feedback-card.has-flags {
    border-left-color: #f59e0b;
}

.coach-feedback-card .feedback-wide-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
    margin-bottom: 16px;
}

.coach-feedback-card .feedback-wide-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.coach-feedback-card .feedback-wide-title h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.coach-feedback-card .feedback-wide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.coach-feedback-card .feedback-workout-summary {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.coach-feedback-card .feedback-workout-summary strong {
    color: #111827;
}

.coach-feedback-card .feedback-workout-summary span {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.coach-feedback-card .feedback-wide-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.coach-feedback-card .feedback-wide-actions .button {
    min-height: 38px;
    white-space: nowrap;
}

.coach-feedback-card .feedback-wide-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.coach-feedback-card .feedback-wide-metrics > div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.coach-feedback-card .feedback-wide-metrics span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.coach-feedback-card .feedback-wide-metrics strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
}

.coach-feedback-card .feedback-wide-lower {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.coach-feedback-card .feedback-wide-lower > div {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.coach-feedback-card .feedback-wide-lower h3 {
    margin: 0 0 10px;
    font-size: 17px;
}

.coach-feedback-card .feedback-signal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.coach-feedback-card .feedback-notes {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.coach-feedback-card .feedback-notes summary {
    cursor: pointer;
    color: #111827;
    font-weight: 900;
}

.coach-feedback-card .feedback-notes p {
    margin: 12px 0 0;
    color: #374151;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .coach-feedback-summary-grid,
    .coach-feedback-card .feedback-wide-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coach-feedback-card .feedback-wide-top {
        grid-template-columns: 1fr;
    }

    .coach-feedback-card .feedback-wide-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .coach-feedback-card .feedback-wide-lower {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .coach-feedback-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-feedback-summary-grid,
    .coach-feedback-card .feedback-wide-metrics {
        grid-template-columns: 1fr;
    }

    .coach-feedback-card {
        padding: 16px;
    }

    .coach-feedback-card .feedback-wide-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coach-feedback-card .feedback-wide-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach notifications page */

.coach-notifications-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.coach-notifications-page .page-actions form {
    margin: 0;
}

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

.coach-notifications-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-notifications-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.coach-notifications-summary-card p {
    margin: 8px 0 0;
}

.coach-notifications-panel {
    margin-bottom: 18px;
}

.coach-notifications-list {
    gap: 14px;
}

.coach-notification-row {
    align-items: start;
}

.coach-notification-row.is-unread {
    border-left: 5px solid #22c55e;
}

.coach-notification-row.is-read {
    opacity: 0.82;
}

.coach-notification-message {
    white-space: normal;
}

.coach-notification-actions form {
    margin: 0;
}

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

@media (max-width: 640px) {
    .coach-notifications-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-notifications-summary-grid {
        grid-template-columns: 1fr;
    }

    .coach-notifications-page .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .coach-notifications-page .page-actions .button,
    .coach-notifications-page .page-actions form,
    .coach-notifications-page .page-actions button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach settings page */

.coach-settings-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.coach-settings-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-settings-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.coach-settings-summary-card p {
    margin: 8px 0 0;
    word-break: break-word;
}

.coach-settings-panel {
    margin-bottom: 18px;
}

.coach-settings-form-grid {
    margin-bottom: 0;
}

.coach-settings-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.coach-settings-submit-content p {
    margin: 6px 0 0;
}

.coach-settings-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.coach-settings-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .coach-settings-submit-content {
        display: grid;
    }

    .coach-settings-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .coach-settings-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-settings-summary-grid {
        grid-template-columns: 1fr;
    }

    .coach-settings-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coach-settings-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Coach workout create / workout template library page */

.coach-workout-create-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.coach-workout-create-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.coach-workout-create-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.coach-workout-create-summary-card p {
    margin: 8px 0 0;
    word-break: break-word;
}

.coach-workout-create-panel,
.coach-workout-template-panel {
    margin-bottom: 18px;
}

.coach-workout-create-form-grid {
    margin-bottom: 0;
}

.coach-workout-create-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.coach-workout-create-submit-content p {
    margin: 6px 0 0;
}

.coach-workout-create-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.coach-workout-create-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.coach-workout-template-list {
    gap: 14px;
}

.coach-workout-template-row {
    align-items: start;
}

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

    .coach-workout-create-submit-content {
        display: grid;
    }

    .coach-workout-create-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .coach-workout-create-page {
        width: min(100% - 20px, 1280px);
    }

    .coach-workout-create-summary-grid {
        grid-template-columns: 1fr;
    }

    .coach-workout-create-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .coach-workout-create-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Iteration 07: coach activity imports */
.coach-activity-imports-summary-grid {
    margin-bottom: 18px;
}

.coach-activity-imports-grid {
    align-items: start;
}


/* =========================================================
   Bundled from athlete.css
========================================================= */

/* Athlete stylesheet split from app.css in iteration 06. */

/* Athlete team filter */

.athlete-team-filter-panel {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
}

.athlete-team-filter-panel .form-group {
    flex: 1;
    margin-bottom: 0;
}

.athlete-team-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-team-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
}

.team-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 700px) {
    .athlete-team-filter-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .athlete-team-filter-actions {
        flex-direction: column;
    }

    .athlete-team-filter-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Athlete team management */

.athlete-team-management-panel {
    margin-top: 24px;
}

.athlete-team-list {
    display: grid;
    gap: 12px;
}

.athlete-team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}

.athlete-team-row p {
    margin: 6px 0 0;
}

.athlete-team-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.athlete-team-row-actions form {
    margin: 0;
}

.athlete-add-team-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 12px;
    align-items: end;
    max-width: 720px;
}

.athlete-add-team-form .form-group {
    margin-bottom: 0;
}

.panel-divider {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}

@media (max-width: 760px) {
    .team-members-header {
        flex-direction: column;
    }

    .athlete-team-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .athlete-team-row-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .athlete-team-row-actions .button,
    .athlete-team-row-actions form,
    .athlete-team-row-actions button {
        width: 100%;
    }

    .athlete-add-team-form {
        grid-template-columns: 1fr;
    }

    .athlete-add-team-form .button {
        width: 100%;
        text-align: center;
    }
}

/* Athlete resource library previews */

.library-resource-view {
    display: grid;
    gap: 24px;
}

.library-resource-summary {
    display: grid;
    gap: 12px;
}

.library-resource-preview {
    display: grid;
    gap: 16px;
}

.library-video-player {
    width: 100%;
    max-height: 70vh;
    background: #000;
    border-radius: 16px;
}

.library-image-preview {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.library-pdf-preview {
    width: 100%;
    height: 75vh;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

@media (max-width: 760px) {
    .library-pdf-preview {
        height: 60vh;
    }
}

/* Athlete social wall page */

.athlete-social-wall-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.social-coach-switcher {
    margin-bottom: 18px;
}

.social-coach-switcher-form {
    max-width: 420px;
}

.social-coach-switcher-form .form-group {
    margin-bottom: 0;
}

.athlete-social-empty-panel {
    padding: 24px;
}

.athlete-social-empty-panel h2 {
    margin: 0 0 8px;
}

@media (max-width: 640px) {
    .athlete-social-wall-page {
        width: min(100% - 20px, 1280px);
    }

    .social-coach-switcher-form {
        max-width: none;
    }
}

/* Athlete library page */

.athlete-library-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.athlete-library-card .library-list-actions {
    max-width: 300px;
}

.athlete-library-card .library-list-meta strong {
    color: #111827;
}

@media (max-width: 1000px) {
    .athlete-library-card .library-list-actions {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .athlete-library-page {
        width: min(100% - 20px, 1280px);
    }
}

/* Athlete library view page */

.athlete-library-view-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.library-view-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.library-view-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.library-view-summary-card p {
    margin: 8px 0 0;
}

.library-view-panel {
    margin-bottom: 18px;
}

.library-view-description {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.library-view-description p {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}

.library-resource-preview {
    width: 100%;
}

.library-resource-link-preview,
.library-resource-file-preview {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.library-resource-link-preview h3,
.library-resource-file-preview h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.library-resource-link-preview p,
.library-resource-file-preview p {
    margin: 0;
}

.library-video-player,
.library-image-preview,
.library-pdf-preview {
    display: block;
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f8fafc;
}

.library-video-player {
    max-height: 620px;
}

.library-image-preview {
    height: auto;
    max-height: 720px;
    object-fit: contain;
}

.library-pdf-preview {
    min-height: 720px;
}

.library-preview-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.library-preview-actions .button {
    min-height: 42px;
}

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

    .library-resource-link-preview,
    .library-resource-file-preview {
        display: grid;
    }
}

@media (max-width: 640px) {
    .athlete-library-view-page {
        width: min(100% - 20px, 1280px);
    }

    .library-view-summary-grid {
        grid-template-columns: 1fr;
    }

    .library-pdf-preview {
        min-height: 520px;
    }

    .library-preview-actions {
        justify-content: stretch;
    }

    .library-preview-actions .button,
    .library-resource-link-preview .button,
    .library-resource-file-preview .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete workout create page */

.athlete-workout-create-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-workout-create-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-workout-create-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-workout-create-summary-card p {
    margin: 8px 0 0;
}

.athlete-workout-create-form {
    display: block;
}

.athlete-workout-create-panel,
.athlete-workout-create-submit-panel {
    margin-bottom: 18px;
}

.athlete-workout-create-form-grid {
    margin-bottom: 0;
}

.athlete-workout-create-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.athlete-workout-create-submit-content p {
    margin: 6px 0 0;
}

.athlete-workout-create-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-workout-create-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .athlete-workout-create-submit-content {
        display: grid;
    }

    .athlete-workout-create-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-workout-create-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-workout-create-summary-grid {
        grid-template-columns: 1fr;
    }

    .athlete-workout-create-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-workout-create-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete workout view page */

.athlete-workout-view-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-workout-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-workout-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-workout-summary-card p {
    margin: 8px 0 0;
}

.athlete-workout-garmin-panel,
.athlete-workout-detail-panel,
.athlete-workout-reference-panel,
.athlete-workout-feedback-panel {
    margin-bottom: 18px;
}

.athlete-workout-garmin-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.athlete-workout-garmin-content strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
}

.athlete-workout-garmin-content p {
    margin: 0;
}

.athlete-workout-garmin-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-workout-garmin-actions .inline-form {
    margin: 0;
}

.athlete-workout-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.athlete-workout-detail-grid > div {
    min-width: 0;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.athlete-workout-detail-grid span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.athlete-workout-detail-grid strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
    word-break: break-word;
}

.athlete-workout-notes-block {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.athlete-workout-notes-block h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.athlete-workout-notes-block p {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}

.workout-reference-block {
    margin-top: 18px;
}

.workout-reference-block:first-of-type {
    margin-top: 0;
}

.workout-reference-block h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

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

    .athlete-workout-garmin-content {
        display: grid;
    }

    .athlete-workout-garmin-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-workout-view-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-workout-summary-grid,
    .athlete-workout-detail-grid {
        grid-template-columns: 1fr;
    }

    .athlete-workout-garmin-actions,
    .athlete-workout-feedback-panel .coach-standard-panel-header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-workout-garmin-actions .button,
    .athlete-workout-feedback-panel .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete submit feedback page */

.athlete-feedback-submit-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-feedback-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-feedback-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-feedback-summary-card p {
    margin: 8px 0 0;
}

.athlete-feedback-planned-panel,
.athlete-feedback-form-panel,
.athlete-feedback-submit-panel {
    margin-bottom: 18px;
}

.athlete-feedback-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.athlete-feedback-detail-grid > div {
    min-width: 0;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.athlete-feedback-detail-grid span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.athlete-feedback-detail-grid strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
    word-break: break-word;
}

.athlete-feedback-notes-block {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.athlete-feedback-notes-block h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.athlete-feedback-notes-block p {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}

.athlete-feedback-form-grid {
    margin-bottom: 0;
}

.athlete-feedback-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.athlete-feedback-submit-content p {
    margin: 6px 0 0;
}

.athlete-feedback-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-feedback-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

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

    .athlete-feedback-submit-content {
        display: grid;
    }

    .athlete-feedback-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-feedback-submit-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-feedback-summary-grid,
    .athlete-feedback-detail-grid {
        grid-template-columns: 1fr;
    }

    .athlete-feedback-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-feedback-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete edit feedback page */

.athlete-feedback-edit-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .athlete-feedback-edit-page {
        width: min(100% - 20px, 1280px);
    }
}

/* Athlete training settings page */

.athlete-training-settings-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-training-settings-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-training-settings-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-training-settings-summary-card p {
    margin: 8px 0 0;
}

.athlete-training-distance-card strong {
    margin-bottom: 12px;
}

.distance-unit-form {
    margin: 0;
}

.distance-unit-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.distance-unit-control select {
    min-height: 38px;
}

.distance-unit-control .button {
    min-height: 38px;
    white-space: nowrap;
}

.athlete-training-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.athlete-training-settings-card {
    min-width: 0;
    margin-bottom: 0;
}

.athlete-training-settings-status-list {
    display: grid;
    gap: 10px;
}

.athlete-training-settings-status-list > div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.athlete-training-settings-status-list span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.athlete-training-settings-status-list strong {
    display: block;
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
    word-break: break-word;
}

.settings-mobile-list {
    display: none;
}

.settings-mobile-card {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.settings-mobile-card + .settings-mobile-card {
    margin-top: 10px;
}

.settings-mobile-card > div {
    display: grid;
    gap: 4px;
}

.settings-mobile-card strong {
    color: #111827;
}

.settings-mobile-card span {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.settings-mobile-card p {
    margin: 8px 0 0;
    color: #374151;
    line-height: 1.5;
}

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

    .athlete-training-settings-card .coach-standard-panel-header {
        display: grid;
    }
}

@media (max-width: 760px) {
    .settings-desktop-table {
        display: none;
    }

    .settings-mobile-list {
        display: block;
    }
}

@media (max-width: 640px) {
    .athlete-training-settings-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-training-settings-summary-grid,
    .athlete-training-settings-grid {
        grid-template-columns: 1fr;
    }

    .distance-unit-control {
        display: grid;
        grid-template-columns: 1fr;
    }

    .distance-unit-control .button,
    .athlete-training-settings-card .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete training paces page */

.athlete-training-paces-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-training-paces-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-training-paces-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-training-paces-summary-card p {
    margin: 8px 0 0;
}

.athlete-training-paces-form {
    display: block;
}

.athlete-training-paces-panel {
    margin-bottom: 18px;
}

.athlete-training-paces-form-grid {
    margin-bottom: 0;
}

.athlete-training-paces-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.athlete-training-paces-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.athlete-training-pace-scroll {
    margin-top: 6px;
}

.athlete-training-pace-table input[type="text"] {
    min-width: 120px;
}

.athlete-training-pace-table .pace-description-col {
    min-width: 260px;
}

.athlete-training-pace-table .pace-split-cell {
    color: #374151;
    font-weight: 800;
    white-space: nowrap;
}

.athlete-training-paces-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.athlete-training-paces-submit-content p {
    margin: 6px 0 0;
}

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

    .athlete-training-paces-submit-content {
        display: grid;
    }

    .athlete-training-paces-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-training-paces-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-training-paces-summary-grid {
        grid-template-columns: 1fr;
    }

    .athlete-training-paces-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-training-paces-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete heart rate zones page */

.athlete-heart-rate-zones-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-heart-rate-zones-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-heart-rate-zones-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-heart-rate-zones-summary-card p {
    margin: 8px 0 0;
}

.athlete-heart-rate-zones-form {
    display: block;
}

.athlete-heart-rate-zones-panel {
    margin-bottom: 18px;
}

.athlete-heart-rate-zones-form-grid {
    margin-bottom: 0;
}

.athlete-heart-rate-zones-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.athlete-heart-rate-zones-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.athlete-heart-rate-zones-scroll {
    margin-top: 6px;
}

.athlete-heart-rate-zones-table input[type="text"] {
    min-width: 160px;
}

.athlete-heart-rate-zones-table input[type="number"] {
    min-width: 90px;
}

.athlete-heart-rate-zones-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.athlete-heart-rate-zones-submit-content p {
    margin: 6px 0 0;
}

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

    .athlete-heart-rate-zones-submit-content {
        display: grid;
    }

    .athlete-heart-rate-zones-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-heart-rate-zones-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-heart-rate-zones-summary-grid {
        grid-template-columns: 1fr;
    }

    .athlete-heart-rate-zones-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-heart-rate-zones-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete dashboard page */

.athlete-dashboard-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-dashboard-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-dashboard-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-dashboard-summary-card p {
    margin: 8px 0 0;
}

.athlete-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
    gap: 18px;
    align-items: start;
}

.athlete-dashboard-main-panel,
.athlete-dashboard-side-panel {
    margin-bottom: 18px;
}

.athlete-dashboard-side-grid {
    display: grid;
    gap: 18px;
}

.athlete-dashboard-side-grid .athlete-dashboard-side-panel {
    margin-bottom: 0;
}

.athlete-dashboard-workout-list {
    gap: 14px;
}

.athlete-dashboard-workout-row {
    align-items: start;
}

.athlete-dashboard-inline-alert {
    margin: 8px 0;
    padding: 10px 12px;
}

.athlete-dashboard-feedback-date {
    margin: 10px 0 0;
    font-size: 13px;
}

.athlete-dashboard-side-panel .button {
    margin-top: 4px;
}

.athlete-dashboard-race-list {
    display: grid;
    gap: 12px;
}

.athlete-dashboard-race-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.athlete-dashboard-race-card h3 {
    margin: 0;
    color: #111827;
    font-size: 17px;
}

.athlete-dashboard-race-card p {
    margin: 4px 0 0;
}

.athlete-dashboard-race-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-dashboard-race-meta span {
    padding: 6px 9px;
    border-radius: 999px;
    background: #ffffff;
    color: #374151;
    font-size: 12px;
    font-weight: 800;
}

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

    .athlete-dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .athlete-dashboard-side-grid .athlete-dashboard-side-panel:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .athlete-dashboard-side-grid {
        grid-template-columns: 1fr;
    }

    .athlete-dashboard-side-grid .athlete-dashboard-side-panel:last-child {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .athlete-dashboard-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-dashboard-summary-grid {
        grid-template-columns: 1fr;
    }

    .athlete-dashboard-side-panel .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete progress page */

.athlete-progress-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-progress-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-progress-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-progress-summary-card p {
    margin: 8px 0 0;
}

.athlete-progress-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.athlete-progress-chart-card {
    min-width: 0;
    margin-bottom: 0;
}

.athlete-progress-chart-card-wide {
    grid-column: 1 / -1;
}

.athlete-progress-chart-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 320px;
}

.athlete-progress-chart-canvas-wrap-small {
    min-height: 280px;
}

.athlete-progress-chart-canvas-wrap canvas {
    width: 100% !important;
    max-width: 100%;
}

.athlete-progress-guide-panel {
    margin-bottom: 18px;
}

.athlete-progress-acwr-guide-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.athlete-progress-acwr-guide-grid > div {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.athlete-progress-acwr-guide-grid strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 18px;
}

.athlete-progress-acwr-guide-grid span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

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

    .athlete-progress-chart-grid {
        grid-template-columns: 1fr;
    }

    .athlete-progress-acwr-guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .athlete-progress-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-progress-summary-grid,
    .athlete-progress-acwr-guide-grid {
        grid-template-columns: 1fr;
    }

    .athlete-progress-chart-canvas-wrap {
        min-height: 260px;
    }

    .athlete-progress-chart-canvas-wrap-small {
        min-height: 240px;
    }
}

/* Athlete progress chart loading and empty states */

.athlete-progress-page.is-loading {
    opacity: 0.78;
}

.athlete-progress-chart-canvas-wrap {
    display: grid;
    place-items: stretch;
}

.progress-chart-empty {
    display: grid;
    min-height: 180px;
    place-items: center;
    margin: 0;
    padding: 24px;
    border-radius: 16px;
    background: #f8fafc;
    text-align: center;
}

/* Athlete profile page */

.athlete-profile-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-profile-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-profile-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.athlete-profile-summary-card p {
    margin: 8px 0 0;
    word-break: break-word;
}

.athlete-profile-form {
    display: block;
}

.athlete-profile-panel,
.athlete-profile-submit-panel,
.athlete-profile-password-panel {
    margin-bottom: 18px;
}

.athlete-profile-form-grid {
    margin-bottom: 0;
}

.athlete-profile-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.athlete-profile-submit-content p {
    margin: 6px 0 0;
}

.athlete-profile-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-profile-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .athlete-profile-submit-content {
        display: grid;
    }

    .athlete-profile-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-profile-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-profile-summary-grid {
        grid-template-columns: 1fr;
    }

    .athlete-profile-submit-actions,
    .athlete-profile-password-panel .coach-standard-panel-header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-profile-submit-actions .button,
    .athlete-profile-password-panel .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete Garmin page */

.athlete-garmin-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-garmin-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-garmin-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.athlete-garmin-summary-card p {
    margin: 8px 0 0;
}

.athlete-garmin-status-panel,
.athlete-garmin-panel {
    margin-bottom: 18px;
}

.athlete-garmin-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin: 8px 0 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.athlete-garmin-status-connected {
    background: #dcfce7;
    color: #166534;
}

.athlete-garmin-status-error {
    background: #fee2e2;
    color: #991b1b;
}

.athlete-garmin-status-disconnected {
    background: #f3f4f6;
    color: #374151;
}

.athlete-garmin-status-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-garmin-status-actions form {
    margin: 0;
}

.athlete-garmin-status-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.athlete-garmin-activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.athlete-garmin-activity-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.athlete-garmin-activity-card h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
}

.athlete-garmin-activity-card p {
    margin: 6px 0 0;
}

.athlete-garmin-activity-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.athlete-garmin-activity-metrics > div {
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.athlete-garmin-activity-metrics span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.athlete-garmin-activity-metrics strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
}

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

    .athlete-garmin-activity-grid {
        grid-template-columns: 1fr;
    }

    .athlete-garmin-status-panel .coach-standard-panel-header {
        display: grid;
    }

    .athlete-garmin-status-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-garmin-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-garmin-summary-grid,
    .athlete-garmin-activity-metrics {
        grid-template-columns: 1fr;
    }

    .athlete-garmin-status-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-garmin-status-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete races page */

.athlete-races-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-races-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-races-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.athlete-races-summary-card p {
    margin: 8px 0 0;
}

.athlete-races-panel {
    margin-bottom: 18px;
}

.athlete-races-list {
    gap: 14px;
}

.athlete-races-row {
    align-items: start;
}

.athlete-races-row-past {
    opacity: 0.78;
}

.athlete-races-coach {
    margin: 10px 0 0;
    font-size: 13px;
}

.athlete-races-static-action {
    pointer-events: none;
}

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

@media (max-width: 640px) {
    .athlete-races-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-races-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Athlete race create page */

.athlete-race-create-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-race-create-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-race-create-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.athlete-race-create-summary-card p {
    margin: 8px 0 0;
}

.athlete-race-create-form {
    display: block;
}

.athlete-race-create-panel,
.athlete-race-create-submit-panel {
    margin-bottom: 18px;
}

.athlete-race-create-form-grid {
    margin-bottom: 0;
}

.athlete-race-create-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.athlete-race-create-submit-content p {
    margin: 6px 0 0;
}

.athlete-race-create-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-race-create-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .athlete-race-create-submit-content {
        display: grid;
    }

    .athlete-race-create-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-race-create-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-race-create-summary-grid {
        grid-template-columns: 1fr;
    }

    .athlete-race-create-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-race-create-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete mobile hamburger menu alignment */

.athlete-mobile-nav,
.athlete-header .mobile-nav,
.athlete-nav-mobile {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.athlete-mobile-nav a,
.athlete-header .mobile-nav a,
.athlete-nav-mobile a,
.athlete-mobile-nav button,
.athlete-header .mobile-nav button,
.athlete-nav-mobile button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    margin: 0 0 10px;
    padding: 13px 14px;
    box-sizing: border-box;
    border: 0;
    border-radius: 9px;
    background: #1f2937;
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
}

.athlete-mobile-nav a:hover,
.athlete-header .mobile-nav a:hover,
.athlete-nav-mobile a:hover,
.athlete-mobile-nav button:hover,
.athlete-header .mobile-nav button:hover,
.athlete-nav-mobile button:hover {
    background: #273244;
}

.athlete-mobile-nav .nav-section,
.athlete-header .mobile-nav .nav-section,
.athlete-nav-mobile .nav-section {
    width: 100%;
    margin: 0;
}

.athlete-mobile-nav .nav-section-toggle,
.athlete-header .mobile-nav .nav-section-toggle,
.athlete-nav-mobile .nav-section-toggle {
    cursor: pointer;
}

.athlete-mobile-nav .nav-section-items,
.athlete-header .mobile-nav .nav-section-items,
.athlete-nav-mobile .nav-section-items {
    display: grid;
    gap: 8px;
    width: 100%;
    margin: -4px 0 10px;
    padding: 0 0 0 12px;
    box-sizing: border-box;
}

.athlete-mobile-nav .nav-section-items a,
.athlete-header .mobile-nav .nav-section-items a,
.athlete-nav-mobile .nav-section-items a {
    min-height: 42px;
    margin: 0;
    background: #111827;
    font-size: 14px;
    font-weight: 700;
}

.athlete-mobile-nav .badge,
.athlete-header .mobile-nav .badge,
.athlete-nav-mobile .badge,
.athlete-mobile-nav .notification-badge,
.athlete-header .mobile-nav .notification-badge,
.athlete-nav-mobile .notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

/* Athlete notifications page */

.athlete-notifications-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.athlete-notifications-page .page-actions form {
    margin: 0;
}

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

.athlete-notifications-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-notifications-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.athlete-notifications-summary-card p {
    margin: 8px 0 0;
}

.athlete-notifications-panel {
    margin-bottom: 18px;
}

.athlete-notifications-list {
    gap: 14px;
}

.athlete-notification-row {
    align-items: start;
}

.athlete-notification-row.is-unread {
    border-left: 5px solid #22c55e;
}

.athlete-notification-row.is-read {
    opacity: 0.82;
}

.athlete-notification-message {
    white-space: normal;
}

.athlete-notification-actions form {
    margin: 0;
}

.athlete-notification-static-action {
    pointer-events: none;
}

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

@media (max-width: 640px) {
    .athlete-notifications-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-notifications-summary-grid {
        grid-template-columns: 1fr;
    }

    .athlete-notifications-page .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .athlete-notifications-page .page-actions .button,
    .athlete-notifications-page .page-actions form,
    .athlete-notifications-page .page-actions button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete profile date input mobile alignment fix */

.athlete-profile-page input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    height: 44px;
    max-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background-color: #ffffff;
    color: #111827;
    font: inherit;
    line-height: 1.2;
    box-sizing: border-box;
}

.athlete-profile-page input[type="date"]::-webkit-date-and-time-value {
    min-height: 24px;
    text-align: left;
}

.athlete-profile-page input[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0;
}

/* Athlete races result additions */

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

.athlete-races-result-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.athlete-races-result-summary > div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.athlete-races-result-summary span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.athlete-races-result-summary strong {
    display: block;
    color: #111827;
    font-size: 16px;
    line-height: 1.25;
}

.athlete-races-result-notes {
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.athlete-races-result-notes summary {
    cursor: pointer;
    color: #111827;
    font-weight: 900;
}

.athlete-races-result-notes p {
    margin: 10px 0 0;
    color: #374151;
    line-height: 1.6;
}

.athlete-races-row .inline-form {
    margin: 0;
}

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

    .athlete-races-result-summary {
        grid-template-columns: 1fr;
    }
}

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

/* Athlete race result page */

.athlete-race-result-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-race-result-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-race-result-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.athlete-race-result-summary-card p {
    margin: 8px 0 0;
    word-break: break-word;
}

.athlete-race-result-panel {
    margin-bottom: 18px;
}

.athlete-race-result-form-grid {
    margin-bottom: 0;
}

.athlete-race-result-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.athlete-race-result-submit-content p {
    margin: 6px 0 0;
}

.athlete-race-result-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-race-result-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.athlete-race-result-context-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.athlete-race-result-context-grid > div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.athlete-race-result-context-grid span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.athlete-race-result-context-grid strong {
    display: block;
    color: #111827;
    font-size: 16px;
    line-height: 1.25;
    word-break: break-word;
}

.athlete-race-result-notes {
    margin-top: 14px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.athlete-race-result-notes strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
}

.athlete-race-result-notes p {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}

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

    .athlete-race-result-submit-content {
        display: grid;
    }

    .athlete-race-result-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-race-result-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-race-result-summary-grid,
    .athlete-race-result-context-grid {
        grid-template-columns: 1fr;
    }

    .athlete-race-result-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-race-result-submit-actions .button,
    .athlete-race-result-panel .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete race edit page */

.athlete-race-edit-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

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

.athlete-race-edit-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-race-edit-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.athlete-race-edit-summary-card p {
    margin: 8px 0 0;
    word-break: break-word;
}

.athlete-race-edit-panel {
    margin-bottom: 18px;
}

.athlete-race-edit-form-grid {
    margin-bottom: 0;
}

.athlete-race-edit-submit-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
}

.athlete-race-edit-submit-content p {
    margin: 6px 0 0;
}

.athlete-race-edit-submit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.athlete-race-edit-submit-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

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

    .athlete-race-edit-submit-content {
        display: grid;
    }

    .athlete-race-edit-submit-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .athlete-race-edit-page {
        width: min(100% - 20px, 1280px);
    }

    .athlete-race-edit-summary-grid {
        grid-template-columns: 1fr;
    }

    .athlete-race-edit-submit-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .athlete-race-edit-submit-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* Athlete page alignment fixes */

main.athlete-progress-page,
main.progress-page.athlete-progress-page,
.athlete-progress-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

main.social-wall-page-shell,
main.athlete-social-wall-page,
.social-wall-page-shell,
.athlete-social-wall-page {
    width: min(100% - 32px, 1280px);
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

.social-wall-page-shell {
    padding-top: 0;
}

@media (max-width: 640px) {
    main.athlete-progress-page,
    main.progress-page.athlete-progress-page,
    .athlete-progress-page,
    main.social-wall-page-shell,
    main.athlete-social-wall-page,
    .social-wall-page-shell,
    .athlete-social-wall-page {
        width: min(100% - 20px, 1280px);
    }
}

/* Athlete progress and social wall width normalisation */

main.athlete-progress-page,
main.progress-page.athlete-progress-page,
.athlete-progress-page,
main.social-wall-page-shell,
main.athlete-social-wall-page,
.social-wall-page-shell,
.athlete-social-wall-page {
    width: min(100% - 32px, 1240px);
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    main.athlete-progress-page,
    main.progress-page.athlete-progress-page,
    .athlete-progress-page,
    main.social-wall-page-shell,
    main.athlete-social-wall-page,
    .social-wall-page-shell,
    .athlete-social-wall-page {
        width: min(100% - 20px, 1240px);
        max-width: 1240px;
    }
}

/* Athlete progress and social wall page-header width fix */

.athlete-progress-page .page-header,
.progress-page.athlete-progress-page .page-header,
.social-wall-page-shell .page-header,
.athlete-social-wall-page .page-header {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.athlete-progress-page > section,
.athlete-progress-page > .panel,
.progress-page.athlete-progress-page > section,
.progress-page.athlete-progress-page > .panel,
.social-wall-page-shell > section,
.social-wall-page-shell > .panel,
.athlete-social-wall-page > section,
.athlete-social-wall-page > .panel {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Iteration 07: athlete activity import */
.athlete-activity-import-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.athlete-activity-import-summary-card .summary-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.athlete-activity-import-summary-card strong {
    display: block;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    word-break: break-word;
}

.athlete-activity-import-panel .inline-form {
    margin: 0;
}

.athlete-activity-import-history-grid {
    align-items: start;
}

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

@media (max-width: 640px) {
    .athlete-activity-import-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Iteration 07 hotfix 02: calendar day text visibility */
.calendar-weekdays,
.calendar-weekdays > div,
.calendar-weekdays div {
    color: #ffffff !important;
}

.calendar-day,
.calendar-day-empty,
.calendar-day-outside-month {
    color: #111827 !important;
}

.calendar-day-number {
    color: #111827 !important;
}

.calendar-day-empty .calendar-day-number,
.calendar-day-outside-month .calendar-day-number {
    color: #6b7280 !important;
}

.coach-mobile-day,
.athlete-mobile-day {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
}

.coach-mobile-day-name,
.coach-mobile-day-number,
.athlete-mobile-day-name,
.athlete-mobile-day-number {
    color: inherit !important;
}

.coach-mobile-day.is-selected,
.athlete-mobile-day.is-selected {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

.coach-mobile-day.is-selected .coach-mobile-day-name,
.coach-mobile-day.is-selected .coach-mobile-day-number,
.athlete-mobile-day.is-selected .athlete-mobile-day-name,
.athlete-mobile-day.is-selected .athlete-mobile-day-number {
    color: #ffffff !important;
}

/* Calendar visibility hotfix: appended after previous overrides. */
.coach-calendar-page .calendar-weekdays,
.athlete-calendar-page .calendar-weekdays,
#custom-calendar .calendar-weekdays,
#athlete-calendar .calendar-weekdays {
    background: #111827 !important;
    color: #111827 !important;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}

.coach-calendar-page .calendar-weekdays > div,
.coach-calendar-page .calendar-weekdays div,
.athlete-calendar-page .calendar-weekdays > div,
.athlete-calendar-page .calendar-weekdays div,
#custom-calendar .calendar-weekdays > div,
#custom-calendar .calendar-weekdays div,
#athlete-calendar .calendar-weekdays > div,
#athlete-calendar .calendar-weekdays div {
    background: #f8fafc !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
    text-shadow: none !important;
}

.coach-calendar-page .calendar-day,
.coach-calendar-page .calendar-day-empty,
.athlete-calendar-page .calendar-day,
.athlete-calendar-page .calendar-day-empty,
#custom-calendar .calendar-day,
#custom-calendar .calendar-day-empty,
#athlete-calendar .calendar-day,
#athlete-calendar .calendar-day-empty {
    background: #ffffff !important;
    color: #111827 !important;
}

.coach-calendar-page .calendar-day-header,
.athlete-calendar-page .calendar-day-header,
#custom-calendar .calendar-day-header,
#athlete-calendar .calendar-day-header {
    color: #111827 !important;
}

.coach-calendar-page .calendar-day-number,
.athlete-calendar-page .calendar-day-number,
#custom-calendar .calendar-day-number,
#athlete-calendar .calendar-day-number {
    color: #111827 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.coach-calendar-page .calendar-day-outside-month,
.athlete-calendar-page .calendar-day-outside-month,
#custom-calendar .calendar-day-outside-month,
#athlete-calendar .calendar-day-outside-month {
    background: #f8fafc !important;
}

.coach-calendar-page .calendar-day-outside-month .calendar-day-number,
.athlete-calendar-page .calendar-day-outside-month .calendar-day-number,
#custom-calendar .calendar-day-outside-month .calendar-day-number,
#athlete-calendar .calendar-day-outside-month .calendar-day-number,
.coach-calendar-page .calendar-day-empty .calendar-day-number,
.athlete-calendar-page .calendar-day-empty .calendar-day-number,
#custom-calendar .calendar-day-empty .calendar-day-number,
#athlete-calendar .calendar-day-empty .calendar-day-number {
    color: #6b7280 !important;
    opacity: 1 !important;
}

.coach-mobile-day,
.athlete-mobile-day {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
    text-shadow: none !important;
}

.coach-mobile-day-name,
.coach-mobile-day-number,
.athlete-mobile-day-name,
.athlete-mobile-day-number {
    color: #111827 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.coach-mobile-day.is-selected,
.athlete-mobile-day.is-selected {
    background: #111827 !important;
    color: #ffffff !important;
    border-color: #111827 !important;
}

.coach-mobile-day.is-selected .coach-mobile-day-name,
.coach-mobile-day.is-selected .coach-mobile-day-number,
.athlete-mobile-day.is-selected .athlete-mobile-day-name,
.athlete-mobile-day.is-selected .athlete-mobile-day-number {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Iteration 08 billing and registration */
.account-register-role-note {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.88);
}

.account-register-role-note strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #0f172a;
}

.account-register-role-note p {
    margin: 0;
}

.coach-billing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 1.25rem;
    align-items: start;
}

.coach-billing-status-card {
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.9);
}

.coach-billing-status-card span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.coach-billing-status-card strong {
    display: block;
    font-size: clamp(1.4rem, 2vw, 2rem);
    color: #0f172a;
}

.coach-billing-status-trialing,
.coach-billing-status-active {
    border-color: rgba(22, 163, 74, 0.28);
    background: rgba(240, 253, 244, 0.94);
}

.coach-billing-status-pending,
.coach-billing-status-incomplete {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(255, 251, 235, 0.95);
}

.coach-billing-status-canceled,
.coach-billing-status-cancelled,
.coach-billing-status-past-due,
.coach-billing-status-unpaid {
    border-color: rgba(220, 38, 38, 0.25);
    background: rgba(254, 242, 242, 0.96);
}

.coach-billing-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 1rem 0 0;
}

.coach-billing-details div {
    padding: 0.9rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.coach-billing-details dt {
    margin-bottom: 0.3rem;
    font-size: 0.76rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.coach-billing-details dd {
    margin: 0;
    font-weight: 800;
    color: #0f172a;
}

.coach-billing-actions {
    display: grid;
    gap: 0.75rem;
}

.coach-billing-actions form,
.coach-billing-actions button {
    width: 100%;
}

.coach-billing-help {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.coach-billing-help strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.coach-billing-help ul {
    margin: 0;
    padding-left: 1.15rem;
    color: #475569;
}

.coach-billing-help li + li {
    margin-top: 0.35rem;
}

.button-danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.button-danger:hover,
.button-danger:focus-visible {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

@media (max-width: 860px) {
    .coach-billing-grid,
    .coach-billing-details {
        grid-template-columns: 1fr;
    }
}

/* Iterations 09-12: billing, onboarding, plan templates, diagnostics and export tools */
.alert-warning,
.alert-info {
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    background: #fff7ed;
    color: #7c2d12;
    border: 1px solid #fed7aa;
}

.alert-info {
    background: #eff6ff;
    color: #1e3a8a;
    border-color: #bfdbfe;
}

.coach-billing-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    font-weight: 700;
    background: #eff6ff;
    color: #1e3a8a;
    border-bottom: 1px solid #bfdbfe;
}

.coach-billing-banner a {
    color: inherit;
    text-decoration: underline;
}

.coach-billing-banner-warning {
    background: #fff7ed;
    color: #7c2d12;
    border-bottom-color: #fed7aa;
}

.coach-billing-banner-error {
    background: #fef2f2;
    color: #991b1b;
    border-bottom-color: #fecaca;
}

.coach-billing-banner-success {
    background: #ecfdf5;
    color: #065f46;
    border-bottom-color: #a7f3d0;
}

.two-column-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
}

.onboarding-progress-panel .coach-standard-panel-header strong {
    font-size: 2rem;
}

.onboarding-progress-bar {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.onboarding-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #16a34a);
}

.onboarding-step-list {
    display: grid;
    gap: 1rem;
}

.onboarding-step-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.onboarding-step-card.is-complete {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.onboarding-step-card.is-dismissed {
    opacity: 0.78;
}

.onboarding-step-status {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e5e7eb;
    color: #111827;
    font-weight: 900;
}

.onboarding-step-card.is-complete .onboarding-step-status {
    background: #16a34a;
    color: #fff;
}

.onboarding-step-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.plan-week-grid,
.training-block-grid,
.export-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.plan-week-card,
.training-block-card,
.export-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    padding: 1rem;
}

.plan-workout-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #eef2f7;
}

.plan-workout-card:first-of-type {
    border-top: 0;
}

.training-block-card ul,
.export-notes {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.export-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.diagnostics-check-list {
    display: grid;
    gap: 0.75rem;
}

.diagnostics-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.diagnostics-check-row > span {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 800;
}

.diagnostics-check-row.is-ok > span {
    background: #dcfce7;
    color: #166534;
}

.diagnostics-check-row.is-warning > span {
    background: #ffedd5;
    color: #9a3412;
}

.diagnostics-definition-list div {
    display: grid;
    grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr);
    gap: 0.75rem;
}

.table-responsive {
    overflow-x: auto;
}

.coach-standard-table {
    width: 100%;
    border-collapse: collapse;
}

.coach-standard-table th,
.coach-standard-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

@media (max-width: 820px) {
    .two-column-grid,
    .onboarding-step-card {
        grid-template-columns: 1fr;
    }

    .onboarding-step-actions,
    .export-card {
        justify-content: stretch;
        align-items: stretch;
        flex-direction: column;
    }

    .coach-billing-banner {
        flex-direction: column;
        text-align: center;
    }
}

/* Iterations 13-17: public launch, consent, security and email queue */
.public-site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.public-site-header .logo {
    font-weight: 800;
    color: #111827;
    text-decoration: none;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.public-nav a {
    color: #374151;
    text-decoration: none;
    font-weight: 700;
}

.button-small {
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
}

.public-page {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem) 0;
}

.public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 1.5rem;
    align-items: center;
    min-height: 52vh;
}

.public-hero h1 {
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1.02;
    margin: 0.25rem 0 1rem;
}

.public-hero-copy {
    font-size: 1.1rem;
    max-width: 720px;
}

.public-hero-card,
.public-pricing-card,
.legal-content {
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: 1.25rem;
}

.public-feature-grid,
.public-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.public-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-pricing-card.is-featured {
    border: 2px solid #2563eb;
}

.pricing-value {
    font-size: 1.75rem;
    font-weight: 900;
    margin: 0.5rem 0 1rem;
}

.public-pricing-card ul,
.legal-content ul {
    padding-left: 1.2rem;
}

.legal-content {
    max-width: 900px;
}

.register-consent-panel {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #f9fafb;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-weight: 600;
    color: #1f2937;
}

.checkbox-row input[type="checkbox"] {
    margin-top: 0.2rem;
}

.stacked-form {
    display: grid;
    gap: 1rem;
}

.button-row-wrap {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 800;
}

.status-pill-ok {
    background: #dcfce7;
    color: #166534;
}

.status-pill-review {
    background: #ffedd5;
    color: #9a3412;
}

.security-audit-page code {
    font-size: 0.86rem;
}

@media (max-width: 820px) {
    .public-site-header,
    .public-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-hero,
    .public-feature-grid,
    .public-pricing-grid {
        grid-template-columns: 1fr;
    }
}


/* Iterations 18-22 admin/billing polish */
.admin-app-header .app-brand {
    font-weight: 800;
}
.coach-billing-cycle-form {
    display: grid;
    gap: 0.65rem;
}
.coach-billing-cycle-field .muted {
    margin-top: 0.35rem;
}
.diagnostics-check-row code,
.export-notes code {
    font-size: 0.9em;
}

/* =========================================================
   Register/public navigation styling hotfix
   - Fixes checkbox inputs inheriting full-width form control styles
   - Vertically aligns public header Register button with other links
   - Vertically aligns register form action buttons
========================================================= */
.public-site-header {
    align-items: center;
}

.public-site-header .public-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-site-header .public-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 0;
    line-height: 1.1;
}

.public-site-header .public-nav a:not(.button) {
    padding: 0.45rem 0;
    color: #1f2937;
}

.public-site-header .public-nav .button,
.public-site-header .public-nav .button-small {
    margin: 0;
    padding: 0.5rem 0.85rem;
    color: #ffffff;
}

.register-consent-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.register-consent-panel .checkbox-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 0.75rem;
    align-items: start;
    margin: 0;
    line-height: 1.35;
    font-weight: 700;
}

.register-consent-panel .checkbox-row input[type="checkbox"] {
    width: 16px !important;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    margin: 0.2rem 0 0;
    padding: 0;
    border-radius: 4px;
    flex: 0 0 auto;
}

.register-consent-panel .checkbox-row span {
    display: block;
    min-width: 0;
}

.account-register-submit-content,
.account-accept-invite-submit-content {
    align-items: center;
}

.account-register-submit-actions,
.account-accept-invite-submit-actions {
    align-items: center;
}

.account-register-submit-actions .button,
.account-register-submit-actions button,
.account-accept-invite-submit-actions .button,
.account-accept-invite-submit-actions button,
.account-register-page .page-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    line-height: 1.2;
}

@media (max-width: 820px) {
    .public-site-header {
        align-items: flex-start;
    }

    .public-site-header .public-nav {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.65rem 0.9rem;
    }
}

@media (max-width: 640px) {
    .account-register-submit-content,
    .account-accept-invite-submit-content {
        align-items: stretch;
    }

    .account-register-submit-actions .button,
    .account-register-submit-actions button,
    .account-accept-invite-submit-actions .button,
    .account-accept-invite-submit-actions button {
        width: 100%;
    }
}

/* =========================================================
   Iterations 23-25: UAT/admin polish and final UX consistency
========================================================= */
.admin-app-header .primary-nav > a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.1;
}

.admin-app-header .primary-nav > a:hover,
.admin-app-header .primary-nav > a:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.admin-tool-grid,
.uat-journey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.admin-tool-card,
.uat-journey-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 100%;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    color: #111827;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.admin-tool-card:hover,
.admin-tool-card:focus-visible {
    border-color: #bfdbfe;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.admin-tool-card strong,
.uat-journey-card h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}

.admin-tool-card span,
.uat-journey-card li {
    color: #475569;
    line-height: 1.45;
}

.uat-dashboard-grid {
    align-items: start;
}

.uat-checklist-page .page-actions,
.admin-diagnostics-page .page-actions,
.email-queue-page .page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.uat-checklist-page .page-actions form,
.email-queue-page .page-actions form {
    margin: 0;
}

.uat-checklist-page .page-actions .button,
.admin-diagnostics-page .page-actions .button,
.email-queue-page .page-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0;
    line-height: 1.15;
}

.uat-journey-card ol {
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
}

.uat-journey-card li + li {
    margin-top: 0.35rem;
}

.uat-journey-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.uat-summary-grid .coach-dashboard-summary-card strong {
    word-break: break-word;
}

.diagnostics-check-row .button {
    white-space: nowrap;
}

.coach-standard-header .page-actions .button,
.coach-standard-panel-header .button,
.uploader-actions .button,
.form-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
}

@media (max-width: 760px) {
    .uat-journey-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .uat-journey-card-header .button,
    .uat-checklist-page .page-actions .button,
    .uat-checklist-page .page-actions form,
    .admin-diagnostics-page .page-actions .button,
    .email-queue-page .page-actions .button,
    .email-queue-page .page-actions form {
        width: 100%;
    }

    .admin-app-header .primary-nav > a {
        width: 100%;
        justify-content: space-between;
        border-radius: 12px;
    }
}

/* Admin home hotfix */
.admin-home-page .page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.admin-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.admin-tool-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    min-height: 170px;
}

.admin-tool-card h3 {
    margin: 0 0 0.35rem;
}

.admin-tool-card .button,
.admin-home-page .page-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0;
    line-height: 1.15;
}

@media (max-width: 760px) {
    .admin-home-page .page-actions .button,
    .admin-tool-card .button {
        width: 100%;
    }
}


/* Admin page action hotfix */
.admin-form-page-actions,
.email-queue-page .page-actions,
.billing-diagnostics-page .page-actions,
.security-audit-page .page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.inline-action-form,
.admin-form-page-actions form,
.email-queue-page .page-actions form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.admin-form-page-actions .button,
.admin-form-page-actions button,
.email-queue-page .page-actions .button,
.email-queue-page .page-actions button,
.billing-diagnostics-page .page-actions .button,
.security-audit-page .page-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0;
    line-height: 1.15;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .admin-form-page-actions,
    .email-queue-page .page-actions,
    .billing-diagnostics-page .page-actions,
    .security-audit-page .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .inline-action-form,
    .admin-form-page-actions form,
    .email-queue-page .page-actions form,
    .admin-form-page-actions .button,
    .admin-form-page-actions button,
    .email-queue-page .page-actions .button,
    .email-queue-page .page-actions button,
    .billing-diagnostics-page .page-actions .button,
    .security-audit-page .page-actions .button {
        width: 100%;
    }
}

/* Email queue admin button typography hotfix */
.email-queue-page button,
.email-queue-page .button,
.email-queue-page .inline-action-form button,
.email-queue-page .inline-action-form .button {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: normal;
    text-decoration: none;
    -webkit-font-smoothing: inherit;
    appearance: none;
}

.email-queue-page .button-small,
.email-queue-page button.button-small {
    font-size: 0.875rem;
    font-weight: 700;
}

/* Admin data requests page */
.admin-data-requests-table td {
    vertical-align: top;
}

.admin-data-request-notes {
    max-width: 320px;
    white-space: pre-wrap;
}

/* =========================================================
   Data & Privacy mobile overflow fix
   - Keeps Current consents and Data requests inside viewport
========================================================= */

.privacy-dashboard-page,
.privacy-dashboard-page * {
    min-width: 0;
}

.privacy-dashboard-page .two-column-grid,
.privacy-dashboard-page .coach-standard-panel,
.privacy-dashboard-page .stacked-form,
.privacy-dashboard-page .diagnostics-check-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.privacy-dashboard-page .diagnostics-check-row > div {
    min-width: 0;
}

.privacy-dashboard-page .diagnostics-check-row strong,
.privacy-dashboard-page .diagnostics-check-row p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 640px) {
    .privacy-dashboard-page {
        width: min(100% - 20px, 1280px);
    }

    .privacy-dashboard-page .coach-standard-header,
    .privacy-dashboard-page .coach-standard-panel {
        padding: 16px;
        border-radius: 16px;
    }

    .privacy-dashboard-page .two-column-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .privacy-dashboard-page .diagnostics-check-row {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .privacy-dashboard-page .diagnostics-check-row > span {
        width: fit-content;
        max-width: 100%;
    }

    .privacy-dashboard-page .button-row-wrap {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        width: 100%;
    }

    .privacy-dashboard-page .button-row-wrap .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
    }

    .privacy-dashboard-page textarea {
        max-width: 100%;
    }
}
/* =========================================================
   Athlete weekly plan readability fix
   - Prevents day cards from becoming too narrow in weekly-plan.php
   - Allows workout/fuelling content to wrap instead of being clipped
========================================================= */

.athlete-weekly-plan-page,
.athlete-weekly-plan-page * {
    min-width: 0;
}

.athlete-weekly-plan-page .coach-weekly-main-panel {
    overflow: visible;
}

.athlete-weekly-plan-page .coach-weekly-day-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    align-items: stretch;
}

.athlete-weekly-plan-page .coach-weekly-day-card,
.athlete-weekly-plan-page .coach-weekly-workout-item,
.athlete-weekly-plan-page .coach-weekly-race-item {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.athlete-weekly-plan-page .coach-weekly-day-header,
.athlete-weekly-plan-page .coach-weekly-workout-title {
    flex-wrap: wrap;
}

.athlete-weekly-plan-page .coach-weekly-workout-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
}

.athlete-weekly-plan-page .coach-weekly-workout-title .badge,
.athlete-weekly-plan-page .coach-weekly-day-header .badge {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
}

.athlete-weekly-plan-page .coach-weekly-day-card strong,
.athlete-weekly-plan-page .coach-weekly-day-card span,
.athlete-weekly-plan-page .coach-weekly-day-card p,
.athlete-weekly-plan-page .coach-weekly-fuel-note {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.athlete-weekly-plan-page .coach-weekly-workout-item .button {
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
}

@media (max-width: 760px) {
    .athlete-weekly-plan-page .coach-weekly-day-grid {
        grid-template-columns: 1fr;
    }

    .athlete-weekly-plan-page .coach-standard-panel {
        padding: 16px;
    }

    .athlete-weekly-plan-page .coach-weekly-day-card {
        padding: 12px;
    }
}

/* =========================================================
   Coach weekly planner readability fix
   - Prevents the Week structure day cards becoming too narrow
   - Allows workout titles, load badges and FuelAssist text to wrap cleanly
========================================================= */

.coach-weekly-planner-page,
.coach-weekly-planner-page * {
    min-width: 0;
}

.coach-weekly-planner-page .coach-weekly-main-panel {
    overflow: visible;
}

.coach-weekly-planner-page .coach-weekly-day-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    align-items: stretch;
}

.coach-weekly-planner-page .coach-weekly-day-card,
.coach-weekly-planner-page .coach-weekly-workout-item,
.coach-weekly-planner-page .coach-weekly-race-item {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.coach-weekly-planner-page .coach-weekly-day-header,
.coach-weekly-planner-page .coach-weekly-workout-title {
    flex-wrap: wrap;
}

.coach-weekly-planner-page .coach-weekly-day-header {
    align-items: flex-start;
}

.coach-weekly-planner-page .coach-weekly-day-header > div,
.coach-weekly-planner-page .coach-weekly-workout-title > strong {
    min-width: 0;
}

.coach-weekly-planner-page .coach-weekly-workout-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
}

.coach-weekly-planner-page .coach-weekly-day-header .badge,
.coach-weekly-planner-page .coach-weekly-workout-title .badge {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
}

.coach-weekly-planner-page .coach-weekly-day-card strong,
.coach-weekly-planner-page .coach-weekly-day-card span,
.coach-weekly-planner-page .coach-weekly-day-card p,
.coach-weekly-planner-page .coach-weekly-fuel-note {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

@media (max-width: 760px) {
    .coach-weekly-planner-page .coach-weekly-day-grid {
        grid-template-columns: 1fr;
    }

    .coach-weekly-planner-page .coach-standard-panel {
        padding: 16px;
    }

    .coach-weekly-planner-page .coach-weekly-day-card {
        padding: 12px;
    }
}

/* =========================================================
   Calendar copy-week and drag-to-remove controls
========================================================= */

.calendar-copy-week-form,
.calendar-remove-dropzone {
    min-width: 0;
    width: 100%;
}

.calendar-copy-week-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.calendar-copy-week-form h3 {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.2;
}

.calendar-copy-week-form p {
    margin: 0;
}

.calendar-copy-week-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-width: 0;
}

.calendar-copy-week-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: #374151;
    font-weight: 800;
}

.calendar-copy-week-form input[type="date"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
    color: #111827;
    font: inherit;
}

.calendar-copy-week-form input[type="date"]:focus {
    outline: 2px solid rgba(37, 99, 235, 0.22);
    border-color: #2563eb;
}

.calendar-copy-week-form .button {
    width: 100%;
    justify-content: center;
}

.calendar-copy-week-message {
    min-height: 1.3em;
    font-size: 14px;
    line-height: 1.35;
}

.calendar-copy-week-message.is-success {
    color: #047857;
    font-weight: 800;
}

.calendar-copy-week-message.is-error {
    color: #b91c1c;
    font-weight: 800;
}

.calendar-copy-week-message.is-info {
    color: #1d4ed8;
    font-weight: 800;
}

.calendar-remove-dropzone {
    display: grid;
    gap: 5px;
    margin-top: 16px;
    padding: 15px;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    color: #374151;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.calendar-remove-dropzone strong {
    display: block;
    color: #111827;
    font-size: 16px;
    line-height: 1.2;
}

.calendar-remove-dropzone p {
    margin: 0;
    line-height: 1.45;
}

.calendar-remove-dropzone.is-remove-drag-over,
.template-list.is-remove-drag-over {
    border-color: #ef4444;
    background: #fef2f2;
    color: #7f1d1d;
}

.calendar-remove-dropzone.is-remove-drag-over {
    transform: translateY(-1px);
}

.calendar-remove-dropzone.is-remove-drag-over strong {
    color: #991b1b;
}

.template-list.is-remove-drag-over {
    outline: 3px solid rgba(239, 68, 68, 0.2);
    outline-offset: 4px;
    border-radius: 16px;
}

.athlete-calendar-remove-dropzone {
    margin-top: 14px;
}

@media (max-width: 760px) {
    .calendar-copy-week-form,
    .calendar-remove-dropzone {
        padding: 14px;
        border-radius: 14px;
    }

    .calendar-copy-week-form .button {
        width: 100%;
    }
}

/* =========================================================
   Progress timeframe + VO2max cards
========================================================= */
.progress-timeframe-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.progress-timeframe-form label {
    font-weight: 800;
    color: #374151;
}

.progress-timeframe-form select {
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 12px;
    background: #ffffff;
    font: inherit;
}

.progress-timeframe-panel {
    margin-bottom: 16px;
}

.athlete-progress-summary-grid,
.coach-athlete-progress-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

@media (max-width: 760px) {
    .progress-timeframe-form {
        display: grid;
        width: 100%;
    }

    .progress-timeframe-form select {
        width: 100%;
    }
}

/* =========================================================
   Calendar sidebars, mobile actions and colour-coded types
========================================================= */
.athlete-calendar-layout {
    align-items: start;
}

.athlete-calendar-sidebar {
    display: grid;
    gap: 16px;
}

.calendar-workout,
.coach-mobile-agenda-card,
.athlete-mobile-agenda-card {
    border-left: 5px solid #64748b;
}

.calendar-workout-type-recovery {
    border-left-color: #22c55e !important;
    background: #f0fdf4;
}

.calendar-workout-type-easy,
.calendar-workout-type-long-run {
    border-left-color: #16a34a !important;
    background: #f0fdf4;
}

.calendar-workout-type-marathon-steady,
.calendar-workout-type-steady {
    border-left-color: #0ea5e9 !important;
    background: #f0f9ff;
}

.calendar-workout-type-threshold,
.calendar-workout-type-tempo {
    border-left-color: #f97316 !important;
    background: #fff7ed;
}

.calendar-workout-type-interval,
.calendar-workout-type-intervals,
.calendar-workout-type-hills,
.calendar-workout-type-hill {
    border-left-color: #8b5cf6 !important;
    background: #f5f3ff;
}

.calendar-workout-type-repetitions,
.calendar-workout-type-repetition {
    border-left-color: #ec4899 !important;
    background: #fdf2f8;
}

.calendar-workout-type-race {
    border-left-color: #dc2626 !important;
    background: #fef2f2;
}

.calendar-workout-type-strength {
    border-left-color: #475569 !important;
    background: #f8fafc;
}

.calendar-workout-type-mobility {
    border-left-color: #14b8a6 !important;
    background: #f0fdfa;
}

.calendar-workout-type-cross-training {
    border-left-color: #06b6d4 !important;
    background: #ecfeff;
}

.calendar-workout-type-rest {
    border-left-color: #94a3b8 !important;
    background: #f8fafc;
    opacity: 0.88;
}

.calendar-workout-target,
.coach-mobile-training-target,
.athlete-mobile-training-target {
    display: block;
    margin-top: 6px;
    font-weight: 800;
    color: #1e3a8a;
    overflow-wrap: anywhere;
}

.coach-mobile-add-template-form {
    display: grid;
    gap: 10px;
    margin: 12px 0 16px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #eff6ff;
}

.coach-mobile-add-template-form label {
    display: grid;
    gap: 6px;
    font-weight: 800;
}

.coach-mobile-add-template-form select,
.calendar-mobile-date-action input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    background: #ffffff;
    font: inherit;
}

.calendar-mobile-date-action {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    width: 100%;
    align-items: end;
}

.calendar-mobile-date-action span {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coach-mobile-agenda-actions,
.athlete-mobile-agenda-actions {
    align-items: stretch;
}

.coach-mobile-agenda-actions .button,
.athlete-mobile-agenda-actions .button {
    justify-content: center;
}

@media (max-width: 900px) {
    .athlete-calendar-layout,
    .coach-calendar-layout {
        grid-template-columns: 1fr !important;
    }

    .athlete-calendar-sidebar,
    .coach-calendar-library {
        order: 2;
    }

    .athlete-calendar-panel,
    .coach-calendar-panel {
        order: 1;
    }
}

@media (max-width: 520px) {
    .calendar-mobile-date-action {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   Calendar mobile action and desktop duration refinements
   - Hides drag/drop-only controls on mobile
   - Shows planned duration in desktop workout cards
========================================================= */

.calendar-workout-duration {
    display: block;
    margin-top: 4px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .coach-calendar-library #template-list,
    .coach-calendar-library .calendar-remove-dropzone,
    .athlete-calendar-sidebar .calendar-remove-dropzone {
        display: none !important;
    }

    .coach-calendar-library .coach-calendar-library-header .muted,
    .athlete-calendar-sidebar .coach-calendar-library-header .muted {
        display: none !important;
    }

    .coach-mobile-add-template-form,
    .calendar-mobile-date-action {
        display: grid !important;
    }

    .coach-mobile-agenda-actions,
    .athlete-mobile-agenda-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
    }

    .coach-mobile-agenda-actions .button,
    .athlete-mobile-agenda-actions .button,
    .calendar-mobile-date-action .button {
        width: 100%;
        text-align: center;
    }
}

.training-pace-hr-zone-option {
    margin-top: 12px;
    align-items: flex-start;
}

.training-pace-hr-zone-option strong {
    display: block;
    color: #111827;
}

.training-pace-hr-zone-option small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    line-height: 1.35;
}


/* =========================================================
   Calendar and training paces mobile refinement
   - Keeps the HR recalculation checkbox text inside the card
   - Lets planned workout cards wrap like Garmin activity cards
   - Adds Fartlek colour coding
   - Tidies mobile buttons and action rows
========================================================= */

.training-pace-hr-zone-option.checkbox-card,
.checkbox-card.training-pace-hr-zone-option {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.training-pace-hr-zone-option input[type="checkbox"] {
    width: 20px;
    min-width: 20px;
    height: 20px;
    margin: 2px 0 0;
}

.training-pace-hr-zone-option span,
.training-pace-hr-zone-option strong,
.training-pace-hr-zone-option small {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.calendar-workout {
    display: grid;
    gap: 3px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
    white-space: normal;
    line-height: 1.22;
}

.calendar-workout strong,
.calendar-workout span,
.calendar-workout small {
    display: block;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: normal;
    text-overflow: clip;
}

.calendar-workout strong {
    font-size: 13px;
    line-height: 1.2;
}

.calendar-workout span {
    font-size: 12px;
    line-height: 1.2;
}

.calendar-workout-target,
.calendar-workout-duration {
    font-size: 12px;
    line-height: 1.2;
}

.calendar-workout-type-fartlek {
    border-left-color: #8b5cf6 !important;
    background: #f5f3ff;
}

@media (max-width: 900px) {
    .coach-calendar-library .calendar-remove-dropzone,
    .athlete-calendar-sidebar .calendar-remove-dropzone,
    .coach-calendar-library #template-list {
        display: none !important;
    }
}

@media (max-width: 760px) {
    .training-pace-hr-zone-option.checkbox-card,
    .checkbox-card.training-pace-hr-zone-option {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 12px;
        border-radius: 14px;
    }

    .training-pace-hr-zone-option strong {
        font-size: 14px;
        line-height: 1.25;
    }

    .training-pace-hr-zone-option small {
        font-size: 12px;
        line-height: 1.35;
    }

    .button,
    .button-small,
    button.button,
    a.button {
        min-height: 42px;
        line-height: 1.2;
    }

    .coach-mobile-agenda-actions,
    .athlete-mobile-agenda-actions,
    .athlete-training-paces-actions,
    .athlete-heart-rate-zones-actions,
    .athlete-heart-rate-zones-submit-content,
    .form-actions,
    .page-actions {
        gap: 10px;
    }

    .coach-mobile-agenda-actions .button,
    .athlete-mobile-agenda-actions .button,
    .athlete-training-paces-actions .button,
    .athlete-heart-rate-zones-actions .button,
    .athlete-heart-rate-zones-submit-content .button,
    .form-actions .button,
    .page-actions .button {
        width: 100%;
        justify-content: center;
        text-align: center;
        margin: 0;
    }

    .calendar-mobile-date-action {
        gap: 8px;
        padding: 10px;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        background: #f8fafc;
    }

    .calendar-mobile-date-action input {
        min-height: 42px;
    }
}


/* =========================================================
   Page alignment consistency + progress action alignment
   - Aligns progress timeframe/actions on one centre line
   - Brings readiness, FuelAssist, activity import and race planner
     pages in line with the training settings layout
========================================================= */

.athlete-progress-page .page-header,
.progress-page.athlete-progress-page .page-header {
    align-items: center !important;
}

.athlete-progress-page .page-header .page-actions,
.progress-page.athlete-progress-page .page-header .page-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.progress-timeframe-form {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px;
    min-height: 48px;
    margin: 0;
}

.progress-timeframe-form label {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    margin: 0;
    line-height: 1;
    font-weight: 900;
}

.progress-timeframe-form select {
    height: 48px;
    min-height: 48px;
    margin: 0;
    line-height: 1.2;
}

.athlete-progress-page .page-header .button,
.progress-page.athlete-progress-page .page-header .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin: 0;
    line-height: 1.2;
}

/* Shared application page shell: match training settings width/alignment */
.athlete-readiness-page,
.fuelassist-page,
.athlete-activity-import-page,
.athlete-race-planner-page,
.coach-race-planner-page,
.coach-activity-imports-page,
.deployment-readiness-page,
.beta-readiness-page {
    width: min(100% - 32px, 1280px) !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* Give athlete pages the same header card treatment as training settings */
.athlete-readiness-page > .page-header,
.athlete-fuelassist-page > .page-header,
.athlete-activity-import-page > .page-header,
.athlete-race-planner-page > .page-header,
.athlete-progress-page > .page-header,
.progress-page.athlete-progress-page > .page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    max-width: 1280px;
    padding: 22px;
    margin: 0 0 18px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
}

.athlete-readiness-page > .page-header h1,
.athlete-fuelassist-page > .page-header h1,
.athlete-activity-import-page > .page-header h1,
.athlete-race-planner-page > .page-header h1,
.athlete-progress-page > .page-header h1,
.progress-page.athlete-progress-page > .page-header h1 {
    margin: 0;
    line-height: 1.1;
}

/* Keep coach utility pages aligned with the same header rhythm */
.coach-fuelassist-page > .coach-standard-header,
.coach-race-planner-page > .coach-standard-header,
.coach-activity-imports-page > .coach-standard-header,
.deployment-readiness-page > .coach-standard-header,
.beta-readiness-page > .coach-standard-header {
    align-items: flex-start;
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.athlete-readiness-page .page-actions,
.athlete-fuelassist-page .page-actions,
.athlete-activity-import-page .page-actions,
.athlete-race-planner-page .page-actions,
.coach-fuelassist-page .page-actions,
.coach-race-planner-page .page-actions,
.coach-activity-imports-page .page-actions,
.deployment-readiness-page .page-actions,
.beta-readiness-page .page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.athlete-readiness-page .page-actions .button,
.athlete-fuelassist-page .page-actions .button,
.athlete-activity-import-page .page-actions .button,
.athlete-race-planner-page .page-actions .button,
.coach-fuelassist-page .page-actions .button,
.coach-race-planner-page .page-actions .button,
.coach-activity-imports-page .page-actions .button,
.deployment-readiness-page .page-actions .button,
.beta-readiness-page .page-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

/* Filter bars and top panels should sit flush with the page width */
.athlete-race-planner-page .coach-standard-filter-bar,
.coach-race-planner-page .coach-standard-filter-bar,
.coach-fuelassist-page .coach-standard-filter-bar,
.athlete-activity-import-page .coach-standard-panel,
.coach-activity-imports-page .coach-standard-filter-bar {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (max-width: 760px) {
    .athlete-readiness-page,
    .fuelassist-page,
    .athlete-activity-import-page,
    .athlete-race-planner-page,
    .coach-race-planner-page,
    .coach-activity-imports-page,
    .deployment-readiness-page,
    .beta-readiness-page,
    .athlete-progress-page,
    .progress-page.athlete-progress-page {
        width: min(100% - 20px, 1280px) !important;
    }

    .athlete-readiness-page > .page-header,
    .athlete-fuelassist-page > .page-header,
    .athlete-activity-import-page > .page-header,
    .athlete-race-planner-page > .page-header,
    .athlete-progress-page > .page-header,
    .progress-page.athlete-progress-page > .page-header,
    .coach-fuelassist-page > .coach-standard-header,
    .coach-race-planner-page > .coach-standard-header,
    .coach-activity-imports-page > .coach-standard-header,
    .deployment-readiness-page > .coach-standard-header,
    .beta-readiness-page > .coach-standard-header {
        display: grid !important;
        gap: 16px;
        padding: 18px;
        border-radius: 18px;
    }

    .athlete-progress-page .page-header .page-actions,
    .progress-page.athlete-progress-page .page-header .page-actions,
    .athlete-readiness-page .page-actions,
    .athlete-fuelassist-page .page-actions,
    .athlete-activity-import-page .page-actions,
    .athlete-race-planner-page .page-actions,
    .coach-fuelassist-page .page-actions,
    .coach-race-planner-page .page-actions,
    .coach-activity-imports-page .page-actions,
    .deployment-readiness-page .page-actions,
    .beta-readiness-page .page-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 10px;
    }

    .progress-timeframe-form {
        display: grid !important;
        grid-template-columns: 1fr;
        align-items: stretch !important;
        width: 100%;
        gap: 8px;
        min-height: 0;
    }

    .progress-timeframe-form label {
        min-height: 0;
        line-height: 1.2;
    }

    .progress-timeframe-form select,
    .athlete-progress-page .page-header .button,
    .progress-page.athlete-progress-page .page-header .button,
    .athlete-readiness-page .page-actions .button,
    .athlete-fuelassist-page .page-actions .button,
    .athlete-activity-import-page .page-actions .button,
    .athlete-race-planner-page .page-actions .button,
    .coach-fuelassist-page .page-actions .button,
    .coach-race-planner-page .page-actions .button,
    .coach-activity-imports-page .page-actions .button,
    .deployment-readiness-page .page-actions .button,
    .beta-readiness-page .page-actions .button {
        width: 100%;
        min-height: 46px;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
}


/* =========================================================
   Athlete page header card standardisation
   - Applies the same top-of-page white card used on Progress
     across athlete-facing display pages
========================================================= */

main[class*="athlete-"] > .page-header,
main[class*="athlete-"] > .coach-standard-header,
.athlete-page > .page-header,
.athlete-page > .coach-standard-header,
.athlete-standard-page > .page-header,
.athlete-standard-page > .coach-standard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    max-width: 1280px;
    padding: 22px;
    margin: 0 0 18px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
}

main[class*="athlete-"] > .page-header h1,
main[class*="athlete-"] > .coach-standard-header h1,
.athlete-page > .page-header h1,
.athlete-page > .coach-standard-header h1,
.athlete-standard-page > .page-header h1,
.athlete-standard-page > .coach-standard-header h1 {
    margin: 0;
    line-height: 1.1;
}

main[class*="athlete-"] > .page-header .muted,
main[class*="athlete-"] > .coach-standard-header .muted,
.athlete-page > .page-header .muted,
.athlete-page > .coach-standard-header .muted,
.athlete-standard-page > .page-header .muted,
.athlete-standard-page > .coach-standard-header .muted {
    margin-bottom: 0;
}

main[class*="athlete-"] > .page-header .page-actions,
main[class*="athlete-"] > .coach-standard-header .page-actions,
.athlete-page > .page-header .page-actions,
.athlete-page > .coach-standard-header .page-actions,
.athlete-standard-page > .page-header .page-actions,
.athlete-standard-page > .coach-standard-header .page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

main[class*="athlete-"] > .page-header .page-actions .button,
main[class*="athlete-"] > .coach-standard-header .page-actions .button,
.athlete-page > .page-header .page-actions .button,
.athlete-page > .coach-standard-header .page-actions .button,
.athlete-standard-page > .page-header .page-actions .button,
.athlete-standard-page > .coach-standard-header .page-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

/* Keep calendar/grid-heavy athlete pages from getting unintended extra width changes */
.athlete-calendar-page > .page-header,
.athlete-weekly-plan-page > .page-header,
.athlete-progress-page > .page-header {
    max-width: 1280px;
}

/* Mobile: make the header card match the progress page behaviour */
@media (max-width: 760px) {
    main[class*="athlete-"] > .page-header,
    main[class*="athlete-"] > .coach-standard-header,
    .athlete-page > .page-header,
    .athlete-page > .coach-standard-header,
    .athlete-standard-page > .page-header,
    .athlete-standard-page > .coach-standard-header {
        display: grid !important;
        gap: 16px;
        padding: 18px;
        border-radius: 18px;
    }

    main[class*="athlete-"] > .page-header .page-actions,
    main[class*="athlete-"] > .coach-standard-header .page-actions,
    .athlete-page > .page-header .page-actions,
    .athlete-page > .coach-standard-header .page-actions,
    .athlete-standard-page > .page-header .page-actions,
    .athlete-standard-page > .coach-standard-header .page-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 10px;
    }

    main[class*="athlete-"] > .page-header .page-actions .button,
    main[class*="athlete-"] > .coach-standard-header .page-actions .button,
    .athlete-page > .page-header .page-actions .button,
    .athlete-page > .coach-standard-header .page-actions .button,
    .athlete-standard-page > .page-header .page-actions .button,
    .athlete-standard-page > .coach-standard-header .page-actions .button {
        width: 100%;
        min-height: 46px;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
}


/* =========================================================
   Athlete top header flush + equal height
   - Removes the visual gap below the navy app header
   - Gives athlete page title cards a consistent height
========================================================= */

/* Athlete pages should start directly under the navy navigation bar */
body:has(.app-header) main[class*="athlete-"],
body:has(.app-header) .athlete-page,
body:has(.app-header) .athlete-standard-page,
body:has(.app-header) .training-settings-page,
body:has(.app-header) .training-tools-page,
body:has(.app-header) .training-child-page,
body:has(.app-header) .progress-page.athlete-progress-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Remove any inherited top spacing from the first element inside athlete pages */
main[class*="athlete-"] > :first-child,
.athlete-page > :first-child,
.athlete-standard-page > :first-child,
.training-settings-page > :first-child,
.training-tools-page > :first-child,
.training-child-page > :first-child,
.progress-page.athlete-progress-page > :first-child {
    margin-top: 0 !important;
}

/* Standard athlete header card shape and height */
main[class*="athlete-"] > .page-header,
main[class*="athlete-"] > .coach-standard-header,
.athlete-page > .page-header,
.athlete-page > .coach-standard-header,
.athlete-standard-page > .page-header,
.athlete-standard-page > .coach-standard-header,
.training-settings-page > .page-header,
.training-tools-page > .page-header,
.training-child-page > .page-header,
.progress-page.athlete-progress-page > .page-header {
    min-height: 92px !important;
    display: flex !important;
    align-items: center !important;
    margin-top: 0 !important;
    margin-bottom: 18px !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Keep the title vertically centred inside the standard height */
main[class*="athlete-"] > .page-header > div:first-child,
main[class*="athlete-"] > .coach-standard-header > div:first-child,
.athlete-page > .page-header > div:first-child,
.athlete-page > .coach-standard-header > div:first-child,
.athlete-standard-page > .page-header > div:first-child,
.athlete-standard-page > .coach-standard-header > div:first-child,
.training-settings-page > .page-header > div:first-child,
.training-tools-page > .page-header > div:first-child,
.training-child-page > .page-header > div:first-child,
.progress-page.athlete-progress-page > .page-header > div:first-child {
    display: grid;
    align-content: center;
    min-height: 48px;
}

/* Title spacing must not change the header height */
main[class*="athlete-"] > .page-header h1,
main[class*="athlete-"] > .coach-standard-header h1,
.athlete-page > .page-header h1,
.athlete-page > .coach-standard-header h1,
.athlete-standard-page > .page-header h1,
.athlete-standard-page > .coach-standard-header h1,
.training-settings-page > .page-header h1,
.training-tools-page > .page-header h1,
.training-child-page > .page-header h1,
.progress-page.athlete-progress-page > .page-header h1 {
    margin: 0 !important;
    line-height: 1.1 !important;
}

main[class*="athlete-"] > .page-header p,
main[class*="athlete-"] > .coach-standard-header p,
.athlete-page > .page-header p,
.athlete-page > .coach-standard-header p,
.athlete-standard-page > .page-header p,
.athlete-standard-page > .coach-standard-header p,
.training-settings-page > .page-header p,
.training-tools-page > .page-header p,
.training-child-page > .page-header p,
.progress-page.athlete-progress-page > .page-header p {
    margin-top: 8px;
    margin-bottom: 0 !important;
}

/* Pages that use a standard shell should not add top padding above the header */
.coach-standard-page[class*="athlete-"],
.coach-standard-page.athlete-calendar-page,
.coach-standard-page.athlete-weekly-plan-page,
.coach-standard-page.athlete-progress-page,
.coach-standard-page.athlete-activity-import-page,
.coach-standard-page.athlete-race-planner-page,
.coach-standard-page.athlete-readiness-page {
    padding-top: 0 !important;
}

/* If a page wrapper has horizontal padding, keep it but remove the top gutter */
@media (min-width: 761px) {
    main[class*="athlete-"],
    .athlete-page,
    .athlete-standard-page,
    .training-settings-page,
    .training-tools-page,
    .training-child-page,
    .progress-page.athlete-progress-page {
        padding-top: 0 !important;
    }
}

@media (max-width: 760px) {
    body:has(.app-header) main[class*="athlete-"],
    body:has(.app-header) .athlete-page,
    body:has(.app-header) .athlete-standard-page,
    body:has(.app-header) .training-settings-page,
    body:has(.app-header) .training-tools-page,
    body:has(.app-header) .training-child-page,
    body:has(.app-header) .progress-page.athlete-progress-page {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    main[class*="athlete-"] > .page-header,
    main[class*="athlete-"] > .coach-standard-header,
    .athlete-page > .page-header,
    .athlete-page > .coach-standard-header,
    .athlete-standard-page > .page-header,
    .athlete-standard-page > .coach-standard-header,
    .training-settings-page > .page-header,
    .training-tools-page > .page-header,
    .training-child-page > .page-header,
    .progress-page.athlete-progress-page > .page-header {
        min-height: 86px !important;
        align-content: center !important;
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
    }

    /* Pages with actions can grow naturally on mobile, but still start flush. */
    main[class*="athlete-"] > .page-header:has(.page-actions),
    main[class*="athlete-"] > .coach-standard-header:has(.page-actions),
    .athlete-page > .page-header:has(.page-actions),
    .athlete-page > .coach-standard-header:has(.page-actions),
    .athlete-standard-page > .page-header:has(.page-actions),
    .athlete-standard-page > .coach-standard-header:has(.page-actions),
    .training-settings-page > .page-header:has(.page-actions),
    .training-tools-page > .page-header:has(.page-actions),
    .training-child-page > .page-header:has(.page-actions),
    .progress-page.athlete-progress-page > .page-header:has(.page-actions) {
        min-height: 0 !important;
    }
}


/* =========================================================
   Athlete mobile top-header button layout
   - Keep top white header buttons horizontal on mobile
========================================================= */

@media (max-width: 760px) {
    main[class*="athlete-"] > .page-header .page-actions,
    main[class*="athlete-"] > .coach-standard-header .page-actions,
    .athlete-page > .page-header .page-actions,
    .athlete-page > .coach-standard-header .page-actions,
    .athlete-standard-page > .page-header .page-actions,
    .athlete-standard-page > .coach-standard-header .page-actions,
    .training-settings-page > .page-header .page-actions,
    .training-tools-page > .page-header .page-actions,
    .training-child-page > .page-header .page-actions,
    .progress-page.athlete-progress-page > .page-header .page-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
    }

    main[class*="athlete-"] > .page-header .page-actions .button,
    main[class*="athlete-"] > .coach-standard-header .page-actions .button,
    .athlete-page > .page-header .page-actions .button,
    .athlete-page > .coach-standard-header .page-actions .button,
    .athlete-standard-page > .page-header .page-actions .button,
    .athlete-standard-page > .coach-standard-header .page-actions .button,
    .training-settings-page > .page-header .page-actions .button,
    .training-tools-page > .page-header .page-actions .button,
    .training-child-page > .page-header .page-actions .button,
    .progress-page.athlete-progress-page > .page-header .page-actions .button {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 44px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.15 !important;
    }

    /* For three or more actions, allow compact two-per-row wrapping instead of a single vertical stack. */
    main[class*="athlete-"] > .page-header .page-actions .button:nth-last-child(n+3),
    main[class*="athlete-"] > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .athlete-page > .page-header .page-actions .button:nth-last-child(n+3),
    .athlete-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .athlete-standard-page > .page-header .page-actions .button:nth-last-child(n+3),
    .athlete-standard-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .training-settings-page > .page-header .page-actions .button:nth-last-child(n+3),
    .training-settings-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .training-tools-page > .page-header .page-actions .button:nth-last-child(n+3),
    .training-tools-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .training-child-page > .page-header .page-actions .button:nth-last-child(n+3),
    .training-child-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .progress-page.athlete-progress-page > .page-header .page-actions .button:nth-last-child(n+3),
    .progress-page.athlete-progress-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button {
        flex-basis: calc(50% - 4px) !important;
    }

    /* Very narrow phones: keep two buttons side-by-side where possible. */
    @media (max-width: 380px) {
        main[class*="athlete-"] > .page-header .page-actions .button,
        main[class*="athlete-"] > .coach-standard-header .page-actions .button,
        .athlete-page > .page-header .page-actions .button,
        .athlete-page > .coach-standard-header .page-actions .button,
        .athlete-standard-page > .page-header .page-actions .button,
        .athlete-standard-page > .coach-standard-header .page-actions .button,
        .training-settings-page > .page-header .page-actions .button,
        .training-tools-page > .page-header .page-actions .button,
        .training-child-page > .page-header .page-actions .button,
        .progress-page.athlete-progress-page > .page-header .page-actions .button {
            font-size: 13px !important;
            padding-left: 8px !important;
            padding-right: 8px !important;
        }
    }
}


/* =========================================================
   Mobile header action buttons: readable horizontal design
   - Avoids cramped/clipped text on small mobile screens
   - Keeps buttons horizontal where practical
   - Uses horizontal scroll only when there is genuinely not enough width
========================================================= */

@media (max-width: 760px) {
    main[class*="athlete-"] > .page-header .page-actions,
    main[class*="athlete-"] > .coach-standard-header .page-actions,
    .athlete-page > .page-header .page-actions,
    .athlete-page > .coach-standard-header .page-actions,
    .athlete-standard-page > .page-header .page-actions,
    .athlete-standard-page > .coach-standard-header .page-actions,
    .training-settings-page > .page-header .page-actions,
    .training-tools-page > .page-header .page-actions,
    .training-child-page > .page-header .page-actions,
    .progress-page.athlete-progress-page > .page-header .page-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 2px 2px 8px !important;
        margin: 0 !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    main[class*="athlete-"] > .page-header .page-actions .button,
    main[class*="athlete-"] > .coach-standard-header .page-actions .button,
    .athlete-page > .page-header .page-actions .button,
    .athlete-page > .coach-standard-header .page-actions .button,
    .athlete-standard-page > .page-header .page-actions .button,
    .athlete-standard-page > .coach-standard-header .page-actions .button,
    .training-settings-page > .page-header .page-actions .button,
    .training-tools-page > .page-header .page-actions .button,
    .training-child-page > .page-header .page-actions .button,
    .progress-page.athlete-progress-page > .page-header .page-actions .button {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 132px !important;
        max-width: none !important;
        min-height: 44px !important;
        padding: 10px 16px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 11px !important;
        text-align: center !important;
        white-space: nowrap !important;
        line-height: 1.15 !important;
        font-size: 15px !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    /* Remove the earlier two-per-row rule that made labels squeeze and clip. */
    main[class*="athlete-"] > .page-header .page-actions .button:nth-last-child(n+3),
    main[class*="athlete-"] > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .athlete-page > .page-header .page-actions .button:nth-last-child(n+3),
    .athlete-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .athlete-standard-page > .page-header .page-actions .button:nth-last-child(n+3),
    .athlete-standard-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .training-settings-page > .page-header .page-actions .button:nth-last-child(n+3),
    .training-settings-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .training-tools-page > .page-header .page-actions .button:nth-last-child(n+3),
    .training-tools-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .training-child-page > .page-header .page-actions .button:nth-last-child(n+3),
    .training-child-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button,
    .progress-page.athlete-progress-page > .page-header .page-actions .button:nth-last-child(n+3),
    .progress-page.athlete-progress-page > .page-header .page-actions .button:nth-last-child(n+3) ~ .button {
        flex-basis: auto !important;
    }
}

/* Extra-small phones: keep the same layout, just tighten spacing slightly. */
@media (max-width: 380px) {
    main[class*="athlete-"] > .page-header .page-actions,
    main[class*="athlete-"] > .coach-standard-header .page-actions,
    .athlete-page > .page-header .page-actions,
    .athlete-page > .coach-standard-header .page-actions,
    .athlete-standard-page > .page-header .page-actions,
    .athlete-standard-page > .coach-standard-header .page-actions,
    .training-settings-page > .page-header .page-actions,
    .training-tools-page > .page-header .page-actions,
    .training-child-page > .page-header .page-actions,
    .progress-page.athlete-progress-page > .page-header .page-actions {
        gap: 8px !important;
    }

    main[class*="athlete-"] > .page-header .page-actions .button,
    main[class*="athlete-"] > .coach-standard-header .page-actions .button,
    .athlete-page > .page-header .page-actions .button,
    .athlete-page > .coach-standard-header .page-actions .button,
    .athlete-standard-page > .page-header .page-actions .button,
    .athlete-standard-page > .coach-standard-header .page-actions .button,
    .training-settings-page > .page-header .page-actions .button,
    .training-tools-page > .page-header .page-actions .button,
    .training-child-page > .page-header .page-actions .button,
    .progress-page.athlete-progress-page > .page-header .page-actions .button {
        min-width: 122px !important;
        padding: 10px 13px !important;
        font-size: 14px !important;
    }
}


/* =========================================================
   Mobile athlete header: title above, buttons below
   - No horizontal scrolling
   - Title/text uses available width at the top
   - Buttons share the bottom row and wrap text rather than clipping
========================================================= */

@media (max-width: 760px) {
    main[class*="athlete-"] > .page-header,
    main[class*="athlete-"] > .coach-standard-header,
    .athlete-page > .page-header,
    .athlete-page > .coach-standard-header,
    .athlete-standard-page > .page-header,
    .athlete-standard-page > .coach-standard-header,
    .training-settings-page > .page-header,
    .training-tools-page > .page-header,
    .training-child-page > .page-header,
    .progress-page.athlete-progress-page > .page-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch !important;
        gap: 12px !important;
        min-height: 0 !important;
        padding: 16px !important;
        overflow: hidden !important;
    }

    main[class*="athlete-"] > .page-header > div:first-child,
    main[class*="athlete-"] > .coach-standard-header > div:first-child,
    .athlete-page > .page-header > div:first-child,
    .athlete-page > .coach-standard-header > div:first-child,
    .athlete-standard-page > .page-header > div:first-child,
    .athlete-standard-page > .coach-standard-header > div:first-child,
    .training-settings-page > .page-header > div:first-child,
    .training-tools-page > .page-header > div:first-child,
    .training-child-page > .page-header > div:first-child,
    .progress-page.athlete-progress-page > .page-header > div:first-child {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        display: block !important;
    }

    main[class*="athlete-"] > .page-header h1,
    main[class*="athlete-"] > .coach-standard-header h1,
    .athlete-page > .page-header h1,
    .athlete-page > .coach-standard-header h1,
    .athlete-standard-page > .page-header h1,
    .athlete-standard-page > .coach-standard-header h1,
    .training-settings-page > .page-header h1,
    .training-tools-page > .page-header h1,
    .training-child-page > .page-header h1,
    .progress-page.athlete-progress-page > .page-header h1 {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        font-size: clamp(24px, 8vw, 32px) !important;
        line-height: 1.08 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    main[class*="athlete-"] > .page-header .muted,
    main[class*="athlete-"] > .coach-standard-header .muted,
    .athlete-page > .page-header .muted,
    .athlete-page > .coach-standard-header .muted,
    .athlete-standard-page > .page-header .muted,
    .athlete-standard-page > .coach-standard-header .muted,
    .training-settings-page > .page-header .muted,
    .training-tools-page > .page-header .muted,
    .training-child-page > .page-header .muted,
    .progress-page.athlete-progress-page > .page-header .muted {
        margin-top: 6px !important;
        font-size: clamp(13px, 3.7vw, 15px) !important;
        line-height: 1.35 !important;
        max-width: 100% !important;
    }

    main[class*="athlete-"] > .page-header .page-actions,
    main[class*="athlete-"] > .coach-standard-header .page-actions,
    .athlete-page > .page-header .page-actions,
    .athlete-page > .coach-standard-header .page-actions,
    .athlete-standard-page > .page-header .page-actions,
    .athlete-standard-page > .coach-standard-header .page-actions,
    .training-settings-page > .page-header .page-actions,
    .training-tools-page > .page-header .page-actions,
    .training-child-page > .page-header .page-actions,
    .progress-page.athlete-progress-page > .page-header .page-actions {
        width: 100% !important;
        max-width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important;
        grid-auto-flow: column !important;
        grid-auto-columns: minmax(0, 1fr) !important;
        gap: 8px !important;
        align-items: stretch !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    main[class*="athlete-"] > .page-header .page-actions .button,
    main[class*="athlete-"] > .coach-standard-header .page-actions .button,
    .athlete-page > .page-header .page-actions .button,
    .athlete-page > .coach-standard-header .page-actions .button,
    .athlete-standard-page > .page-header .page-actions .button,
    .athlete-standard-page > .coach-standard-header .page-actions .button,
    .training-settings-page > .page-header .page-actions .button,
    .training-tools-page > .page-header .page-actions .button,
    .training-child-page > .page-header .page-actions .button,
    .progress-page.athlete-progress-page > .page-header .page-actions .button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 44px !important;
        padding: 8px 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 10px !important;
        font-size: clamp(12px, 3.45vw, 15px) !important;
        line-height: 1.12 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
    }

    /* When there are more than three actions, allow a neat two-column wrap rather than squeezing four tiny buttons. */
    main[class*="athlete-"] > .page-header .page-actions:has(.button:nth-child(4)),
    main[class*="athlete-"] > .coach-standard-header .page-actions:has(.button:nth-child(4)),
    .athlete-page > .page-header .page-actions:has(.button:nth-child(4)),
    .athlete-page > .coach-standard-header .page-actions:has(.button:nth-child(4)),
    .athlete-standard-page > .page-header .page-actions:has(.button:nth-child(4)),
    .athlete-standard-page > .coach-standard-header .page-actions:has(.button:nth-child(4)),
    .training-settings-page > .page-header .page-actions:has(.button:nth-child(4)),
    .training-tools-page > .page-header .page-actions:has(.button:nth-child(4)),
    .training-child-page > .page-header .page-actions:has(.button:nth-child(4)),
    .progress-page.athlete-progress-page > .page-header .page-actions:has(.button:nth-child(4)) {
        grid-auto-flow: row !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 380px) {
    main[class*="athlete-"] > .page-header,
    main[class*="athlete-"] > .coach-standard-header,
    .athlete-page > .page-header,
    .athlete-page > .coach-standard-header,
    .athlete-standard-page > .page-header,
    .athlete-standard-page > .coach-standard-header,
    .training-settings-page > .page-header,
    .training-tools-page > .page-header,
    .training-child-page > .page-header,
    .progress-page.athlete-progress-page > .page-header {
        padding: 14px !important;
        gap: 10px !important;
    }

    main[class*="athlete-"] > .page-header .page-actions,
    main[class*="athlete-"] > .coach-standard-header .page-actions,
    .athlete-page > .page-header .page-actions,
    .athlete-page > .coach-standard-header .page-actions,
    .athlete-standard-page > .page-header .page-actions,
    .athlete-standard-page > .coach-standard-header .page-actions,
    .training-settings-page > .page-header .page-actions,
    .training-tools-page > .page-header .page-actions,
    .training-child-page > .page-header .page-actions,
    .progress-page.athlete-progress-page > .page-header .page-actions {
        gap: 7px !important;
    }

    main[class*="athlete-"] > .page-header .page-actions .button,
    main[class*="athlete-"] > .coach-standard-header .page-actions .button,
    .athlete-page > .page-header .page-actions .button,
    .athlete-page > .coach-standard-header .page-actions .button,
    .athlete-standard-page > .page-header .page-actions .button,
    .athlete-standard-page > .coach-standard-header .page-actions .button,
    .training-settings-page > .page-header .page-actions .button,
    .training-tools-page > .page-header .page-actions .button,
    .training-child-page > .page-header .page-actions .button,
    .progress-page.athlete-progress-page > .page-header .page-actions .button {
        min-height: 42px !important;
        padding: 7px 6px !important;
        font-size: clamp(11px, 3.3vw, 13px) !important;
    }
}


/* =========================================================
   Progress page: timeframe removed
   - Keeps the progress top header clean when only action buttons remain
========================================================= */

.progress-timeframe-form {
    display: none !important;
}

.athlete-progress-page > .page-header,
.progress-page.athlete-progress-page > .page-header {
    align-items: center !important;
}

.athlete-progress-page > .page-header .page-actions,
.progress-page.athlete-progress-page > .page-header .page-actions {
    margin-left: auto;
}

@media (max-width: 760px) {
    .athlete-progress-page > .page-header .page-actions,
    .progress-page.athlete-progress-page > .page-header .page-actions {
        margin-left: 0;
    }
}


/* =========================================================
   Athlete mobile page width standardisation
   - Makes all athlete-facing pages use the same mobile width
     as the Progress page
========================================================= */

@media (max-width: 760px) {
    main[class*="athlete-"],
    .athlete-page,
    .athlete-standard-page,
    .coach-standard-page[class*="athlete-"],
    .training-settings-page,
    .training-tools-page,
    .training-child-page,
    .athlete-calendar-page,
    .athlete-weekly-plan-page,
    .athlete-progress-page,
    .progress-page.athlete-progress-page,
    .athlete-readiness-page,
    .athlete-fuelassist-page,
    .fuelassist-page,
    .athlete-activity-import-page,
    .athlete-race-planner-page,
    .athlete-dashboard-page,
    .athlete-notifications-page,
    .athlete-resource-library-page,
    .athlete-social-wall-page {
        width: min(100% - 20px, 1280px) !important;
        max-width: 1280px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    /* Avoid old page-specific mobile padding making some pages visually narrower. */
    main[class*="athlete-"],
    .athlete-page,
    .athlete-standard-page,
    .coach-standard-page[class*="athlete-"],
    .training-settings-page,
    .training-tools-page,
    .training-child-page,
    .athlete-calendar-page,
    .athlete-weekly-plan-page,
    .athlete-progress-page,
    .progress-page.athlete-progress-page,
    .athlete-readiness-page,
    .athlete-fuelassist-page,
    .fuelassist-page,
    .athlete-activity-import-page,
    .athlete-race-planner-page {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Inner panels/cards should use the full standardised mobile width. */
    main[class*="athlete-"] > .page-header,
    main[class*="athlete-"] > .coach-standard-header,
    .athlete-page > .page-header,
    .athlete-page > .coach-standard-header,
    .athlete-standard-page > .page-header,
    .athlete-standard-page > .coach-standard-header,
    .training-settings-page > .page-header,
    .training-tools-page > .page-header,
    .training-child-page > .page-header,
    .progress-page.athlete-progress-page > .page-header,
    main[class*="athlete-"] > .panel,
    .athlete-page > .panel,
    .athlete-standard-page > .panel,
    .training-settings-page > .panel,
    .training-tools-page > .panel,
    .training-child-page > .panel {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}


/* =========================================================
   Coach page width + flush header standardisation
   - Same page width as coach dashboard across screen sizes
   - No gap between navy navigation header and white page header
   - Consistent white header height on coach pages
========================================================= */

:root {
    --runnerly-app-page-width: min(100% - 32px, 1280px);
    --runnerly-app-page-width-mobile: min(100% - 20px, 1280px);
    --runnerly-coach-header-height: 92px;
    --runnerly-coach-header-height-mobile: 86px;
}

/* Standardise main app page width to match the coach dashboard. */
.coach-dashboard-page,
.athlete-dashboard-page,
main.coach-standard-page,
main[class*="coach-"],
main[class*="athlete-"],
.training-settings-page,
.training-tools-page,
.training-child-page,
.progress-page,
.garmin-page-shell,
.library-page-shell,
.social-wall-page-shell,
.notification-page-shell,
.account-password-page,
.training-pace-page {
    width: var(--runnerly-app-page-width) !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* Remove page-level top gaps directly below the navy app header. */
.app-header + main,
.app-header + .coach-dashboard-page,
.app-header + .athlete-dashboard-page,
.app-header + .coach-standard-page,
.app-header + .training-settings-page,
.app-header + .training-tools-page,
.app-header + .training-child-page,
.app-header + .progress-page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

main.coach-standard-page,
main[class*="coach-"],
.coach-dashboard-page,
.coach-training-setup-page,
.coach-athlete-progress-page {
    padding-top: 0 !important;
}

/* First content item should sit flush at the top of the page wrapper. */
main.coach-standard-page > :first-child,
main[class*="coach-"] > :first-child,
.coach-dashboard-page > :first-child,
.coach-training-setup-page > :first-child,
.coach-athlete-progress-page > :first-child {
    margin-top: 0 !important;
}

/* Consistent coach white header card. */
main.coach-standard-page > .coach-standard-header,
main.coach-standard-page > .page-header,
main[class*="coach-"] > .coach-standard-header,
main[class*="coach-"] > .page-header,
.coach-training-setup-page > .coach-standard-header,
.coach-training-setup-page > .page-header,
.coach-athlete-progress-page > .coach-standard-header,
.coach-athlete-progress-page > .page-header {
    width: 100% !important;
    max-width: 1280px !important;
    min-height: var(--runnerly-coach-header-height) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    padding: 22px !important;
    margin: 0 0 18px !important;
    border: 1px solid #e5e7eb !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 20px !important;
    border-bottom-right-radius: 20px !important;
    background: #ffffff !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
    box-sizing: border-box !important;
}

/* Keep title/subtitle vertically balanced without changing the header height unnecessarily. */
main.coach-standard-page > .coach-standard-header > div:first-child,
main.coach-standard-page > .page-header > div:first-child,
main[class*="coach-"] > .coach-standard-header > div:first-child,
main[class*="coach-"] > .page-header > div:first-child,
.coach-training-setup-page > .coach-standard-header > div:first-child,
.coach-training-setup-page > .page-header > div:first-child,
.coach-athlete-progress-page > .coach-standard-header > div:first-child,
.coach-athlete-progress-page > .page-header > div:first-child {
    display: grid !important;
    align-content: center !important;
    min-width: 0 !important;
    min-height: 48px !important;
}

main.coach-standard-page > .coach-standard-header h1,
main.coach-standard-page > .coach-standard-header h2,
main.coach-standard-page > .page-header h1,
main.coach-standard-page > .page-header h2,
main[class*="coach-"] > .coach-standard-header h1,
main[class*="coach-"] > .coach-standard-header h2,
main[class*="coach-"] > .page-header h1,
main[class*="coach-"] > .page-header h2,
.coach-training-setup-page > .coach-standard-header h1,
.coach-training-setup-page > .page-header h1,
.coach-athlete-progress-page > .coach-standard-header h1,
.coach-athlete-progress-page > .page-header h1 {
    margin: 0 !important;
    line-height: 1.1 !important;
}

main.coach-standard-page > .coach-standard-header .muted,
main.coach-standard-page > .page-header .muted,
main[class*="coach-"] > .coach-standard-header .muted,
main[class*="coach-"] > .page-header .muted,
.coach-training-setup-page > .coach-standard-header .muted,
.coach-training-setup-page > .page-header .muted,
.coach-athlete-progress-page > .coach-standard-header .muted,
.coach-athlete-progress-page > .page-header .muted {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

/* Action buttons in coach headers should align cleanly with the title area. */
main.coach-standard-page > .coach-standard-header .page-actions,
main.coach-standard-page > .page-header .page-actions,
main[class*="coach-"] > .coach-standard-header .page-actions,
main[class*="coach-"] > .page-header .page-actions,
.coach-training-setup-page > .coach-standard-header .page-actions,
.coach-training-setup-page > .page-header .page-actions,
.coach-athlete-progress-page > .coach-standard-header .page-actions,
.coach-athlete-progress-page > .page-header .page-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 !important;
}

main.coach-standard-page > .coach-standard-header .page-actions .button,
main.coach-standard-page > .page-header .page-actions .button,
main[class*="coach-"] > .coach-standard-header .page-actions .button,
main[class*="coach-"] > .page-header .page-actions .button,
.coach-training-setup-page > .coach-standard-header .page-actions .button,
.coach-training-setup-page > .page-header .page-actions .button,
.coach-athlete-progress-page > .coach-standard-header .page-actions .button,
.coach-athlete-progress-page > .page-header .page-actions .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* Keep common page-level panels flush to the standard page width. */
main.coach-standard-page > .coach-standard-panel,
main.coach-standard-page > .panel,
main[class*="coach-"] > .coach-standard-panel,
main[class*="coach-"] > .panel,
.coach-standard-filter-bar,
.coach-standard-grid,
.coach-dashboard-summary-grid,
.coach-dashboard-grid {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 760px) {
    .coach-dashboard-page,
    .athlete-dashboard-page,
    main.coach-standard-page,
    main[class*="coach-"],
    main[class*="athlete-"],
    .training-settings-page,
    .training-tools-page,
    .training-child-page,
    .progress-page,
    .garmin-page-shell,
    .library-page-shell,
    .social-wall-page-shell,
    .notification-page-shell,
    .account-password-page,
    .training-pace-page {
        width: var(--runnerly-app-page-width-mobile) !important;
        max-width: 1280px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    main.coach-standard-page > .coach-standard-header,
    main.coach-standard-page > .page-header,
    main[class*="coach-"] > .coach-standard-header,
    main[class*="coach-"] > .page-header,
    .coach-training-setup-page > .coach-standard-header,
    .coach-training-setup-page > .page-header,
    .coach-athlete-progress-page > .coach-standard-header,
    .coach-athlete-progress-page > .page-header {
        min-height: var(--runnerly-coach-header-height-mobile) !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 16px !important;
        margin: 0 0 14px !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 18px !important;
        border-bottom-right-radius: 18px !important;
        overflow: hidden !important;
    }

    main.coach-standard-page > .coach-standard-header .page-actions,
    main.coach-standard-page > .page-header .page-actions,
    main[class*="coach-"] > .coach-standard-header .page-actions,
    main[class*="coach-"] > .page-header .page-actions,
    .coach-training-setup-page > .coach-standard-header .page-actions,
    .coach-training-setup-page > .page-header .page-actions,
    .coach-athlete-progress-page > .coach-standard-header .page-actions,
    .coach-athlete-progress-page > .page-header .page-actions {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    main.coach-standard-page > .coach-standard-header .page-actions .button,
    main.coach-standard-page > .page-header .page-actions .button,
    main[class*="coach-"] > .coach-standard-header .page-actions .button,
    main[class*="coach-"] > .page-header .page-actions .button,
    .coach-training-setup-page > .coach-standard-header .page-actions .button,
    .coach-training-setup-page > .page-header .page-actions .button,
    .coach-athlete-progress-page > .coach-standard-header .page-actions .button,
    .coach-athlete-progress-page > .page-header .page-actions .button {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 42px !important;
        padding: 8px 9px !important;
        white-space: normal !important;
        text-align: center !important;
        font-size: clamp(12px, 3.45vw, 15px) !important;
        line-height: 1.12 !important;
    }
}


/* =========================================================
   Coach mobile top-header buttons
   - Title/content sits across the top of the white header
   - Buttons sit in a compact horizontal row beneath it
   - No scrolling, no clipped labels, no full vertical stack
========================================================= */

@media (max-width: 760px) {
    main.coach-standard-page > .coach-standard-header,
    main.coach-standard-page > .page-header,
    main[class*="coach-"] > .coach-standard-header,
    main[class*="coach-"] > .page-header,
    .coach-training-setup-page > .coach-standard-header,
    .coach-training-setup-page > .page-header,
    .coach-athlete-progress-page > .coach-standard-header,
    .coach-athlete-progress-page > .page-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
        align-items: stretch !important;
        overflow: hidden !important;
    }

    main.coach-standard-page > .coach-standard-header > div:first-child,
    main.coach-standard-page > .page-header > div:first-child,
    main[class*="coach-"] > .coach-standard-header > div:first-child,
    main[class*="coach-"] > .page-header > div:first-child,
    .coach-training-setup-page > .coach-standard-header > div:first-child,
    .coach-training-setup-page > .page-header > div:first-child,
    .coach-athlete-progress-page > .coach-standard-header > div:first-child,
    .coach-athlete-progress-page > .page-header > div:first-child {
        width: 100% !important;
        min-width: 0 !important;
        display: block !important;
    }

    main.coach-standard-page > .coach-standard-header h1,
    main.coach-standard-page > .page-header h1,
    main[class*="coach-"] > .coach-standard-header h1,
    main[class*="coach-"] > .page-header h1,
    .coach-training-setup-page > .coach-standard-header h1,
    .coach-training-setup-page > .page-header h1,
    .coach-athlete-progress-page > .coach-standard-header h1,
    .coach-athlete-progress-page > .page-header h1 {
        font-size: clamp(24px, 7.5vw, 32px) !important;
        line-height: 1.08 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    main.coach-standard-page > .coach-standard-header .muted,
    main.coach-standard-page > .page-header .muted,
    main[class*="coach-"] > .coach-standard-header .muted,
    main[class*="coach-"] > .page-header .muted,
    .coach-training-setup-page > .coach-standard-header .muted,
    .coach-training-setup-page > .page-header .muted,
    .coach-athlete-progress-page > .coach-standard-header .muted,
    .coach-athlete-progress-page > .page-header .muted {
        font-size: clamp(13px, 3.7vw, 15px) !important;
        line-height: 1.35 !important;
        max-width: 100% !important;
    }

    main.coach-standard-page > .coach-standard-header .page-actions,
    main.coach-standard-page > .page-header .page-actions,
    main[class*="coach-"] > .coach-standard-header .page-actions,
    main[class*="coach-"] > .page-header .page-actions,
    .coach-training-setup-page > .coach-standard-header .page-actions,
    .coach-training-setup-page > .page-header .page-actions,
    .coach-athlete-progress-page > .coach-standard-header .page-actions,
    .coach-athlete-progress-page > .page-header .page-actions {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    main.coach-standard-page > .coach-standard-header .page-actions .button,
    main.coach-standard-page > .page-header .page-actions .button,
    main[class*="coach-"] > .coach-standard-header .page-actions .button,
    main[class*="coach-"] > .page-header .page-actions .button,
    .coach-training-setup-page > .coach-standard-header .page-actions .button,
    .coach-training-setup-page > .page-header .page-actions .button,
    .coach-athlete-progress-page > .coach-standard-header .page-actions .button,
    .coach-athlete-progress-page > .page-header .page-actions .button {
        flex: 1 1 calc(50% - 4px) !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 44px !important;
        padding: 8px 9px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 10px !important;
        font-size: clamp(12px, 3.45vw, 15px) !important;
        line-height: 1.12 !important;
        text-align: center !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    /* One action can use the full row. */
    main.coach-standard-page > .coach-standard-header .page-actions .button:only-child,
    main.coach-standard-page > .page-header .page-actions .button:only-child,
    main[class*="coach-"] > .coach-standard-header .page-actions .button:only-child,
    main[class*="coach-"] > .page-header .page-actions .button:only-child,
    .coach-training-setup-page > .coach-standard-header .page-actions .button:only-child,
    .coach-training-setup-page > .page-header .page-actions .button:only-child,
    .coach-athlete-progress-page > .coach-standard-header .page-actions .button:only-child,
    .coach-athlete-progress-page > .page-header .page-actions .button:only-child {
        flex-basis: 100% !important;
    }

    /* Three actions: first two share the row, the third gets a readable full-width row. */
    main.coach-standard-page > .coach-standard-header .page-actions .button:first-child:nth-last-child(3) ~ .button:last-child,
    main.coach-standard-page > .page-header .page-actions .button:first-child:nth-last-child(3) ~ .button:last-child,
    main[class*="coach-"] > .coach-standard-header .page-actions .button:first-child:nth-last-child(3) ~ .button:last-child,
    main[class*="coach-"] > .page-header .page-actions .button:first-child:nth-last-child(3) ~ .button:last-child,
    .coach-training-setup-page > .coach-standard-header .page-actions .button:first-child:nth-last-child(3) ~ .button:last-child,
    .coach-training-setup-page > .page-header .page-actions .button:first-child:nth-last-child(3) ~ .button:last-child,
    .coach-athlete-progress-page > .coach-standard-header .page-actions .button:first-child:nth-last-child(3) ~ .button:last-child,
    .coach-athlete-progress-page > .page-header .page-actions .button:first-child:nth-last-child(3) ~ .button:last-child {
        flex-basis: 100% !important;
    }
}

@media (max-width: 380px) {
    main.coach-standard-page > .coach-standard-header .page-actions,
    main.coach-standard-page > .page-header .page-actions,
    main[class*="coach-"] > .coach-standard-header .page-actions,
    main[class*="coach-"] > .page-header .page-actions,
    .coach-training-setup-page > .coach-standard-header .page-actions,
    .coach-training-setup-page > .page-header .page-actions,
    .coach-athlete-progress-page > .coach-standard-header .page-actions,
    .coach-athlete-progress-page > .page-header .page-actions {
        gap: 7px !important;
    }

    main.coach-standard-page > .coach-standard-header .page-actions .button,
    main.coach-standard-page > .page-header .page-actions .button,
    main[class*="coach-"] > .coach-standard-header .page-actions .button,
    main[class*="coach-"] > .page-header .page-actions .button,
    .coach-training-setup-page > .coach-standard-header .page-actions .button,
    .coach-training-setup-page > .page-header .page-actions .button,
    .coach-athlete-progress-page > .coach-standard-header .page-actions .button,
    .coach-athlete-progress-page > .page-header .page-actions .button {
        min-height: 42px !important;
        padding: 7px 7px !important;
        font-size: clamp(11px, 3.3vw, 13px) !important;
    }
}


/* =========================================================
   Coach account background
   - Athletes keep the existing light/cyan feel
   - Coach pages get a subtle sage-tinted workspace
========================================================= */

body.coach-account {
    background:
        radial-gradient(circle at top left, rgba(220, 238, 221, 0.75), transparent 34rem),
        linear-gradient(180deg, #f3f7f1 0%, #eef5ee 100%) !important;
}

body.athlete-account {
    background: #f4f6f8;
}

/* Keep content cards clean on the sage workspace. */
body.coach-account .panel,
body.coach-account .coach-standard-panel,
body.coach-account .coach-standard-header,
body.coach-account .page-header,
body.coach-account .summary-card,
body.coach-account .training-settings-summary-grid,
body.coach-account .training-settings-card,
body.coach-account .progress-summary-card,
body.coach-account .progress-chart-card {
    background-color: #ffffff;
}

/* Very subtle sage treatment for secondary coach surfaces only. */
body.coach-account .coach-dashboard-summary-card,
body.coach-account .training-settings-summary-card,
body.coach-account .target-summary-card {
    background: #f8fbf7 !important;
}

/* Prevent the sage tint from affecting the navy navigation. */
body.coach-account .app-header {
    background: #111827 !important;
}


/* =========================================================
   Coach sage background visibility fix
   - Stronger cache-bumped styling
   - Applies to html/body and page wrappers, not just body
========================================================= */

html:has(body.coach-account),
body.coach-account {
    background:
        radial-gradient(circle at 0 0, rgba(205, 227, 203, 0.95), transparent 34rem),
        linear-gradient(180deg, #eef6ec 0%, #e8f2e7 100%) !important;
    background-attachment: fixed !important;
}

/* Coach page shells must be transparent so the sage workspace can show through. */
body.coach-account main,
body.coach-account .coach-dashboard-page,
body.coach-account .coach-standard-page,
body.coach-account .training-settings-page,
body.coach-account .training-tools-page,
body.coach-account .training-child-page,
body.coach-account .progress-page,
body.coach-account .garmin-page-shell,
body.coach-account .library-page-shell,
body.coach-account .social-wall-page-shell,
body.coach-account .notification-page-shell,
body.coach-account .account-password-page,
body.coach-account .training-pace-page {
    background: transparent !important;
}

/* Keep actual cards/panels white against the sage page background. */
body.coach-account .panel,
body.coach-account .coach-standard-panel,
body.coach-account .coach-standard-header,
body.coach-account .page-header,
body.coach-account .summary-card,
body.coach-account .coach-dashboard-summary-card,
body.coach-account .coach-dashboard-card,
body.coach-account .training-settings-summary-grid,
body.coach-account .training-settings-card,
body.coach-account .progress-summary-card,
body.coach-account .progress-chart-card,
body.coach-account .library-card,
body.coach-account .notification-card,
body.coach-account .social-post-card {
    background-color: #ffffff !important;
}

/* Secondary cards get only a very light sage tint. */
body.coach-account .coach-dashboard-summary-card,
body.coach-account .training-settings-summary-card,
body.coach-account .target-summary-card,
body.coach-account .settings-mobile-card {
    background: #f7fbf5 !important;
}

/* Athlete account remains on the existing neutral background. */
html:has(body.athlete-account),
body.athlete-account {
    background: #f4f6f8 !important;
}


/* =========================================================
   Activity Intelligence cards
========================================================= */

.runnerly-intelligence-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.runnerly-intelligence-grid > div {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.runnerly-intelligence-grid span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.runnerly-intelligence-grid strong {
    display: block;
    color: #111827;
    font-size: 16px;
    line-height: 1.35;
}

.runnerly-intelligence-note {
    display: grid;
    gap: 4px;
    margin: 14px 0;
    padding: 13px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
    color: #1e3a8a;
}

.runnerly-intelligence-note strong {
    color: #1e40af;
}

.runnerly-intelligence-note span {
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .runnerly-intelligence-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .runnerly-intelligence-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   Planned vs Actual
========================================================= */

.planned-actual-summary-grid {
    margin-bottom: 18px;
}

.planned-actual-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.planned-actual-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.planned-actual-table th,
.planned-actual-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.planned-actual-table th {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #f8fafc;
}

.planned-actual-table td strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.3;
}

.planned-actual-table td span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.badge.risk-high,
.risk-high .badge {
    background: #fee2e2;
    color: #991b1b;
}

.badge.risk-moderate,
.risk-moderate .badge {
    background: #fef3c7;
    color: #92400e;
}

.badge.risk-low,
.risk-low .badge {
    background: #dcfce7;
    color: #166534;
}

.badge.risk-neutral,
.risk-neutral .badge {
    background: #e5e7eb;
    color: #374151;
}

.coach-dashboard-summary-card[href],
.athlete-dashboard-summary-card[href] {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 760px) {
    .planned-actual-table th,
    .planned-actual-table td {
        padding: 11px 10px;
    }

    .planned-actual-table {
        min-width: 840px;
    }
}


/* =========================================================
   Activity matching
========================================================= */

.badge.badge-success,
.badge.match-matched {
    background: #dcfce7;
    color: #166534;
}

.badge.badge-warning,
.badge.match-candidate {
    background: #fef3c7;
    color: #92400e;
}

.badge.badge-danger,
.badge.match-unmatched {
    background: #fee2e2;
    color: #991b1b;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.coach-activity-imports-summary-grid,
.athlete-activity-import-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}


/* =========================================================
   Mobile date selector sizing
   - Date inputs should not dominate action rows on mobile
   - In move/reschedule rows, the date input and action button share width
   - Applies project-wide to mobile screens only
========================================================= */

@media (max-width: 760px) {
    input[type="date"],
    input[type="datetime-local"],
    .form-control[type="date"],
    .form-control[type="datetime-local"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 8px 9px !important;
        font-size: 14px !important;
        line-height: 1.15 !important;
        box-sizing: border-box !important;
    }

    /*
     * Calendar/mobile move rows commonly contain a date input and a Move button.
     * Force these rows into balanced columns so the date picker is the same
     * visual size as the button beside it.
     */
    .mobile-move-row,
    .mobile-workout-move-row,
    .calendar-mobile-move-row,
    .workout-mobile-move-row,
    .reschedule-row,
    .move-row,
    .workout-move-controls,
    .calendar-move-controls,
    .mobile-workout-actions,
    .workout-card-actions,
    .calendar-card-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .mobile-move-row input[type="date"],
    .mobile-workout-move-row input[type="date"],
    .calendar-mobile-move-row input[type="date"],
    .workout-mobile-move-row input[type="date"],
    .reschedule-row input[type="date"],
    .move-row input[type="date"],
    .workout-move-controls input[type="date"],
    .calendar-move-controls input[type="date"],
    .mobile-workout-actions input[type="date"],
    .workout-card-actions input[type="date"],
    .calendar-card-actions input[type="date"],
    .mobile-move-row button,
    .mobile-workout-move-row button,
    .calendar-mobile-move-row button,
    .workout-mobile-move-row button,
    .reschedule-row button,
    .move-row button,
    .workout-move-controls button,
    .calendar-move-controls button,
    .mobile-workout-actions button,
    .workout-card-actions button,
    .calendar-card-actions button,
    .mobile-move-row .button,
    .mobile-workout-move-row .button,
    .calendar-mobile-move-row .button,
    .workout-mobile-move-row .button,
    .reschedule-row .button,
    .move-row .button,
    .workout-move-controls .button,
    .calendar-move-controls .button,
    .mobile-workout-actions .button,
    .workout-card-actions .button,
    .calendar-card-actions .button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 8px 9px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 14px !important;
        line-height: 1.15 !important;
        white-space: normal !important;
        box-sizing: border-box !important;
    }

    /*
     * When a label or helper text sits above the controls, let it span the
     * full row but keep the input/button pair aligned underneath.
     */
    .mobile-move-row label,
    .mobile-workout-move-row label,
    .calendar-mobile-move-row label,
    .workout-mobile-move-row label,
    .reschedule-row label,
    .move-row label,
    .workout-move-controls label,
    .calendar-move-controls label,
    .mobile-workout-actions label,
    .workout-card-actions label,
    .calendar-card-actions label,
    .mobile-move-row .muted,
    .mobile-workout-move-row .muted,
    .calendar-mobile-move-row .muted,
    .workout-mobile-move-row .muted,
    .reschedule-row .muted,
    .move-row .muted,
    .workout-move-controls .muted,
    .calendar-move-controls .muted,
    .mobile-workout-actions .muted,
    .workout-card-actions .muted,
    .calendar-card-actions .muted {
        grid-column: 1 / -1 !important;
    }

    /*
     * Date fields inside general forms should align with other compact controls,
     * rather than using the browser's wider native control width.
     */
    .form-row input[type="date"],
    .form-grid input[type="date"],
    .form-group input[type="date"],
    .coach-standard-filter-bar input[type="date"],
    .filter-bar input[type="date"],
    .calendar-filters input[type="date"],
    .date-filter input[type="date"] {
        max-width: 100% !important;
    }
}

@media (max-width: 380px) {
    input[type="date"],
    input[type="datetime-local"],
    .form-control[type="date"],
    .form-control[type="datetime-local"] {
        height: 40px !important;
        min-height: 40px !important;
        padding: 7px 7px !important;
        font-size: 13px !important;
    }

    .mobile-move-row input[type="date"],
    .mobile-workout-move-row input[type="date"],
    .calendar-mobile-move-row input[type="date"],
    .workout-mobile-move-row input[type="date"],
    .reschedule-row input[type="date"],
    .move-row input[type="date"],
    .workout-move-controls input[type="date"],
    .calendar-move-controls input[type="date"],
    .mobile-workout-actions input[type="date"],
    .workout-card-actions input[type="date"],
    .calendar-card-actions input[type="date"],
    .mobile-move-row button,
    .mobile-workout-move-row button,
    .calendar-mobile-move-row button,
    .workout-mobile-move-row button,
    .reschedule-row button,
    .move-row button,
    .workout-move-controls button,
    .calendar-move-controls button,
    .mobile-workout-actions button,
    .workout-card-actions button,
    .calendar-card-actions button,
    .mobile-move-row .button,
    .mobile-workout-move-row .button,
    .calendar-mobile-move-row .button,
    .workout-mobile-move-row .button,
    .reschedule-row .button,
    .move-row .button,
    .workout-move-controls .button,
    .calendar-move-controls .button,
    .mobile-workout-actions .button,
    .workout-card-actions .button,
    .calendar-card-actions .button {
        height: 40px !important;
        min-height: 40px !important;
        padding: 7px 7px !important;
        font-size: 13px !important;
    }
}


/* =========================================================
   Smaller mobile date selector correction
   - On narrow screens, keep date + Move stacked vertically
   - Prevent native date inputs becoming wider than buttons/selects
========================================================= */

@media (max-width: 520px) {
    input[type="date"],
    input[type="datetime-local"],
    select,
    .form-control[type="date"],
    .form-control[type="datetime-local"] {
        display: block !important;
        width: 100% !important;
        inline-size: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 8px 10px !important;
        font-size: 14px !important;
        line-height: 1.15 !important;
        box-sizing: border-box !important;
    }

    /*
     * Smaller phones need move/reschedule controls stacked. The previous
     * 2-column layout works on wider mobiles, but on narrow screens the native
     * date control has too much intrinsic width and squeezes the Move button.
     */
    .mobile-move-row,
    .mobile-workout-move-row,
    .calendar-mobile-move-row,
    .workout-mobile-move-row,
    .reschedule-row,
    .move-row,
    .workout-move-controls,
    .calendar-move-controls {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 8px !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /*
     * Do not force every workout action row into a two-column grid on narrow
     * phones. Only the date/move pair should stack; other action buttons can
     * wrap naturally without making the date picker oversized.
     */
    .mobile-workout-actions,
    .workout-card-actions,
    .calendar-card-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .mobile-move-row input[type="date"],
    .mobile-workout-move-row input[type="date"],
    .calendar-mobile-move-row input[type="date"],
    .workout-mobile-move-row input[type="date"],
    .reschedule-row input[type="date"],
    .move-row input[type="date"],
    .workout-move-controls input[type="date"],
    .calendar-move-controls input[type="date"],
    .mobile-workout-actions input[type="date"],
    .workout-card-actions input[type="date"],
    .calendar-card-actions input[type="date"],
    .mobile-move-row select,
    .mobile-workout-move-row select,
    .calendar-mobile-move-row select,
    .workout-mobile-move-row select,
    .reschedule-row select,
    .move-row select,
    .workout-move-controls select,
    .calendar-move-controls select,
    .mobile-workout-actions select,
    .workout-card-actions select,
    .calendar-card-actions select,
    .mobile-move-row button,
    .mobile-workout-move-row button,
    .calendar-mobile-move-row button,
    .workout-mobile-move-row button,
    .reschedule-row button,
    .move-row button,
    .workout-move-controls button,
    .calendar-move-controls button,
    .mobile-workout-actions button,
    .workout-card-actions button,
    .calendar-card-actions button,
    .mobile-move-row .button,
    .mobile-workout-move-row .button,
    .calendar-mobile-move-row .button,
    .workout-mobile-move-row .button,
    .reschedule-row .button,
    .move-row .button,
    .workout-move-controls .button,
    .calendar-move-controls .button,
    .mobile-workout-actions .button,
    .workout-card-actions .button,
    .calendar-card-actions .button {
        display: flex !important;
        width: 100% !important;
        inline-size: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 42px !important;
        min-height: 42px !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 10px !important;
        box-sizing: border-box !important;
    }

    .mobile-move-row input[type="date"],
    .mobile-workout-move-row input[type="date"],
    .calendar-mobile-move-row input[type="date"],
    .workout-mobile-move-row input[type="date"],
    .reschedule-row input[type="date"],
    .move-row input[type="date"],
    .workout-move-controls input[type="date"],
    .calendar-move-controls input[type="date"],
    .mobile-workout-actions input[type="date"],
    .workout-card-actions input[type="date"],
    .calendar-card-actions input[type="date"] {
        -webkit-appearance: none !important;
        appearance: none !important;
        text-align: left !important;
    }

    .mobile-move-row > *,
    .mobile-workout-move-row > *,
    .calendar-mobile-move-row > *,
    .workout-mobile-move-row > *,
    .reschedule-row > *,
    .move-row > *,
    .workout-move-controls > *,
    .calendar-move-controls > * {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 380px) {
    input[type="date"],
    input[type="datetime-local"],
    select,
    .form-control[type="date"],
    .form-control[type="datetime-local"],
    .mobile-move-row input[type="date"],
    .mobile-workout-move-row input[type="date"],
    .calendar-mobile-move-row input[type="date"],
    .workout-mobile-move-row input[type="date"],
    .reschedule-row input[type="date"],
    .move-row input[type="date"],
    .workout-move-controls input[type="date"],
    .calendar-move-controls input[type="date"],
    .mobile-workout-actions input[type="date"],
    .workout-card-actions input[type="date"],
    .calendar-card-actions input[type="date"],
    .mobile-move-row button,
    .mobile-workout-move-row button,
    .calendar-mobile-move-row button,
    .workout-mobile-move-row button,
    .reschedule-row button,
    .move-row button,
    .workout-move-controls button,
    .calendar-move-controls button,
    .mobile-workout-actions button,
    .workout-card-actions button,
    .calendar-card-actions button,
    .mobile-move-row .button,
    .mobile-workout-move-row .button,
    .calendar-mobile-move-row .button,
    .workout-mobile-move-row .button,
    .reschedule-row .button,
    .move-row .button,
    .workout-move-controls .button,
    .calendar-move-controls .button,
    .mobile-workout-actions .button,
    .workout-card-actions .button,
    .calendar-card-actions .button {
        height: 40px !important;
        min-height: 40px !important;
        padding: 7px 9px !important;
        font-size: 13px !important;
    }
}


/* =========================================================
   Calendar mobile Move To layout correction
   - The Move To control uses .calendar-mobile-date-action
   - It must stack date input above Move button on all mobile calendar views
   - Date input and button must share the same width
========================================================= */

@media (max-width: 900px) {
    .calendar-mobile-date-action {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-auto-flow: row !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        align-items: stretch !important;
        justify-items: stretch !important;
    }

    .calendar-mobile-date-action span,
    .calendar-mobile-date-action input[type="date"],
    .calendar-mobile-date-action button,
    .calendar-mobile-date-action .button {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        inline-size: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .calendar-mobile-date-action input[type="date"],
    .calendar-mobile-date-action button,
    .calendar-mobile-date-action .button {
        display: flex !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 8px 10px !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 14px !important;
        line-height: 1.15 !important;
        border-radius: 10px !important;
        flex: none !important;
    }

    .calendar-mobile-date-action input[type="date"] {
        -webkit-appearance: none !important;
        appearance: none !important;
        text-align: center !important;
    }

    .coach-mobile-agenda-actions .calendar-mobile-date-action,
    .athlete-mobile-agenda-actions .calendar-mobile-date-action {
        flex: 0 0 100% !important;
        align-self: stretch !important;
    }

    .coach-mobile-agenda-actions .calendar-mobile-date-action + .button,
    .athlete-mobile-agenda-actions .calendar-mobile-date-action + .button {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

@media (max-width: 520px) {
    .calendar-mobile-date-action input[type="date"],
    .calendar-mobile-date-action button,
    .calendar-mobile-date-action .button {
        height: 40px !important;
        min-height: 40px !important;
        padding: 7px 9px !important;
        font-size: 13px !important;
    }
}


/* =========================================================
   Athlete dashboard overview summary
========================================================= */

.athlete-dashboard-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.athlete-dashboard-overview-card {
    min-width: 0;
    overflow: hidden;
}

.athlete-dashboard-overview-card h2 {
    margin: 0;
    color: #111827;
    font-size: 16px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.athlete-dashboard-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.athlete-dashboard-card-header .muted {
    margin: 4px 0 0;
}

.athlete-dashboard-card-header > a {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #2563eb;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    background: #eff6ff;
}

.athlete-dashboard-chart-card {
    grid-column: span 2;
}

.athlete-dashboard-risk-card,
.athlete-dashboard-month-card {
    grid-column: span 2;
}

.athlete-dashboard-import-card,
.athlete-dashboard-training-log-card {
    grid-column: span 2;
}

.athlete-dashboard-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.athlete-dashboard-chart-legend span::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 4px;
    margin-right: 6px;
    border-radius: 999px;
    vertical-align: middle;
    background: currentColor;
}

.legend-fitness,
.legend-acute {
    color: #2563eb;
}

.legend-fatigue,
.legend-chronic {
    color: #7c3aed;
}

.legend-form {
    color: #06b6d4;
}

.athlete-dashboard-mini-chart {
    display: block;
    width: 100%;
    height: auto;
    min-height: 130px;
}

.athlete-dashboard-chart-grid {
    stroke: #e5e7eb;
    stroke-width: 1;
}

.athlete-dashboard-chart-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.athlete-dashboard-chart-line-fitness,
.athlete-dashboard-chart-line-acute {
    stroke: #2563eb;
}

.athlete-dashboard-chart-line-fatigue,
.athlete-dashboard-chart-line-chronic {
    stroke: #7c3aed;
}

.athlete-dashboard-chart-line-form {
    stroke: #06b6d4;
    stroke-dasharray: 6 6;
}

.athlete-dashboard-chart-label {
    fill: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.athlete-dashboard-chart-label-end {
    text-anchor: end;
}

.athlete-dashboard-overview-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    color: #64748b;
    font-weight: 700;
}

.athlete-dashboard-overview-footer strong {
    color: #111827;
}

.athlete-dashboard-risk-gauge {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 180px;
    text-align: center;
}

.athlete-dashboard-risk-arc {
    position: relative;
    width: min(230px, 90%);
    height: 115px;
    overflow: hidden;
}

.athlete-dashboard-risk-arc::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 180px 180px 0 0;
    background: conic-gradient(from 270deg at 50% 100%, #22c55e 0deg 58deg, #f59e0b 58deg 112deg, #ef4444 112deg 180deg, transparent 180deg 360deg);
}

.athlete-dashboard-risk-arc::after {
    content: "";
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 0;
    height: 72%;
    border-radius: 160px 160px 0 0;
    background: #ffffff;
}

.athlete-dashboard-risk-arc span {
    position: absolute;
    bottom: 8px;
    width: 45%;
    height: 6px;
    transform: translateX(-8%) rotate(-28deg);
    transform-origin: right center;
    border-radius: 999px;
    background: #111827;
    z-index: 2;
}

.athlete-dashboard-risk-card.risk-moderate .athlete-dashboard-risk-arc span {
    transform: translateX(-8%) rotate(8deg);
}

.athlete-dashboard-risk-card.risk-high .athlete-dashboard-risk-arc span {
    transform: translateX(-8%) rotate(34deg);
}

.athlete-dashboard-risk-gauge strong {
    color: #111827;
    font-size: 28px;
    line-height: 1;
}

.athlete-dashboard-risk-gauge p {
    max-width: 420px;
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.athlete-dashboard-metric-list {
    display: grid;
    gap: 10px;
}

.athlete-dashboard-metric-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #e5e7eb;
}

.athlete-dashboard-metric-list div:last-child {
    border-bottom: 0;
}

.athlete-dashboard-metric-list span,
.athlete-dashboard-week-metrics span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.athlete-dashboard-metric-list strong {
    color: #111827;
    font-size: 20px;
}

.athlete-dashboard-sync-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.athlete-dashboard-sync-grid a {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.athlete-dashboard-training-log-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 18px;
    align-items: end;
}

.athlete-dashboard-bar-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    min-height: 150px;
    align-items: end;
}

.athlete-dashboard-bar-item {
    display: grid;
    gap: 6px;
    justify-items: center;
}

.athlete-dashboard-bar-track {
    position: relative;
    width: 100%;
    height: 115px;
    border-radius: 10px;
    background: #eff6ff;
    overflow: hidden;
}

.athlete-dashboard-bar-track span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.athlete-dashboard-bar-item small {
    color: #475569;
    font-weight: 800;
}

.athlete-dashboard-week-metrics {
    display: grid;
    gap: 8px;
    padding-left: 16px;
    border-left: 1px solid #e5e7eb;
}

.athlete-dashboard-week-metrics strong {
    color: #111827;
    font-size: 16px;
}

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

    .athlete-dashboard-chart-card,
    .athlete-dashboard-risk-card,
    .athlete-dashboard-month-card,
    .athlete-dashboard-import-card,
    .athlete-dashboard-training-log-card {
        grid-column: span 1;
    }

    .athlete-dashboard-training-log-layout {
        grid-template-columns: 1fr;
    }

    .athlete-dashboard-week-metrics {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid #e5e7eb;
        padding-top: 12px;
    }
}

@media (max-width: 700px) {
    .athlete-dashboard-overview-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .athlete-dashboard-sync-grid {
        grid-template-columns: 1fr;
    }

    .athlete-dashboard-risk-gauge {
        min-height: 160px;
    }

    .athlete-dashboard-risk-arc {
        width: min(210px, 94%);
        height: 105px;
    }

    .athlete-dashboard-metric-list strong {
        font-size: 18px;
    }
}


/* =========================================================
   Athlete dashboard injury gauge correction
   - Use a clean SVG-like CSS gauge rather than the earlier oversized arc
   - Needle stays within the dial on all dashboard card sizes
========================================================= */

.athlete-dashboard-risk-gauge {
    display: grid !important;
    place-items: center !important;
    gap: 8px !important;
    min-height: 190px !important;
    text-align: center !important;
}

.athlete-dashboard-risk-arc {
    position: relative !important;
    width: min(260px, 92%) !important;
    aspect-ratio: 2 / 1 !important;
    height: auto !important;
    overflow: hidden !important;
    margin: 2px auto 0 !important;
}

.athlete-dashboard-risk-arc::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 999px 999px 0 0 !important;
    background:
        conic-gradient(
            from 270deg at 50% 100%,
            #22c55e 0deg 62deg,
            #f59e0b 62deg 124deg,
            #ef4444 124deg 180deg,
            transparent 180deg 360deg
        ) !important;
}

.athlete-dashboard-risk-arc::after {
    content: "" !important;
    position: absolute !important;
    left: 16% !important;
    right: 16% !important;
    bottom: 0 !important;
    height: 68% !important;
    border-radius: 999px 999px 0 0 !important;
    background: #ffffff !important;
    z-index: 1 !important;
}

/* Centre cap */
.athlete-dashboard-risk-arc .gauge-cap,
.athlete-dashboard-risk-arc em {
    position: absolute !important;
    left: 50% !important;
    bottom: 0 !important;
    width: 14px !important;
    height: 14px !important;
    transform: translate(-50%, 50%) !important;
    border-radius: 999px !important;
    background: #111827 !important;
    z-index: 4 !important;
}

/*
 * Existing markup uses a span for the needle. Keep it fully inside the arc.
 * Low/moderate/high classes rotate it to the correct section.
 */
.athlete-dashboard-risk-arc > span {
    position: absolute !important;
    left: 50% !important;
    bottom: 2px !important;
    width: 40% !important;
    max-width: 112px !important;
    height: 7px !important;
    transform-origin: 0 50% !important;
    transform: rotate(205deg) !important;
    border-radius: 999px !important;
    background: #111827 !important;
    z-index: 3 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25) !important;
}

.athlete-dashboard-risk-card.risk-low .athlete-dashboard-risk-arc > span {
    transform: rotate(205deg) !important;
}

.athlete-dashboard-risk-card.risk-moderate .athlete-dashboard-risk-arc > span {
    transform: rotate(270deg) !important;
}

.athlete-dashboard-risk-card.risk-high .athlete-dashboard-risk-arc > span {
    transform: rotate(333deg) !important;
}

.athlete-dashboard-risk-gauge strong {
    margin-top: -2px !important;
}

@media (max-width: 700px) {
    .athlete-dashboard-risk-gauge {
        min-height: 170px !important;
    }

    .athlete-dashboard-risk-arc {
        width: min(230px, 94%) !important;
    }

    .athlete-dashboard-risk-arc > span {
        height: 6px !important;
        max-width: 98px !important;
    }
}


/* =========================================================
   Social wall width final alignment
   - Match the weekly-plan.php visual width
   - Earlier rule widened Social wall to 1280px; weekly-plan visual
     content is using the narrower 1240px rhythm on desktop.
========================================================= */

.social-wall-page,
.social-wall-page-shell,
.athlete-social-wall-page,
main.social-wall-page,
main.social-wall-page-shell,
main.athlete-social-wall-page,
main[class*="social-wall"] {
    width: min(100% - 32px, 1240px) !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

.social-wall-page > .page-header,
.social-wall-page-shell > .page-header,
.athlete-social-wall-page > .page-header,
main.social-wall-page > .page-header,
main.social-wall-page-shell > .page-header,
main.athlete-social-wall-page > .page-header,
main[class*="social-wall"] > .page-header,
.social-wall-page > .coach-standard-header,
.social-wall-page-shell > .coach-standard-header,
.athlete-social-wall-page > .coach-standard-header,
main.social-wall-page > .coach-standard-header,
main.social-wall-page-shell > .coach-standard-header,
main.athlete-social-wall-page > .coach-standard-header,
main[class*="social-wall"] > .coach-standard-header {
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

.social-wall-page > section,
.social-wall-page-shell > section,
.athlete-social-wall-page > section,
main.social-wall-page > section,
main.social-wall-page-shell > section,
main.athlete-social-wall-page > section,
main[class*="social-wall"] > section,
.social-wall-page > .panel,
.social-wall-page-shell > .panel,
.athlete-social-wall-page > .panel,
main.social-wall-page > .panel,
main.social-wall-page-shell > .panel,
main.athlete-social-wall-page > .panel,
main[class*="social-wall"] > .panel,
.social-wall-summary-grid,
.social-compose-panel,
.social-feed {
    width: 100% !important;
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

@media (max-width: 760px) {
    .social-wall-page,
    .social-wall-page-shell,
    .athlete-social-wall-page,
    main.social-wall-page,
    main.social-wall-page-shell,
    main.athlete-social-wall-page,
    main[class*="social-wall"] {
        width: min(100% - 20px, 1240px) !important;
        max-width: 1240px !important;
    }

    .social-wall-page > .page-header,
    .social-wall-page-shell > .page-header,
    .athlete-social-wall-page > .page-header,
    main.social-wall-page > .page-header,
    main.social-wall-page-shell > .page-header,
    main.athlete-social-wall-page > .page-header,
    main[class*="social-wall"] > .page-header,
    .social-wall-page > .coach-standard-header,
    .social-wall-page-shell > .coach-standard-header,
    .athlete-social-wall-page > .coach-standard-header,
    main.social-wall-page > .coach-standard-header,
    main.social-wall-page-shell > .coach-standard-header,
    main.athlete-social-wall-page > .coach-standard-header,
    main[class*="social-wall"] > .coach-standard-header {
        max-width: 100% !important;
    }
}


/* =========================================================
   Coach social wall width alignment
   - Athlete social wall keeps the narrower weekly-plan rhythm
   - Coach social wall uses the same width as the other coach pages
========================================================= */

body.coach-account .social-wall-page,
body.coach-account .social-wall-page-shell,
body.coach-account .coach-social-wall-page,
body.coach-account main.social-wall-page,
body.coach-account main.social-wall-page-shell,
body.coach-account main.coach-social-wall-page,
body.coach-account main[class*="social-wall"] {
    width: var(--runnerly-app-page-width, min(100% - 32px, 1280px)) !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

body.coach-account .social-wall-page > .page-header,
body.coach-account .social-wall-page-shell > .page-header,
body.coach-account .coach-social-wall-page > .page-header,
body.coach-account main.social-wall-page > .page-header,
body.coach-account main.social-wall-page-shell > .page-header,
body.coach-account main.coach-social-wall-page > .page-header,
body.coach-account main[class*="social-wall"] > .page-header,
body.coach-account .social-wall-page > .coach-standard-header,
body.coach-account .social-wall-page-shell > .coach-standard-header,
body.coach-account .coach-social-wall-page > .coach-standard-header,
body.coach-account main.social-wall-page > .coach-standard-header,
body.coach-account main.social-wall-page-shell > .coach-standard-header,
body.coach-account main.coach-social-wall-page > .coach-standard-header,
body.coach-account main[class*="social-wall"] > .coach-standard-header {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

body.coach-account .social-wall-page > section,
body.coach-account .social-wall-page-shell > section,
body.coach-account .coach-social-wall-page > section,
body.coach-account main.social-wall-page > section,
body.coach-account main.social-wall-page-shell > section,
body.coach-account main.coach-social-wall-page > section,
body.coach-account main[class*="social-wall"] > section,
body.coach-account .social-wall-page > .panel,
body.coach-account .social-wall-page-shell > .panel,
body.coach-account .coach-social-wall-page > .panel,
body.coach-account main.social-wall-page > .panel,
body.coach-account main.social-wall-page-shell > .panel,
body.coach-account main.coach-social-wall-page > .panel,
body.coach-account main[class*="social-wall"] > .panel,
body.coach-account .social-wall-summary-grid,
body.coach-account .social-compose-panel,
body.coach-account .social-feed {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

@media (max-width: 760px) {
    body.coach-account .social-wall-page,
    body.coach-account .social-wall-page-shell,
    body.coach-account .coach-social-wall-page,
    body.coach-account main.social-wall-page,
    body.coach-account main.social-wall-page-shell,
    body.coach-account main.coach-social-wall-page,
    body.coach-account main[class*="social-wall"] {
        width: var(--runnerly-app-page-width-mobile, min(100% - 20px, 1280px)) !important;
        max-width: 1280px !important;
    }

    body.coach-account .social-wall-page > .page-header,
    body.coach-account .social-wall-page-shell > .page-header,
    body.coach-account .coach-social-wall-page > .page-header,
    body.coach-account main.social-wall-page > .page-header,
    body.coach-account main.social-wall-page-shell > .page-header,
    body.coach-account main.coach-social-wall-page > .page-header,
    body.coach-account main[class*="social-wall"] > .page-header,
    body.coach-account .social-wall-page > .coach-standard-header,
    body.coach-account .social-wall-page-shell > .coach-standard-header,
    body.coach-account .coach-social-wall-page > .coach-standard-header,
    body.coach-account main.social-wall-page > .coach-standard-header,
    body.coach-account main.social-wall-page-shell > .coach-standard-header,
    body.coach-account main.coach-social-wall-page > .coach-standard-header,
    body.coach-account main[class*="social-wall"] > .coach-standard-header {
        max-width: 100% !important;
    }
}


/* =========================================================
   Delete actions for templates, blocks and plans
========================================================= */

.inline-delete-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.button-danger,
.button.button-danger,
button.button-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

.button-danger:hover,
.button.button-danger:hover,
button.button-danger:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
}

.coach-standard-row-actions .inline-delete-form,
.page-actions .inline-delete-form {
    margin: 0;
}

.training-block-card .inline-delete-form {
    margin-top: 14px;
}

@media (max-width: 760px) {
    .coach-standard-row-actions .inline-delete-form,
    .page-actions .inline-delete-form,
    .training-block-card .inline-delete-form {
        width: 100%;
    }

    .coach-standard-row-actions .inline-delete-form .button,
    .page-actions .inline-delete-form .button,
    .training-block-card .inline-delete-form .button {
        width: 100%;
    }
}


/* =========================================================
   Coach library upload athlete access tidy-up
   - Overrides the generic .library-upload-form label grid rule
   - Keeps checkbox, athlete name and email aligned in one compact card
========================================================= */

.library-upload-form .library-checkbox-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 10px !important;
}

.library-upload-form .library-checkbox-card {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    min-height: 0 !important;
    padding: 11px 13px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}

.library-upload-form .library-checkbox-card input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    flex: 0 0 16px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    accent-color: #2563eb !important;
    align-self: flex-start !important;
}

.library-upload-form .library-checkbox-card span {
    display: grid !important;
    gap: 2px !important;
    min-width: 0 !important;
    line-height: 1.25 !important;
}

.library-upload-form .library-checkbox-card strong {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
}

.library-upload-form .library-checkbox-card small {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
}

.library-upload-form .library-checkbox-card:hover {
    border-color: #93c5fd !important;
    background: #ffffff !important;
}

@media (max-width: 640px) {
    .library-upload-form .library-checkbox-grid {
        grid-template-columns: 1fr !important;
    }

    .library-upload-form .library-checkbox-card {
        padding: 10px 12px !important;
    }
}


/* =========================================================
   Coach calendar copy/delete week mobile date sizing
   - Make date boxes match the visual height of other controls
   - Stops iOS/Safari native date controls becoming oversized
========================================================= */

@media (max-width: 900px) {
    .calendar-copy-week-form .calendar-copy-week-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .calendar-copy-week-form label {
        display: grid !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
    }

    .calendar-copy-week-form input[type="date"] {
        display: flex !important;
        width: 100% !important;
        inline-size: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        padding: 9px 12px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
        text-align: center !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    .calendar-copy-week-form input[type="date"]::-webkit-date-and-time-value {
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }

    .calendar-copy-week-form input[type="date"]::-webkit-calendar-picker-indicator {
        width: 18px !important;
        height: 18px !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 0 18px !important;
    }

    .calendar-copy-week-form .button {
        min-height: 44px !important;
        height: 44px !important;
        padding: 9px 12px !important;
        border-radius: 12px !important;
        font-size: 15px !important;
        line-height: 1.1 !important;
    }
}

@media (max-width: 420px) {
    .calendar-copy-week-form input[type="date"],
    .calendar-copy-week-form .button {
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        padding: 8px 10px !important;
        font-size: 14px !important;
    }
}


/* =========================================================
   Garmin selectable import period
========================================================= */

.garmin-period-action-row {
    align-items: flex-end;
    flex-wrap: wrap;
}

.garmin-period-sync-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin: 0;
}

.garmin-period-sync-form label {
    display: grid;
    gap: 6px;
    min-width: 190px;
    margin: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.garmin-period-sync-form select {
    min-height: 42px;
    border-radius: 10px;
}

.garmin-period-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.garmin-period-sync-form-compact {
    padding: 0;
}

@media (max-width: 700px) {
    .garmin-period-sync-form,
    .garmin-period-buttons,
    .garmin-period-sync-form label,
    .garmin-period-sync-form .button,
    .garmin-period-action-row > .inline-form,
    .garmin-period-action-row > .inline-form .button {
        width: 100%;
    }

    .garmin-period-sync-form label {
        min-width: 0;
    }
}


/* =========================================================
   Garmin period controls alignment
   - Keeps import period select and action buttons aligned neatly
========================================================= */

.garmin-period-action-row {
    display: flex !important;
    align-items: flex-end !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.garmin-period-sync-form {
    display: flex !important;
    align-items: flex-end !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
}

.garmin-period-sync-form label {
    display: grid !important;
    gap: 5px !important;
    min-width: 220px !important;
    margin: 0 !important;
    color: #111827 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

.garmin-period-sync-form select,
.garmin-period-sync-form .button,
.garmin-period-action-row > .inline-form .button {
    display: inline-flex !important;
    height: 42px !important;
    min-height: 42px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

.garmin-period-sync-form select {
    min-width: 220px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.garmin-period-buttons {
    display: flex !important;
    align-items: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.garmin-period-action-row > .inline-form {
    display: inline-flex !important;
    align-items: flex-end !important;
    margin: 0 !important;
}

.garmin-period-sync-form-compact {
    padding: 0 !important;
}

.activity-import-review-grid {
    display: grid;
    gap: 12px;
}

.activity-import-review-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
}

.activity-import-review-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #111827;
}

.activity-import-review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #64748b;
    font-size: 13px;
}

.activity-import-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .garmin-period-sync-form,
    .garmin-period-buttons,
    .garmin-period-sync-form label,
    .garmin-period-sync-form select,
    .garmin-period-sync-form .button,
    .garmin-period-action-row > .inline-form,
    .garmin-period-action-row > .inline-form .button {
        width: 100% !important;
        min-width: 0 !important;
    }

    .activity-import-review-card {
        grid-template-columns: 1fr;
    }

    .activity-import-review-actions,
    .activity-import-review-actions .inline-form,
    .activity-import-review-actions .button {
        width: 100%;
    }
}

/* =========================================================
   Runnerly public landing page
========================================================= */

.landing-page {
    min-height: calc(100vh - 140px);
}

.landing-shell {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

.landing-hero {
    background: linear-gradient(180deg, #111827 0%, #15233d 58%, #f4f6f8 58%, #f4f6f8 100%);
    color: #fff;
    padding: 36px 0 48px;
}

.landing-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: stretch;
}

.landing-eyebrow,
.landing-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #93c5fd;
}

.landing-copy h1 {
    margin: 14px 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.04;
    color: #fff;
}

.landing-lead {
    margin: 0;
    font-size: 18px;
    line-height: 1.72;
    color: rgba(255, 255, 255, 0.9);
    max-width: 760px;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.landing-actions .button {
    margin-top: 0;
}

.landing-primary-button {
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

.landing-secondary-button {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.landing-stat-card,
.landing-highlight-card,
.landing-feature-card,
.landing-journey-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.landing-stat-card {
    padding: 18px 18px 16px;
    color: #1f2937;
}

.landing-stat-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 17px;
}

.landing-stat-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.landing-highlight-card {
    padding: 24px;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.landing-highlight-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 7px 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.landing-highlight-card h2 {
    margin: 16px 0 14px;
    font-size: 30px;
    line-height: 1.15;
}

.landing-highlight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.landing-highlight-list li {
    position: relative;
    padding-left: 18px;
    color: #374151;
    line-height: 1.6;
}

.landing-highlight-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #2563eb;
}

.landing-highlight-pricing {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.landing-highlight-pricing div {
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    padding: 16px;
    background: #f8fafc;
}

.landing-highlight-pricing span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 6px;
}

.landing-highlight-pricing strong {
    font-size: 24px;
    color: #111827;
}

.landing-section {
    padding: 28px 0 56px;
}

.landing-section-heading {
    max-width: 820px;
    margin-bottom: 24px;
}

.landing-section-heading h2,
.landing-journey-grid h2 {
    margin: 10px 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    color: #111827;
}

.landing-section-heading p,
.landing-journey-grid p,
.landing-feature-content p,
.landing-journey-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.72;
    font-size: 17px;
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.landing-feature-card {
    overflow: hidden;
}

.landing-feature-visual {
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
    padding: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.landing-feature-visual img {
    display: block;
    max-width: 100%;
    max-height: 340px;
    width: auto;
    height: auto;
}

.landing-feature-content {
    padding: 26px;
}

.landing-feature-content h3,
.landing-journey-card h3 {
    margin: 0 0 12px;
    font-size: 26px;
    color: #111827;
}

.landing-feature-content ul {
    margin: 18px 0 0;
    padding-left: 20px;
    color: #374151;
    line-height: 1.65;
}

.landing-feature-content li + li {
    margin-top: 8px;
}

.landing-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.store-badge {
    height: 58px;
    width: auto;
    display: inline-block;
}

.landing-section-accent {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    border-top: 1px solid #e5e7eb;
}

.landing-journey-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: center;
}

.landing-journey-card {
    padding: 24px;
}

.landing-journey-card .button {
    margin-top: 20px;
}

@media (max-width: 1100px) {
    .landing-hero-grid,
    .landing-journey-grid,
    .landing-feature-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        background: linear-gradient(180deg, #111827 0%, #15233d 48%, #f4f6f8 48%, #f4f6f8 100%);
    }
}

@media (max-width: 900px) {
    .landing-shell {
        width: min(100% - 28px, 1200px);
    }

    .landing-stat-grid {
        grid-template-columns: 1fr;
    }

    .landing-highlight-pricing {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .landing-hero {
        padding: 24px 0 38px;
    }

    .landing-copy h1 {
        font-size: 34px;
    }

    .landing-lead,
    .landing-section-heading p,
    .landing-journey-grid p,
    .landing-feature-content p,
    .landing-journey-card p {
        font-size: 16px;
    }

    .landing-feature-visual {
        min-height: 240px;
        padding: 18px;
    }

    .landing-feature-content,
    .landing-highlight-card,
    .landing-journey-card {
        padding: 20px;
    }

    .store-badge {
        height: 52px;
    }
}

/* =========================================================
   Runnerly landing page refinement patch
========================================================= */

.landing-hero-section {
    padding: 22px 0 34px;
}

.landing-hero-section .landing-shell {
    width: min(1220px, calc(100% - 26px));
}

.landing-hero-panel {
    background: linear-gradient(135deg, #111827 0%, #14284a 100%);
    color: #fff;
    border-radius: 28px;
    padding: 34px 30px 46px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
}

.landing-copy {
    max-width: 920px;
}

.landing-copy h1 {
    margin-bottom: 20px;
}

.landing-lead {
    max-width: 900px;
    margin-bottom: 0;
}

.landing-stat-grid-centered {
    max-width: 980px;
    margin: 34px auto 0;
}

.landing-actions-centered {
    justify-content: center;
    margin-top: 22px;
}

.landing-actions-centered .button {
    min-width: 280px;
    text-align: center;
}

.landing-section-kicker {
    position: relative;
    padding-bottom: 10px;
}

.landing-section-kicker::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 72px;
    height: 2px;
    border-radius: 999px;
    background: #93c5fd;
}

.landing-feature-grid-single {
    grid-template-columns: 1fr;
    gap: 22px;
}

.landing-feature-grid-single .landing-feature-card {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    align-items: stretch;
}

.landing-feature-grid-single .landing-feature-visual {
    min-height: 100%;
}

.landing-feature-grid-single .landing-feature-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing-feature-grid-single .landing-feature-content ul {
    margin-top: 16px;
}

.landing-feature-grid-single .landing-feature-content li {
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .landing-feature-grid-single .landing-feature-card {
        grid-template-columns: 1fr;
    }

    .landing-feature-grid-single .landing-feature-content li {
        white-space: normal;
    }
}

@media (max-width: 900px) {
    .landing-hero-panel {
        padding: 26px 20px 34px;
        border-radius: 24px;
    }

    .landing-hero-section .landing-shell {
        width: min(100% - 18px, 1220px);
    }

    .landing-stat-grid-centered {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .landing-hero-section {
        padding-top: 14px;
    }

    .landing-hero-panel {
        padding: 22px 16px 28px;
        border-radius: 20px;
    }

    .landing-copy h1 {
        font-size: 32px;
    }

    .landing-stat-grid-centered {
        margin-top: 24px;
    }

    .landing-actions-centered .button {
        min-width: 0;
        width: 100%;
    }
}

/* RUNNERLY RC1 HEADER PARITY V1 BEGIN */
/* Runnerly RC1 header geometry v1: Calendar dimensions across the web site.
   Leave each page's existing header palette and branding choice untouched. */
.app-header .app-header-inner,
.public-site-header {
  box-sizing: border-box !important;
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  padding-block: 0 !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}
.app-header .app-header-inner {
  width: 100% !important;
  max-width: 1600px !important;
  margin: 0 auto !important;
  padding-inline: 24px !important;
}
.public-site-header {
  padding-inline: max(24px, calc(50vw - 800px + 24px)) !important;
  flex-direction: row !important;
  justify-content: space-between !important;
}
.app-header .brand-switch-group > .logo,
.app-header .app-logo,
.public-site-header > .logo {
  width: 180px !important;
  max-width: 180px !important;
  flex: 0 0 180px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
}
.app-header .logo img,
.public-site-header .logo img {
  display: block !important;
  width: auto !important;
  height: 38px !important;
  max-height: 38px !important;
  max-width: 162px !important;
  object-fit: contain !important;
}
.app-header .logo.runnerly-header-logo-plate,
.public-site-header .logo.runnerly-header-logo-plate {
  padding: 5px 9px !important;
  height: 48px !important;
}
.app-header .nav-toggle,
.public-site-header .public-nav,
.public-site-header .public-nav a {
  flex-shrink: 0;
}
.public-site-header .public-nav {flex-wrap: nowrap !important;}
@media(max-width:900px) {
  .app-header .app-header-inner,
  .public-site-header {
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    padding-inline: 16px !important;
  }
  .app-header .brand-switch-group > .logo,
  .app-header .app-logo,
  .public-site-header > .logo {
    width: 160px !important;
    max-width: 160px !important;
    flex-basis: 160px !important;
  }
  .app-header .logo img,
  .public-site-header .logo img {
    height: 34px !important;
    max-height: 34px !important;
    max-width: 146px !important;
  }
  .app-header .logo.runnerly-header-logo-plate,
  .public-site-header .logo.runnerly-header-logo-plate {
    height: 42px !important;
    padding: 4px 7px !important;
  }
  .app-header .primary-nav {top: 68px !important;}
}
@media(max-width:420px) {
  .app-header .app-header-inner,
  .public-site-header {
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    padding-inline: 12px !important;
  }
  .app-header .brand-switch-group > .logo,
  .app-header .app-logo,
  .public-site-header > .logo {
    width: 150px !important;
    max-width: 150px !important;
    flex-basis: 150px !important;
  }
  .app-header .primary-nav {top: 64px !important;}
}
/* RUNNERLY RC1 HEADER PARITY V1 END */

/* RUNNERLY_INLINE_CSS_MIGRATION | public header and pricing | centralized */
/* Transferred from views/layouts/header.php (block 1) */
/* Contrast plate independent of the main CSS bundle. The same blue
           image remains unfiltered on Pricing, Login and the homepage. */
        .public-site-header.runnerly-standard-header .logo.runnerly-header-logo-plate {
            display: inline-flex;
            align-items: center;
            flex: 0 0 auto;
            background: #fff;
            padding: 5px 9px;
            border-radius: 8px;
        }
        .public-site-header .logo img {
            display: block;
            width: auto;
            height: auto;
            max-width: min(180px, 42vw);
            max-height: 46px;
            object-fit: contain;
        }
        .public-site-header.runnerly-standard-header .logo.runnerly-header-logo-plate img {
            max-height: 38px;
            filter: none;
        }
        @media (max-width: 800px) {
            .public-site-header.runnerly-standard-header .logo.runnerly-header-logo-plate { padding: 4px 7px; }
            .public-site-header.runnerly-standard-header .logo.runnerly-header-logo-plate img { max-height: 34px; }
        }

/* Transferred from pricing.php (block 1) */
/* RUNNERLY PRICING LOGO LEFT ALIGNMENT V1 START */
.public-site-header.runnerly-pricing-header > a.logo {
    padding-left: 9px !important;
    box-sizing: border-box !important;
}
@media (max-width: 900px) {
    .public-site-header.runnerly-pricing-header > a.logo {
        padding-left: 7px !important;
    }
}
/* RUNNERLY PRICING LOGO LEFT ALIGNMENT V1 END */

.runnerly-pricing{max-width:1120px;margin:30px auto 80px;padding:0 18px;color:inherit}
.runnerly-pricing .intro{max-width:680px;margin:0 auto 27px;text-align:center}
.runnerly-pricing .intro h1{margin:0 0 12px;font-size:clamp(2rem,4vw,3rem)}
.runnerly-pricing .intro p{color:#64748b;line-height:1.6}
.runnerly-price-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px}
.runnerly-price-card{display:flex;flex-direction:column;padding:25px;border:1px solid #dbe3ef;border-radius:16px;background:#fff;box-shadow:0 3px 12px rgba(15,23,42,.035)}
.runnerly-price-card > *{min-width:0}
.runnerly-price-card.featured{border:2px solid #136ac0}
.runnerly-price-card h2{margin:0 0 14px;font-size:1.25rem;color:#142d48}
.runnerly-price-card .price{font-size:2rem;font-weight:750;line-height:1.35;color:#0f345d;margin:9px 0 0}
.runnerly-price-card .small{font-size:.92rem;color:#65758a;margin-bottom:16px}
.runnerly-price-card ul{padding-left:20px;line-height:1.85;min-height:190px;margin:0 0 18px}
.runnerly-price-card ul + *{margin-top:auto !important}
.runnerly-price-card form{display:grid;gap:11px;margin-top:14px;width:100%}
.runnerly-price-card select{width:100%;min-height:42px;border-radius:8px;border:1px solid #cbd5e1;padding:7px;background:white;color:#153047}
.runnerly-price-card .button{display:inline-flex;justify-content:center;align-items:center;text-decoration:none;min-height:42px;text-align:center}
.runnerly-price-card > .button,.runnerly-price-card form .button{width:100%}
.runnerly-price-card .notice{font-size:.86rem;color:#586b7b;line-height:1.5}
.runnerly-offer{margin-top:26px;padding:19px 22px;border-radius:12px;background:#f3f8fd;border:1px solid #d5e6fa}
.runnerly-pricing .hint{font-size:.85rem;line-height:1.55;color:#64748b}
@media(max-width:900px){.runnerly-price-grid{grid-template-columns:1fr}.runnerly-price-card ul{min-height:0}}
/* END RUNNERLY_INLINE_CSS_MIGRATION */

/* RUNNERLY INCOMPATIBLE CHECKOUT BUTTONS V1: only the disabled checkout state; other pricing styles remain unchanged. */
.runnerly-price-card .runnerly-incompatible-checkout:disabled {
    display: inline-flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    background: #64748b;
    color: #fff;
    cursor: not-allowed;
    box-shadow: none;
}
