/* =========================================================================
   Trainer environment (desktop-first, design at 1440 px). Tokens: app.css :root.
   ========================================================================= */

/* ---- Shell: side bar + content ---------------------------------------- */

.tbm-trainer {
    display: grid;
    grid-template-columns: var(--tbm-sidebar-width) minmax(0, 1fr);
    min-height: 100dvh;
    /* The side bar colour runs down the whole page, also below the sticky side bar. */
    background: linear-gradient(to right, var(--tbm-sidebar) var(--tbm-sidebar-width), var(--tbm-bg) 0);
}

.tbm-trainer__topbar,
.tbm-trainer__backdrop {
    display: none;
}

.tbm-trainer__sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
}

.tbm-trainer__content {
    min-width: 0;
    padding: 28px 32px 48px;
}

@media (max-width: 1023.98px) {
    .tbm-trainer {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        background: var(--tbm-bg);
    }

    .tbm-trainer__topbar {
        position: sticky;
        top: 0;
        z-index: 1200;
        display: flex;
        align-items: center;
        gap: 12px;
        height: 60px;
        padding: 0 16px;
        background: var(--tbm-sidebar);
        border-bottom: 1px solid var(--tbm-border);
    }

    .tbm-trainer__sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1300;
        width: var(--tbm-sidebar-width);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .tbm-trainer--drawer-open .tbm-trainer__sidebar {
        transform: none;
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.6);
    }

    .tbm-trainer--drawer-open .tbm-trainer__backdrop {
        position: fixed;
        inset: 0;
        z-index: 1250;
        display: block;
        background: rgba(4, 4, 5, 0.72);
    }

    .tbm-trainer__content {
        padding: 20px 20px 40px;
    }
}

/* ---- Side bar ---------------------------------------------------------- */

.tbm-logo {
    font-weight: 700;
    font-style: italic;
    font-size: 1.9rem;
    line-height: 1;
    letter-spacing: 0.01em;
    transform: var(--tbm-skew);
}

.tbm-logo sup {
    font-size: 0.4em;
    font-style: normal;
    vertical-align: super;
}

.tbm-side__env {
    color: var(--tbm-text-secondary);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.tbm-side {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 22px 0 16px;
    background: var(--tbm-sidebar);
    overflow-y: auto;
}

.tbm-side__logo {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 20px 26px;
    color: var(--tbm-text);
    text-decoration: none;
}

.tbm-side__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    padding-right: 10px;
}

.tbm-side__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 0 10px 0 18px;
    color: var(--tbm-text);
    font-size: 1.15rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0 var(--tbm-radius) var(--tbm-radius) 0;
}

.tbm-side__item .mud-icon-root {
    flex: none;
    font-size: 1.35rem;
    color: var(--tbm-text-secondary);
}

.tbm-side__item:hover:not(.active) {
    background: rgba(var(--tbm-overlay), 0.04);
}

/* Active: pink parallelogram, dark uppercase text */
.tbm-side__item.active {
    margin-left: 8px;
    padding-left: 18px;
    background: var(--tbm-pink);
    color: var(--tbm-on-pink);
    clip-path: polygon(4% 0, 100% 0, 95% 100%, 0 100%);
    border-radius: 0;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tbm-side__item.active .mud-icon-root {
    color: var(--tbm-on-pink);
}

.tbm-side__item-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tbm-side__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: var(--tbm-radius-pill);
    background: var(--tbm-carbs);
    color: var(--tbm-on-accent);
    font-size: 0.9rem;
    font-weight: 700;
}

.tbm-side__heading {
    margin: 22px 0 6px;
    padding: 0 22px;
    color: var(--tbm-text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.tbm-side__user-menu {
    width: 100%;
    padding: 12px 14px 0;
}

.tbm-side__user {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: var(--tbm-radius);
    background: transparent;
    color: var(--tbm-text);
    text-align: left;
    cursor: pointer;
}

.tbm-side__user:hover {
    background: rgba(var(--tbm-overlay), 0.04);
}

.tbm-side__user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.tbm-side__user-text strong {
    font-size: 1.15rem;
}

.tbm-side__user-text span {
    color: var(--tbm-text-secondary);
    font-size: 1rem;
}

.tbm-side__user-popover .mud-menu-item {
    font-family: var(--tbm-font);
    font-size: 1.1rem;
}

/* ---- Initials avatar --------------------------------------------------- */

.tbm-initials {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--tbm-radius-pill);
    background: var(--tbm-input-raised);
    color: var(--tbm-text);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.tbm-initials--blue {
    background: var(--tbm-carbs);
    color: var(--tbm-on-accent);
}

.tbm-initials--small {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
}

.tbm-initials--large {
    width: 76px;
    height: 76px;
    background: #FFFFFF;
    color: var(--tbm-chart-blue);
    font-size: 2rem;
}

.tbm-initials--dark {
    background: var(--tbm-bg);
    color: var(--tbm-carbs);
}

/* ---- Page header ------------------------------------------------------- */

.tbm-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.tbm-page-header__titles {
    min-width: 0;
}

.tbm-page-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tbm-page-kicker {
    margin: 0 0 4px;
    color: var(--tbm-text-secondary);
    font-size: 1.15rem;
}

.tbm-page-kicker a {
    color: inherit;
    text-decoration: none;
}

.tbm-page-kicker a:hover {
    color: var(--tbm-text);
}

.tbm-page-title {
    font-size: 3rem;
    letter-spacing: 0;
}

.tbm-accent {
    color: var(--tbm-pink-accent);
}

/* ---- Placeholders (ComingSoon) in the trainer environment -------------- */

.tbm-trainer .tbm-placeholder {
    padding: 0;
}

.tbm-trainer .tbm-placeholder__title {
    margin-bottom: 22px;
    font-size: 3rem;
}

.tbm-trainer .tbm-placeholder__text,
.tbm-empty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 220px;
    margin: 0;
    padding: 32px;
    border: 1px dashed var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: var(--tbm-card);
    text-align: center;
    font-size: 1.2rem;
}

.tbm-empty-card p {
    margin: 0;
}

.tbm-empty-card .mud-icon-root {
    font-size: 2rem;
    color: var(--tbm-text-secondary);
}

/* ---- KPI tiles --------------------------------------------------------- */

.tbm-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.tbm-kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 16px 14px;
    border: 1px solid var(--tbm-border);
    border-radius: var(--tbm-radius);
    background: var(--tbm-card);
}

.tbm-kpi__label {
    color: var(--tbm-text-secondary);
    font-size: 1.1rem;
}

.tbm-kpi__value {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.1;
}

@media (max-width: 1023.98px) {
    .tbm-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---- Filter pills ------------------------------------------------------ */

.tbm-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tbm-filter-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--tbm-radius-pill);
    background: var(--tbm-input-raised);
    color: var(--tbm-text);
    font-family: var(--tbm-font);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.tbm-filter-pill:hover:not(.tbm-filter-pill--active) {
    background: #262632;
}

.tbm-filter-pill--active {
    background: var(--tbm-text);
    color: var(--tbm-bg);
    font-weight: 700;
}

/* ---- Panels, tables, filters ------------------------------------------ */

.tbm-panel {
    padding: 20px 24px 12px;
    border: 1px solid var(--tbm-border);
    border-radius: var(--tbm-radius);
    background: var(--tbm-card);
}

.tbm-panel__title {
    margin: 0 0 16px;
    font-size: 1.6rem;
    transform: none;
}

.tbm-page-sub {
    margin: 6px 0 0;
    color: var(--tbm-text-secondary);
    font-size: 1.2rem;
}

.tbm-link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    color: var(--tbm-text);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.tbm-link-button:hover {
    border-color: var(--tbm-pink);
}

.tbm-link-button .mud-icon-root {
    font-size: 1.1rem;
}

.tbm-text-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--tbm-pink-accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tbm-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.tbm-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 260px;
    max-width: 360px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: var(--tbm-input);
}

.tbm-search-field:focus-within {
    border-color: var(--tbm-pink);
}

.tbm-search-field .mud-icon-root {
    color: var(--tbm-text-secondary);
    font-size: 1.2rem;
}

.tbm-search-field__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--tbm-text);
    font-size: 1.15rem;
}

.tbm-select--compact {
    width: auto;
    min-height: 42px;
    font-size: 1.1rem;
}

.tbm-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    user-select: none;
}

.tbm-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tbm-toggle__track {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: var(--tbm-radius-pill);
    background: var(--tbm-input-raised);
    border: 1px solid var(--tbm-border-strong);
    transition: background 0.15s;
}

.tbm-toggle__track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--tbm-text-secondary);
    transition: transform 0.15s, background 0.15s;
}

.tbm-toggle input:checked + .tbm-toggle__track {
    background: var(--tbm-pink);
    border-color: var(--tbm-pink);
}

.tbm-toggle input:checked + .tbm-toggle__track::after {
    transform: translateX(18px);
    background: var(--tbm-bg);
}

.tbm-toggle input:focus-visible + .tbm-toggle__track {
    outline: 2px solid var(--tbm-pink-accent);
    outline-offset: 2px;
}

.tbm-table-wrap {
    overflow-x: auto;
}

.tbm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.15rem;
}

.tbm-table th {
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid var(--tbm-border);
    color: var(--tbm-text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.tbm-table td {
    padding: 12px 12px 12px 0;
    border-bottom: 1px solid var(--tbm-border);
    vertical-align: middle;
}

.tbm-table tbody tr:last-child td {
    border-bottom: 0;
}

.tbm-table--rows tbody tr {
    cursor: pointer;
}

.tbm-table--rows tbody tr:hover td {
    background: rgba(var(--tbm-overlay), 0.025);
}

.tbm-table__row--inactive td {
    opacity: 0.6;
}

.tbm-sort {
    display: inline-flex;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.tbm-sort:hover {
    color: var(--tbm-text);
}

.tbm-member-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tbm-member-cell__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.tbm-member-cell__text .tbm-muted {
    font-size: 1rem;
}

.tbm-member-cell__name {
    color: var(--tbm-text);
    font-weight: 700;
    text-decoration: none;
}

.tbm-member-cell__name:hover {
    text-decoration: underline;
}

.tbm-week-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.tbm-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0 6px;
    border-top: 1px solid var(--tbm-border);
}

.tbm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 48px 16px;
    text-align: center;
    font-size: 1.15rem;
}

.tbm-empty p {
    margin: 0;
}

.tbm-empty .mud-icon-root {
    font-size: 2rem;
    color: var(--tbm-text-secondary);
}

.tbm-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---- Status chips: green within ±10%, amber ▼ too low, red ▲ too high --- */

.tbm-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: var(--tbm-radius);
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}

.tbm-status__mark {
    font-size: 0.8em;
}

.tbm-status--within {
    background: var(--tbm-success-chip-bg);
    color: var(--tbm-success);
}

.tbm-status--low {
    background: var(--tbm-warning-bg);
    color: var(--tbm-warning);
}

.tbm-status--high {
    background: var(--tbm-error-bg);
    color: var(--tbm-error);
}

.tbm-status--none {
    padding: 0;
    background: none;
    color: var(--tbm-text);
    font-weight: 600;
}

/* ---- Member profile ----------------------------------------------------- */

/* Name and actions on top, then the flags, the intake steps and the tabs as their own row at the bottom of the card. */
.tbm-profile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
    padding: 22px 28px 0;
    border: 1px solid var(--tbm-border);
    border-radius: var(--tbm-radius);
    background: var(--tbm-card);
}

.tbm-profile__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.tbm-profile__main {
    flex: 1 1 360px;
    min-width: 0;
}

.tbm-profile__sub strong {
    color: var(--tbm-text);
    font-weight: 700;
}

/* What to watch: one row of chips */
.tbm-profile__flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tbm-profile__flags .tbm-chip--danger {
    font-size: 1.05rem;
    font-weight: 700;
}

.tbm-profile__step {
    color: var(--tbm-text-secondary);
}

/* The tabs: an underlined row at the bottom of the card */
.tbm-profile__tabs {
    display: flex;
    gap: 26px;
    margin: 4px -28px 0;
    padding: 0 28px;
    overflow-x: auto;
    border-top: 1px solid var(--tbm-border);
}

.tbm-profile__tab {
    padding: 12px 0 9px;
    border-bottom: 3px solid transparent;
    color: var(--tbm-text-secondary);
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.tbm-profile__tab:hover {
    color: var(--tbm-text);
}

.tbm-profile__tab--active {
    border-bottom-color: var(--tbm-pink);
    color: var(--tbm-text);
}

.tbm-profile__main .tbm-page-kicker {
    margin-bottom: 2px;
}

.tbm-profile__title {
    font-size: 2.75rem;
}

.tbm-profile__sub {
    margin: 6px 0 0;
    color: var(--tbm-text-secondary);
    font-size: 1.2rem;
}

.tbm-profile__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tbm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tbm-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: var(--tbm-radius-pill);
    background: var(--tbm-input-raised);
    color: var(--tbm-text);
    font-weight: 600;
    font-size: 1.05rem;
}

.tbm-chip--blue {
    background: var(--tbm-blue-bg);
    color: var(--tbm-carbs);
}

/* Segmented control: Overzicht · Voeding · Trainingen · Notities */
.tbm-segmented {
    display: inline-flex;
    gap: 2px;
    padding: 5px;
    border-radius: var(--tbm-radius);
    background: var(--tbm-card);
    border: 1px solid var(--tbm-border);
}

.tbm-segmented__item {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: var(--tbm-radius);
    color: var(--tbm-text);
    font-weight: 600;
    font-size: 1.15rem;
    text-decoration: none;
    white-space: nowrap;
}

.tbm-segmented__item:hover:not(.tbm-segmented__item--active) {
    background: rgba(var(--tbm-overlay), 0.05);
}

.tbm-segmented__item--active {
    background: var(--tbm-text);
    color: var(--tbm-bg);
    font-weight: 700;
}

.tbm-outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: transparent;
    color: var(--tbm-text);
    font-family: var(--tbm-font);
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.tbm-outline-button:hover:not(:disabled) {
    border-color: var(--tbm-text);
}

.tbm-btn-primary--compact {
    width: auto;
    min-height: 44px;
    padding: 0 26px;
    font-size: 1.15rem;
}

/* Overview grid as in the design: left 1.4fr, right 1fr */
.tbm-dossier-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.tbm-dossier-overview__column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tbm-tcard {
    padding: 22px 24px;
    border: 1px solid var(--tbm-border);
    border-radius: var(--tbm-radius);
    background: var(--tbm-card);
}

.tbm-tcard__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.tbm-tcard__title {
    font-size: 1.6rem;
    transform: none;
}

.tbm-tcard__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tbm-card-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 28px 12px;
    border: 1px dashed var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    text-align: center;
    font-size: 1.1rem;
}

.tbm-card-empty p {
    margin: 0;
}

.tbm-card-empty .mud-icon-root {
    margin-bottom: 4px;
    font-size: 1.7rem;
    color: var(--tbm-text-secondary);
}


@media (max-width: 1023.98px) {
    .tbm-dossier-overview {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---- Nutrition tab ----------------------------------------------------- */

/* Not .tbm-nutrition: that is the nutrition card of the member app (app.css), also loaded here. */
.tbm-member-nutrition {
    display: grid;
    /* The design at 1440 px: ±340 px; a little wider for the Dutch labels, the table needs the rest. */
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.tbm-nutrition__week {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

@media (max-width: 1099.98px) {
    .tbm-member-nutrition {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Daily goals */
.tbm-goal-form .tbm-tcard__title {
    font-size: 1.6rem;
}

.tbm-goal-form__notice {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: var(--tbm-radius);
    background: var(--tbm-warning-bg);
    color: var(--tbm-warning);
}

.tbm-goal-form__presets {
    flex-wrap: nowrap;
    margin-bottom: 18px;
}

.tbm-goal-form__presets .tbm-filter-pill {
    padding: 0 13px;
}

.tbm-goal-form__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tbm-goal-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 136px 36px;
    align-items: center;
    gap: 4px 10px;
}

.tbm-goal-field__label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
}

.tbm-goal-field__input {
    min-height: 52px;
    text-align: right;
    font-weight: 600;
    background: var(--tbm-bg);
    -moz-appearance: textfield;
}

.tbm-goal-field__input::-webkit-outer-spin-button,
.tbm-goal-field__input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.tbm-goal-field__unit {
    color: var(--tbm-text-secondary);
    font-size: 1.2rem;
}

.tbm-goal-field .tbm-field-error {
    grid-column: 2 / 4;
}

.tbm-dot {
    display: inline-block;
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.tbm-dot--kcal {
    background: var(--tbm-bg);
    box-shadow: inset 0 0 0 1.5px var(--tbm-border-strong);
}

.tbm-dot--protein { background: var(--tbm-trainer-protein); }
.tbm-dot--carbs { background: var(--tbm-trainer-carbs); }
.tbm-dot--fat { background: var(--tbm-trainer-fat); }

.tbm-goal-form__info {
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: var(--tbm-radius);
    background: var(--tbm-input);
    color: var(--tbm-text-secondary);
    font-size: 1.1rem;
}

.tbm-goal-form__info--warning {
    background: var(--tbm-warning-bg);
    color: var(--tbm-warning);
}

.tbm-goal-form__warning {
    display: block;
    margin-top: 4px;
    font-weight: 600;
}

.tbm-goal-form__date {
    margin-top: 18px;
}

.tbm-goal-form__date-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--tbm-bg);
    font-family: var(--tbm-font);
    text-align: left;
    cursor: pointer;
}

.tbm-goal-form__date-button .mud-icon-root {
    color: var(--tbm-text-secondary);
    font-size: 1.2rem;
}

.tbm-goal-form__date-hint {
    font-size: 1rem;
}

.tbm-goal-form__error {
    display: block;
}

.tbm-goal-form__save {
    margin-top: 20px;
}

.tbm-goal-form__hint {
    margin: 10px 0 0;
    font-size: 1.05rem;
}

.tbm-goal-history {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--tbm-border);
}

.tbm-goal-history__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--tbm-text-secondary);
    font-family: var(--tbm-font);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
}

.tbm-goal-history__toggle .mud-icon-root {
    font-size: 1rem;
}

/* TBM-calculator in "Dagdoelen instellen" */
.tbm-calculator {
    padding: 12px 0;
    border-bottom: 1px solid var(--tbm-border);
}

.tbm-calculator__toggle:disabled {
    cursor: default;
    opacity: 0.5;
}

.tbm-calculator__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.tbm-calculator__facts {
    display: grid;
    gap: 6px;
    margin: 0;
}

.tbm-calculator__fact {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
    font-size: 1.05rem;
}

.tbm-calculator__fact dt {
    font-weight: 700;
}

.tbm-calculator__fact dd {
    margin: 0;
}

.tbm-calculator__fact dd .tbm-muted {
    margin-left: 6px;
}

.tbm-calculator__fact--missing dd {
    color: var(--tbm-pink-accent);
}

.tbm-calculator__profile-link {
    display: block;
    margin-top: 4px;
}

.tbm-calculator__result {
    display: block;
    font-size: 1.3rem;
}

.tbm-calculator__detail,
.tbm-calculator__hint {
    display: block;
    margin: 0;
}

.tbm-calculator__apply {
    align-self: flex-start;
}

.tbm-goal-history__list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    font-size: 1.02rem;
}

.tbm-goal-history__list li {
    padding: 4px 0;
}

/* Week overview */
.tbm-square-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: var(--tbm-bg);
    color: var(--tbm-text);
    cursor: pointer;
}

.tbm-square-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.tbm-square-btn .mud-icon-root {
    font-size: 1.2rem;
}

.tbm-week__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 18px;
}

.tbm-week__nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tbm-week__title {
    font-size: 1.75rem;
    transform: none;
    white-space: nowrap;
}

.tbm-week__stats,
.tbm-week-card__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 22px;
    font-size: 1.2rem;
}

.tbm-week-card__stats {
    margin-bottom: 12px;
}

.tbm-week-card__stats .tbm-status {
    margin-left: 6px;
    min-height: 26px;
    font-size: 1rem;
}

.tbm-text-link {
    color: var(--tbm-pink-accent);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    white-space: nowrap;
}

.tbm-text-link:hover {
    text-decoration: underline;
}

/* Chart (own SVG) */
.tbm-chart {
    position: relative;
    padding-left: 48px;
}

.tbm-chart--compact {
    padding-left: 0;
}

.tbm-chart__plot {
    position: relative;
    margin-top: 12px;
}

.tbm-chart__svg {
    display: block;
    overflow: visible;
}

.tbm-chart__tick {
    position: absolute;
    left: -48px;
    width: 40px;
    transform: translateY(50%);
    color: var(--tbm-text-secondary);
    font-size: 0.9rem;
    text-align: right;
}

.tbm-chart__grid {
    stroke: var(--tbm-border);
    stroke-width: 1;
}

.tbm-chart__bar {
    cursor: pointer;
    transition: opacity 0.15s;
}

.tbm-chart__bar:hover {
    opacity: 0.85;
}

.tbm-chart__bar--ok { fill: var(--tbm-chart-blue); }
.tbm-chart__bar--high { fill: var(--tbm-pink); }
.tbm-chart__bar--today { fill: var(--tbm-chart-muted); }
.tbm-chart__bar--protein { fill: var(--tbm-trainer-protein); }
.tbm-chart__bar--carbs { fill: var(--tbm-trainer-carbs); }
.tbm-chart__bar--fat { fill: var(--tbm-trainer-fat); }
.tbm-chart__bar--muted { opacity: 0.4; }
.tbm-chart__bar--muted:hover { opacity: 0.55; }

.tbm-chart__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.tbm-chart__view {
    min-height: 30px;
    padding: 0 12px;
    font-size: 1rem;
}

.tbm-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    color: var(--tbm-text-secondary);
    font-size: 0.95rem;
}

.tbm-chart__legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tbm-chart__legend-goal {
    display: inline-block;
    width: 16px;
    border-top: 2px dashed var(--tbm-text);
}

.tbm-chart__tooltip .tbm-dot {
    margin-right: 6px;
}

.tbm-chart__goal {
    stroke: var(--tbm-pink-accent);
    stroke-width: 2;
    stroke-dasharray: 7 6;
}

/* The goal of one macro over its own bar: white, so it shows on the pink, blue and fat bars alike. */
.tbm-chart__goal--macro {
    stroke: var(--tbm-text);
    stroke-dasharray: 4 3;
}

.tbm-chart__goal-label {
    position: absolute;
    right: 0;
    margin-bottom: 4px;
    color: var(--tbm-pink-accent);
    font-size: 0.95rem;
    font-weight: 600;
}

.tbm-chart__tooltip {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    margin-bottom: 10px;
    padding: 8px 12px;
    transform: translateX(-50%);
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: var(--tbm-input-raised);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    font-size: 1rem;
    pointer-events: none;
    white-space: nowrap;
}

.tbm-chart__tooltip span {
    color: var(--tbm-text-secondary);
}

.tbm-chart__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin-top: 14px;
    color: var(--tbm-text-secondary);
    font-size: 1.1rem;
    text-align: center;
}

.tbm-chart--compact .tbm-chart__days {
    margin-top: 6px;
    font-size: 0.95rem;
}

.tbm-chart__day--today {
    color: var(--tbm-text);
    font-weight: 700;
}

/* Week table */
.tbm-week-table th,
.tbm-week-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.tbm-week-table tbody th,
.tbm-week-table tfoot th {
    color: var(--tbm-text);
    font-size: 1.15rem;
    letter-spacing: 0;
    text-transform: none;
    border-bottom: 1px solid var(--tbm-border);
}

.tbm-week-table__day {
    white-space: nowrap;
}

.tbm-week-table__goal {
    display: block;
    max-width: 120px;
    color: var(--tbm-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.15;
    white-space: normal;
}

.tbm-week-table__row--clickable {
    cursor: pointer;
}

.tbm-week-table__row--clickable:hover td,
.tbm-week-table__row--clickable:hover th {
    background: rgba(var(--tbm-overlay), 0.025);
}

.tbm-week-table__row--clickable:focus-visible {
    outline: 2px solid var(--tbm-pink-accent);
    outline-offset: -2px;
}

.tbm-week-table__insights {
    min-width: 150px;
    color: var(--tbm-text);
    font-size: 1.05rem;
    line-height: 1.3;
}

.tbm-week-table__insights span {
    display: block;
}

.tbm-week-table tfoot th,
.tbm-week-table tfoot td {
    border-bottom: 0;
    font-weight: 700;
}

.tbm-week-table tfoot td.tbm-muted {
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.15;
}

.tbm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 10px;
    color: var(--tbm-text-secondary);
    font-size: 1rem;
}

.tbm-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tbm-legend__box {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1.5px solid;
}

.tbm-legend__box--within { border-color: var(--tbm-success); background: var(--tbm-success-chip-bg); }
.tbm-legend__box--low { border-color: var(--tbm-warning); background: var(--tbm-warning-bg); }
.tbm-legend__box--high { border-color: var(--tbm-error); background: var(--tbm-error-bg); }

/* Day diary side panel. Closed it is not rendered, so it cannot widen the page. */
.tbm-diary.mud-drawer--closed {
    display: none;
}

.tbm-diary.mud-drawer {
    background: var(--tbm-panel);
    border-left: 1px solid var(--tbm-border);
}

.tbm-diary .mud-drawer-content {
    padding: 22px 22px 32px;
    overflow-y: auto;
}

.tbm-diary__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.tbm-diary__title {
    font-size: 1.9rem;
}

.tbm-diary__totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.tbm-diary__totals div {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: var(--tbm-radius);
    background: var(--tbm-card);
}

.tbm-diary__totals strong {
    font-size: 1.3rem;
}

.tbm-diary__totals span {
    color: var(--tbm-text-secondary);
    font-size: 0.95rem;
    white-space: nowrap;
}

.tbm-diary__meal {
    padding: 10px 0;
    border-top: 1px solid var(--tbm-border);
}

.tbm-diary__meal-title {
    display: flex;
    justify-content: space-between;
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-weight: 700;
}

.tbm-diary__meal-title .tbm-muted {
    font-weight: 500;
}

.tbm-diary__entry {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    font-size: 1.1rem;
}

.tbm-diary__product {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.tbm-diary__product .tbm-muted {
    font-size: 0.98rem;
}

/* Meal the trainer put ready that the member did not confirm yet: muted, it does not count in the totals. */
.tbm-diary__planned {
    margin-top: 4px;
    padding: 6px 10px;
    border: 1px dashed var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    color: var(--tbm-text-secondary);
}

.tbm-diary__planned-head {
    margin: 0 0 2px;
    font-size: 0.98rem;
    font-weight: 600;
}

/* Row actions (moderation) */
.tbm-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.tbm-small-button {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid;
    border-radius: var(--tbm-radius);
    background: transparent;
    font-family: var(--tbm-font);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    white-space: nowrap;
}

.tbm-small-button:disabled {
    opacity: 0.5;
    cursor: default;
}

.tbm-small-button--approve {
    border-color: var(--tbm-success);
    background: var(--tbm-success-chip-bg);
    color: var(--tbm-success);
}

.tbm-small-button--reject {
    border-color: rgba(255, 122, 133, 0.55);
    color: var(--tbm-error);
}

/* =========================================================================
   Progress and measurements (trainer)
   ========================================================================= */

/* Overzicht card "Progressie · 6-wekenmeting" */
.tbm-pcard__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.tbm-pcard__weight {
    margin: 6px 0 0;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.1;
}

.tbm-pcard__weight--small {
    margin: 0;
    font-size: 1.5rem;
}

.tbm-pcard__change {
    margin-left: 6px;
    color: var(--tbm-carbs);
    font-size: 1.45rem;
    font-weight: 700;
}

.tbm-pcard__weight--small .tbm-pcard__change {
    font-size: 1.15rem;
}

.tbm-pcard__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.tbm-pcard__interval {
    margin: 0;
    color: var(--tbm-text-secondary);
    font-size: 1rem;
}

.tbm-pcard__more {
    display: inline-block;
    margin-top: 10px;
}

.tbm-weight-panel__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}

.tbm-weight-panel__spacer {
    flex: 1;
}

.tbm-outline-button--small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 1.05rem;
}

/* Popover (Doel instellen, + Gewicht) */
.tbm-popover {
    position: relative;
    display: inline-block;
}

.tbm-popover__backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
}

.tbm-popover__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 21;
    width: 320px;
    padding: 16px;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: var(--tbm-input-raised);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    text-align: left;
}

.tbm-popover__panel--left {
    right: auto;
    left: 0;
}

.tbm-popover__title {
    margin: 0 0 10px;
    font-weight: 700;
}

.tbm-target-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tbm-target-form__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* "t.o.v. vorige" chip */
.tbm-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--tbm-radius);
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}

.tbm-change__icon.mud-icon-root {
    width: 16px;
    height: 16px;
}

.tbm-change--improved { background: var(--tbm-success-chip-bg); color: var(--tbm-success); }
.tbm-change--worsened { background: var(--tbm-warning-bg); color: var(--tbm-warning); }
.tbm-change--unchanged { background: rgba(var(--tbm-overlay), 0.08); color: var(--tbm-text-secondary); }
.tbm-change--neutral { background: rgba(var(--tbm-overlay), 0.04); color: var(--tbm-text); }

.tbm-change__percent {
    font-weight: 600;
    opacity: 0.85;
}

/* Task chip: late, today, later */
.tbm-task-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: var(--tbm-radius-pill);
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}

.tbm-task-chip--late { background: var(--tbm-error-bg); color: var(--tbm-error); }
.tbm-task-chip--today { background: rgba(231, 50, 114, 0.2); color: var(--tbm-pink-accent); }
.tbm-task-chip--upcoming { background: rgba(var(--tbm-overlay), 0.08); color: var(--tbm-text); }

/* Tab Progressie */
.tbm-progress-tab {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tbm-progress-tab .tbm-tcard__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tbm-progress-tab__draft {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--tbm-text-secondary);
}

.tbm-matrix-wrap {
    overflow-x: auto;
}

.tbm-matrix {
    min-width: 100%;
    border-collapse: collapse;
    font-size: 1.1rem;
}

.tbm-matrix th,
.tbm-matrix td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--tbm-border);
    text-align: right;
    white-space: nowrap;
}

.tbm-matrix thead th {
    border-bottom-color: var(--tbm-border-strong);
}

.tbm-matrix .tbm-matrix__metric {
    position: sticky;
    left: 0;
    z-index: 1;
    padding-left: 0;
    background: var(--tbm-card);
    text-align: left;
    font-weight: 700;
}

/* "t.o.v. vorige" after the measurement columns, set apart like on the measurement screen */
.tbm-matrix .tbm-matrix__change {
    min-width: 150px;
    border-left: 1px solid var(--tbm-border-strong);
}

.tbm-matrix__head {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--tbm-text);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.tbm-matrix__head:hover span {
    color: var(--tbm-pink-accent);
}

.tbm-matrix__head small {
    color: var(--tbm-text-secondary);
    font-size: 0.95rem;
}

.tbm-matrix__group th {
    padding-top: 18px;
    color: var(--tbm-text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}

.tbm-weights__actions {
    text-align: right;
}

.tbm-weights__delete {
    color: var(--tbm-error);
}

/* Measurement screen (Pages/Trainer/MeasurementPage.razor) */
.tbm-mpage__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 24px;
}

.tbm-mpage__sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 0;
    color: var(--tbm-text-secondary);
    font-size: 1.15rem;
}

.tbm-chip--done {
    background: var(--tbm-success-chip-bg);
    color: var(--tbm-success);
}

.tbm-mpage__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.tbm-mpage__filled,
.tbm-mpage__saved {
    color: var(--tbm-text-secondary);
    font-size: 1.1rem;
}

.tbm-mpage__conflict {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: var(--tbm-radius);
    background: var(--tbm-error-bg);
    color: var(--tbm-error);
}

.tbm-mpage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1279.98px) {
    .tbm-mpage {
        grid-template-columns: minmax(0, 1fr);
    }
}

.tbm-mpage__main,
.tbm-mpage__side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tbm-mtable table {
    width: 100%;
    border-collapse: collapse;
}

.tbm-mtable th,
.tbm-mtable td {
    padding: 8px 12px 8px 0;
    border-bottom: 1px solid var(--tbm-border);
    text-align: left;
    font-size: 1.15rem;
}

.tbm-mtable thead th {
    padding-bottom: 12px;
    border-bottom-color: var(--tbm-border-strong);
    color: var(--tbm-text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.5;
    text-transform: uppercase;
    vertical-align: bottom;
}

.tbm-mtable thead th.tbm-mtable__metric {
    color: var(--tbm-text);
    vertical-align: middle;
}

.tbm-mtable tbody th {
    font-weight: 700;
    white-space: nowrap;
}

.tbm-mtable tbody th .tbm-muted {
    font-weight: 400;
}

.tbm-mtable__metric {
    width: 32%;
}

.tbm-mtable__old {
    color: var(--tbm-text-secondary);
}

.tbm-mtable__input {
    width: 200px;
}

.tbm-minput {
    width: 100%;
    max-width: 190px;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: var(--tbm-bg);
    color: var(--tbm-text);
    font-size: 1.25rem;
    font-weight: 700;
}

.tbm-minput:focus {
    outline: none;
    border-color: var(--tbm-text);
}

.tbm-minput::placeholder {
    color: var(--tbm-text-secondary);
    font-weight: 600;
}

.tbm-minput--empty {
    border: 1.5px dashed var(--tbm-pink-accent);
}

.tbm-minput--error {
    border-color: var(--tbm-error);
}

.tbm-minput__error {
    display: block;
    margin-top: 4px;
    font-size: 0.95rem;
}

.tbm-mtable__change {
    width: 170px;
}

.tbm-mtable__since {
    display: block;
    margin-top: 4px;
    color: var(--tbm-text-secondary);
    font-size: 0.95rem;
    white-space: nowrap;
}

/* (i) with the measuring point */
.tbm-mtable__info {
    display: inline-flex;
    vertical-align: middle;
}

.tbm-info-button {
    display: inline-flex;
    align-items: center;
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: var(--tbm-text-secondary);
    cursor: pointer;
}

.tbm-info-button .mud-icon-root {
    width: 18px;
    height: 18px;
}

.tbm-info-button:hover,
.tbm-info-button:focus-visible {
    color: var(--tbm-text);
}

.tbm-mtable__info-text {
    max-width: 260px;
    margin: 0;
    font-weight: 400;
    white-space: normal;
}

/* TBM fit test */
.tbm-fit {
    width: auto;
}

.tbm-fit__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.tbm-fit .tbm-minput {
    max-width: 90px;
}

.tbm-minput--select {
    max-width: 120px;
    padding-right: 8px;
}

.tbm-fit__unit {
    color: var(--tbm-text-secondary);
    font-size: 1.05rem;
    font-weight: 600;
}

.tbm-fit__total {
    display: block;
    color: var(--tbm-carbs);
    font-size: 1.2rem;
    font-weight: 700;
}

.tbm-fit__warning {
    display: block;
    margin-bottom: 6px;
    color: var(--tbm-warning);
    font-size: 1rem;
    font-weight: 600;
}

.tbm-mtable__sub td {
    padding-top: 0;
}

.tbm-fit__extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tbm-fit__comment {
    flex: 1;
    min-width: 200px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: var(--tbm-bg);
    color: var(--tbm-text);
    font: inherit;
    font-size: 1.05rem;
    resize: vertical;
}

.tbm-fit__comment:disabled {
    opacity: 0.6;
}

.tbm-fit__timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}

.tbm-fit__timer--running {
    border-color: var(--tbm-pink);
    color: var(--tbm-pink-accent);
}

.tbm-fit__done {
    color: var(--tbm-pink-accent);
    font-weight: 700;
}

/* 1 min ski / roei */
.tbm-cardio-choice {
    display: inline-flex;
    gap: 2px;
    margin-right: 8px;
    padding: 2px;
    border-radius: var(--tbm-radius);
    background: var(--tbm-input);
}

.tbm-cardio-choice__option {
    padding: 4px 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--tbm-text-secondary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.tbm-cardio-choice__option--active {
    background: var(--tbm-text);
    color: var(--tbm-bg);
}

/* Open measurements */
.tbm-tasks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tbm-task {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: var(--tbm-radius);
    background: transparent;
    color: var(--tbm-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tbm-task:hover:not(:disabled) {
    background: var(--tbm-input);
}

.tbm-task--current {
    border-left-color: var(--tbm-pink);
    background: rgba(231, 50, 114, 0.12);
}

.tbm-task__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    font-size: 1.15rem;
}

.tbm-task__text .tbm-muted {
    font-size: 1rem;
}

.tbm-task__trainer {
    width: 120px;
}

.tbm-tasks:not(.tbm-tasks--compact) .tbm-task {
    padding: 12px 16px;
    border-bottom: 1px solid var(--tbm-border);
    border-radius: 0;
}

/* "Sinds intake" tiles */
.tbm-intake-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 16px;
}

.tbm-intake-tile {
    display: flex;
    flex-direction: column;
}

.tbm-intake-tile strong {
    color: var(--tbm-carbs);
    font-size: 2.1rem;
    line-height: 1.1;
}

.tbm-intake-tile span {
    color: var(--tbm-text-secondary);
}

.tbm-mpage__info {
    padding: 18px 24px;
    border: 1px solid var(--tbm-border);
    border-radius: var(--tbm-radius);
    background: var(--tbm-card);
    color: var(--tbm-text-secondary);
    font-size: 1.1rem;
    line-height: 1.5;
}

.tbm-mpage__info strong {
    color: var(--tbm-text);
}

.tbm-kpi--link {
    color: inherit;
    text-decoration: none;
}

.tbm-kpi--link:hover {
    border-color: var(--tbm-border-strong);
}

.tbm-kpi__late {
    margin-left: 6px;
    color: var(--tbm-error);
    font-size: 1.2rem;
}

/* =========================================================================
   Management: trainers, member form, duos, change history
   ========================================================================= */

/* Avatars with a fixed colour per person (trainer design) */
.tbm-avatar--blue { background: #22B8E8; color: #FFFFFF; }
.tbm-avatar--pink { background: #F08AB0; color: #FFFFFF; }
.tbm-avatar--grey { background: #B9BCC6; color: #FFFFFF; }
.tbm-avatar--sky { background: #BDE7F7; color: #FFFFFF; }
.tbm-avatar--yellow { background: #F4C451; color: #FFFFFF; }
.tbm-avatar--mint { background: #C9EBD9; color: #FFFFFF; }

.tbm-initials--xl {
    width: 76px;
    height: 76px;
    font-size: 1.9rem;
}

a.tbm-btn-primary {
    text-decoration: none;
}

.tbm-chip--muted {
    min-height: 24px;
    margin-left: 8px;
    color: var(--tbm-text-secondary);
    font-size: 0.95rem;
}

.tbm-chip--pink {
    background: rgba(231, 50, 114, 0.14);
    color: var(--tbm-pink-accent);
}

.tbm-chip--link {
    text-decoration: none;
}

.tbm-chip--link:hover {
    filter: brightness(1.15);
}

/* Trainers & uren: list left, detail right */
.tbm-trainers {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
    gap: 20px;
    align-items: start;
}

.tbm-trainers__list .tbm-filter-pills {
    margin-bottom: 10px;
}

.tbm-trainers__table td {
    padding-top: 14px;
    padding-bottom: 14px;
}

.tbm-trainers__table tr td:first-child {
    padding-left: 10px;
}

.tbm-trainers__row--selected td {
    background: rgba(231, 50, 114, 0.12);
}

.tbm-trainers__row--selected td:first-child {
    box-shadow: inset 4px 0 0 var(--tbm-pink);
}

.tbm-trainers__note {
    margin: 14px 0 8px;
    font-size: 1rem;
}

.tbm-trainers__empty,
.tbm-trainers__hint {
    padding: 16px 0;
}

.tbm-trainer-panel__head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.tbm-trainer-panel__titles {
    flex: 1;
    min-width: 0;
}

.tbm-trainer-panel__name {
    font-size: 2.3rem;
}

.tbm-trainer-panel__sub {
    margin: 6px 0 0;
    font-size: 1.2rem;
}

.tbm-trainer-panel__locations {
    margin-top: 18px;
}

.tbm-trainer-panel__members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 18px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
    font-size: 1.15rem;
}

.tbm-trainer-panel__members a {
    color: var(--tbm-text);
    font-weight: 600;
    text-decoration: none;
}

.tbm-trainer-panel__members a:hover {
    color: var(--tbm-pink-accent);
}

.tbm-trainer-panel__members .tbm-muted {
    margin-left: 6px;
}

.tbm-trainer-panel__footer {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--tbm-border);
}

/* Form building blocks */
.tbm-admin-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.tbm-admin-grid {
    display: grid;
    gap: 16px;
}

.tbm-admin-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tbm-admin-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tbm-admin-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.tbm-admin-grid .tbm-field--wide {
    grid-column: span 2;
}

.tbm-admin-optional {
    margin-left: 4px;
    color: var(--tbm-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

input.tbm-input[type="date"] {
    color-scheme: dark;
}

.tbm-input:disabled,
.tbm-select:disabled {
    opacity: 0.7;
}

.tbm-admin-section {
    margin: 26px 0 12px;
    font-size: 1.5rem;
}

.tbm-admin-section--row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.tbm-admin-section--row .tbm-heading {
    font-size: 1.5rem;
}

.tbm-admin-note {
    margin: 14px 0 0;
    padding: 10px 14px;
    border-radius: var(--tbm-radius);
    background: var(--tbm-blue-bg);
    color: var(--tbm-carbs);
    font-size: 1.05rem;
}

.tbm-admin-note--warning {
    background: var(--tbm-warning-bg);
    color: var(--tbm-warning);
}

.tbm-admin-alert {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: var(--tbm-radius);
    background: var(--tbm-error-bg);
    color: var(--tbm-error);
    font-size: 1.05rem;
}

.tbm-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 1.15rem;
    cursor: pointer;
}

.tbm-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--tbm-pink);
}

.tbm-admin-later {
    margin-top: 12px;
    border: 1px dashed var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
}

.tbm-admin-later summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
}

.tbm-admin-later summary::-webkit-details-marker {
    display: none;
}

.tbm-admin-later summary .tbm-heading {
    font-size: 1.3rem;
}

.tbm-admin-later p {
    margin: 0 16px 12px;
}

.tbm-danger-outline {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(255, 122, 133, 0.6);
    border-radius: var(--tbm-radius);
    background: transparent;
    color: var(--tbm-error);
    font-family: var(--tbm-font);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
}

.tbm-danger-outline:hover {
    border-color: var(--tbm-error);
    background: var(--tbm-error-bg);
}

/* Account block */
.tbm-account {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid var(--tbm-border);
    border-radius: var(--tbm-radius);
    background: var(--tbm-input);
}

.tbm-account--attention {
    border-color: rgba(252, 211, 77, 0.4);
}

.tbm-account > .mud-icon-root {
    color: var(--tbm-text-secondary);
}

.tbm-account__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    font-size: 1.15rem;
}

/* Dialogs */
.tbm-admin-dialog .mud-dialog-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tbm-admin-dialog .mud-dialog-actions {
    gap: 10px;
    padding: 12px 24px 20px;
}

.tbm-admin-dialog__title {
    font-size: 1.8rem;
}

.tbm-admin-dialog__lead {
    margin: 0;
    font-size: 1.2rem;
}

@media (max-width: 1279.98px) {
    .tbm-trainers {
        grid-template-columns: minmax(0, 1fr);
    }

    .tbm-admin-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 699.98px) {
    .tbm-admin-grid--2,
    .tbm-admin-grid--3,
    .tbm-admin-grid--4 {
        grid-template-columns: minmax(0, 1fr);
    }

    .tbm-admin-grid .tbm-field--wide {
        grid-column: auto;
    }
}

/* Member form: cards in two columns */
.tbm-member-form {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.tbm-member-form__column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tbm-member-form__hint {
    margin: -6px 0 12px;
}

.tbm-member-form__address {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr);
}

.tbm-member-form__active {
    margin-top: 18px;
}

/* Member list: selection and bulk actions (beheer) */
.tbm-table__select {
    width: 36px;
}

.tbm-table__select input {
    width: 18px;
    height: 18px;
    accent-color: var(--tbm-pink);
    cursor: pointer;
}

.tbm-bulk-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 4px 0 12px;
    padding: 10px 14px;
    border: 1px solid rgba(231, 50, 114, 0.4);
    border-radius: var(--tbm-radius);
    background: rgba(231, 50, 114, 0.08);
    font-size: 1.1rem;
}

@media (max-width: 1279.98px) {
    .tbm-member-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .tbm-member-form__address {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Duo: invoicing choice cards (contracts design), link dialog, duo card */
.tbm-billing {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.tbm-billing legend {
    margin-bottom: 8px;
}

.tbm-billing__card {
    padding: 14px 18px;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: var(--tbm-input);
}

.tbm-billing__card--selected {
    border-color: var(--tbm-pink);
    background: rgba(231, 50, 114, 0.08);
}

.tbm-billing__option {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.25rem;
    cursor: pointer;
}

.tbm-billing__option input,
.tbm-billing__recipient input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tbm-billing__radio {
    flex: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--tbm-text-secondary);
    border-radius: 50%;
    background: #4A4A55;
}

.tbm-billing__card--selected .tbm-billing__radio {
    border: 6px solid var(--tbm-pink);
    background: #FFFFFF;
}

.tbm-billing__option input:focus-visible + .tbm-billing__radio,
.tbm-billing__recipient:focus-within {
    outline: 2px solid var(--tbm-pink-accent);
    outline-offset: 2px;
}

.tbm-billing__recipients {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 2px 36px;
}

.tbm-billing__recipient {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius-pill);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

.tbm-billing__recipient--selected {
    border-color: var(--tbm-pink);
    background: var(--tbm-pink);
    color: var(--tbm-on-pink);
}

.tbm-billing__hint {
    margin: 2px 0 0;
    font-size: 1rem;
}

.tbm-chip--warning {
    min-height: 24px;
    background: var(--tbm-warning-bg);
    color: var(--tbm-warning);
    font-size: 0.95rem;
}

.tbm-duo-dialog__search {
    flex: none;
    max-width: none;
}

.tbm-duo-candidates {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 320px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.tbm-duo-candidate {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--tbm-radius);
    font-size: 1.15rem;
    cursor: pointer;
}

.tbm-duo-candidate:hover {
    background: rgba(var(--tbm-overlay), 0.04);
}

.tbm-duo-candidate--selected {
    border-color: var(--tbm-pink);
    background: rgba(231, 50, 114, 0.08);
}

.tbm-duo-candidate__name {
    font-weight: 700;
}

.tbm-duo-card__partner {
    margin: 0 0 4px;
    font-size: 1.25rem;
}

.tbm-duo-card__partner a {
    color: var(--tbm-text);
    font-weight: 700;
}

.tbm-duo-card__billing {
    margin: 0 0 12px;
    font-size: 1.15rem;
}

.tbm-duo-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tbm-danger-outline--small {
    min-height: 36px;
    font-size: 1.05rem;
}

.tbm-duo-card__history {
    margin-top: 16px;
}

.tbm-duo-card__history summary {
    color: var(--tbm-text-secondary);
    font-weight: 600;
    cursor: pointer;
}

.tbm-duo-card__history ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.tbm-duo-card__history a {
    color: var(--tbm-text);
}

.tbm-payer-card__pays-for {
    margin: 12px 0 0;
}

.tbm-payer-card__pays-for ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

.tbm-payer-card__pays-for a {
    color: var(--tbm-text);
}

/* Change history (side panel) */
.tbm-audit__list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tbm-audit__entry {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--tbm-border);
}

.tbm-audit__head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.tbm-audit__changes {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 14px;
    margin: 0;
    font-size: 1.05rem;
}

.tbm-audit__changes dt {
    color: var(--tbm-text-secondary);
}

.tbm-audit__changes dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.tbm-audit__old {
    color: var(--tbm-text-secondary);
    text-decoration: line-through;
}

/* ---- Collapsed side bar (planning: full width, icons only) -------------- */

.tbm-side__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    padding-right: 10px;
}

.tbm-side__collapse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: var(--tbm-radius);
    background: transparent;
    color: var(--tbm-text-secondary);
    cursor: pointer;
}

.tbm-side__collapse:hover {
    background: rgba(var(--tbm-overlay), 0.06);
    color: var(--tbm-text);
}

@media (min-width: 1024px) {
    .tbm-trainer--collapsed {
        --tbm-sidebar-width: 72px;
    }

    .tbm-trainer--collapsed .tbm-side__top {
        flex-direction: column;
        align-items: center;
        padding: 0 0 12px;
    }

    .tbm-trainer--collapsed .tbm-side__logo {
        padding: 0 0 10px;
    }

    .tbm-trainer--collapsed .tbm-side__logo .tbm-logo {
        font-size: 1.3rem;
    }

    .tbm-trainer--collapsed .tbm-side__env,
    .tbm-trainer--collapsed .tbm-side__item-label,
    .tbm-trainer--collapsed .tbm-side__heading,
    .tbm-trainer--collapsed .tbm-side__user-text {
        display: none;
    }

    .tbm-trainer--collapsed .tbm-side__nav {
        padding-right: 0;
    }

    .tbm-trainer--collapsed .tbm-side__item,
    .tbm-trainer--collapsed .tbm-side__item.active {
        justify-content: center;
        margin: 0 8px;
        padding: 0;
        border-radius: var(--tbm-radius);
        clip-path: none;
    }

    .tbm-trainer--collapsed .tbm-side__badge {
        position: absolute;
        top: 2px;
        right: 2px;
        min-width: 16px;
        height: 16px;
        font-size: 0.7rem;
    }

    .tbm-trainer--collapsed .tbm-side__user {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 1023.98px) {
    .tbm-side__collapse {
        display: none;
    }
}

/* Beheer → NMBRS: the link and its settings. */
.tbm-nmbrs {
    display: grid;
    gap: 16px;
    max-width: 880px;
}

.tbm-nmbrs__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tbm-nmbrs__facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0 0 16px;
}

.tbm-nmbrs__facts dt {
    color: var(--tbm-text-secondary);
}

.tbm-nmbrs__facts dd {
    margin: 0;
}

.tbm-nmbrs__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tbm-nmbrs__readonly {
    display: flex;
    align-items: center;
    background: transparent;
}

.tbm-nmbrs__note {
    margin-top: 12px;
}

.tbm-nmbrs__tabs {
    margin-bottom: 16px;
}

.tbm-nmbrs__sub {
    margin: 2px 0 0;
}

.tbm-nmbrs__list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.tbm-nmbrs__candidate {
    border: 1px solid var(--tbm-border);
    border-radius: var(--tbm-radius);
    padding: 12px 14px;
}

.tbm-nmbrs__candidate-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.tbm-nmbrs__candidate-head p {
    margin: 2px 0 0;
}

.tbm-nmbrs__match {
    color: var(--tbm-pink-accent);
}

.tbm-nmbrs__form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--tbm-border);
    display: grid;
    gap: 12px;
}

.tbm-nmbrs__check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}

.tbm-nmbrs__empty {
    margin-top: 12px;
}

/* Loonstroken and the leave balance from NMBRS. */
.tbm-pay {
    display: grid;
    gap: 16px;
    max-width: 720px;
}

.tbm-pay__list,
.tbm-pay__balances {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.tbm-pay__item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--tbm-border);
    border-radius: var(--tbm-radius);
    background: transparent;
    color: var(--tbm-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tbm-pay__item:hover:not(:disabled) {
    border-color: var(--tbm-border-strong);
}

.tbm-pay__item:disabled {
    cursor: progress;
    opacity: 0.7;
}

.tbm-pay__item--annual {
    border-color: var(--tbm-pink-accent);
}

.tbm-pay__balances li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.tbm-pay__balance--vacation strong {
    font-size: 1.2rem;
}

.tbm-pay__negative {
    color: var(--tbm-error);
}

.tbm-pay__note {
    margin-top: 8px;
}

.tbm-pay__link {
    display: inline-block;
    margin-top: 12px;
    text-decoration: none;
}

.tbm-nmbrs--wide {
    max-width: 1100px;
}

.tbm-nmbrs__month {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tbm-nmbrs__closed {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: var(--tbm-radius);
    background: var(--tbm-warning-bg);
    color: var(--tbm-warning);
}

.tbm-nmbrs__closed p {
    margin: 0 0 6px;
}

.tbm-nmbrs__export {
    width: 100%;
}

.tbm-nmbrs__line-note {
    display: block;
    margin-top: 4px;
    font-size: 0.9rem;
}

/* Day plans on the member profile (tab Voeding) */
.tbm-nutrition__goals {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tbm-mealplans-card__list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tbm-mealplans-card__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--tbm-input);
}

.tbm-mealplans-card__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tbm-mealplans-card__text a {
    color: var(--tbm-text);
    text-decoration: none;
}

.tbm-mealplans-card__share {
    display: flex;
    gap: 10px;
}

.tbm-mealplans-card__share .tbm-select {
    flex: 1;
    min-width: 0;
}

.tbm-mealplans-card__share .tbm-btn-primary {
    flex: 0 0 auto;
    width: auto;
    padding-inline: 28px;
}

.tbm-mealplans-card__days {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--tbm-border);
}

.tbm-mealplans-card__subtitle {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
}

.tbm-mealplans-card__hint {
    margin: 0 0 12px;
}

.tbm-mealplans-card__plan {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tbm-mealplans-card__plan .tbm-select {
    flex-basis: 100%;
    min-width: 0;
}

.tbm-mealplans-card__plan .tbm-btn-primary {
    flex: 0 0 auto;
    width: auto;
    padding-inline: 28px;
}

.tbm-mealplans-card__date {
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
}

.tbm-mealplans-card__plan + .tbm-mealplans-card__hint {
    margin: 8px 0 0;
}

/* Beheer → Producten (WeFact) */
.tbm-products {
    display: grid;
    gap: 12px;
}

.tbm-products__intro {
    max-width: 72ch;
    margin: 0;
}

.tbm-products__sync {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tbm-products__code {
    color: var(--tbm-pink-accent);
    font-weight: 600;
    white-space: nowrap;
}

.tbm-products__num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tbm-products__num .tbm-muted {
    display: block;
    font-size: 0.9rem;
}

.tbm-products__credits {
    width: 76px;
}

.tbm-products__save {
    display: grid;
    gap: 4px;
    justify-items: start;
    min-width: 110px;
}

.tbm-products__row--removed td {
    color: var(--tbm-text-secondary);
}

.tbm-products__row--removed .tbm-pchip {
    margin-left: 8px;
}

/* Contracten & offertes: offertes and the dialog "Nieuwe offerte" */
.tbm-quotes__error {
    display: block;
    font-size: 0.9rem;
}

.tbm-quotes__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tbm-quotes__link {
    color: var(--tbm-pink-accent);
    font-weight: 600;
    white-space: nowrap;
}

.tbm-newquote__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 16px;
}

.tbm-newquote__fields {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
}

.tbm-newquote__summary {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 14px;
    border: 1px solid var(--tbm-border);
    border-radius: 10px;
    background: var(--tbm-card);
}

.tbm-newquote__big {
    margin: 0;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
}

.tbm-newquote__big small {
    font-size: 1rem;
    font-weight: 500;
    color: var(--tbm-text-secondary);
}

.tbm-newquote__facts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    margin: 0;
}

.tbm-newquote__facts dt {
    color: var(--tbm-text-secondary);
}

.tbm-newquote__facts dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tbm-newquote__note {
    margin: 0;
    font-size: 0.9rem;
}

@media (max-width: 760px) {
    .tbm-newquote__layout {
        grid-template-columns: 1fr;
    }
}

.tbm-cpanel__subscriptions {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tbm-cpanel__subscriptions li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.tbm-cpanel__subscriptions small {
    display: block;
}

/* Lid bewerken: Automatische incasso */
.tbm-directdebit__form {
    display: grid;
    gap: 10px;
}

.tbm-directdebit__hint {
    margin: 0;
    font-size: 0.95rem;
}

.tbm-directdebit__facts {
    margin-bottom: 10px;
}

.tbm-directdebit__iban {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.tbm-products__chip {
    margin-left: 8px;
}

/* Attention points of the movement assessment in the profile header */
.tbm-profile__attention {
    margin: 4px 0 0;
    color: var(--tbm-error);
    font-size: 1.1rem;
}

.tbm-profile__attention strong {
    font-weight: 700;
}

/* Movement assessment (intake measurement) */
.tbm-massess {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tbm-massess__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.tbm-massess__group {
    margin: 8px 0 0;
    color: var(--tbm-text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.tbm-massess__item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--tbm-border);
    border-left: 3px solid transparent;
    border-radius: var(--tbm-radius);
}

.tbm-massess__item--attention {
    border-left-color: var(--tbm-error);
    background: var(--tbm-error-bg);
}

.tbm-massess__head strong {
    font-size: 1.2rem;
}

.tbm-massess__focus {
    margin: 2px 0 0;
    font-size: 1rem;
}

.tbm-massess__attention {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: var(--tbm-radius-pill);
    background: var(--tbm-error);
    color: var(--tbm-on-accent);
    font-size: 0.85rem;
    font-weight: 700;
}

.tbm-massess__scores {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tbm-massess__score,
.tbm-massess__choice {
    min-width: 38px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: var(--tbm-bg);
    color: var(--tbm-text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.tbm-massess__score--selected,
.tbm-massess__choice--selected {
    border-color: var(--tbm-text);
    background: var(--tbm-text);
    color: var(--tbm-bg);
}

.tbm-massess__score--attention {
    border-color: var(--tbm-error);
    background: var(--tbm-error);
}

.tbm-massess__sides {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--tbm-text-secondary);
}

.tbm-massess__comment {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--tbm-border-strong);
    border-radius: var(--tbm-radius);
    background: var(--tbm-bg);
    color: var(--tbm-text);
    font: inherit;
    font-size: 1.05rem;
}

.tbm-massess__averages {
    padding-top: 8px;
    border-top: 1px solid var(--tbm-border-strong);
    color: var(--tbm-text-secondary);
    font-size: 1.1rem;
}

.tbm-massess__averages strong {
    color: var(--tbm-text);
}

/* Read-only view */
.tbm-massess-view__list {
    margin: 4px 0 8px;
    padding: 0;
    list-style: none;
}

.tbm-massess-view__item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--tbm-border);
}

.tbm-massess-view__item--attention .tbm-massess-view__score {
    color: var(--tbm-error);
}

.tbm-massess-view__label {
    min-width: 140px;
}

.tbm-massess-view__side {
    color: var(--tbm-warning);
}

.tbm-massess-view__comment {
    flex-basis: 100%;
    color: var(--tbm-text-secondary);
}

/* Fitcheck conversation (block "Gesprek" of a fitcheck) */
.tbm-fconv {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tbm-fconv__context {
    display: grid;
    grid-template-columns: minmax(120px, max-content) 1fr;
    gap: 6px 16px;
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--tbm-radius);
    background: var(--tbm-panel);
}

.tbm-fconv__context dt {
    color: var(--tbm-text-secondary);
    font-weight: 600;
}

.tbm-fconv__context dd {
    margin: 0;
}

.tbm-fconv__context dd p {
    margin: 2px 0 0;
}

.tbm-fconv__scale,
.tbm-fconv__hint {
    margin: -4px 0 0;
    font-size: 0.85rem;
}

.tbm-fconv__earlier {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 0;
    font-size: 0.9rem;
}

.tbm-fconv__goal {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (max-width: 600px) {
    .tbm-fconv__context {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------------------------------------------------------
   TBM testbibliotheek: beheer (Beheer › Testbibliotheek), tab TBM testen in het dossier, tab in Mijn progressie
   --------------------------------------------------------------------------------------------------------------- */

.tbm-testlib__lead {
    max-width: 72ch;
    margin: 0 0 16px;
}

.tbm-testlib__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.tbm-testlib__variant {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.tbm-testlib__instructions {
    min-height: 72px;
    resize: vertical;
}

.tbm-testlib__filters,
.tbm-addtests__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.tbm-testlib__filters .tbm-select,
.tbm-addtests__filters .tbm-select {
    max-width: 260px;
}

.tbm-testlib__variants {
    display: block;
    font-size: 0.85rem;
}

.tbm-testlib__row--inactive td {
    opacity: 0.55;
}

.tbm-testlib__actions {
    white-space: nowrap;
    text-align: right;
}

.tbm-tests-tab {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tbm-tests-tab__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 12px;
}

.tbm-addtests {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tbm-addtests__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.tbm-addtests__date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tbm-addtests__choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 4px 16px;
    max-height: 260px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.tbm-addtests__choice {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
}

.tbm-addtests__choice .tbm-muted {
    width: 100%;
    padding-left: 26px;
    font-size: 0.8rem;
}

.tbm-addtests__entries {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tbm-addtests__entry {
    padding: 12px 14px;
    border: 1px solid var(--tbm-border);
    border-radius: var(--tbm-radius);
    background: var(--tbm-card);
}

.tbm-addtests__entry-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
}

.tbm-addtests__entry-head .tbm-round-btn {
    margin-left: auto;
}

.tbm-addtests__instructions,
.tbm-addtests__hint {
    margin: 6px 0 0;
    font-size: 0.85rem;
}

.tbm-addtests__fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px 12px;
    margin-top: 10px;
}

.tbm-addtests__comment {
    grid-column: 1 / -1;
}

.tbm-testcard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--tbm-border);
    border-radius: var(--tbm-radius);
    background: var(--tbm-card);
}

.tbm-testcard__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.tbm-testcard__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.tbm-testcard__variant {
    color: var(--tbm-text-secondary);
    font-weight: 600;
}

.tbm-testcard__meta {
    margin: 2px 0 0;
    font-size: 0.85rem;
}

.tbm-testcard__latest {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.tbm-testcard__value {
    font-size: 1.1rem;
    font-weight: 700;
}

.tbm-testcard__figures {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tbm-testcard__figure {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 0.9rem;
}

.tbm-testcard__side {
    min-width: 1.2em;
    font-weight: 700;
}

.tbm-testcard__best {
    margin-left: auto;
    color: var(--tbm-pink-accent);
    font-weight: 700;
}

.tbm-testcard__charts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tbm-testcard__charts .tbm-mchart {
    padding: 8px 0 0;
    background: transparent;
}

.tbm-testcard__charts .tbm-mchart__title {
    font-size: 0.85rem;
    color: var(--tbm-text-secondary);
}

.tbm-testcard__history td {
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 0.9rem;
}

.tbm-testcard__date {
    white-space: nowrap;
}

.tbm-testcard__comment {
    display: block;
    font-size: 0.8rem;
}

.tbm-testcard__actions {
    white-space: nowrap;
    text-align: right;
}

.tbm-progress__tests {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 600px) {
    .tbm-tests-tab__list {
        grid-template-columns: 1fr;
    }

    .tbm-testlib__variant {
        grid-template-columns: 1fr auto;
    }

    .tbm-testlib__variant .tbm-select {
        grid-row: 2;
    }
}
