/* DARK NAVBAR */
.app-header.navbar {
    background-color: #0f172a !important;
    border-bottom: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.app-header .nav-link,
.app-header .navbar-brand span,
.app-header .dropdown-toggle {
    color: #ffffff !important;
}

.app-header .nav-link:hover {
    color: rgba(255,255,255,0.85) !important;
    background: rgba(255,255,255,0.08) !important;
    border-radius: 8px;
}

/* User dropdown button hover */
.app-header .user-menu > a:hover {
    background: rgba(255,255,255,0.14) !important;
}

/* Brand text — skryť/zobraziť podľa stavu sidebaru */
.navbar-brand-text {
    transition: opacity 0.2s ease, visibility 0.2s ease;
    opacity: 1;
    visibility: visible;
}

/* Mobile: skryť keď je sidebar otvorený (sidebar-open na body) */
@media (max-width: 991.98px) {
    body.sidebar-open .navbar-brand-text {
        opacity: 0 !important;
        visibility: hidden !important;
    }
}

/* Desktop: skryť keď je sidebar viditeľný (predvolený stav),
   zobraziť keď je sidebar zbalený (sidebar-collapse na body) */
@media (min-width: 992px) {
    .navbar-brand-text,
    .navbar-brand-logo {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }
    body.sidebar-collapse .navbar-brand-text,
    body.sidebar-collapse .navbar-brand-logo {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* BREADCRUMB
   Prístup: ol je display:block + white-space:nowrap + overflow:hidden
   Každý li je display:inline — tým pádom sa celý riadok správa ako
   jeden riadok textu. Posledný li (.bc-truncate) dostane inline-block
   + max-width + text-overflow:ellipsis aby orezal dlhý názov.
*/
.app-content-header nav[aria-label="breadcrumb"] {
    overflow: hidden;
    max-width: 100%;
}

.app-content-header .breadcrumb {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    font-size: 12px;
    margin-bottom: 6px;
    padding: 0;
    background: none;
}

@media (min-width: 992px) {
    .app-content-header .breadcrumb {
        font-size: 13px;
    }
}

.app-content-header .breadcrumb-item {
    display: inline;
    font-size: inherit;
    color: #9ca3af;
    white-space: nowrap;
	padding: 0;
}

.app-content-header .breadcrumb-item a {
    color: #9ca3af;
    font-size: inherit;
}

.app-content-header .breadcrumb-item.active {
    color: #6b7280;
}

/* Vypnúť Bootstrap ::before separator — dáme ho cez ::after za každý item okrem posledného */
.app-content-header .breadcrumb-item + .breadcrumb-item::before {
    display: none;
}

.app-content-header .breadcrumb-item:not(:last-child)::after {
    display: inline;
    padding: 0 5px;
    color: #d1d5db;
    content: "/";
    font-size: inherit;
}

/* Posledný item — inline-block s max-width a ellipsis */
.app-content-header .bc-truncate {
    display: inline-block !important;
    max-width: 40% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    vertical-align: bottom;
}

@media (min-width: 576px) {
    .app-content-header .bc-truncate {
        max-width: 55% !important;
    }
}

@media (min-width: 992px) {
    .app-content-header .bc-truncate {
        max-width: 65% !important;
    }
}

.app-content-header h3 {
    margin-top: 4px;
    margin-bottom: 12px;
}

/* ATTENDANCE — donut chart card fills heatmap height */
@media (min-width: 992px) {
    .schedule-donut-card .card-body {
        min-height: 280px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* COLLAPSIBLE CARD HEADERS — medzera medzi textom a šípkou */
.card-header .bi-chevron-down,
.card-header .bi-chevron-up {
    margin-left: auto;
    padding-left: 8px;
	padding-right: 8px;
    flex-shrink: 0;
    opacity: 0.6;
    font-size: 13px;
}

/* FOOTER centered */
.app-footer {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    text-align: center !important;
}


/* CLIENT DASHBOARD CARDS — MOBILE ONLY (desktop nedotknutý) */
@media (max-width: 991.98px) {
    #client-dashboard-cards .col-6 { display: flex; }
    #client-dashboard-cards { align-items: stretch; }

    .client-dashboard-card {
        padding: 12px 14px !important;
        border-radius: 14px !important;
        height: 100% !important;
        min-height: 0 !important;
    }

    .client-dashboard-card .dashboard-card-body {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        height: 100%;
        justify-content: center;
    }

    .client-dashboard-card .dashboard-card-content {
        width: 100%;
    }

    .client-dashboard-card .dashboard-card-label {
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.2;
        display: block;
    }

    .client-dashboard-card .dashboard-card-content h3 {
        font-size: 1.4rem !important;
        font-weight: 800 !important;
        margin: 2px 0 0 0 !important;
        line-height: 1.1 !important;
    }
}

/* DASHBOARD ACTION BUTTONS ROW (Pridať tréning, Zmena kreditu, atď.) */
#action-buttons-row .dashboard-card {
    padding: 16px 20px;
    border-radius: 18px;
}

#action-buttons-row .dashboard-card-icon {
    width: 60px;
    height: 60px;
    font-size: 26px;
    border-radius: 16px;
    flex-shrink: 0;
}

#action-buttons-row .dashboard-card-label {
    font-size: 16px;
}

@media (max-width: 767.98px) {
    #action-buttons-row .dashboard-card {
        padding: 12px 14px;
        border-radius: 14px;
    }
    #action-buttons-row .dashboard-card-body {
        gap: 10px;
    }
    #action-buttons-row .dashboard-card-icon {
        width: 46px;
        height: 46px;
        font-size: 20px;
        border-radius: 12px;
    }
    #action-buttons-row .dashboard-card-label {
        font-size: 14px;
        line-height: 1.3;
    }
}

/* ============================================================
   FIXNÝ LAYOUT (len DESKTOP) - sidebar zostáva úplne nehybný,
   scrolluje sa len hlavný obsah (.app-main)
   ============================================================
   AdminLTE pouziva CSS Grid (.app-wrapper) s grid-template-rows:
   min-content 1fr min-content (header / hlavny obsah / footer)
   a "min-height: 100vh". Problem je, ze min-height dovoli wrapperu
   narast nad 100vh, ak je obsah dlhsi - vtedy sa zacne scrollovat
   cela stranka (body) namiesto len strednej casti, a sidebar
   (position: sticky) sa po prejdeni svojej vlastnej vysky "odlepi".
   Zmenou na presne "height: 100vh" donutime grid riadok ".app-main"
   (1fr) zaberat presne zvysny priestor po header/footer, a jeho
   vlastny scroll uz zariadi AdminLTE (.app-main { overflow: auto }).

   DOLEZITE: toto plati LEN na desktope (min-width: 992px, rovnaky
   breakpoint ako AdminLTE sidebar-expand-lg). Na mobile je sidebar
   aj tak skryty (off-canvas menu), takze fixovanie nema zmysel - a
   "overflow: hidden" na body na iPhone/Safari often UPLNE zablokuje
   akykolvek scroll, preto sa na mensich obrazovkach vobec neaplikuje.
*/
@media (min-width: 992px) {

    html, body {
        height: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .app-wrapper {
        height: 100vh;
    }
}

/* SIDEBAR IMAGE */
/* POZOR: position sa tu zamerne NENASTAVUJE - AdminLTE definuje
   .sidebar-expand-lg.layout-fixed .app-sidebar { position: sticky; ... },
   co zaistuje, ze sidebar zostane pri scrollovani na mieste. Predtym tu
   bolo "position: relative", ktore toto sticky pravidlo prebijalo a
   sidebar sa scrolloval spolu s obsahom. */
.app-sidebar {
    overflow: hidden;
    background-color: #111827;
}

/* Obrázok dole */
.app-sidebar::after {
    content: '';
    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;
    height: 380px;

    background-image: url('../img/sidebar_btn.png');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;

    pointer-events: none;
}

/* Dark overlay */
.app-sidebar::before {
    content: '';
    position: absolute;
    inset: 0;

    background: linear-gradient(
            to bottom,
            rgba(17,24,39,0.96) 0%,
            rgba(17,24,39,0.92) 55%,
            rgba(17,24,39,0.75) 100%
    );

    z-index: 1;
}

/* Obsah sidebaru nad obrázkom */
.app-sidebar > * {
    position: relative;
    z-index: 2;
}

.nav-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
}

.nav-sidebar .nav-link.active {
    border-radius: 10px;
}

/* HEADER PROFILE */
.user-footer a {
    width: 125px;
}
.user-menu i {
    padding-right: 5px;
}
.user-header .role {
    padding: 5px;
}

/* DASHBOARD CARDS */

.dashboard-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #eef1f4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
    height: 100%;
    cursor: pointer;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.dashboard-card-header {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-card-body {
    display: flex;
    align-items: center;
    gap: 18px;
}

.dashboard-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
}

.dashboard-card-content h3 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: #111827;
}

.dashboard-card-content p {
    margin: 4px 0 0 0;
    color: #6b7280;
    font-size: 14px;
}

/* Soft backgrounds */

.bg-success-soft {
    background: rgba(25, 135, 84, 0.12);
}

.bg-primary-soft {
    background: rgba(13, 110, 253, 0.12);
}

.bg-warning-soft {
    background: rgba(255, 193, 7, 0.15);
}

.bg-danger-soft {
    background: rgba(220, 53, 69, 0.12);
}

/* MODERN CARDS */

.modern-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #eef1f4;
    /*box-shadow: 0 4px 14px rgba(0,0,0,0.04);*/
    /*transition: all 0.25s ease;*/
}

.modern-card:hover {
    /*transform: translateY(-3px);*/
    /*box-shadow: 0 12px 28px rgba(0,0,0,0.08);*/
}

.modern-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modern-card-header h5 {
    margin: 0;
    font-weight: 700;
    color: #111827;
}

.modern-card-header small {
    color: #6b7280;
}

.modern-card-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13,110,253,0.1);
    color: #0d6efd;
    font-size: 20px;
}

.modern-input {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    min-height: 48px;
    padding-left: 14px;
    /*transition: all 0.2s ease;*/
}

.modern-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13,110,253,0.1);
}
.modern-btn {
    border-radius: 14px;
    padding: 10px 18px;
    font-weight: 600;
}

.modern-btn-secondary {
    border-radius: 14px;
    padding: 10px 18px;
    border: 1px solid #e5e7eb;
}

.payment-card {
    /*background:
            linear-gradient(
                    135deg,
                    #ffffff 0%,
                    #f8fafc 100%
            );*/
}

.payment-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,193,7,0.15);
    color: #f59e0b;
    font-size: 34px;
}

.payment-text {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.payment-qr-wrapper {
    background: #f8fafc;
    border-radius: 20px;
    padding: 16px;
    border: 1px solid #eef1f4;
    margin-bottom: 20px;
}

.payment-qr {
    max-width: 230px;
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.payment-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
}

.payment-info-item span {
    color: #6b7280;
}

.payment-info-item strong {
    color: #111827;
}

/* ATTENDANCE */
.training-section-header {
    margin-bottom: 10px;
}

.training-section-header h2 {
    font-size: 28px;

    font-weight: 700;

    margin-bottom: 4px;

    color: #111827;
}

.training-section-header p {
    color: #6b7280;

    margin: 0;

    font-size: 15px;
}

.chart-icon-box {
    width: 46px;
    height: 46px;

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(13,110,253,0.12);

    color: #0d6efd;

    font-size: 20px;
}

.chart-icon-box.success {
    background: rgba(25,135,84,0.12);

    color: #198754;
}

/* DASHBOARD - RESPONSIVE (< 1600px) */
/*
   Layout je navrhnuty pre sirku >= 1600px. Na mensich obrazovkach
   zmensime fonty a odsadenia, aby sa karty a tabulky lepsie zmestili
   a netriestili sa.
*/
@media (max-width: 1599.98px) {

    .dashboard-card {
        padding: 14px;
        border-radius: 16px;
    }

    .dashboard-card-body {
        gap: 12px;
    }

    .dashboard-card-icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
        border-radius: 14px;
    }

    .dashboard-card-content h3 {
        font-size: 22px;
    }

    .dashboard-card-label {
        font-size: 12px;
    }

    /* Posledne treningy / Pohyby kreditu / Pravidelne treningy */
    .card-title {
        font-size: 1rem;
    }

    .table {
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 0.4rem 0.5rem;
    }

    .info-box {
        min-height: 60px;
    }

    .info-box-icon {
        width: 50px;
        font-size: 14px;
    }

    .info-box-text,
    .info-box-number {
        font-size: 13px;
    }
}

@media (max-width: 1199.98px) {

    /* Pod 1200px sa tri karty (Posledne treningy, Pohyby kreditu,
       Pravidelne treningy) zalamu na samostatne riadky - vratime
       im rovnaku (automaticku) vysku, aby sa nestahovali podla
       najvyssej z trojice. */
    #last-trainings-credit-schedule-row .card {
        height: auto;
    }
}

/* ============================================================
   GLOBAL MOBILE RESPONSIVE FIXES (client + admin)
   ============================================================
   Aplikacia sa vo velkej miere pouziva na mobile, preto su tu
   doplnene pravidla, ktore zabezpecia, ze sa stranka nikdy
   nezalomi/neroztiahne mimo sirky obrazovky, a obsah (karty,
   tabulky, formulare, grafy) zostane citatelny aj na malych
   displejoch (< 576px).
*/

/* Horizontalne pretekanie je uz osetrene v hlavnom pravidle
   html, body na zaciatku suboru (FIXNY LAYOUT) */

@media (max-width: 767.98px) {

    /* Univerzalna medzera medzi stlpcami, ktore sa na mobile zalomia
       pod seba (napr. "Pridat trening" + "Ako to funguje" karty vedla
       seba na desktope) - rady bez explicitnej g-* (gutter) triedy
       nemaju medzi stlpcami ziadnu vertikalnu medzeru, takze na mobile
       sa karty lepia priamo na seba. Tymto sa to rieši plosne, pre
       cele admin aj klientske rozhranie naraz. */
    .row > [class*="col-"] {
        margin-bottom: 1rem;
    }

    .app-content-header .row .col-sm-6 {
        margin: 0;
    }

    /*.row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }*/

    /* Zakladne odsadenie obsahu - na mobile menej priestoru */
    .app-content-header .container-fluid,
    .app-content .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .app-content-header h3 {
        font-size: 1.8rem;
    }

    /* Dashboard karty - cisla a ikony mensie, aby sa zmestili na 2 v rade */
    .dashboard-card {
        padding: 10px !important;
        border-radius: 14px;
    }

    .dashboard-card-body {
        gap: 10px;
        position: relative;
    }

    .dashboard-card-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
        border-radius: 12px;
    }

    /* Skryť ikonu len v klientskej časti (client-dashboard-card) */
    .client-dashboard-card .dashboard-card-icon {
        display: none !important;
    }

    .client-dashboard-card .dashboard-card-content h3 {
        font-size: 18px !important;
        margin: 6px 0 0 0 !important;
    }

    .dashboard-card-label {
        font-size: 11px;
    }

    /* Admin dashboard "tlacidla" (klikatelne dlazdice na Pridat trening,
       Zmena kreditu a pod.) su funkcne ako hlavne navigacne tlacidla,
       nie len informacne stitky ako na klientskom dashboarde - preto
       maju vlastne, vacsie rozmery pisma/ikon na mobile. */
    a.text-decoration-none .dashboard-card-icon {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    a.text-decoration-none .dashboard-card-label {
        font-size: 15px;
    }

    a.text-decoration-none .dashboard-card-content p {
        font-size: 13px;
        margin: 6px 0 0 0;
    }

    .dashboard-card-content p {
        font-size: 13px;
        margin: 6px 0 0 0;
    }

    /* Karty vseobecne - mensie odsadenie */
    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-body {
        padding: 0.85rem;
    }

    .card-title {
        font-size: 0.95rem;
    }

    /* Tabulky - este o nieco kompaktnejsie, vzdy s horizontalnym scrollom
       (.table-responsive uz zabezpecuje scroll, tu len zmensime fonty) */
    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 0.35rem 0.4rem;
        white-space: nowrap;
    }

    /* Formulare - tlacidla na cely riadok, aby sa dobre ovladali prstom */
    .modern-btn,
    .btn {
        font-size: 14px;
    }

    .card-footer .btn.float-end {
        float: none !important;
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Filter formulare (Treningy, Kredit, Zaznamy) - polia pod sebou */
    .card-body form .row > [class^="col-"] {
        margin-bottom: 8px;
    }

    /* Grafy - mensia vyska na mobile, aby sa zmestilo viac na obrazovku */
    [id^="attendanceChart"],
    [id^="scheduleHeatmap"],
    [id^="scheduleDonut"] {
        height: 180px !important;
    }

    /* Info-box (Moje pravidelne treningy) - mensie */
    .info-box {
        min-height: 54px;
    }

    .info-box-icon {
        width: 44px;
        font-size: 13px;
    }

    /* Select2 - rovnaka vyska ako ostatne inputy, ziadny pretek */
    .select2-container {
        width: 100% !important;
        max-width: 100%;
    }

    .select2-container .select2-selection--single {
        height: 42px;
        display: flex;
        align-items: center;
    }

    /* Add-training klient polozky - input na sumu mensi, nezalamuje meno */
    .item {
        padding: 8px;
        flex-wrap: nowrap;
    }

    .item span {
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-right: 6px;
    }

    .item input.item_value {
        width: 64px;
        flex-shrink: 0;
    }

    /* Stats kalendar (treneri/klienti) - mensie bunky, aby sa zmestil
       cely tyzden na sirku displeja bez horizontalneho scrollu */
    .stats-calendar td {
        height: 56px !important;
        padding: 2px;
        font-size: 11px;
    }

    .stats-calendar th {
        font-size: 11px;
        padding: 4px 2px;
    }

    /* Login box - mensie odsadenie po stranach */
    .login-box {
        width: 90%;
        max-width: 360px;
    }
}

@media (max-width: 575.98px) {

    /* Najmensie displeje (telefony na vysku) - dashboard karty
       po jednej na riadok namiesto dvoch, aby cisla neboli stlacene */
    .dashboard-card-content h3 {
        font-size: 17px;
    }

    /* Tabulky s viac stlpcami (Zaznamy, Kredit) - este kompaktnejsie */
    .table {
        font-size: 11px;
    }

    .stats-calendar td {
        height: 48px !important;
        font-size: 10px;
    }
}
/* ==========================================================================
   TRÉNINGOVÉ PLÁNY
   ========================================================================== */

.tp-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 28px 16px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    margin: 0;
}
.tp-drop:hover, .tp-drop.over { border-color: #0d6efd; background: #eef4ff; }
.tp-drop > .bi { font-size: 2rem; color: #0d6efd; }
.tp-drop-title { font-weight: 600; }
.tp-drop-sub { font-size: 13px; color: #6b7280; }



.tp-q-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid #eef0f3; }
.tp-q-row:first-child { border-top: 0; }
.tp-q-icon { font-size: 1.3rem; color: #64748b; line-height: 1.2; }
.tp-q-main { min-width: 0; flex: 1; }
.tp-q-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tp-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tp-chip {
    display: inline-flex; align-items: center; gap: 5px;
    border: 1px solid #dee2e6; border-radius: 999px; padding: 2px 10px;
    font-size: 13px; color: #374151; text-decoration: none; background: #fff;
}
.tp-chip span { font-size: 11px; color: #9ca3af; }
.tp-chip:hover { border-color: #0d6efd; color: #0d6efd; }
.tp-chip.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.tp-chip.active span { color: rgba(255,255,255,.75); }

.tp-tabs .nav-link { padding: 6px 14px; }

.tp-card { transition: box-shadow .15s, transform .15s; color: inherit; }
.tp-card:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .10); transform: translateY(-1px); }
.tp-date { font-size: 1.15rem; font-weight: 700; color: #0f172a; line-height: 1.2; }
.tp-focus {
    display: inline-block; background: #fff4e0; color: #7c4a03;
    border-radius: 6px; padding: 1px 8px; margin: 2px 4px 2px 0; font-size: 13px;
}
.tp-thumbs { display: flex; gap: 6px; }
.tp-thumbs img { width: 25%; max-width: 70px; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; }
.tp-match { display: inline-block; background: #fff3cd; border-radius: 4px; padding: 0 6px; margin: 2px 2px 0 0; color: #664d03; }

.tp-tag {
    display: inline-block; background: #e7f1ff; color: #0b5ed7; border: 0;
    border-radius: 999px; padding: 1px 9px; font-size: 12px; margin: 2px 4px 2px 0; text-decoration: none;
}
a.tp-tag:hover { background: #0d6efd; color: #fff; }
.tp-tag-pick { cursor: pointer; background: #f1f3f5; color: #495057; }
.tp-tag-pick:hover { background: #e7f1ff; color: #0b5ed7; }

.tp-time {
    display: inline-block; background: #0f172a; color: #fff; border-radius: 6px;
    padding: 0 7px; font-size: 12px; font-weight: 600; margin-left: 6px; vertical-align: middle;
}
.tp-unsure {
    display: inline-block; background: #fde8e1; color: #b4542d; border-radius: 4px;
    padding: 0 4px; font-weight: 700; font-size: .85em; cursor: help;
}
.tp-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; margin-bottom: 4px; }
.tp-section { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #0d6efd; font-weight: 600; }
.tp-num {
    display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%;
    border: 1.5px solid #0f172a; font-size: 13px; font-weight: 700; margin-right: 8px; padding: 0 4px;
}

.tp-ex { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid #eef0f3; }
.tp-ex:first-child { border-top: 0; }
.tp-ex:target { background: linear-gradient(90deg, #fff7e0, transparent 70%); margin: 0 -16px; padding: 16px; }
.tp-ex-dia img { width: 160px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; cursor: zoom-in; }
.tp-nodia {
    width: 160px; height: 110px; border: 1px dashed #d1d5db; border-radius: 8px;
    display: grid; place-items: center; color: #9ca3af; font-size: 12px;
}
.tp-ex-body h5 { font-size: 1.05rem; font-weight: 600; }
.tp-ex-body ul { padding-left: 18px; }

.tp-ex-thumb { width: 96px; flex: none; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; align-self: flex-start; }
.tp-ex-thumb.tp-nodia { width: 96px; height: 80px; font-size: 1.2rem; }
.tp-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.tp-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.tp-pages img { width: 100%; border: 1px solid #e5e7eb; border-radius: 6px; cursor: zoom-in; background: #fff; }

.tp-timeline .tp-tl-item { border-left: 2px solid #e5e7eb; padding: 0 0 12px 12px; }
.tp-timeline .tp-tl-item:last-child { padding-bottom: 0; }

@media (min-width: 1200px) {
    .tp-sticky { position: sticky; top: 76px; }
    .tp-pages-scroll { max-height: calc(100vh - 160px); overflow: auto; }
}

@media (max-width: 575.98px) {
    .tp-ex { grid-template-columns: 1fr; }
    .tp-ex-dia img, .tp-nodia { width: 200px; }
}

/* ikonka plánu v zozname tréningov */
.btn-tp-plan { white-space: nowrap; }
.tp-drop.picked { border-style: solid; border-color: #198754; background: #effaf3; }
.tp-drop.picked > .bi { color: #198754; }
.tp-training-ex { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid #eef0f3; }
.tp-training-ex:first-child { border-top: 0; }
.tp-training-ex img { width: 54px; height: auto; border: 1px solid #e5e7eb; border-radius: 4px; background: #fff; flex: none; align-self: flex-start; }

/* --- tréningové plány: v2 úpravy --- */
.tp-collapse-head { display: flex; align-items: center; cursor: pointer; }
.tp-collapse-head .tp-chevron { transition: transform .2s; }
.tp-collapse-head.collapsed .tp-chevron { transform: rotate(-90deg); }
.tp-collapse-head.collapsed { border-bottom: 0; }

.tp-pages { display: flex; flex-wrap: wrap; gap: 8px; grid-template-columns: none; }
.tp-pages img { width: 96px; height: auto; border: 1px solid #e5e7eb; border-radius: 6px; cursor: zoom-in; background: #fff; }
.tp-pages img:hover { border-color: #0d6efd; }

.tp-zoom-content { background: rgba(15, 23, 42, .94); border: 0; border-radius: 0; overflow: auto; cursor: zoom-out; }
.tp-zoom-content img { display: block; max-width: 100%; max-height: 100vh; margin: auto; background: #fff; object-fit: contain; }
.tp-zoom-close { position: fixed; top: 16px; right: 20px; z-index: 2; opacity: .9; }

.tp-ex-box {
    border: 1px solid #e5e7eb; border-left: 4px solid #0d6efd; border-radius: 10px;
    padding: 14px 16px; margin-bottom: 12px; background: #fff;
}
.tp-ex-box:nth-child(even) { background: #fafbfd; }
.tp-ex-box:last-child { margin-bottom: 0; }
.tp-ex-box:target { box-shadow: 0 0 0 3px rgba(13, 110, 253, .25); }
.tp-ex-box.editing { border-left-color: #fd7e14; background: #fffaf3; }
.tp-ex-view { display: grid; grid-template-columns: 140px 1fr; gap: 16px; }
.tp-ex-view[hidden], .tp-ex-form[hidden] { display: none !important; }
.tp-ex-view .tp-ex-dia img { width: 140px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; cursor: zoom-in; }
.tp-ex-view .tp-nodia { width: 140px; height: 100px; }
.tp-ex-title { font-size: 1.05rem; font-weight: 600; margin: 2px 0 6px; line-height: 1.35; }
.tp-ex-label { color: #0d6efd; }
.tp-ex-dur { color: #6b7280; font-weight: 500; white-space: nowrap; }
.tp-ex-body ul { padding-left: 18px; }
.tp-ex-types { font-size: 12px; color: #6b7280; }
.tp-ex-types a, .tp-ex-types span { color: #6b7280; text-decoration: none; margin-right: 10px; white-space: nowrap; }
.tp-ex-types a::before, .tp-ex-types span::before { content: "#"; opacity: .6; }
.tp-ex-types a:hover { color: #0d6efd; }
.tp-tag-pick.on { background: #0d6efd; color: #fff; }
.tp-ex-card .tp-ex-mini li { margin: 0; }

@media (max-width: 575.98px) {
    .tp-ex-view { grid-template-columns: 1fr; }
    .tp-ex-view .tp-ex-dia img, .tp-ex-view .tp-nodia { width: 180px; }
}

/* --- tréningové plány: v3 úpravy --- */
.tp-group {
    display: inline-block; border-radius: 6px; padding: 2px 9px; font-size: 12px; font-weight: 700;
    letter-spacing: .02em; white-space: nowrap; line-height: 1.5; vertical-align: middle;
}
.tp-group-u18 { background: #0d6efd; color: #fff; }
.tp-group-u20 { background: #6f42c1; color: #fff; }
.tp-group-zeny { background: #d63384; color: #fff; }
.tp-group-none { background: #f1f3f5; color: #868e96; font-weight: 500; }
.tp-group:not(.tp-group-u18):not(.tp-group-u20):not(.tp-group-zeny):not(.tp-group-none) { background: #495057; color: #fff; }
.tp-group-lg { font-size: 15px; padding: 4px 12px; }

/* náhľady nákresov na kartách - malé */
.tp-thumbs { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.tp-thumbs img { width: 64px; max-width: 64px; height: auto; max-height: 90px; object-fit: cover; aspect-ratio: auto; }
.tp-ex-thumb { width: 96px; max-height: 130px; object-fit: contain; }

/* originál - malé náhľady */
.tp-pages img { width: 90px; max-width: 90px; max-height: 130px; object-fit: cover; object-position: top; }

/* cvičenia v detaile - samostatné bloky */
.tp-ex-box {
    border: 1px solid #dbe3ee; border-left: 5px solid #0d6efd; border-radius: 10px;
    padding: 0; margin: 0 0 22px 0; background: #fff; overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.tp-ex-box:nth-child(even) { background: #fff; }
.tp-ex-box:last-of-type { margin-bottom: 0; }
.tp-ex-head {
    display: flex; align-items: center; gap: 10px; justify-content: space-between;
    background: #eef4ff; border-bottom: 1px solid #dbe3ee; padding: 10px 14px;
}
.tp-ex-head .tp-ex-title { margin: 0; font-size: 1.1rem; font-weight: 700; color: #0f172a; }
.tp-ex-head .tp-ex-label { color: #0d6efd; }
.tp-ex-head .btn { flex: none; }
.tp-ex-view { padding: 14px; }
.tp-ex-form { padding: 14px; }
.tp-ex-box.editing { border-left-color: #fd7e14; background: #fffaf3; }
.tp-ex-box.editing .tp-ex-head { background: #fff1e0; }
.tp-ex-view .tp-ex-dia img { width: 140px; max-width: 140px; height: auto; max-height: 200px; object-fit: contain; }
.tp-ex-body ul { margin-top: 0; }
.tp-ex-body li { margin-bottom: 3px; }
.tp-tag, .tp-focus { margin-right: 4px; }

/* karta plánu v zozname */
.tp-card .card-body { overflow: hidden; }
.tp-training-ex img { width: 54px; max-width: 54px; max-height: 80px; object-fit: contain; }
