/* PROFIL – HLAVNÝ OBAL */

.td-profile {
    width: 100%;
    color: #e5e9e7;
    box-sizing: border-box;
}

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

.td-profile-title {
    margin: 20px 0 25px;
    padding: 0 5px;
    color: #f0f4f1;
    font-size: clamp(23px, 3vw, 30px);
    font-weight: 600;
}


/* ROZLOŽENIE KARIET */

.td-profile-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.35fr 1fr;
    gap: 16px;
    align-items: stretch;
}

.td-profile-card {
    min-width: 0;
    padding: 18px;
    background: #202725;
    border: 1px solid #35413c;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
}

.td-profile-card-header {
    margin: -18px -18px 18px;
    padding: 17px 18px;
    border-bottom: 1px solid #35413c;
}

.td-profile-card-header h2 {
    margin: 0;
    color: #19cc85;
    font-size: 18px;
    font-weight: 600;
}


/* POČET TRÉNINGOV */

.td-profile-workouts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.td-profile-main-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0 22px;
    border-bottom: 1px solid #35413c;
}

.td-profile-main-number span {
    color: #19cc85;
    font-size: clamp(48px, 5vw, 68px);
    line-height: 1.1;
    font-weight: 700;
}

.td-profile-main-number small {
    margin-top: 5px;
    color: #aebbb4;
    font-size: 14px;
}

.td-profile-stat-list {
    display: flex;
    flex-direction: column;
}

.td-profile-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 0;
    border-bottom: 1px solid #35413c;
}

.td-profile-stat-label {
    color: #aebbb4;
    font-size: 13px;
}

.td-profile-stat strong {
    color: #edf2ef;
    font-size: 16px;
    font-weight: 600;
}

.td-profile-average {
    padding-top: 3px;
}

.td-profile-average > span {
    color: #aebbb4;
    font-size: 14px;
}

.td-profile-average div {
    margin-top: 7px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.td-profile-average strong {
    color: #19cc85;
    font-size: 38px;
    font-weight: 700;
}

.td-profile-average div span {
    color: #dce5df;
    font-size: 15px;
}

.td-profile-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: #123f30;
    color: #19cc85;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.td-profile-link:hover {
    background: #18543d;
}


/* TABUĽKY CVIKOV */

.td-profile-table-section {
    margin-bottom: 22px;
}

.td-profile-table-section:last-of-type {
    margin-bottom: 0;
}

.td-profile-table-section h3 {
    margin: 0 0 12px;
    color: #e8eee9;
    font-size: 15px;
    font-weight: 600;
}

.td-profile-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #3a4841;
    border-radius: 8px;
}

.td-profile-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.td-profile-table th {
    padding: 11px 10px;
    background: #293630;
    color: #c8d8ce;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.td-profile-table th:last-child,
.td-profile-table td:last-child {
    text-align: right;
}

.td-profile-table td {
    padding: 9px 10px;
    color: #e1e8e3;
    border-top: 1px solid #35413c;
    line-height: 1.35;
}

.td-profile-table tbody tr:nth-child(even) {
    background: #252e29;
}

.td-profile-table tbody tr:hover {
    background: #2c3932;
}

.td-profile-table td:last-child {
    color: #19cc85;
    font-weight: 600;
    white-space: nowrap;
}


/* OPAKOVANIA A GRAF */

.td-profile-description {
    margin: 0 0 18px;
    color: #b9c5bd;
    font-size: 14px;
    line-height: 1.55;
}

.td-profile-chart-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 10px 0 22px;
    min-width: 0;
}

#grafPouzivaneOpakovaniaCelkovoContainer {
    width: 55%;
    min-width: 0;
    height: 220px;
}

.td-profile-legend {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

.td-profile-legend div {
    display: grid;
    grid-template-columns: 10px 1fr;
    column-gap: 8px;
    row-gap: 3px;
    align-items: center;
    color: #e5ebe7;
    font-size: 13px;
}

.td-profile-legend i,
.td-profile-table i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.td-profile-legend strong {
    grid-column: 2;
    font-weight: 600;
}

.td-profile-legend small {
    color: #aebbb4;
    font-size: 12px;
    font-weight: 400;
}

.rep-green { background: #19cc85; }
.rep-blue { background: #299cf0; }
.rep-pink { background: #d62c9e; }
.rep-orange { background: #f28b35; }

.td-profile-reps-table td:first-child {
    white-space: nowrap;
}

.td-profile-reps-table td:first-child i {
    margin-right: 8px;
    vertical-align: middle;
}

.td-profile-reps-table .td-profile-total td {
    background: #293a31;
    color: #19cc85;
    font-weight: 700;
}


/* DETAIL CVIKU – HLAVIČKA */

.td-exercise-detail {
    width: 100%;
    padding: 0;
    color: #e5e9e7;
}

.td-exercise-heading {
    padding: 5px 5px 25px;
}

.td-exercise-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.td-exercise-title h1 {
    margin: 0;
    color: #edf2ef;
    font-size: clamp(24px, 3.2vw, 30px);
    font-weight: 600;
}

.td-edit-button {
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: #aebbb4;
    font-size: 19px;
    cursor: pointer;
}

.td-edit-button:hover {
    color: #19cc85;
}

.td-exercise-alternative {
    margin-top: 7px;
    color: #aebbb4;
    font-size: 16px;
}

.td-exercise-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 35px;
    margin-top: 20px;
}

.td-exercise-info-title {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #e5e9e7;
    font-size: 18px;
}

.td-exercise-info-title strong {
    font-weight: 600;
}

.td-exercise-info p {
    margin: 6px 0 0;
    color: #aebbb4;
    font-size: 14px;
    line-height: 1.5;
}


/* NADPIS PREHĽADY */

.td-exercise-overview-title {
    margin: 15px 0;
    padding: 13px;
    color: #19cc85;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid #35413c;
}


/* POPIS A FILTRE */

.td-exercise-description {
    margin: 0 0 15px;
    color: #b9c5bd;
    font-size: 14px;
    line-height: 1.5;
    font-style: italic;
}

.td-exercise-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin: 15px 0;
    color: #dce5df;
    font-size: 13px;
}

.td-exercise-filter select {
    padding: 5px 9px;
    border: 1px solid #52645a;
    border-radius: 7px;
    background: #293630;
    color: #edf2ef;
}


/* CHRONOLOGICKÝ VÝPIS SÉRIÍ */

.td-exercise-history-list {
    overflow: hidden;
    border: 1px solid #35413c;
    border-radius: 8px;
}

.td-exercise-history-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.td-exercise-history-table tr {
    background: #252e29;
}

.td-exercise-history-table tr:nth-child(even) {
    background: #202725;
}

.td-exercise-history-table td {
    vertical-align: middle;
}

.td-exercise-date {
    width: 115px;
    padding: 8px;
    color: #e5e9e7;
    font-size: 12px;
    white-space: nowrap;
}

.td-exercise-date strong {
    margin-right: 4px;
    color: #19cc85;
}

.td-exercise-context {
    padding: 8px;
    color: #b9c5bd;
    font-size: 11px;
}

.td-exercise-sets {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    text-align: center;
    overflow-x: auto;
    min-width: 0;
}

.td-exercise-sets span {
    padding: 5px;
    color: #e5e9e7;
    font-size: 12px;
    line-height: 1.4;
    border-left: 1px solid #52645a;
    flex: 0 0 auto;
}

/* HLAVNÝ GRAF */

.td-exercise-main-chart {
    margin-top: 14px;
}

#tdExerciseMainChart {
    width: 100%;
    min-height: 230px;
}

.td-exercise-chart-legend {
    padding: 12px 5px 0;
    border-top: 1px solid #35413c;
}

.td-exercise-chart-legend h3 {
    margin: 0 0 8px;
    color: #19cc85;
    font-size: 15px;
}

.td-exercise-chart-legend ul {
    margin: 0;
    padding-left: 20px;
    color: #c1ccc5;
    font-size: 12px;
    line-height: 1.6;
}


/* SPODNÉ TRI PREHĽADY */

.td-exercise-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
    align-items: stretch;
}

.td-exercise-bottom-grid > section {
    min-width: 0;
}


/* OZNAČENÉ SÉRIE */

.td-exercise-marked-list {
    overflow: hidden;
    border-radius: 7px;
}

.td-exercise-marked-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 2px;
    table-layout: fixed;
}

.td-exercise-marked-table tr {
    background: #252e29;
    color: #dce5df;
    font-size: 11px;
}

.td-exercise-marked-table tr:nth-child(even) {
    background: #202725;
}

.td-exercise-marked-table td {
    padding: 9px 6px;
    vertical-align: middle;
}

.td-exercise-marked-table td:first-child {
    width: 85px;
    white-space: nowrap;
}

.td-exercise-marked-table td:last-child {
    width: 55px;
}

.td-exercise-marked-table strong {
    display: block;
    text-align: right;
    color: #19cc85;
    font-size: 12px;
}

/* GRAF OPAKOVANÍ */

#tdExerciseRepsChart {
    width: 100%;
    min-height: 190px;
    margin: 10px 0;
}


/* ŠTATISTIKA DOKONČENÉHO TRÉNINGU */

.td-workout-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    min-width: 0;
}

.td-workout-completed-heading {
    text-align: center;
    padding: 5px 0 20px;
}

.td-workout-completed-heading h1 {
    margin: 0 0 8px;
    color: #19cc85;
    font-size: 25px;
    font-weight: 700;
}

.td-workout-completed-heading h1 span {
    white-space: nowrap;
}

.td-workout-completed-heading p {
    margin: 0 0 14px;
    color: #e1e8e3;
    font-size: 16px;
    line-height: 1.4;
}

.td-workout-date {
    color: #e1e8e3;
    font-size: 17px;
    font-weight: 600;
}

.td-workout-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid #3a4841;
    border-radius: 12px;
    overflow: hidden;
}

.td-workout-metric {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    padding: 18px 14px;
    border-right: 1px solid #3a4841;
    border-bottom: 1px solid #3a4841;
}

.td-workout-metric:nth-child(3n) {
    border-right: 0;
}

.td-workout-metric:nth-child(n+4) {
    border-bottom: 0;
}

.td-workout-metric-icon {
    flex-shrink: 0;
    color: #19cc85;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
}

.td-workout-metric-label {
    display: block;
    margin-bottom: 5px;
    color: #c8d8ce;
    font-size: 13px;
    line-height: 1.35;
}

.td-workout-metric strong {
    display: block;
    color: #f0f4f1;
    font-size: 22px;
    line-height: 1.2;
}

.td-workout-time-note {
    margin-top: 17px;
    padding: 8px 0 8px 15px;
    border-left: 5px solid #19cc85;
    color: #dce5df;
    font-size: 14px;
    font-style: italic;
    line-height: 1.5;
}


/* GRAF */

/* TABUĽKA ZOBRAZIŤ TRÉNING */

#posledneTable {
    min-width: 0;
    text-align: center;
}

#posledneTable th {
    background: #118653;
    color: white;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,.2);
}

#posledneTable th:last-child,
#posledneTable td:last-child {
    text-align: center;
}

#posledneTable td {
    text-align: center;
    border-right: 1px solid #35413c;
}

#posledneTable td:last-child {
    color: #e1e8e3;
    font-weight: 400;
}

#posledneTable tbody tr.odd {
    background: #1d1d1d;
}

#posledneTable tbody tr.even {
    background: #333333;
}

#posledneTable tbody tr:hover {
    background: #3a4841;
}

.td-workout-display {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.td-workout-display .td-profile-card-header {
    padding-left: 18px;
    padding-right: 18px;
}

.td-workout-display .td-profile-table-wrap {
    width: 100%;
    margin: 0;
    border-radius: 8px;
}

.td-workout-display .td-profile-table {
    width: 100%;
    margin: 0;
}

.td-workout-display table.td-profile-table tbody tr.odd {
    background: #1d1d1d !important;
}

.td-workout-display table.td-profile-table tbody tr.even {
    background: #333333 !important;
}

.td-workout-display table.td-profile-table tbody tr.other {
    background: #3C3D1E !important;
}

.td-workout-display table.td-profile-table tbody tr.othereven {
    background: #8b2704 !important;
}

.td-workout-display table.td-profile-table tbody tr.otherodd {
    background: #5d1b07 !important;
}


.td-workout-grid {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

/* HLAVIČKA TRÉNINGU */

.td-workout-heading {
    margin-bottom: 20px;
    padding: 20px;
    background: #19231e;
    border: 1px solid #245b43;
    border-radius: 18px;
    color: #e5e9e7;
    box-sizing: border-box;
}

.td-workout-heading svg {
    width: 23px;
    height: 23px;
    flex-shrink: 0;
    fill: none;
    stroke: #19cc85;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* OBDOBIE */

.td-workout-period {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #c4d0c8;
    font-size: 17px;
    font-weight: 500;
}

/* DÁTUM A ČAS */

.td-workout-datetime {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 19px;
}

.td-workout-datetime .datumVhlavicke {
    // color: #19cc85;
    font-size: 21px;
    font-weight: 600;
    text-decoration: none !important;
}

.td-workout-time {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #f0f4f1;
}

.td-workout-time svg {
    stroke: #c4d0c8;
}

/* ODDEĽOVACIA ČIARA */

.td-workout-heading-divider {
    height: 1px;
    margin: 18px 0;
    background: #354b40;
}

/* NÁZOV TRÉNINGU A PARTIE */

.td-workout-name {
    display: flex;
    align-items: center;
    gap: 16px;
}

.td-workout-dumbbell {
    width: 42px !important;
    height: 42px !important;
    stroke-width: 2.5 !important;
}

.td-workout-name-content {
    min-width: 0;
}

.td-workout-name-content .spanPrvyNadpis {
    color: #f0f4f1;
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.2;
}

.td-workout-name-content #partieSelectSub {
    display: block;
    margin-top: 5px;
}

.td-workout-name-content .spanDruhyNadpis2 {
    color: #b9c5bd;
    font-size: 15px;
    font-style: italic;
    line-height: 1.5;
}


/* RESPONZÍVNY DIZAJN */

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

    .td-profile-card:last-child {
        grid-column: 1 / -1;
    }

    .td-profile-chart-area {
        justify-content: center;
    }

    #grafPouzivaneOpakovaniaCelkovoContainer {
        max-width: 300px;
    }
}

@media (max-width: 1000px) {
    .td-exercise-bottom-grid {
        grid-template-columns: 1fr 1fr;
    }

    .td-exercise-bottom-grid > section:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .td-profile-title {
        margin: 15px 0 18px;
    }

    .td-profile-grid {
        grid-template-columns: 1fr;
        gap: 13px;
        margin-left: 12px;
        margin-right: 12px;
    }

    .td-profile-card:last-child {
        grid-column: auto;
    }

    .td-profile-card {
        padding: 15px;
    }

    .td-profile-card-header {
        margin: -15px -15px 15px;
        padding: 15px;
    }

    .td-profile-chart-area {
        flex-direction: column;
    }

    #grafPouzivaneOpakovaniaCelkovoContainer {
        width: 100%;
        max-width: 320px;
        height: 220px;
    }

    .td-profile-legend {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .td-exercise-heading {
        padding-bottom: 18px;
    }

.td-exercise-detail {
    padding: 20px 14px 25px;
}

    .td-exercise-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .td-exercise-history-table {
        table-layout: auto;
    }

    .td-exercise-history-table tr {
        display: grid;
        grid-template-columns: 95px minmax(0, 1fr);
        align-items: center;
    }

    .td-exercise-date {
        padding: 8px;
        width: auto;
    }

    .td-exercise-context {
        padding: 8px;
    }

    .td-exercise-sets {
        grid-column: 1 / -1;
        width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
    }

    .td-exercise-sets {
        grid-column: 2;
        overflow-x: auto;
    }

    .td-exercise-bottom-grid {
        grid-template-columns: 1fr;
    }

    .td-exercise-bottom-grid > section:last-child {
        grid-column: auto;
    }  
    
    .td-workout-stats {
        gap: 13px;
        margin-left: 12px;
        margin-right: 12px;
    }

    .td-workout-completed-heading {
        padding-top: 2px;
    }

    .td-workout-completed-heading h1 {
        font-size: 21px;
    }

    .td-workout-completed-heading p {
        font-size: 14px;
    }

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

    .td-workout-metric {
        gap: 9px;
        padding: 13px 10px;
    }

    .td-workout-metric:nth-child(3n) {
        border-right: 1px solid #3a4841;
    }

    .td-workout-metric:nth-child(2n) {
        border-right: 0;
    }

    .td-workout-metric:nth-child(n+4) {
        border-bottom: 1px solid #3a4841;
    }

    .td-workout-metric:nth-child(n+5) {
        border-bottom: 0;
    }

    .td-workout-metric-icon {
        font-size: 20px;
    }

    .td-workout-metric-label {
        font-size: 12px;
    }

    .td-workout-metric strong {
        font-size: 19px;
    }

    .td-workout-time-note {
        font-size: 12px;
        padding-left: 11px;
    }

    #grafPouzivaneOpakovaniaCelkovoContainer {
        max-width: 320px;
        height: 220px;
    }

    #posledneTable {
        font-size: 12px;
    }

    #posledneTable th,
    #posledneTable td {
        padding: 9px 5px;
        white-space: nowrap;
    }     


    .td-workout-heading {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 14px;
    }

    .td-workout-period {
        font-size: 15px;
        margin-bottom: 13px;
    }

    .td-workout-datetime {
        gap: 12px;
        font-size: 17px;
    }

    .td-workout-datetime .datumVhlavicke {
        font-size: 18px;
    }

    .td-workout-heading-divider {
        margin: 15px 0;
    }

    .td-workout-dumbbell {
        width: 34px !important;
        height: 34px !important;
    }

    .td-workout-name {
        gap: 12px;
    }

    .td-workout-name-content .spanPrvyNadpis {
        font-size: 25px;
    }

    .td-workout-name-content .spanDruhyNadpis2 {
        font-size: 14px;
    }
    
    .td-workout-grid {
        margin-left: 12px;
        margin-right: 12px;
    }       
}

@media (max-width: 400px) {
    .td-exercise-info-grid {
        grid-template-columns: 1fr;
    }

    .td-exercise-title h1 {
        font-size: 22px;
    }
    
    .td-exercise-alternative {
    font-size: 14px;
    }
}

@media (min-width: 701px) {
    .td-exercise-heading {
        padding-top: 12px;
    }
}






