/* Reset a základní nastavení */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
    background-color: #fff;
}

/* Plná bílá vrstva za obsahem – zakryje šedý pruh v Safari emulátoru */
body::before {
    content: '';
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: -1;
    pointer-events: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    padding: 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    margin: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Skrytí obsahu do aplikace jazyka (odstraní app.js na konci DOMContentLoaded) */
html.i18n-pending .app-wrap {
    opacity: 0;
}

/* Obal aplikace: sahá do safe area (záporný margin), bílé pozadí zakryje šedý pruh */
.app-wrap {
    position: relative;
    z-index: 1;
    height: 100%;
    max-height: 100vh;
    margin-left: calc(-1 * env(safe-area-inset-left, 0px));
    margin-right: calc(-1 * env(safe-area-inset-right, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #fff;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header neshrinkuje */
header {
    flex-shrink: 0;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.app-header .logout-wrap {
    flex-shrink: 0;
}
.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #8e8e93;
    -webkit-appearance: none;
    appearance: none;
}
.logout-link:hover {
    color: #5c5c60;
}
.logout-link .logout-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}
.logout-link .logout-icon svg {
    width: 22px;
    height: 22px;
}

/* Přihlašovací obrazovka – Welcome screen + Google tlačítko */
.auth-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    z-index: 10;
}
.auth-screen[aria-hidden="true"] {
    display: none;
}
.auth-screen-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 32px;
}
.welcome-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.welcome-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    color: #1976D2;
}
.welcome-logo-icon svg {
    width: 56px;
    height: 56px;
}
.welcome-title {
    font-size: 26px;
    font-weight: bold;
    color: #333;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.btn-google-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    min-height: 48px;
    font-size: 16px;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-appearance: none;
    appearance: none;
}
.btn-google-signin:hover {
    border-color: #ccc;
    background: #fafafa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.btn-google-signin:focus {
    outline: 2px solid #1976D2;
    outline-offset: 2px;
}
.btn-google-signin-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-google-signin-icon svg {
    width: 24px;
    height: 24px;
}
.btn-google-signin-text {
    flex-shrink: 0;
}

/* Taby: vždy jen jeden panel viditelný */
.tab-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-panel {
    display: none;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.tab-panel.active {
    display: flex;
}

.tab-panel[hidden] {
    display: none !important;
}

/* Tab Statistiky a Oblíbené: celý panel scrolluje při dlouhém obsahu */
#tab-stats,
#tab-settings {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#tab-stats::-webkit-scrollbar,
#tab-settings::-webkit-scrollbar {
    display: none;
}

/* Tab Tréninky: filtry, split-view (sidebar + detail) */
#tab-trainings {
    position: relative;
}

#tab-trainings .filters {
    flex-shrink: 0;
    position: relative;
}

.trainings-split {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Sidebar = jeden scroll kontejner, aby tlačítko „Přidat trénink“ bylo vždy nad tab barem */
.sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar {
    display: none;
}

#tab-trainings .trainings-scroll {
    flex: 0 0 auto;
    overflow: visible;
    margin-bottom: 12px;
}

#tab-trainings .trainings-add-wrap {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    padding-top: 12px;
    padding-bottom: 8px;
}

.detail-view {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.detail-view::-webkit-scrollbar {
    display: none;
}

.detail-view .training-detail {
    padding: 12px;
}

.detail-view-empty {
    padding: 24px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.training-add-container {
    position: relative;
    display: inline-block;
}

#tab-trainings .trainings-add-wrap .btn-primary {
    width: auto;
    max-width: 100%;
    min-width: 160px;
}

.training-picker-wrap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    margin-bottom: 6px;
    min-width: 200px;
    max-width: 280px;
    z-index: 50;
}

.training-picker-wrap--hidden {
    display: none !important;
}

.training-picker {
    margin: 0;
    padding: 4px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Spodní navigace – iOS styl */
.tab-bar {
    position: fixed;
    bottom: 35px;
    left: env(safe-area-inset-left);
    right: env(safe-area-inset-right);
    height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 8px;
    z-index: 100;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.tab-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    min-height: 44px;
    border: none;
    background: transparent;
    color: #8e8e93;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
}

.tab-bar-item:active {
    opacity: 0.8;
}

.tab-bar-item.active {
    color: #007AFF;
}

.tab-bar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    line-height: 0;
}

.tab-bar-icon svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.tab-bar-label {
    line-height: 1.2;
}

/* Sekce Nastavení / Oblíbené – obsah */
.settings-tab-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 12px;
}

h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Hlavní obsah */
main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Filtry */
.filters {
    margin-bottom: 8px;
}

.filters-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

/* Jedna řádka: kalendář vlevo, filtrace typu vpravo */
.filters-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.filter-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-group-date {
    flex: 0 0 auto;
}

.filter-group-full {
    flex: 1;
}

/* Blok typu tréninku – vizuálně sladěný s polem kalendáře, šířka jen po poslední tlačítko */
.filters-row-type {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.filter-type-label {
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}

.filter-type-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Stejná velikost a font jako tagy u tréninku (.training-type) */
.filter-type-btn {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease;
}

.filter-type-btn:active {
    transform: scale(0.97);
}

.filter-type-btn.filter-type-all {
    background-color: #e0e0e0;
    color: #555;
}

.filter-type-btn.filter-type-all.active {
    background-color: #9e9e9e;
    color: #fff;
}

.filter-type-btn.type-strength {
    background-color: #E3F2FD;
    color: #1976D2;
}

.filter-type-btn.type-strength:not(.active) {
    opacity: 0.7;
}

.filter-type-btn.type-strength.active {
    background-color: #E3F2FD;
    color: #1976D2;
    opacity: 1;
}

.filter-type-btn.type-running {
    background-color: #F3E5F5;
    color: #7B1FA2;
}

.filter-type-btn.type-running:not(.active) {
    opacity: 0.7;
}

.filter-type-btn.type-running.active {
    background-color: #F3E5F5;
    color: #7B1FA2;
    opacity: 1;
}

/* Skrytí rest timeru při zobrazení běžeckého dashboardu (vybraný trénink typu Běh) */
.rest-timer-wrap--hidden {
    display: none !important;
}

/* Časovač odpočinku – napravo od filtru typu, stejná výška jako .filters-row-type */
.rest-timer-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    height: 44px;
    min-height: 44px;
    padding: 0 14px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.rest-timer-label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.rest-timer-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Stejná velikost a styl jako .filter-type-btn (Vše, Silový, Běh) */
.rest-timer-btn {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    color: #333;
    background: #e0e0e0;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    transition: transform 0.1s ease;
}

.rest-timer-btn:hover {
    background: #d5d5d5;
}

.rest-timer-btn:active {
    transform: scale(0.97);
}

.rest-timer-display {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 2.5em;
    text-align: right;
}

.rest-timer-wrap.rest-timer--running .rest-timer-display {
    color: #1976D2;
}

/* Tlačítko „točící se šipka“ ↺ v rámci 44px výšky – neroztahuje rámeček */
.rest-timer-wrap .rest-timer-reset {
    color: #c62828;
    margin-left: 2px;
    min-height: 0;
    align-self: center;
}

.rest-timer-reset-icon {
    font-size: 20px;
    line-height: 1;
    display: inline-block;
}

.rest-timer-reset:hover {
    color: #b71c1c;
}

/* Běžecký Dashboard – v jedné linii s filtry (kalendář, typ, odpočinek), stejná výška */
.run-dashboard-wrap {
    flex: 0 0 auto;
    height: 44px;
    min-height: 44px;
    padding: 0 14px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    max-width: 100%;
}

.run-dashboard-wrap--hidden {
    display: none !important;
}

.run-dashboard-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
}

.run-dashboard-title {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
    white-space: nowrap;
}

.run-dashboard-stopwatch {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 2.8em;
}

.run-dashboard-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.run-dashboard-btn {
    min-height: 32px;
    min-width: 44px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.run-dashboard-btn:hover:not(:disabled) {
    background: #eee;
    border-color: #ccc;
}

.run-dashboard-btn:active:not(:disabled) {
    background: #e0e0e0;
}

.run-dashboard-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.run-dashboard-btn-start {
    background: #E8F5E9;
    border-color: #4CAF50;
    color: #2E7D32;
}

.run-dashboard-btn-pause {
    background: #FFF3E0;
    border-color: #FF9800;
    color: #E65100;
}

.run-dashboard-btn-stop {
    background: #FFEBEE;
    border-color: #c62828;
    color: #b71c1c;
}

.run-dashboard-metrics {
    display: flex;
    flex-direction: row;
    gap: 10px;
    font-size: 12px;
    flex-shrink: 0;
}

.run-dashboard-metric {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.run-dashboard-label {
    color: #666;
    font-weight: 500;
}

.run-dashboard-distance-val,
.run-dashboard-pace-val {
    font-weight: 600;
    color: #333;
    font-variant-numeric: tabular-nums;
}

.run-dashboard-gps {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.run-dashboard-gps--good {
    background: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.run-dashboard-gps--medium {
    background: #FF9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.3);
}

.run-dashboard-gps--poor {
    background: #9e9e9e;
    box-shadow: 0 0 0 2px rgba(158, 158, 158, 0.3);
}

/* Desktop: jedna řádka; mobil: dva řádky */
.run-dashboard-row1 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.run-dashboard-row2 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Na mobilu dashboard na 2 řádky – řádek 1: název + stopky + tlačítka, řádek 2: metriky + GPS */
@media (max-width: 767px) {
    .run-dashboard-wrap {
        height: auto;
        min-height: 44px;
        padding: 10px 14px;
    }

    .run-dashboard-inner {
        flex-wrap: wrap;
        gap: 8px 0;
    }

    .run-dashboard-row1,
    .run-dashboard-row2 {
        width: 100%;
    }
}

.filter-group-type {
    flex: 1;
    min-width: 0;
    max-width: 55%;
}

.filter-group-type .filter-input {
    min-height: 40px;
}

/* Tlačítko pro otevření kalendáře výběru období */
.filter-date-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    min-height: 44px;
    flex: 0 0 auto;
    max-width: 280px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    text-align: left;
}
.filter-date-trigger:hover {
    border-color: #1976D2;
    background: #fafafa;
}
.filter-date-trigger:focus {
    outline: 2px solid #1976D2;
    outline-offset: 2px;
}
.filter-date-trigger-icon {
    flex-shrink: 0;
    color: #666;
}
.filter-date-trigger-text {
    flex: 1;
}

/* Mini kalendář filtrace – overlay přes oblast tréninků, animace zobrazení */
.filter-calendar-wrap {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    width: fit-content;
    max-width: 100%;
    margin-top: 4px;
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.filter-calendar-wrap--hidden {
    display: none !important;
}

.filter-calendar-wrap:not(.filter-calendar-wrap--hidden):not(.filter-calendar-wrap--closing) {
    animation: filter-calendar-in 0.22s ease-out forwards;
}

.filter-calendar-wrap--closing {
    animation: filter-calendar-out 0.22s ease-out forwards;
}

@keyframes filter-calendar-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes filter-calendar-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.filter-calendar {
    max-width: 280px;
}

.filter-calendar-title {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-align: center;
}

.filter-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
    font-size: 10px;
    color: #999;
    text-align: center;
}

.filter-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.filter-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    min-height: 32px;
}

.filter-calendar-day:hover {
    background: #f0f0f0;
}

.filter-calendar-day:active {
    transform: scale(0.95);
}

.filter-calendar-day--empty {
    pointer-events: none;
    visibility: hidden;
}

.filter-calendar-day-num {
    line-height: 1.2;
}

.filter-calendar-dot {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #1976D2;
}

.filter-calendar-day--has-training .filter-calendar-dot {
    display: block;
}

/* Označení začátku výběru (Od) */
.filter-calendar-day--from {
    background: #1976D2 !important;
    color: #fff;
    font-weight: 600;
}
.filter-calendar-day--from .filter-calendar-dot {
    background: #fff;
}

/* Označení konce výběru (Do) */
.filter-calendar-day--to {
    background: #1565C0 !important;
    color: #fff;
    font-weight: 600;
}
.filter-calendar-day--to .filter-calendar-dot {
    background: #fff;
}

/* Když je stejný den Od i Do */
.filter-calendar-day--from.filter-calendar-day--to {
    background: #0D47A1 !important;
}

.filter-calendar-actions {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.filter-calendar-reset {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    background: #e0e0e0;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.filter-calendar-reset:hover {
    background: #d0d0d0;
    border-color: #ccc;
}

.filter-calendar-reset:active {
    transform: scale(0.98);
}

.filter-group label {
    font-size: 12px;
    color: #666;
}

.filter-date-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
}

.filter-date-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #666;
}

.filter-date-icon svg {
    width: 18px;
    height: 18px;
}

.filter-date-inner {
    position: relative;
    flex: 0 0 auto;
    width: 110px;
    min-width: 110px;
}

.filter-input-date {
    position: relative;
    z-index: 1;
    opacity: 0;
    min-height: 36px;
    cursor: pointer;
}

.filter-date-display {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 6px 4px;
    font-size: 16px;
    color: #333;
    pointer-events: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 36px;
    box-sizing: border-box;
    background: white;
}

.filter-date-display:empty::before {
    content: attr(data-placeholder);
    color: #999;
}

.filter-input {
    width: 100%;
    padding: 6px 4px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    min-height: 36px;
    -webkit-appearance: none;
    appearance: none;
}

.filter-input:focus {
    outline: none;
    border-color: #999;
    box-shadow: none;
}

.btn-filter {
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid #333;
    border-radius: 8px;
    background: transparent;
    color: #333;
    cursor: pointer;
    min-height: 40px;
}

.btn-filter:active {
    background-color: #eee;
}

/* Seznam tréninků */
.trainings-list {
    background-color: white;
    border-radius: 12px;
    padding: 12px;
    min-height: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empty-state {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-size: 16px;
}

/* Kontejner pro seznam tréninků */
.trainings-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Jednotlivá položka tréninku */
.training-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: background-color 0.2s;
    margin-bottom: 8px;
}

.training-item:hover {
    background-color: #f0f0f0;
}

/* Informace o tréninku */
.training-info {
    flex: 1;
}

.training-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.training-date {
    font-size: 14px;
    color: #666;
}

/* Tlačítka */
.btn-primary {
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 18px 24px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.btn-primary:active {
    background-color: #0056CC;
    transform: scale(0.98);
}

/* Modální dialog nad aplikací */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #333;
}

.modal-backdrop.modal--hidden {
    display: none !important;
}

.modal-dialog {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.modal-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-body {
    margin-bottom: 16px;
}

.modal-body .modal-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
}

.modal-body .modal-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.modal-body .modal-input:focus {
    outline: none;
    border-color: #007AFF;
}

.modal-body .modal-message {
    margin: 0;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.modal-body .modal-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-body .modal-choice-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.modal-body .modal-choice-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-modal-confirm {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #007AFF;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.btn-modal-confirm:hover {
    background: #0056CC;
}

.btn-modal-confirm:active {
    transform: scale(0.98);
}

/* Destruktivní akce (Smazat) – červené tlačítko */
.btn-modal-confirm--destructive {
    background: #c00;
}

.btn-modal-confirm--destructive:hover {
    background: #a00;
}

.btn-modal-cancel {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid #c00;
    border-radius: 8px;
    background: #fff;
    color: #c00;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.btn-modal-cancel:hover {
    background: rgba(204, 0, 0, 0.08);
}

.btn-modal-cancel:active {
    transform: scale(0.98);
}

/* Zrušit vedle destruktivního Smazat – šedé (ne červené) */
.btn-modal-cancel--neutral {
    border-color: #999;
    color: #555;
}

.btn-modal-cancel--neutral:hover {
    background: #f0f0f0;
    border-color: #888;
}

/* Welcome Screen – vítací obrazovka při prvním přihlášení */
.welcome-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(0, 0, 0, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #333;
}

.welcome-modal-backdrop.welcome-modal--hidden {
    display: none !important;
}

.welcome-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 360px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 20px;
    padding-top: 48px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.welcome-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
}

.welcome-modal-close:hover {
    background: #f0f0f0;
    color: #111;
}

.welcome-modal-close:active {
    background: #e5e5e5;
}

.welcome-modal-heading {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.welcome-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.welcome-card {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: none;
}

.welcome-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    color: #333;
}

.welcome-card-icon svg {
    width: 24px;
    height: 24px;
}

.welcome-card-title {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.welcome-card-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

.welcome-modal-cta {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Mini-modal pro bod grafu (nadpis, datum, hodnota, křížek) */
.chart-point-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #333;
}

.chart-point-modal-backdrop.chart-point-modal--hidden {
    display: none !important;
}

.chart-point-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 280px;
    padding: 20px 44px 20px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.chart-point-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
}

.chart-point-modal-close:hover {
    background: #f0f0f0;
    color: #111;
}

.chart-point-modal-close:active {
    background: #e5e5e5;
    color: #000;
}

.chart-point-modal-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.chart-point-modal-date {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #666;
}

.chart-point-modal-value {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Základní styl pro malé ikonové tlačítko */
.icon-button {
    background: transparent;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-button:active {
    transform: scale(0.96);
}

/* Odhlášení – ikona v pravém horním rohu */
#logout-btn.logout-btn-fixed {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 9999;
    color: #333;
}
#logout-btn .logout-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tlačítko smazat (trénink v seznamu) */
.btn-delete {
    font-size: 18px;
}

/* Tlačítko pro rozbalení/sbalení */
.btn-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    min-height: 44px;
    min-width: 44px;
    flex-shrink: 0;
}

/* Meta informace o tréninku */
.training-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 4px;
}

.training-type {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.type-strength {
    background-color: #E3F2FD;
    color: #1976D2;
}

.type-running {
    background-color: #F3E5F5;
    color: #7B1FA2;
}

/* Header tréninku (klikatelný) */
.training-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    width: 100%;
    gap: 8px;
}

/* Detail tréninku – kompaktní, sjednocené písmo 12px jako filtr typu */
.training-detail {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    width: 100%;
    font-size: 12px;
}

/* Detail běhu – sjednoceno s designem silového tréninku (.exercise-item) */
.running-detail {
    margin-top: 8px;
}

.running-block {
    background-color: #fafafa;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 6px;
    border: 1px solid #e8e8e8;
}

.running-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.running-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

.running-row:last-child {
    border-bottom: none;
}

.running-row--pace {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.running-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
}

.running-value {
    font-size: 12px;
    font-weight: 400;
    color: #333;
    text-align: right;
}

.running-pace {
    font-size: 12px;
    font-weight: 400;
    color: #333;
}

.running-pace--empty {
    color: #999;
}

.running-row .running-input {
    width: 100%;
    max-width: 120px;
    margin-left: auto;
    text-align: right;
}

.running-input {
    padding: 4px 6px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    min-height: 36px;
    -webkit-appearance: none;
    appearance: none;
}

.running-input:focus {
    outline: none;
    border-color: #999;
    box-shadow: none;
}

.running-summary {
    font-size: 13px;
    color: #666;
    margin-left: 8px;
}

/* Tlačítko pro přidání cviku - kompaktní ikona */
.btn-add-exercise {
    margin-bottom: 4px;
}

/* Prázdný stav cviků */
.empty-exercises {
    text-align: center;
    color: #999;
    padding: 12px;
    font-size: 12px;
}

/* Cvik – kompaktní, písmo 12px */
.exercise-item {
    background-color: #fafafa;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 6px;
    border: 1px solid #e8e8e8;
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.exercise-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    flex: 1;
}

.exercise-note-wrapper {
    margin-bottom: 4px;
}

/* Silový trénink dokončený – jen text (jako tempo u běhu) */
.exercise-item--readonly .exercise-header {
    margin-bottom: 4px;
}

.exercise-note-readonly {
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exercise-note-readonly .running-pace {
    font-weight: 400;
}

.series-value {
    font-size: 12px;
    font-weight: 400;
    color: #333;
}

.exercise-note {
    width: 100%;
    padding: 4px 6px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    min-height: 32px;
    -webkit-appearance: none;
    appearance: none;
}

.exercise-note:focus {
    outline: none;
    border-color: #999;
    box-shadow: none;
}

.btn-delete-small {
    font-size: 18px;
}

.icon-trash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 0;
}

.icon-trash svg {
    width: 20px;
    height: 20px;
}

/* Kontejner akcí cviku (šipky + koš) */
.exercise-actions {
    display: flex;
    align-items: center;
    gap: 12px; /* dostatečný rozestup kvůli chybným tapům v iOS */
}

.btn-move {
    font-size: 18px;
}

.favorite-star {
    font-size: 18px;
}

.favorite-star--active {
    font-weight: 600;
}

/* Kontejner pro série */
.series-container {
    margin-top: 4px;
}

/* Tabulka sérií – kompaktní, písmo 12px */
.series-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 4px;
    font-size: 12px;
    table-layout: fixed;
}

.series-table thead {
    background-color: #f5f5f5;
}

.series-table th {
    padding: 4px 2px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
}

.series-table th:nth-child(1) {
    width: 15%;
}

.series-table th:nth-child(2) {
    width: 40%;
}

.series-table th:nth-child(3) {
    width: 40%;
}

.series-actions-th,
.series-delete-th {
    width: 44px;
    padding: 0 !important;
    vertical-align: middle;
}

.series-actions-cell,
.series-delete-cell {
    width: 44px;
    padding: 2px !important;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

.series-duplicate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 2px;
    -webkit-tap-highlight-color: transparent;
}

.series-duplicate-btn:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.06);
}

.series-duplicate-btn:active {
    transform: scale(0.9);
}

.icon-duplicate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    line-height: 0;
}

.icon-duplicate svg {
    width: 18px;
    height: 18px;
}

.series-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: #999;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    border-radius: 2px;
    -webkit-tap-highlight-color: transparent;
}

.series-delete-btn:hover {
    color: #c00;
    background: rgba(204, 0, 0, 0.08);
}

.series-delete-btn:active {
    transform: scale(0.9);
}

.series-table td {
    padding: 2px 3px;
    border-bottom: 1px solid #f0f0f0;
}

.series-number {
    font-weight: 600;
    color: #666;
    text-align: center;
    width: 28px;
    font-size: 12px;
    padding: 2px 1px;
}

/* Input pro sérii – 16px kvůli iOS zoomu, menší padding */
.input-series {
    width: 100%;
    padding: 4px 6px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 0;
    background-color: white;
    min-height: 36px;
    -webkit-appearance: none;
    appearance: none;
    -webkit-border-radius: 4px;
    border-radius: 4px;
}

/* Širší input pro váhu */
.input-series[data-field="weight"] {
    min-width: 80px;
    width: 100%;
}

.input-series:focus {
    outline: none;
    border-color: #999;
    box-shadow: none;
}

/* Tlačítko pro přidání série - kompaktní ikona */
.btn-add-series {
    font-size: 18px;
    min-height: 40px;
}

.btn-add-series:disabled,
.btn-add-series--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Akce tréninku */
.training-actions {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-delete-full {
    font-size: 18px;
}

.btn-completed-toggle,
.btn-save-template {
    font-size: 18px;
}

.badge-completed {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.exercise-picker {
    margin: 4px 0 2px 0;
    padding: 4px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;
}

.exercise-picker-section {
    margin-bottom: 2px;
}

.exercise-picker-title {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.exercise-picker-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 4px 6px;
    font-size: 12px;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
}

.exercise-picker-item:hover {
    background-color: #f0f0f0;
}

.settings-lang-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.settings-lang-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    min-width: 5.5em;
}

.settings-lang-btns {
    display: flex;
    gap: 8px;
}

.settings-lang-btn {
    font-size: 24px;
    line-height: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.settings-lang-btn:hover {
    border-color: #999;
    background: #f9f9f9;
}

.settings-lang-btn--active {
    border-color: #007AFF;
    background: #E8F4FF;
}

.templates-settings {
    margin-top: 0;
    padding-top: 12px;
    border-top: none;
    font-size: 14px;
}

.templates-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.templates-details {
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.templates-summary {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 12px 14px;
    list-style: none;
    cursor: pointer;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.templates-summary::-webkit-details-marker {
    display: none;
}

.templates-summary::before {
    content: '▶';
    font-size: 10px;
    color: #666;
    transition: transform 0.2s ease;
}

.templates-details[open] .templates-summary::before {
    transform: rotate(90deg);
}

.templates-summary:hover {
    background: #f0f0f0;
}

.templates-section-content {
    padding: 10px 14px 12px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.templates-section {
    margin-bottom: 8px;
}

.templates-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
}

.templates-empty {
    font-size: 12px;
    color: #999;
}

.templates-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.templates-name {
    flex: 1;
    font-size: 14px;
}

.templates-btn {
    font-size: 16px;
}

.templates-export-import-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.templates-export-import-btns .btn-primary {
    width: auto;
    flex: 0 0 auto;
    font-size: 16px;
    padding: 10px 16px;
}

.templates-import-btn {
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.templates-import-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.templates-import-btn:active {
    background: #eee;
}

/* Statistiky */
.stats {
    margin-top: 16px;
}

.stats-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stats-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.stats-block {
    margin-bottom: 12px;
}

.stats-graph-block--hidden {
    display: none !important;
}

.stats-text {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}

.stats-run-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    margin-right: 6px;
    margin-bottom: 6px;
    border-radius: 6px;
    border: 1px solid rgb(255, 159, 64);
    background-color: rgba(255, 159, 64, 0.15);
    color: #333;
}

.stats-run-text {
    font-size: 13px;
    color: #555;
}

.stats-control {
    margin-bottom: 6px;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 220px;
    overflow: hidden;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
}

/* Responzivní tabulka na mobilu */
@media (max-width: 767px) {
    .container {
        padding: 8px;
        width: 95%;
    }
    
    .trainings-list {
        padding: 10px;
    }
    
    .series-table {
        font-size: 12px;
    }
    
    .series-table th {
        padding: 4px 2px;
        font-size: 12px;
    }
    
    .series-table td {
        padding: 2px 3px;
    }
    
    .input-series {
        padding: 4px 6px;
        font-size: 16px;
        min-height: 36px;
    }
    
    .input-series[data-field="weight"] {
        min-width: 70px;
    }
    
    .series-number {
        width: 26px;
        font-size: 12px;
        padding: 2px 1px;
    }
    
    .exercise-item {
        padding: 8px;
    }
    
    .training-item {
        padding: 8px;
    }
}

/* Responzivita pro větší obrazovky – Split-View (Master-Detail), kompaktní série */
@media (min-width: 768px) {
    .container {
        max-width: none;
        padding: 24px 20px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .trainings-split {
        display: grid;
        grid-template-columns: 350px 1fr;
        gap: 12px;
    }
    
    .detail-view {
        display: block;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
    }
    
    .sidebar .btn-toggle {
        display: none;
    }
    
    .training-item--selected {
        border-color: #007AFF;
        background-color: #E8F4FF;
    }
    
    .btn-primary {
        max-width: 100%;
        margin: 0;
    }
    
    .series-table {
        font-size: 12px;
    }
    
    .series-table th,
    .series-table td {
        padding: 6px 10px;
    }
}

@media (max-width: 767px) {
    .detail-view {
        display: none !important;
    }
}