/* PHP 8.3 – společný vizuální styl Sportovního deníku */
:root {
    --royal-blue: #4169E1;
    --royal-blue-dark: #2748A5;
    --royal-blue-deep: #1D3478;
    --blue-pale: #E8EEFC;
    --text: #303844;
    --muted: #77818E;
    --line: #E2E6EC;
    --surface: #FFFFFF;
    --background: #F3F5F8;
    --success: #1D8A59;
    --danger: #B42318;
    --shadow: 0 18px 55px rgba(29, 52, 120, .10);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--background); color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}
a { color: var(--royal-blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
    height: 76px; padding: 0 max(5vw, 24px); display: flex; align-items: center;
    justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--royal-blue-deep); font-weight: 800; font-size: 19px; letter-spacing: -.4px; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
    color: #fff; background: var(--royal-blue); font-size: 13px; font-weight: 900;
}
.topbar nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 650; }
.topbar nav a { color: var(--text); }
.topbar nav .nav-register { color: var(--royal-blue); }
.nav-form { margin: 0; }
.nav-link { border: 0; padding: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; flex: 1; }
.hero { min-height: 610px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 7%; padding: 65px 0; }
.eyebrow { display: inline-block; color: var(--royal-blue); font-size: 11px; font-weight: 850; letter-spacing: 1.6px; }
.hero h1, .auth-intro h1, .dashboard-heading h1 { margin: 18px 0; color: var(--royal-blue-deep); font-size: clamp(40px, 5vw, 62px); line-height: 1.08; letter-spacing: -2px; }
.hero h1 span, .auth-intro h1 span { color: var(--royal-blue); }
.hero-copy > p, .auth-intro > p { max-width: 510px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }
.button {
    min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid transparent; border-radius: 10px; padding: 0 22px;
    font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; transition: .18s ease;
}
.button:hover { transform: translateY(-1px); text-decoration: none; }
.button-primary { background: var(--royal-blue); color: #fff; box-shadow: 0 7px 18px rgba(65,105,225,.22); }
.button-primary:hover { background: var(--royal-blue-dark); color: #fff; }
.button-secondary { background: #fff; color: var(--royal-blue-deep); border-color: var(--line); }
.button-full { width: 100%; margin-top: 12px; }
.hero-panel {
    padding: 34px; border-radius: 22px; color: #fff;
    background: linear-gradient(145deg, var(--royal-blue), var(--royal-blue-deep));
    box-shadow: 0 24px 65px rgba(39,72,165,.24);
}
.panel-label { font-size: 11px; font-weight: 800; letter-spacing: 1.7px; opacity: .75; }
.stat-placeholder { display: flex; align-items: center; gap: 20px; padding: 24px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.stat-placeholder strong { font-size: 34px; color: #C9D7FF; }
.stat-placeholder span { font-size: 15px; font-weight: 650; }
.panel-line { height: 4px; width: 42%; margin: 28px 0 16px; border-radius: 8px; background: #AFC3FF; }
.hero-panel small { opacity: .75; }
.auth-wrap { min-height: 650px; display: grid; grid-template-columns: 1fr 440px; align-items: center; gap: 8%; padding: 60px 0; }
.auth-intro h1 { font-size: clamp(38px, 4.5vw, 54px); }
.form-card { padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.form-card h1, .form-card h2 { margin: 5px 0 4px; color: var(--royal-blue-deep); font-size: 27px; letter-spacing: -.6px; }
.muted, .hint { color: var(--muted); }
.form-card > .muted { margin: 0 0 24px; font-size: 14px; }
.form-card form { display: flex; flex-direction: column; }
.form-card label:not(.check-row) { margin: 14px 0 6px; font-size: 13px; font-weight: 750; }
.form-card input[type="email"], .form-card input[type="password"], .form-card input[type="text"] {
    width: 100%; height: 47px; border: 1px solid #D8DEE7; border-radius: 9px;
    padding: 0 13px; background: #fff; color: var(--text); font: inherit; outline: none;
}
.form-card input:focus { border-color: var(--royal-blue); box-shadow: 0 0 0 3px rgba(65,105,225,.12); }
.hint { margin-top: 5px; font-size: 12px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin: 18px 0 8px; color: var(--muted); font-size: 12px; }
.check-row input { margin-top: 4px; accent-color: var(--royal-blue); }
.form-bottom { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.form-bottom a { font-weight: 750; }
.auth-wrap-single { display: flex; justify-content: center; align-items: center; }
.form-card-centered { width: min(440px, 100%); }
.form-card-centered h1 { margin-top: 12px; }
.alert { margin: 12px 0; padding: 12px 14px; border-radius: 9px; font-size: 13px; }
.alert-error { color: var(--danger); background: #FFF0EF; border: 1px solid #F8D1CD; }
.alert-success { color: #176B46; background: #EAF7F0; border: 1px solid #C8EAD7; }
.alert-warning { color: #805B10; background: #FFF7E5; border: 1px solid #F2E1B4; }
.success-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; background: #E5F6ED; color: var(--success); font-size: 27px; font-weight: 800; }
.dashboard-heading { padding: 58px 0 28px; }
.dashboard-heading h1 { margin: 10px 0; font-size: 42px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 65px; }
.dashboard-card { min-height: 230px; padding: 25px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 28px rgba(35,48,75,.04); }
.dashboard-card-highlight { border-top: 4px solid var(--royal-blue); }
.card-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--blue-pale); color: var(--royal-blue); font-size: 24px; }
.dashboard-card h2 { margin: 17px 0 5px; color: var(--royal-blue-deep); font-size: 18px; }
.dashboard-card p { min-height: 48px; margin: 0 0 15px; color: var(--muted); font-size: 13px; }
.coming-soon { color: var(--royal-blue); font-size: 10px; font-weight: 850; letter-spacing: 1.2px; }
.footer { padding: 22px 5vw; display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; }
@media (max-width: 800px) {
    .hero, .auth-wrap { grid-template-columns: 1fr; gap: 35px; padding: 45px 0; }
    .hero { min-height: auto; }
    .hero-panel { max-width: 520px; }
    .auth-intro { padding-top: 10px; }
    .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .topbar { height: 66px; padding: 0 16px; }
    .brand { font-size: 16px; }
    .topbar nav { gap: 13px; font-size: 12px; }
    .container { width: calc(100% - 30px); }
    .form-card { padding: 24px 20px; }
    .footer { flex-direction: column; }
}


/* Profil uživatele */
.page-heading { padding: 48px 0 24px; }
.page-heading h1 { margin: 8px 0; color: var(--royal-blue-deep); font-size: 40px; line-height: 1.15; letter-spacing: -1.2px; }
.page-heading p { margin: 8px 0 0; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 22px; padding-bottom: 64px; }
.profile-form { min-width: 0; }
.profile-section { margin-bottom: 18px; padding: 27px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 28px rgba(35,48,75,.04); }
.section-heading { margin-bottom: 22px; }
.section-heading h2 { margin: 0 0 4px; color: var(--royal-blue-deep); font-size: 19px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.field label { color: var(--text); font-size: 13px; font-weight: 750; }
.field input, .field select, .field textarea {
    width: 100%; min-height: 46px; border: 1px solid #D8DEE7; border-radius: 9px;
    padding: 10px 12px; background: #fff; color: var(--text); font: inherit; font-size: 14px; outline: none;
}
.field textarea { min-height: 105px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--royal-blue); box-shadow: 0 0 0 3px rgba(65,105,225,.12); }
.field small { color: var(--muted); font-size: 11px; }
.field-full { margin-top: 18px; }
.profile-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.profile-aside { position: sticky; top: 20px; padding: 24px; border-radius: 16px; background: var(--blue-pale); }
.profile-aside-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #fff; color: var(--royal-blue); font-size: 22px; font-weight: 800; }
.profile-aside h2 { margin: 15px 0 5px; color: var(--royal-blue-deep); font-size: 18px; }
.profile-aside p, .profile-note span { color: #59677E; font-size: 13px; }
.profile-note { display: flex; flex-direction: column; gap: 5px; margin-top: 22px; padding-top: 17px; border-top: 1px solid rgba(39,72,165,.15); }
.profile-note strong { color: var(--royal-blue-deep); font-size: 12px; }
@media (max-width: 800px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-aside { position: static; }
}
@media (max-width: 520px) {
    .page-heading { padding-top: 32px; }
    .page-heading h1 { font-size: 33px; }
    .profile-section { padding: 21px 17px; }
    .form-grid { grid-template-columns: 1fr; }
    .profile-actions { flex-direction: column-reverse; }
    .profile-actions .button { width: 100%; }
}


/* Výběr oblíbených sportů */
.sports-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.sport-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.sport-option:hover { border-color: #A9BDF5; }
.sport-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.sport-option:has(input:checked) {
    border-color: var(--royal-blue);
    background: var(--blue-pale);
    box-shadow: 0 0 0 1px rgba(65,105,225,.08);
}
.sport-option:has(input:focus-visible) {
    outline: 3px solid rgba(65,105,225,.2);
    outline-offset: 2px;
}
.sport-option-check {
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border: 1px solid #C8D0DC;
    border-radius: 6px;
    background: #fff;
    color: transparent;
    font-size: 13px;
    font-weight: 800;
}
.sport-option input:checked + .sport-option-check {
    border-color: var(--royal-blue);
    background: var(--royal-blue);
    color: #fff;
}
.sport-option-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.sports-help { display: block; margin-top: 13px; color: var(--muted); font-size: 11px; }
@media (max-width: 900px) {
    .sports-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .sports-grid { grid-template-columns: 1fr; }
}


/* Evidence tréninků */
.workout-form { padding-bottom: 64px; }
.workout-form .profile-section { margin-bottom: 18px; }
.required-mark { color: #C33B32; }
.input-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input-pair > div { display: flex; flex-direction: column; gap: 4px; }
.input-pair small { color: var(--muted); font-size: 11px; }
.calculated-hint { min-height: 16px; color: var(--royal-blue-deep); font-size: 11px; font-weight: 700; }
.workout-actions { display: flex; justify-content: flex-end; gap: 10px; }
.workout-actions button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 520px) {
    .workout-actions { flex-direction: column-reverse; }
    .workout-actions .button { width: 100%; }
}


/* Tréninkový deník – přehled uložených aktivit */
.workouts-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.workouts-heading .eyebrow, .workouts-heading h1, .workouts-heading p { width: 100%; }
.workouts-heading .button { margin: 0 0 4px auto; }
.workout-filters { margin-bottom: 22px; }
.workout-filter-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; }
.workout-list-section { padding-bottom: 65px; }
.workout-list-heading { display: flex; justify-content: space-between; align-items: center; margin: 25px 0 14px; }
.workout-list-heading h2 { margin: 0; color: var(--royal-blue-deep); font-size: 21px; }
.workout-list-heading p { margin: 2px 0 0; font-size: 12px; }
.workout-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(35,48,75,.04); }
.workout-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.workout-table th { padding: 14px 15px; background: #F7F8FA; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.workout-table td { padding: 15px; border-top: 1px solid var(--line); white-space: nowrap; }
.workout-table td:nth-child(2) { min-width: 180px; white-space: normal; }
.workout-table td strong, .workout-table td small { display: block; }
.workout-table td small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.workout-date-cell { font-weight: 750; }
.activity-badge { display: inline-flex; align-items: center; border-radius: 30px; padding: 4px 10px; font-size: 11px; font-weight: 800; }
.activity-badge-training { color: #2748A5; background: #E8EEFC; }
.activity-badge-race { color: #8A3D12; background: #FFF0E5; }
.empty-state { padding: 48px 20px; border: 1px dashed #C9D2E0; border-radius: 15px; background: #fff; text-align: center; }
.empty-state-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 13px; background: var(--blue-pale); color: var(--royal-blue); font-size: 25px; }
.empty-state h3 { margin: 0 0 5px; color: var(--royal-blue-deep); }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.workout-pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 20px; font-size: 12px; font-weight: 700; }
@media (max-width: 800px) { .workouts-heading { align-items: flex-start; } .workouts-heading .button { margin-left: 0; } }
@media (max-width: 520px) { .workout-filter-actions { flex-direction: column-reverse; } .workout-filter-actions .button { width: 100%; } .workout-pagination { flex-wrap: wrap; } }


/* Detail, úprava a odstranění aktivity */
.workout-detail-heading { margin-bottom: 22px; }
.detail-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.workout-detail-section { margin-bottom: 18px; }
.workout-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.detail-metric { padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.detail-metric span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.detail-metric strong { display: block; color: var(--royal-blue-deep); font-size: 15px; overflow-wrap: anywhere; }
.workout-note { color: var(--text, #343A40); font-size: 14px; line-height: 1.7; white-space: normal; }
.workout-delete-section { display: flex; justify-content: flex-end; padding: 0 0 60px; }
.button-danger { border: 1px solid #C43D3D; background: #fff; color: #B52F36; }
.button-danger:hover { background: #FFF1F1; }
.workout-detail-link { color: var(--royal-blue); font-weight: 800; text-decoration: none; white-space: nowrap; }
.workout-detail-link:hover { text-decoration: underline; }
@media (max-width: 700px) { .workout-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .detail-heading-actions { align-items: stretch; } }
@media (max-width: 480px) { .workout-detail-grid { grid-template-columns: 1fr; } .detail-heading-actions { flex-direction: column; } .detail-heading-actions .button { width: 100%; } .workout-delete-section .button { width: 100%; } }

/* Statistiky */
.statistics-heading { padding-bottom: 22px; }
.statistics-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px; }
.statistics-kpi { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 28px rgba(35,48,75,.04); }
.statistics-kpi > span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.statistics-kpi strong { display: block; margin: 9px 0 5px; color: var(--royal-blue-deep); font-size: clamp(22px, 2.5vw, 30px); line-height: 1.15; }
.statistics-kpi small { color: var(--muted); font-size: 11px; }
.statistics-chart-section, .statistics-sports-section, .statistics-races-section { margin-bottom: 18px; }
.statistics-section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.statistics-chart-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.chart-toggle { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; font-size: 12px; font-weight: 700; }
.chart-toggle:hover, .chart-toggle.is-active { border-color: var(--royal-blue); color: var(--royal-blue-deep); background: var(--blue-pale); text-decoration: none; }
.statistics-metric-controls { margin: 0 0 22px; }
.statistics-bars { display: flex; flex-direction: column; gap: 15px; }
.statistics-bar-row { display: grid; grid-template-columns: minmax(130px, 190px) minmax(100px, 1fr) 78px; align-items: center; gap: 14px; }
.statistics-bar-label { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.statistics-bar-label strong { color: var(--royal-blue-deep); white-space: nowrap; }
.statistics-bar-track { height: 12px; overflow: hidden; border-radius: 20px; background: #EDF0F5; }
.statistics-bar-fill { height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--royal-blue), #7896F0); }
.statistics-bar-row > small { color: var(--muted); text-align: right; font-size: 11px; }
.statistics-table-wrap { width: 100%; overflow-x: auto; }
.statistics-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
.statistics-table th { padding: 11px 13px; color: var(--muted); background: #F7F8FA; text-align: left; font-size: 11px; }
.statistics-table td { padding: 14px 13px; border-bottom: 1px solid var(--line); }
.statistics-table tbody tr:last-child td { border-bottom: 0; }
.statistics-table td strong { color: var(--royal-blue-deep); }
.race-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.race-stat-grid .detail-metric { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #FAFBFD; }
.statistics-empty { padding: 24px 10px; }
.statistics-footer-actions { display: flex; justify-content: space-between; gap: 12px; padding: 0 0 55px; }
@media (max-width: 800px) {
    .statistics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .statistics-section-heading { flex-direction: column; }
}
@media (max-width: 520px) {
    .statistics-kpis { gap: 9px; }
    .statistics-kpi { padding: 16px 13px; }
    .statistics-kpi strong { font-size: 22px; }
    .statistics-bar-row { grid-template-columns: 1fr 65px; gap: 7px 10px; }
    .statistics-bar-label { grid-column: 1 / -1; }
    .statistics-bar-row > small { grid-column: 2; grid-row: 2; }
    .statistics-bar-track { grid-column: 1; grid-row: 2; }
    .race-stat-grid { grid-template-columns: 1fr; }
    .statistics-footer-actions { flex-direction: column-reverse; }
    .statistics-footer-actions .button { width: 100%; }
}

/* Tréninkový kalendář */
.calendar-heading { margin-bottom: 22px; }
.calendar-controls { margin-bottom: 18px; }
.calendar-month-navigation { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.calendar-month-navigation h2 { margin:0; text-align:center; text-transform:capitalize; }
.calendar-filter-form { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.calendar-filter-form input, .calendar-filter-form select { min-height:44px; padding:9px 12px; border:1px solid #d9dee7; border-radius:9px; background:#fff; color:#303844; }
.calendar-summary-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:18px 0; }
.calendar-summary-card { background:#fff; border:1px solid #e5e9f0; border-radius:13px; padding:16px 18px; box-shadow:0 3px 12px rgba(30,50,90,.04); }
.calendar-summary-card span { display:block; color:#78838d; font-size:.88rem; }
.calendar-summary-card strong { display:block; margin-top:5px; color:#2748a5; font-size:1.65rem; }
.calendar-grid-section { background:#fff; border:1px solid #e5e9f0; border-radius:14px; padding:14px; overflow:hidden; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); border-top:1px solid #e8ecf2; border-left:1px solid #e8ecf2; }
.calendar-weekday { padding:11px 6px; text-align:center; font-weight:700; color:#536071; background:#f5f7fb; border-right:1px solid #e8ecf2; border-bottom:1px solid #e8ecf2; }
.calendar-day { min-height:132px; padding:8px; border-right:1px solid #e8ecf2; border-bottom:1px solid #e8ecf2; background:#fff; min-width:0; }
.calendar-day-outside { background:#f8f9fb; }
.calendar-day-today { background:#f0f4ff; }
.calendar-day-number { display:flex; align-items:center; justify-content:space-between; gap:4px; margin-bottom:7px; font-weight:700; color:#303844; }
.calendar-day-number span { color:#4169e1; font-size:.7rem; font-weight:600; }
.calendar-day-activities { display:flex; flex-direction:column; gap:5px; }
.calendar-activity { display:flex; flex-direction:column; min-width:0; padding:5px 7px; border-radius:6px; text-decoration:none; font-size:.76rem; line-height:1.25; overflow:hidden; }
.calendar-activity strong, .calendar-activity span, .calendar-activity small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.calendar-activity-training { color:#2748a5; background:#e8eefc; border-left:3px solid #4169e1; }
.calendar-activity-race { color:#8b3c19; background:#fff0e8; border-left:3px solid #e47b43; }
.calendar-activity small { margin-top:2px; opacity:.8; }
.calendar-more { color:#78838d; font-size:.72rem; padding:1px 4px; }
.calendar-legend { display:flex; gap:18px; flex-wrap:wrap; padding:13px 4px 2px; color:#66717f; font-size:.85rem; }
.calendar-legend span { display:flex; align-items:center; gap:7px; }
.calendar-legend i { width:10px; height:10px; display:inline-block; border-radius:3px; }
.legend-training { background:#4169e1; }
.legend-race { background:#e47b43; }
.calendar-empty { margin-top:18px; }
@media (max-width:800px) {
 .calendar-summary-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .calendar-day { min-height:105px; padding:5px; }
 .calendar-activity { font-size:.68rem; padding:4px; }
}
@media (max-width:560px) {
 .calendar-month-navigation { gap:6px; }
 .calendar-month-navigation .button { padding:8px 9px; font-size:.78rem; }
 .calendar-month-navigation h2 { font-size:1.05rem; }
 .calendar-filter-form { display:grid; grid-template-columns:1fr 1fr; }
 .calendar-filter-form input, .calendar-filter-form select { width:100%; min-width:0; }
 .calendar-filter-form button, .calendar-filter-form a { text-align:center; }
 .calendar-grid-section { padding:6px; }
 .calendar-day { min-height:82px; padding:3px; }
 .calendar-weekday { padding:8px 2px; font-size:.78rem; }
 .calendar-day-number { font-size:.8rem; margin-bottom:4px; }
 .calendar-day-number span { display:none; }
 .calendar-activity { font-size:.61rem; padding:3px 4px; }
 .calendar-activity small { display:none; }
 .calendar-more { font-size:.6rem; }
}


/* Sportovní profily a komunita */
.profile-preview-link { display: inline-flex; margin-top: 15px; font-size: 12px; }
.athletes-heading { padding-bottom: 18px; }
.athletes-directory { margin-bottom: 60px; }
.athletes-search { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.athletes-search .field { flex: 1 1 280px; }
.athletes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.athlete-card { display: flex; align-items: flex-start; gap: 13px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.athlete-avatar { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-pale); color: var(--royal-blue-deep); font-size: 19px; font-weight: 800; }
.athlete-card-content { flex: 1; min-width: 0; }
.athlete-card-content h2 { margin: 1px 0 5px; color: var(--royal-blue-deep); font-size: 16px; }
.athlete-card-content p { margin: 0 0 8px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.athlete-card-content small { color: var(--text); font-size: 11px; }
.athlete-card .button { flex: 0 0 auto; align-self: center; padding: 9px 11px; font-size: 11px; }
.athlete-profile-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.athlete-profile-title { display: flex; align-items: center; gap: 17px; min-width: 0; }
.athlete-profile-title h1 { margin-top: 0; }
.athlete-avatar-large { flex-basis: 76px; width: 76px; height: 76px; font-size: 30px; }
.athlete-profile-section, .athlete-public-activities { margin-bottom: 18px; }
.athlete-sport-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.athlete-sport-tags span { padding: 8px 12px; border-radius: 30px; background: var(--blue-pale); color: var(--royal-blue-deep); font-size: 12px; font-weight: 700; }
.athlete-public-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.athlete-public-stats article { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.athlete-public-stats span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.athlete-public-stats strong { display: block; margin-top: 8px; color: var(--royal-blue-deep); font-size: 23px; overflow-wrap: anywhere; }
.athlete-activity-list { display: flex; flex-direction: column; }
.athlete-activity-list article { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.athlete-activity-list article:last-child { border-bottom: 0; }
.athlete-activity-list article > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.athlete-activity-list article strong { color: var(--royal-blue-deep); font-size: 13px; }
.athlete-activity-list article span { color: var(--muted); font-size: 11px; }
.athlete-activity-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.empty-state { display: flex; flex-direction: column; gap: 5px; padding: 25px 12px; color: var(--muted); font-size: 13px; }
.empty-state strong { color: var(--royal-blue-deep); }
@media (max-width: 800px) {
    .athletes-grid { grid-template-columns: 1fr; }
    .athlete-public-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .athlete-card { flex-wrap: wrap; }
    .athlete-card .button { width: 100%; }
    .athlete-profile-heading { align-items: flex-start; }
    .athlete-profile-title { align-items: flex-start; }
    .athlete-avatar-large { flex-basis: 54px; width: 54px; height: 54px; font-size: 23px; }
    .athlete-public-stats article { padding: 14px; }
    .athlete-public-stats strong { font-size: 20px; }
    .athlete-activity-list article { flex-direction: column; }
}


/* Sledování sportovců */
.athlete-profile-actions { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.follow-form { margin:0; }
.follow-form button { cursor:pointer; }
.athlete-follow-stats { display:flex; align-items:center; flex-wrap:wrap; gap:18px; width:100%; padding-left:93px; color:var(--muted); font-size:12px; }
.athlete-follow-stats strong { color:var(--royal-blue-deep); font-size:15px; }
.following-summary { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:20px; color:var(--muted); font-size:13px; }
.following-summary > strong { color:var(--royal-blue-deep); font-size:24px; }
.following-summary .button { margin-left:auto; }
@media (max-width: 600px) {
    .athlete-profile-actions { width:100%; }
    .athlete-profile-actions .button, .athlete-profile-actions .follow-form { width:100%; }
    .athlete-profile-actions .follow-form button { width:100%; }
    .athlete-follow-stats { padding-left:0; }
    .following-summary .button { width:100%; margin:8px 0 0; }
}


/* Sportovní nástěnka – veřejné aktivity sledovaných sportovců */
.feed-heading { padding-bottom: 20px; }
.feed-heading h1 { margin-bottom: 8px; }
.feed-heading-meta { display:flex; align-items:center; flex-wrap:wrap; gap:18px; margin-top:20px; color:var(--muted); font-size:12px; }
.feed-heading-meta strong { color:var(--royal-blue-deep); font-size:16px; }
.feed-heading-meta .button { margin-left:auto; }
.feed-section { margin-bottom:60px; }
.feed-list { display:flex; flex-direction:column; gap:15px; }
.feed-card { overflow:hidden; border:1px solid var(--line); border-radius:14px; background:#fff; }
.feed-card-top { display:flex; align-items:center; gap:11px; padding:16px 19px; background:#FAFBFD; border-bottom:1px solid var(--line); }
.feed-athlete-avatar { flex:0 0 40px; width:40px; height:40px; display:grid; place-items:center; border-radius:50%; background:var(--blue-pale); color:var(--royal-blue-deep); font-size:17px; font-weight:800; }
.feed-athlete-info { display:flex; flex:1; min-width:0; flex-direction:column; gap:3px; }
.feed-athlete-info a { color:var(--royal-blue-deep); font-size:13px; font-weight:800; }
.feed-athlete-info span { color:var(--muted); font-size:11px; }
.feed-kind { padding:6px 10px; border-radius:20px; font-size:10px; font-weight:800; }
.feed-kind-training { background:#EAF1FF; color:#3157B7; }
.feed-kind-race { background:#FFF0E8; color:#A94E1B; }
.feed-card-body { padding:18px 20px 16px; }
.feed-card-body h2 { margin:0 0 4px; color:var(--royal-blue-deep); font-size:18px; }
.feed-sport-line { margin:0 0 17px; color:var(--muted); font-size:12px; }
.feed-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.feed-metrics div { min-width:0; padding:12px; border-radius:9px; background:#F6F8FC; }
.feed-metrics span { display:block; color:var(--muted); font-size:10px; font-weight:700; }
.feed-metrics strong { display:block; margin-top:5px; color:var(--text); font-size:15px; overflow-wrap:anywhere; }
.feed-card-footer { display:flex; justify-content:flex-end; padding:0 20px 15px; }
.feed-card-footer a { color:var(--royal-blue); font-size:12px; font-weight:750; }
.feed-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:22px; color:var(--muted); font-size:12px; }
@media (max-width:520px) {
    .feed-heading-meta { align-items:flex-start; gap:10px 16px; }
    .feed-heading-meta .button { width:100%; margin:5px 0 0; }
    .feed-card-top { padding:14px; }
    .feed-card-body { padding:16px 14px; }
    .feed-metrics { gap:7px; }
    .feed-metrics div { padding:9px 7px; }
    .feed-metrics strong { font-size:13px; }
    .feed-card-footer { padding:0 14px 14px; }
    .feed-pagination { flex-wrap:wrap; }
    .feed-pagination .button { flex:1; text-align:center; }
}
