.table-row{
    cursor:pointer;
}
.mdi::before {
    font-size: 24px;
    line-height: 14px;
}
.btn .mdi::before {
    position: relative;
    top: 4px;
}
.btn-xs .mdi::before {
    font-size: 18px;
    top: 3px;
}
.btn-sm .mdi::before {
    font-size: 18px;
    top: 3px;
}
.dropdown-menu .mdi {
    width: 18px;
}
.dropdown-menu .mdi::before {
    position: relative;
    top: 4px;
    left: -8px;
}
.nav .mdi::before {
    position: relative;
    top: 4px;
}
.navbar .navbar-toggle .mdi::before {
    position: relative;
    top: 4px;
    color: #FFF;
}
.breadcrumb .mdi::before {
    position: relative;
    top: 4px;
}
.breadcrumb a:hover {
    text-decoration: none;
}
.breadcrumb a:hover span {
    text-decoration: underline;
}
.alert .mdi::before {
    position: relative;
    top: 4px;
    margin-right: 2px;
}
.input-group-addon .mdi::before {
    position: relative;
    top: 3px;
}
.navbar-brand .mdi::before {
    position: relative;
    top: 2px;
    margin-right: 2px;
}
.list-group-item .mdi::before {
    position: relative;
    top: 3px;
    left: -3px
}
.chart-container {
    position: relative;
    height: 150px !important; /* Zorg ervoor dat de hoogte altijd wordt gerespecteerd */
    width: 100%;
}
.marker-toggle-container {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;  /* ✅ Kleinere tekst */
    margin-top: 5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 35px;  /* ✅ Kleinere switch */
    height: 18px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: red;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: green;
}

input:checked + .slider:before {
    transform: translateX(17px);
}

.active-round {
    background-color: rgba(195, 210, 25, 0.2) !important; /* ✅ Highlight ronde in tabel */
}

/* 🚀 Hover-effect */
.clickable-row:hover td {
    background-color: rgba(25, 118, 210, 0.2) !important; /* Lichtblauw bij hover */
}

/* 🎯 Actieve ronde na selectie */
.clickable-row.active-round td {
    background-color: rgba(25, 118, 210, 0.4) !important; /* Donkerder blauw als geselecteerd */
}

.form-check-input:checked {
    background-color: #d32f2f !important; /* ✅ Rood als markers zichtbaar zijn */
    border-color: #d32f2f !important;
}

.form-check-input:not(:checked) {
    background-color: #757575 !important; /* ✅ Grijs als markers verborgen zijn */
    border-color: #757575 !important;
}

/* Lijstkaartjes (trainingen, uitrusting, FTP): rij met rond icoon, titel, subtitel en waardelabels */
.card-entry {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid #edf0f3;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.card-entry:last-child {
    margin-bottom: 0;
}

.card-entry:hover,
.card-entry:visited,
.card-entry:focus {
    color: inherit;
    text-decoration: none;
}

.card-entry:hover {
    background-color: #f8fafd;
    border-color: rgba(25, 118, 210, 0.35);
    box-shadow: 0 2px 10px rgba(25, 118, 210, 0.08);
}

.card-entry:focus-visible {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
}

.card-entry-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 118, 210, 0.1);
    color: #1976d2;
    font-size: 1rem;
}

.card-entry-body {
    flex: 1 1 auto;
    min-width: 0;
}

.card-entry-header {
    font-weight: 600;
    font-size: 0.95rem;
    color: #222;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-entry-subtitle {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.1rem;
}

.card-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.2;
}

.card-entry-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f3f5f8;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    color: #222;
    white-space: nowrap;
}

.card-entry-meta > span i {
    color: #6c757d;
    font-size: 0.72rem;
}

.card-entry-meta-label {
    color: #6c757d;
}

.card-entry-meta > span.card-entry-meta-gold,
.card-entry-meta > span.card-entry-meta-gold i {
    background: #fdf3d7;
    color: #9a6b00;
}

.card-entry-chevron {
    flex: 0 0 auto;
    color: #adb5bd;
    font-size: 1.1rem;
}

.card-entry:hover .card-entry-chevron {
    color: #1976d2;
}

.info-group {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
}

.info-group:last-child {
    border-bottom: none;
}

.info-group h6 {
    font-size: 0.95rem;
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Prestaties bij een training (records, mijlpalen, trends) */
.achievement-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.5rem;
}

.achievement {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.88rem;
}

.achievement-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #f3f5f8;
    color: #6c757d;
    font-size: 0.85rem;
}

.achievement-title {
    font-weight: 600;
    color: #222;
}

.achievement-detail {
    color: #6c757d;
    font-size: 0.8rem;
}

.achievement-gold .achievement-icon { background: #fdf3d7; color: #c99700; }
.achievement-silver .achievement-icon { background: #eef0f3; color: #8a94a3; }
.achievement-bronze .achievement-icon { background: #f8e9dd; color: #b06a36; }
.achievement-positive .achievement-icon { background: #e3f4e8; color: #2e7d32; }
.achievement-neutral .achievement-icon { background: #e8f1fb; color: #1976d2; }

/* Trainingsdetail: kop met kerncijfers, daaronder route, zones, grafieken en details als losse kaarten */
.training-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
    text-decoration: none;
}

.training-back-link:hover {
    color: #1976d2;
}

.training-hero {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.training-hero-icon {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
}

.training-hero-body {
    min-width: 0;
}

.training-hero-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
    color: #222;
}

.training-hero-subtitle {
    margin-top: 0.2rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.training-hero .card-entry-meta {
    margin-top: 0.6rem;
}

.training-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.training-kpi {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.8rem 0.95rem;
    min-width: 0;
}

.training-kpi-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.training-kpi-label i {
    color: #1976d2;
    font-size: 0.75rem;
}

.training-kpi-value {
    margin-top: 0.25rem;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    color: #222;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.training-kpi-value small {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
}

/* Markerschakelaar: rustig blauw i.p.v. de algemene rood/grijs-stijl van form-check-input */
.training-marker-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0;
    font-size: 0.85rem;
    color: #6c757d;
}

.training-marker-toggle #toggle-markers {
    float: none;
    margin: 0;
}

.training-marker-toggle .form-check-input:checked {
    background-color: #1976d2 !important;
    border-color: #1976d2 !important;
}

.training-marker-toggle .form-check-input:not(:checked) {
    background-color: #fff !important;
    border-color: #ced4da !important;
}

.training-route {
    display: grid;
    gap: 1rem;
}

.training-map {
    height: 380px;
    border-radius: 10px;
    isolation: isolate;
}

.training-rounds {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.training-rounds-hint,
.training-charts-hint {
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.training-rounds-scroll {
    max-height: 280px;
    overflow-y: auto;
}

.training-rounds-table {
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.training-rounds-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

.soft-ui .training-rounds-table .clickable-row:hover td {
    background-color: #f4f8fd !important;
}

.soft-ui .training-rounds-table .clickable-row.active-round td {
    background-color: rgba(25, 118, 210, 0.14) !important;
    color: #1976d2;
    font-weight: 600;
}

@media (min-width: 992px) {
    .training-route.has-rounds {
        grid-template-columns: minmax(0, 1fr) 380px;
    }

    .training-route.has-rounds .training-map {
        height: 440px;
    }

    .training-route.has-rounds .training-rounds-scroll {
        max-height: 412px;
    }
}

.training-zones {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .training-zones {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2.5rem;
    }
}

.training-zone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
}

.training-zone-name {
    flex: 0 0 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #222;
}

.training-zone-main {
    flex: 1 1 auto;
    min-width: 0;
}

.training-zone-range {
    margin-bottom: 0.2rem;
    font-size: 0.72rem;
    color: #6c757d;
}

.training-zone-bar {
    height: 8px;
    border-radius: 999px;
    background: #f1f3f5;
    overflow: hidden;
}

.training-zone-bar > div {
    height: 100%;
    border-radius: 999px;
}

.training-zone-time {
    flex: 0 0 5.5rem;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    color: #222;
    font-variant-numeric: tabular-nums;
}

.training-zone-time small {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: #6c757d;
}

.training-chart + .training-chart {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f5;
}

.training-chart-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
}

.training-chart-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.training-chart .chart-container {
    height: 170px !important;
}

/* Details: kolommen die zich vullen zoals een krant, zodat groepen van ongelijke lengte geen gaten geven */
.training-facts-grid {
    columns: 240px;
    column-gap: 2.5rem;
}

.training-facts-group {
    break-inside: avoid;
    margin-bottom: 1.25rem;
}

.training-facts {
    margin: 0;
    font-size: 0.88rem;
}

.training-facts > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.training-facts > div:last-child {
    border-bottom: none;
}

.training-facts dt {
    font-weight: 400;
    color: #6c757d;
}

.training-facts dd {
    margin: 0;
    text-align: right;
    font-weight: 500;
    color: #222;
    font-variant-numeric: tabular-nums;
}

.training-facts dd small {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: #6c757d;
}

.training-fact-hint {
    border-bottom: 1px dotted #adb5bd;
    cursor: help;
}

@media (max-width: 576px) {
    .training-hero-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .training-hero-title {
        font-size: 1.25rem;
    }

    .training-kpi-value {
        font-size: 1.2rem;
    }

    .training-map {
        height: 300px;
    }
}

.info-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    row-gap: 0.35rem;
    column-gap: 1.2rem;
    font-size: 0.88rem;
}

.info-grid .label {
    color: #666;
    font-weight: 500;
    text-align: right;
    padding-right: 0.5rem;
    border-right: 1px solid #ddd;
}

.info-grid .value {
    color: #222;
    padding-left: 0.6rem;
}

.section-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.section {
    flex: 1 1 320px;
    min-width: 280px;
}

.card-block {
    background: #f8f9fa;
    border-left: 4px solid #1976d2;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.card-block:hover {
    background-color: #dbe8fd;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.card-block h6 {
    font-size: 0.85rem;
    color: #1976d2;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.statistics-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr; /* standaard 1 kolom (mobiel) */
}

.tooltip {
    margin: 2px !important;
}

.card-header-primary {
    background-color: #1976d2;
    color: #fff;
    padding: 0.5rem 1rem;
}

.card-header-primary h6 {
    font-size: 0.95rem;
    margin-bottom: 0;
    font-weight: 600;
}

.card-header-primary small {
    font-size: 0.8rem;
    opacity: 0.85;
}

.tabs-scrollable-container {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: -1px; /* zodat het aansluit met de content */
}

.tabs-scrollable {
    margin-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    flex-wrap: nowrap;
    position: relative;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.tabs-scrollable .nav-link {
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
}

.tabs-scrollable .nav-item {
    flex: 0 0 auto;
}

.tabs-scrollable::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
    z-index: 1;
}

.tabs-scrollable .nav-item:last-child {
    margin-right: 12px;
}

#toggle-markers {
    margin-left: 8px;
    margin-top: 0.25rem;
}

.toggle-markers-label {
    font-size: 0.85rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.table-compact {
    font-size: 0.8rem;
    border-collapse: collapse;
    width: 100%;
}

.table-compact thead th {
    background-color: #1976d2;
    color: #fff;
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.3rem 0.4rem;
}

.table-compact td {
    padding: 0.3rem 0.4rem;
    vertical-align: middle;
    font-size: 0.78rem;
    line-height: 1.2;
}

.table-compact .clickable-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.table-compact .clickable-row:hover {
    background-color: #f4f4f4;
}

.pagination {
    justify-content: center;
    margin-top: 1rem;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.pagination .page-link {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    color: #1976d2;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    transition: background-color 0.2s, color 0.2s;
}

.pagination .page-link:hover {
    background-color: #e3f2fd;
    color: #1565c0;
}

.pagination .active .page-link {
    background-color: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.pagination .disabled .page-link {
    color: #999;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

@media (max-width: 576px) {
    .info-group h6 {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .info-grid {
        grid-template-columns: 140px 1fr;
        font-size: 0.82rem;
    }

    .info-grid .label {
        text-align: right;
        border-right: 1px solid #ddd;
        padding-right: 0.5rem;
    }

    .info-grid .value {
        padding-left: 0.5rem;
    }

    .card-header-primary h6 {
        font-size: 0.85rem;
    }

    .card-header-primary small {
        font-size: 0.7rem;
    }

    .table-compact {
        font-size: 0.75rem;
    }

    .table-compact thead th,
    .table-compact td {
        padding: 0.25rem 0.3rem;
        font-size: 0.7rem;
    }

    .pagination .page-link {
        font-size: 0.78rem;
        padding: 0.3rem 0.5rem;
    }
}

@media (min-width: 768px) {
    .statistics-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .tabs-scrollable .nav-link {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

.integration-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.integration-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.85rem 1.25rem;
    transition: background-color 0.15s ease;
}

.integration-row:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.integration-row:last-child {
    border-bottom: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.integration-row:hover {
    background-color: #f8f9fa;
}

.integration-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.integration-logo-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 110px;
    flex-shrink: 0;
}

.integration-logo {
    display: block;
    height: 22px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
}

.integration-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.stat-tile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #f8f9fa;
    border-left: 4px solid var(--accent-color, #1976d2);
    border-radius: 6px;
    padding: 0.9rem 1.1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.stat-tile-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 118, 210, 0.12);
    color: var(--accent-color, #1976d2);
    font-size: 1.1rem;
}

.stat-tile-body {
    min-width: 0;
}

.stat-tile-label {
    font-size: 0.78rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.1rem;
}

.stat-tile-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
}

.stat-tile-meta {
    font-size: 0.78rem;
    color: #666;
    margin-top: 0.15rem;
}

.stat-tile-meta.positive {
    color: #2e7d32;
}

.stat-tile-meta.negative {
    color: #c62828;
}

.stat-tile-progress {
    margin-top: 0.4rem;
}

.widget-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
    .widget-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.widget-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.widget-card-header .form-select {
    width: auto;
}

@media (max-width: 576px) {
    .integration-row {
        flex-direction: column;
        align-items: stretch;
    }

    .integration-brand {
        justify-content: space-between;
    }

    .integration-logo-box {
        width: auto;
    }

    .integration-actions {
        justify-content: stretch;
    }

    .integration-actions > * {
        flex: 1 1 auto;
    }
}

.auth-page {
    display: flex;
    justify-content: center;
    padding: 4rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.auth-card-header {
    text-align: center;
    padding: 2.25rem 2rem 1rem;
}

.auth-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: rgba(25, 118, 210, 0.12);
    color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.auth-card-body {
    padding: 0.5rem 2rem 2.25rem;
}

.auth-provider-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-provider-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    color: #222;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-provider-btn:hover {
    background-color: #f4f8fd;
    border-color: #1976d2;
    color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15);
}

.auth-provider-icon {
    display: flex;
    align-items: center;
    color: #1976d2;
}

.auth-provider-name {
    flex: 1;
}

.auth-provider-arrow {
    opacity: 0.4;
}

.settings-sidebar {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.settings-sidebar .list-group-item {
    border: none;
    border-radius: 0;
    padding: 0.85rem 1.25rem;
    color: #222;
    font-weight: 500;
}

.settings-sidebar .list-group-item .mdi {
    width: 20px;
    margin-right: 0.5rem;
    color: #6c757d;
}

.settings-sidebar .list-group-item:hover {
    background-color: #f4f8fd;
}

.settings-sidebar .list-group-item.active {
    background-color: rgba(25, 118, 210, 0.12);
    color: #1976d2;
    box-shadow: inset 3px 0 0 #1976d2;
}

.settings-sidebar .list-group-item.active .mdi {
    color: #1976d2;
}

.profile-identity-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.card-header-accent {
    background-color: #1976d2;
    color: #fff;
}

.page-header {
    background-color: #1976d2;
    color: #fff;
}

.page-header .page-header-action {
    color: #fff;
    text-decoration: none;
}

/* Rustige kaartstijl (instellingen, activiteiten): zelfde uitstraling als de instellingen-zijbalk, zonder blauwe balken en randen */
.soft-ui .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.soft-ui .card-header,
.soft-ui .card-header-accent {
    background: transparent;
    color: #222;
    border-bottom: none;
    padding: 1.25rem 1.5rem 0;
    font-size: 1.05rem;
}

.soft-ui .card-header b {
    font-weight: 600;
}

.soft-ui .card-body {
    padding: 1rem 1.5rem 1.5rem;
}

/* Horizontale formulieren: iets bredere labelkolom zodat labels niet midden in een woord afbreken */
@media (min-width: 576px) {
    .soft-ui .row > .col-sm-2.col-form-label {
        width: 25%;
    }

    .soft-ui .row > .col-sm-10,
    .soft-ui .row > .offset-sm-2.col-sm-10 {
        width: 75%;
    }

    .soft-ui .row > .offset-sm-2 {
        margin-left: 25%;
    }
}

.soft-ui .settings-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin: 1.25rem 0 0.5rem;
}

.soft-ui .settings-section-title:first-child {
    margin-top: 0;
}

.soft-ui .integration-list {
    border: none;
}

.soft-ui .integration-row {
    padding: 0.85rem 0.5rem;
    border-radius: 8px;
}

/* Paginakop binnen soft-ui: gewone titel in plaats van blauwe balk */
.soft-ui .page-header {
    background: transparent;
    color: #222;
    padding: 0 !important;
    font-size: 1.6rem !important;
    font-weight: 600;
}

.soft-ui .page-header .page-header-action {
    color: #6c757d;
}

.soft-ui .page-header .page-header-action:hover {
    color: #1976d2;
}

.soft-ui .card-header-primary small {
    color: #6c757d;
    opacity: 1;
}

/* Dashboard binnen soft-ui: witte tegels en rustige grafiekkoppen */
.soft-ui .stat-tile {
    background: #fff;
    border-left: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 1rem 1.25rem;
}

.soft-ui .card-header-primary {
    background: transparent;
    color: #222;
}

.soft-ui .widget-card-header {
    padding: 1rem 1.5rem 0;
}

.soft-ui .widget-card-header h6 {
    font-size: 1.05rem;
    font-weight: 600;
}

.soft-ui .widget-card-header h6 i {
    color: #1976d2;
}

@media (min-width: 576px) {
    .soft-ui .dashboard-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .soft-ui .dashboard-tiles {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Registratietabellen (stappen, slaap, metingen, cliënten) */
.soft-ui .table-soft {
    margin-bottom: 0;
}

.soft-ui .table-soft > thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    border-bottom-color: #e9ecef;
}

.soft-ui .table-soft td {
    border-color: #f1f3f5;
}

.soft-ui .table-soft .table-row:hover td {
    background-color: #f4f8fd;
}

/* Weektabellen (gewicht, stappen, slaap): per week een kopregel met gemiddelde en verschil */
.soft-ui .table-weekly td {
    padding: 0.6rem 0.5rem;
    vertical-align: middle;
}

.soft-ui .table-weekly .week-row td {
    background-color: #f8f9fa;
    border-bottom-color: #edf0f3;
    font-size: 0.78rem;
    font-weight: 600;
    color: #495057;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.soft-ui .table-weekly tbody .week-row:not(:first-child) td {
    border-top: 0.75rem solid #fff;
}

.soft-ui .week-avg {
    color: #222;
}

.soft-ui .week-diff {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: #e9ecef;
    color: #495057;
    font-weight: 600;
}

.soft-ui .week-diff.trend-good {
    background: rgba(46, 125, 50, 0.12);
    color: #2e7d32;
}

.soft-ui .week-diff.trend-bad {
    background: rgba(198, 40, 40, 0.1);
    color: #c62828;
}

/* Metingen (omtrek, huidplooi): tegels voor de laatste meting en een geschiedenislijst */
.measure-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.measure-tile {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
}

.measure-tile-label,
.measure-key-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
}

.measure-tile-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    margin-bottom: 0.2rem;
    font-variant-numeric: tabular-nums;
}

.measure-tile-value small,
.measure-key-value small {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6c757d;
}

.measure-tile .week-diff {
    margin-left: 0;
    font-size: 0.75rem;
}

.measure-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid #f1f3f5;
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

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

a.measure-row:hover {
    background-color: #f8fafd;
    color: inherit;
}

a.measure-row:hover .card-entry-chevron {
    color: #1976d2;
}

.measure-row-main {
    flex: 1 1 auto;
    min-width: 0;
}

.measure-row-date {
    font-weight: 600;
    color: #222;
}

.measure-row .card-entry-meta {
    margin-top: 0.35rem;
}

.measure-row-key {
    flex: 0 0 auto;
    text-align: right;
    min-width: 90px;
}

.measure-key-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    font-variant-numeric: tabular-nums;
}

.measure-row-key .week-diff {
    margin-left: 0;
    margin-top: 0.15rem;
    font-size: 0.72rem;
}



/* PWA: terugknop alleen tonen als de app geïnstalleerd (standalone) draait */
.pwa-back-btn {
    display: none;
    padding: 0 8px 0 0;
    font-size: 1.75rem;
    line-height: 1;
    text-decoration: none;
    color: #222;
}

html.pwa-standalone:not(.pwa-home) .pwa-back-btn {
    display: inline-block;
}

/* Trek-om-te-verversen in de geïnstalleerde app, zie pull_to_refresh.js. Start net boven het scherm. */
.pull-refresh {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) - 44px);
    left: 50%;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
    color: #8a96a8;
    font-size: 1.6rem;
    opacity: 0;
    transform: translate(-50%, 0);
    pointer-events: none;
}

.pull-refresh-ready {
    color: #1976d2;
}

.pull-refresh i {
    display: inline-block;
    line-height: 1;
}

/* Pagina vervaagt tijdens het herladen, zodat duidelijk is dat er iets gebeurt */
html.pull-refreshing .app-main {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.pull-refresh-release {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.pull-refresh-loading i {
    animation: pull-refresh-spin 0.8s linear infinite;
}

@keyframes pull-refresh-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ---------- Layout: menubalk, cliëntbalk en footer ---------- */
.app-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-main {
    flex: 1 0 auto;
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

.app-navbar {
    /* Dicht (niet doorzichtig) met een lichte blauwgrijze tint, zodat content er bij scrollen niet doorheen schijnt */
    background: #f5f8fc;
    box-shadow: 0 1px 0 #e3e9f1, 0 4px 16px rgba(0, 0, 0, 0.04);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

/* Ontwikkelomgeving: dunne rode lijn en DEV-label, zodat dev en productie niet te verwarren zijn */
.app-navbar-dev {
    border-top: 3px solid #dc3545;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #222;
    letter-spacing: -0.01em;
}

.app-brand:hover {
    color: #222;
}

.app-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    color: #fff;
    font-size: 0.9rem;
}

.app-brand-icon-sm {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 0.6rem;
}

.app-dev-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    background: #dc3545;
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
}

.app-navbar .navbar-toggler {
    border: none;
    color: #222;
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
}

.app-navbar .navbar-toggler:focus {
    box-shadow: none;
}

.app-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #495057;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.45rem 0.75rem !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.app-nav .nav-link .mdi::before {
    font-size: 18px;
    top: 0;
}

.app-nav .nav-link:hover,
.app-nav .nav-link:focus,
.app-nav .nav-link.show {
    color: #1976d2;
    background-color: #f4f8fd;
}

.app-nav .nav-link.active {
    color: #1976d2;
    background-color: rgba(25, 118, 210, 0.1);
}

@media (min-width: 992px) {
    .app-nav .nav-item + .nav-item {
        margin-left: 0.15rem;
    }
}

@media (max-width: 991.98px) {
    .app-navbar .navbar-collapse {
        padding-top: 0.5rem;
    }
}

.app-navbar .dropdown-menu,
.client-navbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 0.4rem;
    min-width: 13rem;
    margin-top: 0.4rem;
}

.app-navbar .dropdown-item,
.client-navbar .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
}

.app-navbar .dropdown-item .mdi {
    width: auto;
    color: #6c757d;
}

.app-navbar .dropdown-item .mdi::before {
    font-size: 18px;
    top: 0;
    left: 0;
}

.app-navbar .dropdown-item:hover,
.client-navbar .dropdown-item:hover {
    background-color: #f4f8fd;
    color: #1976d2;
}

.app-navbar .dropdown-item:hover .mdi {
    color: #1976d2;
}

.app-navbar .dropdown-item.text-danger:hover,
.app-navbar .dropdown-item.text-danger:hover .mdi {
    background-color: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.app-user-toggle {
    gap: 0.5rem !important;
}

/* Bel met het aantal ongelezen berichten; staat buiten het inklapmenu */
.app-navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 992px) {
    .app-navbar-actions {
        order: 1;
        margin-left: 0.25rem;
    }
}

.app-notifications-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #495057;
    font-size: 1.35rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.app-notifications-link .mdi::before {
    top: 0;
}

.app-notifications-link:hover,
.app-notifications-link:focus,
.app-notifications-link.active {
    color: #1976d2;
    background-color: rgba(25, 118, 210, 0.1);
}

.app-notifications-count {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    border: 2px solid #f5f8fc;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}

.app-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.app-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 118, 210, 0.12);
    color: #1976d2;
    font-weight: 700;
    font-size: 0.85rem;
}

.app-user-header {
    padding: 0.5rem 0.7rem 0.25rem;
}

/* Cliëntbalk voor personal trainers */
.client-navbar {
    background: #eef4fb;
    border-bottom: 1px solid #dbe7f5;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    font-size: 0.9rem;
}

.client-navbar-name {
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.client-navbar .navbar-toggler {
    border: none;
    color: #1976d2;
}

.client-navbar .nav-link {
    color: #1976d2;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.3rem 0.7rem !important;
}

.client-navbar .nav-link:hover,
.client-navbar .nav-link.show {
    background: rgba(25, 118, 210, 0.1);
}

/* Footer */
.app-footer {
    flex-shrink: 0;
    border-top: 1px solid #edf0f3;
    background: #fff;
    color: #6c757d;
    font-size: 0.85rem;
    padding: 1rem 0;
}

.app-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.app-footer-brand,
.app-footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem 1.25rem;
    flex-wrap: wrap;
}

.app-footer-brand {
    gap: 0.5rem;
}

.app-footer a {
    color: #495057;
    text-decoration: none;
}

.app-footer a:hover {
    color: #1976d2;
}

.app-footer-version {
    font-variant-numeric: tabular-nums;
    background: #f3f5f8;
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
    font-size: 0.78rem;
}

@media (max-width: 575.98px) {
    .app-footer-inner {
        justify-content: center;
        text-align: center;
    }
}

/* Tabbalk onderaan op mobiel, zoals een native app (zie includes/tab_bar.html) */
.app-tabbar {
    display: none;
}

@media (max-width: 991.98px) {
    .app-tabbar {
        display: flex;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 1030;
        padding: 5px;
        border: 1px solid #e3e9f1;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.92);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
    }

    .app-tabbar > .app-tabbar-item,
    .app-tabbar-nieuw {
        flex: 1 1 0;
        min-width: 0;
    }

    .app-tabbar-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        width: 100%;
        padding: 0.4rem 0;
        border: none;
        border-radius: 999px;
        background: none;
        color: #495057;
        font-size: 0.7rem;
        font-weight: 500;
        line-height: 1.2;
        text-decoration: none;
        white-space: nowrap;
        -webkit-tap-highlight-color: transparent;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .app-tabbar-item .mdi::before {
        font-size: 22px;
        line-height: 22px;
    }

    .app-tabbar-item.active,
    .app-tabbar-item.show {
        color: #1976d2;
        background-color: rgba(25, 118, 210, 0.1);
    }

    /* Ruimte onder de footer, zodat de zwevende tabbalk niets afdekt */
    .app-body-tabbar {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
}

.app-tabbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 0.4rem;
    min-width: 13rem;
}

.app-tabbar .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
}

.app-tabbar .dropdown-item .mdi {
    width: auto;
    color: #6c757d;
}

.app-tabbar .dropdown-item .mdi::before {
    font-size: 18px;
    top: 0;
    left: 0;
}

.app-tabbar .dropdown-item:hover,
.app-tabbar .dropdown-item:hover .mdi {
    background-color: #f4f8fd;
    color: #1976d2;
}

@media print {
    .app-tabbar {
        display: none !important;
    }
}
