:root {
    --primary: #153b63;
    --primary-dark: #0d2a44;
    --secondary: #f39c32;
    --secondary-dark: #d4831d;
    --background: #eef3f7;
    --white: #ffffff;
    --text: #1f2a37;
    --muted: #617086;
    --border: #dfe6ee;
    --success: #2e8b57;
    --error: #cb3d3d;
    --warning: #d88b1d;
    --shadow: 0 10px 25px rgba(21, 59, 99, 0.08);
    --table-head: #eff4fa;
    --low: #2e8b57;
    --medium: #f39c32;
    --high: #cb3d3d;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

.container {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
}

.page-shell {
    padding: 2rem 0 3rem;
}

.site-header {
    background: var(--primary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 10;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 1rem;
}

.brand {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.82);
    padding: 0.7rem 0.9rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 600;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links .logout-link {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    text-decoration: none;
}

.nav-links .username-text,
.nav-links .user-name,
.nav-links .nav-user {
    color: #f3f7ff;
}

.nav-logout-form {
    margin: 0;
}

.nav-links button.logout-link {
    border: 0;
    padding: 0.7rem 0.9rem;
    border-radius: 0.5rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.hero-section {
    padding-top: 5rem;
}

.hero-card {
    padding: 2.5rem;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--secondary-dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.hero-card h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--primary);
}

.hero-card p {
    margin: 0 auto 1.5rem;
    max-width: 700px;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-shell {
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.form-card {
    width: min(680px, 100%);
    padding: 2rem;
}

.form-card h1 {
    margin-top: 0;
    color: var(--primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.full-width {
    grid-column: 1 / -1;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.field-group label {
    font-weight: 700;
    color: var(--primary);
}

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

input,
select,
textarea {
    width: 100%;
    padding: 0.78rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(243, 156, 50, 0.15);
}

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

.form-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.7rem;
    padding: 0.8rem 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-secondary {
    background: #e8eef6;
    color: var(--primary);
}

.alert {
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(203, 61, 61, 0.08);
    border-color: rgba(203, 61, 61, 0.2);
    color: var(--error);
}

.alert-success {
    background: rgba(46, 139, 87, 0.08);
    border-color: rgba(46, 139, 87, 0.2);
    color: var(--success);
}

.error-list {
    margin: 0;
    padding-left: 1.1rem;
}

.flash-container {
    padding-top: 1.25rem;
}

.flash {
    padding: 0.8rem 1rem;
    border-radius: 0.7rem;
    margin-bottom: 0.8rem;
    border: 1px solid transparent;
    transition: opacity 0.3s ease;
}

.flash-success {
    background: rgba(46, 139, 87, 0.1);
    border-color: rgba(46, 139, 87, 0.2);
    color: var(--success);
}

.flash-error {
    background: rgba(203, 61, 61, 0.08);
    border-color: rgba(203, 61, 61, 0.2);
    color: var(--error);
}

.admin-note {
    margin: 0 0 1rem;
    color: var(--secondary-dark);
    font-weight: 700;
    text-align: center;
}

.captcha-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(21, 59, 99, 0.04);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
}

.captcha-box label {
    font-weight: 700;
    color: var(--primary);
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

th,
td {
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 1rem;
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--table-head);
    color: var(--primary);
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-low {
    background: rgba(46, 139, 87, 0.13);
    color: var(--low);
}

.badge-medium {
    background: rgba(243, 156, 50, 0.15);
    color: var(--medium);
}

.badge-high {
    background: rgba(203, 61, 61, 0.12);
    color: var(--high);
}

.badge-pending,
.badge-in-progress,
.badge-done {
    background: rgba(21, 59, 99, 0.08);
    color: var(--primary);
}

.status-pill, .priority-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.74rem;
    font-weight: 700;
}

.status-pill.pending {
    background: rgba(243, 156, 50, 0.15);
    color: var(--warning);
}

.status-pill.in-progress {
    background: rgba(21, 59, 99, 0.08);
    color: var(--primary);
}

.status-pill.done {
    background: rgba(46, 139, 87, 0.12);
    color: var(--success);
}

.priority-pill.low {
    background: rgba(46, 139, 87, 0.12);
    color: var(--success);
}

.priority-pill.medium {
    background: rgba(243, 156, 50, 0.15);
    color: var(--warning);
}

.priority-pill.high {
    background: rgba(203, 61, 61, 0.12);
    color: var(--error);
}

.mt-1 { margin-top: 1rem; }

.empty-state {
    padding: 1.5rem;
    text-align: center;
    color: var(--muted);
    background: rgba(21, 59, 99, 0.03);
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
}

.feature-page > h1 {
    margin: 0 0 1.25rem;
    color: var(--primary);
}

.feature-panel,
.filter-panel {
    padding: 1.5rem;
}

.feature-panel h2,
.schedule-section h2,
.logs-section h2 {
    margin: 0 0 1rem;
    color: var(--primary);
}

.schedule-section,
.logs-section {
    margin-top: 2rem;
}

.week-table {
    min-width: 980px;
    table-layout: fixed;
}

.week-table td {
    vertical-align: top;
    padding: 0.55rem;
}

.schedule-list {
    display: grid;
    gap: 0.6rem;
}

.schedule-entry {
    display: grid;
    gap: 0.25rem;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    overflow-wrap: anywhere;
    font-size: 0.85rem;
}

.schedule-category {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
}

.category-swatch {
    width: 0.65rem;
    height: 0.65rem;
    flex: 0 0 0.65rem;
    border-radius: 50%;
}

.muted-text {
    color: var(--muted);
    font-size: 0.85rem;
}

.text-action {
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.text-action:hover {
    text-decoration: underline;
}

.text-danger {
    color: var(--error);
}

.schedule-entry form,
.row-actions form {
    margin: 0;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    white-space: nowrap;
}

.filter-panel {
    margin-top: 1rem;
}

.section-heading,
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.section-heading p {
    margin: 0;
    color: var(--primary);
    font-weight: 700;
}

.pagination {
    margin-top: 1rem;
    color: var(--muted);
}

.pagination-actions {
    display: flex;
    gap: 0.5rem;
}

.flash-warning {
    background: rgba(216, 139, 29, 0.12);
    border-color: rgba(216, 139, 29, 0.3);
    color: #82500a;
}

.inline-filter,
.status-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inline-filter select,
.status-form select {
    width: auto;
    min-width: 8rem;
    padding: 0.45rem 0.6rem;
}

.priority-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.priority-low {
    background: rgba(46, 139, 87, 0.14);
    color: #21663f;
}

.priority-medium {
    background: rgba(237, 174, 73, 0.2);
    color: #85530a;
}

.priority-high {
    background: rgba(203, 61, 61, 0.13);
    color: #9c2929;
}

.task-overdue td:first-child {
    color: var(--error);
    font-weight: 700;
}

.overdue-label {
    display: inline-block;
    margin-left: 0.35rem;
    color: var(--error);
    font-size: 0.76rem;
    text-transform: uppercase;
}

.consent-copy {
    padding: 1rem;
    border-left: 4px solid var(--secondary);
    background: rgba(237, 174, 73, 0.1);
}

.consent-check {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1.25rem 0;
    font-weight: 700;
}

.consent-check input,
.likert-option input {
    width: auto;
    accent-color: var(--primary);
}

.survey-progress {
    margin: 1.25rem 0;
}

.survey-progress-label {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.survey-progress progress {
    display: block;
    width: 100%;
    height: 0.75rem;
    accent-color: var(--success);
}

.survey-domain {
    margin-top: 2rem;
}

.survey-domain h2 {
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.survey-question {
    min-width: 0;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.survey-question legend {
    padding: 0 0.35rem;
    font-weight: 700;
}

.likert-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
}

.likert-option {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    font-size: 0.88rem;
}

.likert-option span {
    overflow-wrap: anywhere;
}

.dashboard-page > .dashboard-heading {
    margin-bottom: 1.5rem;
}

.dashboard-heading h1 {
    margin: 0;
    color: var(--primary);
}

.dashboard-heading p:last-child {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.summary-card {
    display: grid;
    gap: 0.45rem;
    padding: 1.1rem;
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 0.4rem;
    background: var(--white);
}

.summary-card span {
    color: var(--muted);
    font-size: 0.9rem;
}

.summary-card strong {
    color: var(--primary);
    font-size: 1.6rem;
}

.summary-alert {
    border-top-color: var(--error);
}

.balance-alert {
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    border-left: 4px solid var(--warning);
    background: rgba(216, 139, 29, 0.12);
    color: #704506;
}

.balance-alert p {
    margin: 0.25rem 0 0;
}

.dashboard-section {
    min-width: 0;
    margin-top: 2rem;
}

.dashboard-section h2 {
    margin: 0 0 1rem;
    color: var(--primary);
}

.chart-grid,
.dashboard-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.chart-panel {
    padding: 1.1rem;
}

.chart-panel h3 {
    margin: 0 0 0.75rem;
    color: var(--primary);
    font-size: 1rem;
}

.chart-canvas {
    position: relative;
    height: 300px;
}

.today-schedule {
    display: grid;
    gap: 0.6rem;
}

.today-schedule article {
    display: grid;
    grid-template-columns: minmax(6rem, auto) 1fr;
    gap: 0.8rem;
    padding: 0.85rem;
    border-left: 3px solid var(--secondary);
    background: var(--white);
}

.today-schedule time {
    color: var(--primary);
    font-weight: 700;
}

.today-schedule p {
    margin: 0.2rem 0 0;
    color: var(--muted);
}

.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-heading > p {
    margin: 0;
    color: var(--muted);
}

.admin-chart-canvas {
    height: 360px;
}

.survey-chart-panel {
    margin-bottom: 1rem;
}

.survey-chart-canvas {
    height: 320px;
}

.question-number {
    display: inline-block;
    margin-right: 0.3rem;
    color: var(--primary);
    font-weight: 700;
    white-space: nowrap;
}

.response-text {
    min-width: 20rem;
    white-space: pre-wrap;
}

.athlete-profile {
    margin-bottom: 1.5rem;
}

.athlete-profile h2 {
    margin: 0;
}

.athlete-profile h3 {
    color: var(--primary);
}

.athlete-filter-grid {
    grid-template-columns: 2fr 1fr 1fr;
}

.doc-page {
    padding-bottom: 2rem;
}

.doc-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    width: min(900px, calc(100% - 2rem));
    margin: 0 auto 1rem;
}

.doc-copy-status {
    flex: 1 1 100%;
    min-height: 1.5em;
    color: var(--muted);
    font-size: 0.9rem;
}

.doc-copy-status.copy-success {
    color: var(--success);
}

.doc-copy-status.copy-fallback {
    color: var(--warning);
}

.doc {
    width: calc(100% - 2rem);
    max-width: 900px;
    margin: 0 auto 2.5rem;
    padding: 3rem 3.25rem;
    border: 1px solid #d9e0e5;
    background: #fff;
    box-shadow: 0 12px 36px rgba(13, 42, 68, 0.1);
    color: #263746;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.68;
}

.doc p,
.doc ul,
.doc ol {
    margin-top: 0.55rem;
    margin-bottom: 0.9rem;
}

.doc h1,
.doc h2,
.doc h3 {
    color: #163d5a;
    line-height: 1.25;
}

.doc h1 {
    margin: 0.4rem 0 1.2rem;
    font-size: 2.15rem;
}

.doc h2 {
    margin: 2rem 0 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #ccd7de;
    font-size: 1.55rem;
}

.doc h3 {
    margin: 1.4rem 0 0.5rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.08rem;
}

.doc a {
    color: #155578;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.doc-cover {
    display: flex;
    min-height: 560px;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
    border-top: 5px solid #e4a241;
    break-after: page;
    page-break-after: always;
}

.doc-kicker {
    color: #9c5e1b;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.doc-cover .doc-title {
    margin: 0;
    color: #315268;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
}

.doc-version {
    margin-top: 1.1rem;
    color: #516a7b;
    font-family: Arial, Helvetica, sans-serif;
}

.doc-cover-meta {
    display: grid;
    max-width: 500px;
    gap: 0.65rem;
    margin-top: 3rem;
    font-family: Arial, Helvetica, sans-serif;
}

.doc-cover-meta div {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
}

.doc-cover-meta dt {
    color: #516a7b;
    font-weight: 700;
}

.doc-cover-meta dd {
    margin: 0;
    color: #1d2d3a;
}

.doc-table {
    width: 100%;
    margin: 1rem 0 1.35rem;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.doc-table th,
.doc-table td {
    padding: 0.55rem 0.6rem;
    border: 1px solid #8797a2;
    text-align: left;
    vertical-align: top;
}

.doc-table thead th {
    background: #e8edf0;
    color: #162f42;
    font-weight: 700;
}

.doc-table tbody th[scope="row"] {
    background: #f5f7f8;
}

.doc-toc {
    break-after: page;
    page-break-after: always;
}

.doc-toc ol {
    columns: 2;
    column-gap: 2rem;
    padding-left: 1.5rem;
}

.doc-toc li {
    break-inside: avoid;
    margin-bottom: 0.4rem;
}

.doc-section {
    margin-top: 1.7rem;
}

@media (max-width: 767px) {
    .guest-help-menu .help-menu-dropdown {
        right: 0;
    }

    .doc {
        width: calc(100% - 1rem);
        padding: 1.25rem;
        font-size: 0.96rem;
    }

    .doc h1 {
        font-size: 1.8rem;
    }

    .doc-cover {
        min-height: 0;
        padding: 3rem 0;
    }

    .doc-cover-meta div {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .doc-toc ol {
        columns: 1;
    }

    .doc-actions .btn {
        width: auto;
    }
}

.site-header .navbar {
    width: min(1200px, calc(100% - 3rem));
}

.site-header .nav-links a {
    padding: 0.6rem 1rem;
}

.site-header .nav-links a[href$="/auth/login.php"] {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.site-header .nav-links > a[href$="/auth/register.php"] {
    border: 1px solid transparent;
    background: var(--secondary);
    color: #17283b;
}

.help-menu {
    position: relative;
}

.help-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.guest-help-menu .help-menu-toggle {
    padding: 0.6rem 1rem;
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.guest-help-menu .help-menu-toggle:hover,
.guest-help-menu .help-menu-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-help-menu {
    margin: 0.4rem 0 0.8rem;
    padding: 0 0.85rem;
}

.sidebar-help-menu .help-menu-toggle {
    width: 100%;
    padding: 0.7rem 0;
    color: #d3deea;
    text-align: left;
}

.sidebar-help-menu .help-menu-toggle:hover,
.sidebar-help-menu .help-menu-toggle[aria-expanded="true"] {
    color: #fff;
}

.help-menu-toggle::after {
    content: "v";
    font-size: 0.72rem;
}

.help-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 140;
    display: grid;
    width: min(330px, calc(100vw - 2rem));
    gap: 0.2rem;
    padding: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 12px 30px rgba(13, 42, 68, 0.2);
}

.help-menu-dropdown[hidden] {
    display: none;
}

.help-menu-dropdown a {
    display: block;
    padding: 0.65rem 0.75rem;
    border-radius: 0.3rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.35;
}

.help-menu-dropdown a:hover,
.help-menu-dropdown a:focus-visible {
    background: #eff4f7;
    text-decoration: none;
}

.sidebar-help-menu .help-menu-dropdown {
    top: auto;
    right: auto;
    bottom: calc(100% + 0.3rem);
    left: 0.5rem;
    width: 235px;
}

.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    width: 264px;
    padding: 1.4rem 1rem 1rem;
    background: #102b46;
    color: #f4f7fa;
    box-shadow: 8px 0 28px rgba(13, 42, 68, 0.12);
}

.sidebar-brand {
    display: block;
    padding: 0.55rem 0.8rem 1.5rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
}

.sidebar-brand:hover {
    text-decoration: none;
}

.sidebar-nav {
    display: grid;
    gap: 0.3rem;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 0.85rem;
    border-left: 3px solid transparent;
    border-radius: 0 0.45rem 0.45rem 0;
    color: #d3deea;
    font-weight: 600;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    border-left-color: var(--secondary);
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    text-decoration: none;
}

.sidebar-profile {
    position: relative;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.profile-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.7rem;
    padding: 0.65rem;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.profile-toggle:hover,
.profile-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.09);
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 2.5rem;
    border-radius: 50%;
    color: #102b46;
    font-weight: 800;
}

.avatar-athlete {
    background: #f3a83b;
}

.avatar-admin {
    background: #76c1b6;
}

.profile-label {
    display: grid;
    min-width: 0;
    flex: 1;
}

.profile-label strong,
.profile-menu-identity strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-label small {
    color: #bac8d7;
    font-size: 0.78rem;
}

.profile-chevron {
    color: #cbd6e2;
    font-size: 1.2rem;
}

.profile-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.55rem);
    left: 0;
    z-index: 120;
    display: grid;
    gap: 0.25rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: #fff;
    box-shadow: 0 14px 36px rgba(13, 42, 68, 0.24);
    color: var(--text);
}

.profile-menu[hidden] {
    display: none;
}

.profile-menu-identity {
    display: grid;
    gap: 0.15rem;
    padding: 0.65rem 0.7rem;
}

.profile-menu-identity span {
    color: var(--muted);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.profile-menu form {
    margin: 0;
}

.profile-menu-link {
    display: block;
    width: 100%;
    padding: 0.65rem 0.7rem;
    border: 0;
    border-radius: 0.35rem;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.profile-menu-link:hover,
.profile-menu-link.active {
    background: #eff4f7;
    text-decoration: none;
}

.profile-menu .profile-logout {
    color: var(--error);
}

.profile-menu-divider {
    height: 1px;
    margin: 0.2rem 0;
    background: var(--border);
}

.app-main {
    min-height: 100vh;
    margin-left: 264px;
}

.app-main > .page-shell {
    min-height: 100vh;
    padding-top: 2rem;
}

.sidebar-mobile-toggle,
.sidebar-backdrop {
    display: none;
}

.print-mode .site-header,
.print-mode .app-sidebar,
.print-mode .sidebar-mobile-toggle,
.print-mode .sidebar-backdrop {
    display: none !important;
}

.print-mode .app-main {
    width: 100%;
    margin: 0;
}

.print-mode .app-main > .page-shell {
    min-height: 0;
    padding: 0;
}

.settings-section + .settings-section {
    margin-top: 1.5rem;
}

.settings-section h2 {
    color: var(--primary);
}

.settings-username {
    display: flex;
    gap: 0.8rem;
    color: var(--muted);
}

.settings-username strong {
    color: var(--primary);
}

.landing-page {
    margin: -2rem 0 -3rem;
}

.landing-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(118deg, #102b46 0%, #173f65 62%, #245879 100%);
    color: #fff;
}

.landing-hero::before {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    content: "";
    mask-image: linear-gradient(90deg, transparent 15%, #000 100%);
    pointer-events: none;
}

.landing-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: center;
    gap: 4rem;
    min-height: 560px;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.landing-copy .eyebrow {
    color: #ffc269;
}

.landing-copy h1 {
    max-width: 720px;
    margin: 0;
    color: #fff;
    font-size: 3.75rem;
    line-height: 1.04;
}

.landing-copy > p:not(.eyebrow) {
    max-width: 590px;
    margin: 1.3rem 0 0;
    color: #d7e2ee;
    font-size: 1.12rem;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.7rem;
}

.btn-accent {
    background: #f3a83b;
    color: #192b3c;
}

.btn-hero-outline {
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    color: #fff;
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.time-visual {
    width: min(100%, 400px);
    justify-self: end;
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.65rem;
    background: rgba(9, 29, 48, 0.5);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    transform: rotate(1deg);
}

.time-visual-heading,
.time-visual-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #a9bdcf;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.time-visual-heading {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.time-row {
    display: grid;
    grid-template-columns: 0.7rem 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e8eef4;
}

.time-row strong {
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.time-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
}

.dot-training { background: #ed6a5a; }
.dot-class { background: #f3a83b; }
.dot-study { background: #72b7b2; }
.dot-rest { background: #9ab6d0; }

.time-visual-footer {
    padding-top: 1rem;
    color: #f3a83b;
}

.visual-accent {
    font-size: 1.1rem;
}

.landing-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.landing-section-heading {
    max-width: 650px;
    margin-bottom: 2rem;
}

.landing-section-heading h2 {
    margin: 0;
    color: var(--primary);
    font-size: 2.3rem;
    line-height: 1.15;
}

.landing-section-heading .eyebrow {
    margin-bottom: 0.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.landing-feature {
    min-height: 205px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    background: #fff;
}

.feature-mark {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.45rem;
    background: #d9e8ef;
    color: #15515c;
    font-size: 0.78rem;
    font-weight: 800;
}

.mark-orange { background: #fbe4bd; color: #7d4b09; }
.mark-red { background: #f5d6d3; color: #8c3730; }
.mark-gold { background: #f4e9bf; color: #725d12; }
.mark-green { background: #d8e9dc; color: #316640; }
.mark-slate { background: #dde4ec; color: #40546b; }

.landing-feature h3 {
    margin: 1rem 0 0.35rem;
    color: var(--primary);
    font-size: 1.1rem;
}

.landing-feature p {
    margin: 0;
    color: var(--muted);
}

.how-section {
    padding: 4.5rem 0 5rem;
    background: #e4edf1;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps-grid li {
    padding-top: 1rem;
    border-top: 2px solid #8da7b4;
}

.steps-grid li > span {
    color: #b46320;
    font-size: 0.85rem;
    font-weight: 800;
}

.steps-grid h3 {
    margin: 0.6rem 0 0.35rem;
    color: var(--primary);
}

.steps-grid p {
    margin: 0;
    color: var(--muted);
}

.landing-footer {
    padding: 1.5rem 0;
    background: #102b46;
    color: #d5e0e9;
}

.landing-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.landing-footer strong {
    color: #fff;
}

@media (max-width: 767px) {
    .sidebar-mobile-toggle {
        position: fixed;
        top: 0.75rem;
        left: 0.75rem;
        z-index: 130;
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        padding: 0.6rem 0.75rem;
        border: 1px solid #d5e0e8;
        border-radius: 0.45rem;
        background: #fff;
        color: var(--primary);
        font-weight: 700;
        box-shadow: 0 5px 16px rgba(13, 42, 68, 0.14);
        cursor: pointer;
    }

    .hamburger-icon {
        display: grid;
        gap: 3px;
        width: 1rem;
    }

    .hamburger-icon span {
        height: 2px;
        border-radius: 2px;
        background: currentColor;
    }

    .app-sidebar {
        width: min(84vw, 292px);
        transform: translateX(-105%);
        transition: transform 0.22s ease;
    }

    .app-shell.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 90;
        display: block;
        border: 0;
        background: rgba(5, 20, 34, 0.52);
    }

    .sidebar-backdrop[hidden] {
        display: none;
    }

    .app-main {
        width: 100%;
        margin-left: 0;
    }

    .app-main > .page-shell {
        padding-top: 4.5rem;
    }

    .navbar {
        flex-direction: column;
        justify-content: center;
        padding: 0.8rem 0;
    }

    .nav-links {
        justify-content: center;
    }

    .hero-card,
    .form-card {
        padding: 1.3rem;
    }

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

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

    .btn {
        width: 100%;
    }

    .section-heading,
    .pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination-actions {
        width: 100%;
    }

    .likert-options {
        grid-template-columns: 1fr;
    }

    .inline-filter,
    .status-form {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .summary-grid,
    .chart-grid,
    .dashboard-columns,
    .athlete-filter-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        min-height: 0;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .landing-copy h1 {
        max-width: 600px;
        font-size: 2.75rem;
    }

    .time-visual {
        justify-self: start;
        transform: none;
    }

    .landing-section,
    .how-section {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .landing-section-heading h2 {
        font-size: 1.9rem;
    }

    .feature-grid,
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .landing-feature {
        min-height: 0;
    }

    .landing-footer-inner {
        flex-direction: column;
    }

    th,
    td {
        padding: 0.7rem 0.65rem;
        font-size: 0.92rem;
    }
}

@media print {
    body {
        background: #fff;
        color: #000;
    }

    .site-header,
    .mobile-topbar,
    .nav-links,
    .app-sidebar,
    .sidebar-mobile-toggle,
    .sidebar-backdrop,
    .help-menu,
    .sidebar-profile,
    .profile-toggle,
    .profile-menu,
    .btn,
    .form-actions,
    .flash,
    .hero-actions {
        display: none !important;
    }

    .app-main {
        width: 100%;
        margin: 0;
    }

    .app-main > .page-shell,
    .print-mode .page-shell {
        min-height: 0;
        padding: 0;
    }

    .page-shell,
    .container,
    .card,
    .form-card {
        box-shadow: none;
        border: 1px solid #ddd;
        background: #fff;
    }

    table,
    th,
    td {
        border: 1px solid #000;
        color: #000;
    }

    * {
        color: #000 !important;
        background: #fff !important;
    }

    .table-wrap {
        overflow: visible !important;
    }

    .responsive-table {
        display: table !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        border-collapse: collapse !important;
        box-shadow: none !important;
    }

    .responsive-table thead {
        position: static !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        clip: auto !important;
        clip-path: none !important;
        white-space: normal !important;
        display: table-header-group !important;
    }

    .responsive-table tbody {
        display: table-row-group !important;
    }

    .responsive-table tr {
        display: table-row !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .responsive-table td {
        display: table-cell !important;
        padding: 0.4rem !important;
        border: 1px solid #000 !important;
        text-align: left !important;
    }

    .responsive-table td::before {
        content: none !important;
        display: none !important;
    }
}

@page {
    size: A4;
    margin: 20mm 18mm;

    @bottom-center {
        content: counter(page);
        color: #555;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 9pt;
    }
}

@media print {
    .site-header,
    .app-sidebar,
    .sidebar-mobile-toggle,
    .sidebar-backdrop,
    .help-menu,
    .sidebar-profile,
    .profile-toggle,
    .profile-menu,
    .landing-footer,
    .flash-container,
    .no-print {
        display: none !important;
    }

    html,
    body,
    .app-shell,
    .app-main,
    .app-main > .page-shell,
    .doc-page,
    .doc {
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
        color: #000 !important;
    }

    .app-main {
        margin-left: 0 !important;
    }

    .page-shell {
        padding: 0 !important;
    }

    .doc {
        max-width: none !important;
        font-family: Georgia, "Times New Roman", serif !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
    }

    .doc h1,
    .doc h2,
    .doc h3,
    .doc p,
    .doc li,
    .doc td,
    .doc th {
        color: #000 !important;
    }

    .doc h2,
    .doc h3 {
        break-after: avoid;
        page-break-after: avoid;
    }

    .doc-cover {
        min-height: 0;
        border-top: 0 !important;
        break-after: page;
        page-break-after: always;
    }

    .doc-toc {
        break-after: page;
        page-break-after: always;
    }

    .doc-table {
        display: table !important;
        width: 100% !important;
        overflow: visible !important;
        border-collapse: collapse;
        background: #fff !important;
        font-size: 9pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .doc-table th,
    .doc-table td {
        border: 1px solid #000 !important;
        padding: 0.4rem;
        background: #fff !important;
        color: #000 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .doc-table thead {
        display: table-header-group;
    }

    .doc-table thead th {
        background: #e6e6e6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .doc li,
    .doc tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .doc a,
    .doc a:visited,
    .doc a:hover {
        color: #000 !important;
        text-decoration: none !important;
    }
}

@media screen {
    :root {
        --space-1: 0.5rem;
        --space-2: 0.75rem;
        --space-3: 1rem;
        --space-4: 1.5rem;
        --space-5: 2rem;
        --font-body: 1rem;
        --font-small: 0.875rem;
        --font-heading: clamp(1.75rem, 7vw, 2.75rem);
    }

    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    html {
        min-width: 320px;
        font-size: 16px;
    }

    body {
        min-width: 320px;
        font-size: var(--font-body);
        line-height: 1.5;
    }

    img,
    canvas {
        max-width: 100%;
    }

    .container {
        width: calc(100% - 1.5rem);
        max-width: 1100px;
    }

    .feature-page,
    .dashboard-page,
    .app-shell,
    .page-shell,
    .form-card,
    .card {
        min-width: 0;
    }

    .page-shell {
        padding: var(--space-3) 0 calc(var(--space-5) + env(safe-area-inset-bottom));
    }

    .app-shell {
        min-height: 100vh;
    }

    .app-main {
        width: 100%;
        margin: 0;
    }

    .app-main > .page-shell {
        min-height: 100vh;
        padding: calc(4rem + env(safe-area-inset-top)) 0 calc(var(--space-5) + env(safe-area-inset-bottom));
    }

    .mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 130;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-2);
        min-height: 3.5rem;
        padding: calc(0.35rem + env(safe-area-inset-top)) calc(0.75rem + env(safe-area-inset-right)) 0.35rem calc(0.75rem + env(safe-area-inset-left));
        border-bottom: 1px solid var(--border);
        background: #fff;
        box-shadow: 0 4px 14px rgba(13, 42, 68, 0.08);
    }

    .mobile-brand {
        color: var(--primary);
        font-size: 1.05rem;
        font-weight: 800;
    }

    .mobile-brand:hover {
        text-decoration: none;
    }

    .sidebar-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        min-width: 44px;
        min-height: 44px;
        padding: 0.45rem 0.65rem;
        border: 1px solid var(--border);
        border-radius: 0.45rem;
        background: #fff;
        color: var(--primary);
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
    }

    .hamburger-icon {
        display: grid;
        gap: 3px;
        width: 1rem;
    }

    .hamburger-icon span {
        height: 2px;
        border-radius: 2px;
        background: currentColor;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 100;
        display: flex;
        flex-direction: column;
        width: min(84vw, 292px);
        padding: calc(4.25rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        background: #102b46;
    }

    .app-shell.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 90;
        display: block;
        border: 0;
        background: rgba(5, 20, 34, 0.55);
    }

    .sidebar-backdrop[hidden] {
        display: none;
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    .sidebar-profile {
        margin-top: auto;
    }

    .profile-menu {
        right: max(0.5rem, env(safe-area-inset-right));
        left: max(0.5rem, env(safe-area-inset-left));
        width: auto;
        max-width: calc(100vw - 2rem);
    }

    .guest-help-menu .help-menu-dropdown {
        right: 0;
        width: min(330px, calc(100vw - 1rem));
        max-width: calc(100vw - 1rem);
    }

    .sidebar-help-menu .help-menu-dropdown {
        right: max(0.5rem, env(safe-area-inset-right));
        left: max(0.5rem, env(safe-area-inset-left));
        width: auto;
        max-width: calc(100vw - 2rem);
    }

    .navbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.35rem;
        min-height: 0;
        padding: calc(0.4rem + env(safe-area-inset-top)) max(0.4rem, env(safe-area-inset-right)) 0.4rem max(0.4rem, env(safe-area-inset-left));
    }

    .site-header .navbar {
        width: 100%;
    }

    .brand {
        font-size: 1.05rem;
    }

    .nav-links {
        justify-content: flex-end;
        gap: 0.2rem;
        min-width: 0;
    }

    .nav-links > a,
    .guest-help-menu .help-menu-toggle {
        min-height: 44px;
        padding: 0.4rem 0.5rem;
        font-size: 0.9rem;
    }

    .form-grid,
    .athlete-filter-grid,
    .summary-grid,
    .chart-grid,
    .dashboard-columns,
    .feature-grid,
    .steps-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-grid > *,
    .field-group,
    .filter-panel,
    .section-heading {
        min-width: 0;
    }

    .full-width {
        grid-column: auto;
    }

    input,
    select,
    textarea,
    button {
        font-size: 16px;
    }

    input,
    select,
    textarea {
        width: 100%;
        min-width: 0;
        min-height: 44px;
    }

    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible,
    button:focus-visible,
    a:focus-visible {
        outline: 3px solid #e6a544;
        outline-offset: 2px;
    }

    button,
    .btn,
    .text-action,
    .profile-menu-link,
    .help-menu-dropdown a,
    .sidebar-nav a {
        min-height: 44px;
    }

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

    .form-actions > .btn,
    .form-actions > button {
        width: 100%;
    }

    .captcha-box {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 6.5rem;
        align-items: center;
        gap: 0.5rem;
    }

    .captcha-box label {
        overflow-wrap: anywhere;
    }

    .flash-container,
    .flash,
    .alert,
    .error-list,
    .empty-state {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .week-table {
        min-width: 980px;
    }

    .responsive-table {
        width: 100%;
        min-width: 0;
    }

    .response-text {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .filter-panel .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .filter-panel .form-actions {
        margin-top: 0.5rem;
    }

    .inline-filter,
    .status-form {
        width: 100%;
        flex-wrap: wrap;
    }

    .inline-filter select,
    .status-form select {
        min-width: 0;
        width: 100%;
        min-height: 44px;
    }

    .report-exports {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }

    .report-exports .btn {
        width: 100%;
    }

    .pagination,
    .pagination-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .pagination-actions .btn {
        flex: 1 1 8rem;
        min-height: 44px;
    }

    .chart-canvas {
        width: 100%;
        min-width: 0;
        height: 240px;
    }

    .admin-chart-canvas,
    .survey-chart-canvas {
        height: 240px;
    }

    .landing-page {
        margin-top: -1rem;
    }

    .landing-hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
        min-height: 0;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .landing-copy h1 {
        font-size: clamp(2rem, 8vw, 2.7rem);
        overflow-wrap: anywhere;
    }

    .landing-actions {
        flex-direction: column;
    }

    .landing-actions .btn {
        width: 100%;
        min-height: 48px;
    }

    .time-visual {
        width: 100%;
        min-width: 0;
        justify-self: stretch;
        transform: none;
    }

    .landing-section,
    .how-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .landing-section-heading h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .landing-footer {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    .settings-section,
    .feature-panel,
    .filter-panel {
        padding: 1rem;
    }

    .settings-username {
        flex-wrap: wrap;
        overflow-wrap: anywhere;
    }

    .survey-progress {
        position: sticky;
        top: calc(3.5rem + env(safe-area-inset-top));
        z-index: 40;
        padding: 0.6rem 0;
        background: #fff;
    }

    .likert-legend {
        margin: 0.4rem 0 0.75rem;
        color: var(--muted);
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .likert-options {
        display: grid;
        grid-template-columns: repeat(5, minmax(44px, 1fr));
        gap: 0.25rem;
    }

    .likert-option {
        display: flex;
        min-width: 0;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        padding: 0.25rem;
        font-size: 1rem;
    }

    .likert-option input {
        width: 20px;
        min-width: 20px;
        height: 20px;
        min-height: 20px;
        margin: 0;
    }

    .consent-check {
        min-height: 44px;
    }

    .doc-table {
        display: block;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        table-layout: fixed;
        overflow-wrap: anywhere;
    }

    @media (min-width: 600px) {
        .summary-grid,
        .feature-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

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

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

    @media (min-width: 768px) {
        .mobile-topbar {
            display: none;
        }

        .app-sidebar {
            width: 264px;
            padding: 1.4rem 1rem 1rem;
            transform: none;
            transition: none;
        }

        .sidebar-backdrop {
            display: none !important;
        }

        .app-main {
            width: auto;
            margin-left: 264px;
        }

        .app-main > .page-shell {
            min-height: 100vh;
            padding: 2rem 0 3rem;
        }

        .container {
            width: min(1100px, calc(100% - 2rem));
        }

        .form-grid,
        .athlete-filter-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .full-width {
            grid-column: 1 / -1;
        }

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

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

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

        .filter-panel .form-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .filter-panel .form-actions,
        .form-actions {
            flex-direction: row;
        }

        .form-actions > .btn,
        .form-actions > button {
            width: auto;
        }

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

        .chart-canvas {
            height: 320px;
        }

        .admin-chart-canvas {
            height: 360px;
        }

        .survey-chart-canvas {
            height: 320px;
        }

        .landing-hero-inner {
            grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
            gap: 2rem;
            min-height: 500px;
            padding-top: 3rem;
            padding-bottom: 3rem;
        }

        .landing-copy h1 {
            font-size: clamp(2.6rem, 4vw, 3.75rem);
        }

        .landing-actions {
            flex-direction: row;
        }

        .landing-actions .btn {
            width: auto;
        }

        .time-visual {
            width: min(100%, 400px);
            justify-self: end;
            transform: rotate(1deg);
        }

        .landing-section,
        .how-section {
            padding-top: 4.5rem;
            padding-bottom: 5rem;
        }

        .doc {
            width: calc(100% - 2rem);
            padding: 3rem 3.25rem;
        }
    }

    @media (min-width: 1024px) {
        .summary-grid {
            grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
        }

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

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

        .landing-hero-inner {
            gap: 4rem;
            min-height: 560px;
        }
    }

    @media (max-width: 639px) {
        .responsive-table {
            display: block;
            border-collapse: separate;
            overflow: visible;
            background: transparent;
            box-shadow: none;
        }

        .responsive-table thead {
            position: absolute;
            width: 1px;
            height: 1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            clip-path: inset(50%);
        }

        .responsive-table tbody {
            display: grid;
            gap: 0.75rem;
        }

        .responsive-table tr {
            display: grid;
            min-width: 0;
            padding: 0.25rem 0.75rem;
            border: 1px solid var(--border);
            border-radius: 0.5rem;
            background: #fff;
            box-shadow: var(--shadow);
        }

        .responsive-table td {
            display: grid;
            grid-template-columns: minmax(5rem, 0.8fr) minmax(0, 1.2fr);
            align-items: start;
            gap: 0.5rem;
            min-width: 0;
            padding: 0.65rem 0.1rem;
            border: 0;
            border-bottom: 1px solid var(--border);
            text-align: right;
            overflow-wrap: anywhere;
        }

        .responsive-table td::before {
            content: attr(data-label);
            color: var(--primary);
            font-weight: 700;
            text-align: left;
        }

        .responsive-table td[colspan] {
            display: block;
            border: 0;
            text-align: center;
        }

        .responsive-table td[colspan]::before {
            content: none;
        }

        .responsive-table td[data-label="Actions"] {
            display: block;
            border: 0;
            text-align: left;
        }

        .responsive-table td[data-label="Actions"]::before {
            display: block;
            margin-bottom: 0.45rem;
        }

        .responsive-table td[data-label="Actions"] .row-actions {
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .responsive-table .status-form {
            justify-content: flex-end;
        }

        .responsive-table .status-form select {
            width: auto;
            flex: 1 1 8rem;
        }
    }

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

@media screen and (max-width: 639px) {
    .doc .doc-table {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media print {
    .doc .doc-table {
        display: table !important;
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
    }
}