/* =========================================================
   Bout2BeBetter Patient App Screens
   Figma patient screens: dashboard, care plan, library,
   milestones, journal, appointments, plans, settings.
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { margin-top: 0 !important; }
body.b2bb-app {
    margin: 0;
    background: #f4f4f4;
    color: #1f1f1f;
    font-family: "Plus Jakarta Sans", "Inter", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}
body.b2bb-app #wpadminbar { display: none !important; }
body.b2bb-app a { color: inherit; }

:root {
    --b2bb-sidebar: 277px;
    --b2bb-topbar: 86px;
    --b2bb-page: #f4f4f4;
    --b2bb-white: #ffffff;
    --b2bb-text: #202124;
    --b2bb-muted: #707070;
    --b2bb-soft: #9a9a9a;
    --b2bb-line: #d8d8d8;
    --b2bb-border: #e9e6dd;
    --b2bb-card: #f2f2f2;
    --b2bb-green: #789c5d;
    --b2bb-green-dark: #626c5d;
    --b2bb-green-soft: #bce3a3;
    --b2bb-green-pale: #efffe6;
    --b2bb-blue: #2499ec;
    --b2bb-purple: #914cff;
    --b2bb-pink: #f1c8d7;
    --b2bb-radius-xl: 26px;
    --b2bb-radius-lg: 18px;
    --b2bb-radius-md: 12px;
    --b2bb-shadow-border: 0 0 0 1px rgba(0,0,0,.06);
}

.b2bb-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ---------------- Sidebar ---------------- */
.b2bb-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--b2bb-sidebar);
    min-height: 100vh;
    background: #fff;
    border-right: 1px solid #eee9df;
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none;
}
.b2bb-sidebar::-webkit-scrollbar { display: none; }

.b2bb-sidebar__logo {
    height: 82px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 17px;
}
.b2bb-sidebar__logo img {
    width: 176px;
    height: auto;
    display: block;
}

.b2bb-sidebar__search {
    width: 164px;
    height: 40px;
    margin: 8px 0 26px 24px;
    border-radius: 8px;
    background: #e9e9e9;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}
.b2bb-sidebar__search svg,
.b2bb-shell-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.b2bb-sidebar__search span { color: #9c9c9c; }
.b2bb-sidebar__search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
    color: #636363;
    font-family: inherit;
}
.b2bb-sidebar__search input::placeholder { color: #9b9b9b; }

.b2bb-sidebar__nav {
    display: flex;
    flex-direction: column;
    padding: 0 24px;
    gap: 5px;
    flex: 1;
}
.b2bb-sidebar__section {
    margin: 0 0 13px;
    color: rgba(0,0,0,.53);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.1;
}
.b2bb-sidebar__section--support { margin-top: 15px; }
.b2bb-sidebar__link {
    width: 228px;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    border-radius: 8px;
    text-decoration: none;
    color: rgba(0,0,0,.48);
    font-size: 15px;
    font-weight: 400;
    transition: background .18s ease, color .18s ease, opacity .18s ease;
}
.b2bb-sidebar__link:hover { background: #f4f4f4; color: rgba(0,0,0,.75); }
.b2bb-sidebar__link.is-active {
    background: var(--b2bb-green);
    color: #fff;
}
.b2bb-sidebar__icon {
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 25px;
}
.b2bb-sidebar__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.b2bb-sidebar__icon svg rect { fill: none; }
.b2bb-sidebar__icon svg circle { fill: none; }
.b2bb-sidebar__link.is-active .b2bb-sidebar__icon svg { stroke-width: 2; }

.b2bb-sidebar__user {
    min-height: 178px;
    padding-bottom: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    color: #171717;
}
.b2bb-sidebar__user img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.b2bb-sidebar__user strong {
    font-size: 15px;
    font-weight: 600;
}
.b2bb-sidebar__logout {
    color: #ff2457;
    text-decoration: none;
    display: inline-flex;
    margin-top: 21px;
}
.b2bb-sidebar__logout svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------------- Top bar ---------------- */
.b2bb-page-wrap {
    width: calc(100% - var(--b2bb-sidebar));
    margin-left: var(--b2bb-sidebar);
    min-height: 100vh;
}
.b2bb-topbar {
    position: fixed;
    top: 0;
    left: var(--b2bb-sidebar);
    right: 0;
    height: var(--b2bb-topbar);
    background: #fff;
    border-bottom: 1px solid #eee9df;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 22px;
}
.b2bb-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.b2bb-topbar__icon {
    width: 48px;
    height: 48px;
    border: 1.5px solid #eee9df;
    border-radius: 8px;
    color: #636b5d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
    background: #fff;
}
.b2bb-topbar__icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.b2bb-topbar__badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ff2457;
    color: #fff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.b2bb-topbar__profile {
    min-width: 182px;
    height: 48px;
    margin-left: 24px;
    padding: 7px 10px;
    border: 1px solid #eee9df;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #212121;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
}
.b2bb-topbar__avatar {
    width: 31px;
    height: 31px;
    border-radius: 7px;
    background: #eee9df;
    display: inline-block;
    flex: 0 0 31px;
}
.b2bb-topbar__chevron {
    margin-left: auto;
    font-size: 20px;
    line-height: 1;
    transform: translateY(-3px);
}

/* ---------------- Main shell ---------------- */
.b2bb-main {
    margin-top: var(--b2bb-topbar);
    min-height: calc(100vh - var(--b2bb-topbar));
    background: #fff;
    padding: 0;
}
.b2bb-main--grey { background: #f4f4f4; }
.b2bb-main--dashboard { background: #fff; padding: 50px 39px 28px 44px; }
.b2bb-main--library { background: #fff; padding: 47px 38px 70px 39px; }
.b2bb-main--care { background: #fff; padding: 39px 46px 36px 44px; }
.b2bb-main--milestone { background: #fff; padding: 39px 40px 40px 44px; }
.b2bb-main--journal { background: #f4f4f4; padding: 40px 29px 60px 44px; }
.b2bb-main--appointments { background: #fff; padding: 40px 38px 38px 67px; }
.b2bb-main--plans { background: #f4f4f4; padding: 40px 31px 24px 30px; }
.b2bb-main--settings { background: #f4f4f4; padding: 22px 22px 60px 14px; }

.b2bb-page-title {
    margin: 0;
    color: #1f1f1f;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.9px;
}
.b2bb-page-subtitle {
    margin: 8px 0 0;
    color: #666;
    font-size: 16px;
    font-weight: 400;
}
.b2bb-centered-title { text-align: center; }

/* Utility pieces */
.b2bb-ui-icon svg,
.b2bb-table-more svg,
.b2bb-mini-icon svg,
.b2bb-action-card__arrow svg,
.b2bb-play svg,
.b2bb-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.b2bb-btn {
    height: 34px;
    border: 0;
    border-radius: 5px;
    background: var(--b2bb-green);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.b2bb-btn--wide { width: 100%; }
.b2bb-btn--pale {
    background: var(--b2bb-green-soft);
    color: #351111;
    font-weight: 700;
}
.b2bb-tag {
    min-height: 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--b2bb-green);
    background: #fff;
    box-shadow: inset 0 0 0 1px #e8e8e8;
    font-size: 16px;
    font-weight: 700;
}

/* ---------------- Dashboard ---------------- */
.b2bb-dashboard-hero {
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 1060px;
    margin: 0 0 40px;
}
.b2bb-dashboard-hero__avatar {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 3px solid #eee9df;
    padding: 9px;
    flex: 0 0 170px;
}
.b2bb-dashboard-hero__avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.b2bb-dashboard-hero__content { flex: 1; min-width: 0; }
.b2bb-dashboard-hero h1 {
    margin: 0 0 5px;
    font-size: 28px;
    line-height: 1.24;
    font-weight: 700;
    letter-spacing: -.8px;
}
.b2bb-dashboard-hero p {
    margin: 0 0 22px;
    color: #6b6b6b;
    font-size: 16px;
}
.b2bb-dashboard-actions {
    display: grid;
    grid-template-columns: 211px 211px 211px;
    gap: 16px;
}
.b2bb-action-card {
    min-height: 84px;
    border-radius: 14px;
    background: #f0f0f0;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 16px 16px 14px;
    color: #1e1e1e;
}
.b2bb-action-card strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.b2bb-action-card small { display: block; margin-top: 5px; color: #949494; font-size: 9px; }
.b2bb-action-card--dark { background: var(--b2bb-green-dark); color: #fff; }
.b2bb-action-card--dark small { color: rgba(255,255,255,.76); }
.b2bb-action-card__arrow { color: inherit; font-size: 25px; line-height: 1; }

.b2bb-dashboard-panel {
    max-width: 1058px;
    min-height: 361px;
    border-radius: 16px;
    background: #f1f1f1;
    display: grid;
    grid-template-columns: 303px 1fr 298px;
    gap: 13px;
    padding: 20px 18px;
    margin-bottom: 20px;
}
.b2bb-today-card,
.b2bb-milestone-card,
.b2bb-progress-widget {
    background: #fff;
    border-radius: 13px;
}
.b2bb-today-card {
    padding: 20px 16px;
    box-shadow: inset 0 0 0 1px #eee9df;
}
.b2bb-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.b2bb-card-title-row h2,
.b2bb-card-title-row h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.4px;
}
.b2bb-card-title-row a { color: #666; text-decoration: none; font-size: 14px; }
.b2bb-today-card__inner {
    min-height: 139px;
    background: var(--b2bb-green-dark);
    color: #fff;
    border-radius: 15px;
    padding: 14px 18px 12px;
}
.b2bb-today-card__head {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}
.b2bb-round-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
}
.b2bb-round-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.b2bb-today-card__inner h3 { margin: 0; font-size: 16px; font-weight: 700; }
.b2bb-today-card__inner p { margin: 0 0 16px; color: rgba(255,255,255,.68); font-size: 11px; }

.b2bb-milestone-card { padding: 20px 12px 16px; }
.b2bb-milestone-mini {
    display: grid;
    grid-template-columns: 61px 1fr 4px;
    gap: 16px;
    align-items: start;
}
.b2bb-mini-rail {
    position: relative;
    padding-top: 19px;
    min-height: 197px;
}
.b2bb-mini-rail::before {
    content: "";
    position: absolute;
    top: 0;
    right: 12px;
    width: 2px;
    height: 193px;
    background: var(--b2bb-green);
}
.b2bb-mini-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 45px;
    margin-bottom: 22px;
    color: #666;
    font-size: 14px;
}
.b2bb-mini-step span:first-child {
    min-width: 42px;
    height: 21px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.b2bb-mini-step.is-active span:first-child { background: var(--b2bb-green); color: #fff; }
.b2bb-mini-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--b2bb-green);
    position: relative;
    z-index: 2;
}
.b2bb-mini-items { display: flex; flex-direction: column; gap: 7px; }
.b2bb-mini-item {
    min-height: 59px;
    display: grid;
    grid-template-columns: 1fr 22px;
    align-items: center;
    gap: 8px;
    padding: 9px 13px 9px 24px;
    border-radius: 17px;
    background: #fafafa;
    box-shadow: inset 0 0 0 1px #e7e7e7;
}
.b2bb-mini-item.is-done { background: var(--b2bb-green-pale); box-shadow: inset 0 0 0 1px #d9f4c7; }
.b2bb-mini-item strong { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b2bb-mini-item small { display: block; margin-top: 2px; color: #8d8d8d; font-size: 14px; }
.b2bb-mini-check,
.b2bb-mini-empty {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.b2bb-mini-check { background: #4bd966; color: #fff; }
.b2bb-mini-check svg { width: 11px; height: 11px; stroke-width: 3; }
.b2bb-mini-check.is-soft { background: #d5efd9; }
.b2bb-mini-empty { border: 1px solid #d7d7d7; }
.b2bb-scrollbar-fake { background: #7c8476; width: 4px; height: 56px; border-radius: 99px; margin-top: 56px; }
.b2bb-milestone-note { margin: 19px 0 0 25px; color: #4b4b4b; font-size: 11px; }

.b2bb-progress-widget { padding: 30px 17px 20px; position: relative; }
.b2bb-progress-widget__dots { position: absolute; right: 23px; top: 11px; color: #858585; letter-spacing: 2px; }
.b2bb-progress-widget__icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #eee9df;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--b2bb-green);
    margin-bottom: 10px;
}
.b2bb-progress-widget__icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.b2bb-progress-widget h3 { margin: 0 0 28px; font-size: 18px; font-weight: 700; }
.b2bb-progress-widget .b2bb-tag { min-height: 26px; font-size: 12px; margin-bottom: 14px; }
.b2bb-widget-progress-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.b2bb-widget-progress-row strong { font-size: 20px; }
.b2bb-widget-progress-row span { color: #45d75e; background: #edffee; border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700; }
.b2bb-progress-widget p { margin: 0 0 10px; color: #898989; font-size: 12px; }
.b2bb-progress-bar {
    height: 6px;
    border-radius: 999px;
    background: #ebebf1;
    overflow: hidden;
}
.b2bb-progress-bar span { display: block; height: 100%; background: var(--b2bb-green); border-radius: inherit; }

.b2bb-table-card {
    max-width: 1058px;
    background: #fff;
    border-radius: 9px;
    padding: 12px 24px 20px;
    box-shadow: 0 0 0 12px #f1f1f1;
    margin: 34px 12px 0 12px;
}
.b2bb-table-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.b2bb-table-card__title { margin: 0; font-size: 16px; font-weight: 500; }
.b2bb-table-tools { display: flex; align-items: center; gap: 12px; }
.b2bb-table-search {
    width: 260px;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e7e7e7;
    border-radius: 7px;
    background: #f8f8f8;
    padding: 0 14px;
    color: #8c8c8c;
}
.b2bb-table-search svg { width: 15px; height: 15px; }
.b2bb-table-search input { border: 0; outline: 0; background: transparent; width: 100%; font-family: inherit; font-size: 13px; }
.b2bb-table-more {
    width: 34px;
    height: 34px;
    border: 1px solid #e7e7e7;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #848484;
}
.b2bb-table-more svg { width: 20px; height: 20px; }
.b2bb-table { width: 100%; border-collapse: collapse; font-family: Inter, Arial, sans-serif; }
.b2bb-table th {
    height: 38px;
    background: #f8f8f8;
    text-align: left;
    padding: 0 17px;
    font-size: 13px;
    font-weight: 500;
    color: #111;
}
.b2bb-table th:first-child { border-radius: 6px 0 0 6px; }
.b2bb-table th:last-child { border-radius: 0 6px 6px 0; }
.b2bb-table td {
    height: 60px;
    border-bottom: 1px solid #eeeeee;
    padding: 0 17px;
    font-size: 14px;
    color: #000;
    vertical-align: middle;
}
.b2bb-table tr:last-child td { border-bottom: 0; }
.b2bb-doctor-cell { display: flex; align-items: center; gap: 16px; }
.b2bb-doctor-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--b2bb-pink); display: inline-block; }
.b2bb-table a { color: #333; }

/* ---------------- Care plan ---------------- */
.b2bb-care-header { margin-bottom: 25px; }
.b2bb-care-progress-label { margin: 22px 0 17px; font-size: 20px; color: #5b5b5b; font-weight: 700; }
.b2bb-care-progress {
    height: 51px;
    background: #eeeef4;
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 45% 55%;
    max-width: 1074px;
}
.b2bb-care-progress__fill { background: var(--b2bb-green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.b2bb-care-progress__rest { color: var(--b2bb-green); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.b2bb-care-grid {
    max-width: 1076px;
    display: grid;
    grid-template-columns: 333px 1fr;
    gap: 10px;
    margin-top: 42px;
}
.b2bb-care-timeline {
    background: #fff;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px #eee;
    padding: 20px 12px 30px;
}
.b2bb-care-timeline h3 { margin: 14px 0 20px 4px; font-size: 14px; }
.b2bb-exercise-timeline { position: relative; padding-left: 10px; }
.b2bb-exercise-timeline::before {
    content: "";
    position: absolute;
    left: 56px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #c6c6c6;
}
.b2bb-exercise-step {
    display: grid;
    grid-template-columns: 48px 14px 1fr;
    gap: 8px;
    align-items: center;
    min-height: 67px;
    position: relative;
}
.b2bb-exercise-step__num {
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b6b6b;
    font-size: 13px;
    z-index: 2;
}
.b2bb-exercise-step.is-active .b2bb-exercise-step__num { background: var(--b2bb-green); color: #fff; }
.b2bb-exercise-step__dot { width: 8px; height: 8px; border-radius: 50%; background: #bfc1c5; position: relative; z-index: 2; }
.b2bb-exercise-step.is-done .b2bb-exercise-step__dot,
.b2bb-exercise-step.is-active .b2bb-exercise-step__dot { background: var(--b2bb-green); }
.b2bb-exercise-step__box {
    min-height: 60px;
    border-radius: 15px;
    background: #fbfbfb;
    box-shadow: inset 0 0 0 1px #e7e7e7;
    padding: 12px 18px 11px 25px;
    display: grid;
    grid-template-columns: 1fr 18px;
    gap: 8px;
    align-items: center;
}
.b2bb-exercise-step.is-done .b2bb-exercise-step__box { background: var(--b2bb-green-pale); box-shadow: inset 0 0 0 1px #dbf2ca; }
.b2bb-exercise-step.is-active .b2bb-exercise-step__box { background: var(--b2bb-green); color: #fff; }
.b2bb-exercise-step__box strong { font-size: 14px; font-weight: 500; line-height: 1.35; text-transform: uppercase; }
.b2bb-exercise-step__box small { display: block; color: #8d8d8d; font-size: 14px; text-transform: none; }
.b2bb-exercise-step.is-active small { color: rgba(255,255,255,.9); }
.b2bb-care-video-wrap { background: #f2f2f2; border-radius: 13px; padding: 20px 29px 100px; position: relative; }
.b2bb-care-video {
    height: 419px;
    border-radius: 18px;
    background: #2b2b2b;
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 27px 33px;
}
.b2bb-care-video h2 { margin: 0; font-size: 22px; }
.b2bb-care-video__duration { position: absolute; top: 39px; right: 28px; font: 13px Inter, Arial, sans-serif; }
.b2bb-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -34%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #9c9c9c;
    display: flex;
    align-items: center;
    justify-content: center;
}
.b2bb-play svg { width: 28px; height: 28px; fill: #fff; stroke: none; transform: translateX(2px); }
.b2bb-video-controls {
    position: absolute;
    left: 33px;
    right: 33px;
    bottom: 19px;
    height: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.b2bb-video-controls__bar { flex: 1; height: 8px; border: 1px solid #5d6d69; background: #303a38; position: relative; }
.b2bb-video-controls__bar span { display: block; height: 100%; width: 12%; background: #14e627; }
.b2bb-video-controls__small { width: 20px; height: 20px; background: #222; }
.b2bb-care-info-row {
    display: grid;
    grid-template-columns: 1fr .92fr;
    gap: 16px;
    position: absolute;
    left: 29px;
    right: 29px;
    bottom: 100px;
    transform: translateY(100%);
    margin-top: 16px;
}
.b2bb-care-info-box {
    min-height: 85px;
    border-radius: 12px;
    background: var(--b2bb-green-dark);
    color: #fff;
    padding: 23px 21px;
    display: grid;
    grid-template-columns: 1fr 30px;
    align-items: center;
}
.b2bb-care-info-box strong { display: block; font-size: 16px; font-weight: 500; letter-spacing: .1px; }
.b2bb-care-info-box small { display: block; margin-top: 5px; color: rgba(255,255,255,.7); font-size: 9px; }
.b2bb-care-info-box svg { width: 24px; height: 24px; stroke-width: 3; }

/* ---------------- Exercise library ---------------- */
.b2bb-library-header { text-align: center; }
.b2bb-library-search-row {
    max-width: 713px;
    margin: 24px auto 24px;
    min-height: 50px;
    border-radius: 12px;
    background: #f6f6f6;
    border: 1px solid #e7e7e7;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px 43px;
    align-items: center;
    gap: 10px;
    padding: 5px 5px 5px 13px;
}
.b2bb-library-search-row .b2bb-table-search {
    width: auto;
    border: 0;
    background: transparent;
    height: 40px;
    padding: 0;
    min-width: 0;
}
.b2bb-library-search-row .b2bb-table-search input {
    min-width: 0;
    width: 100%;
}
.b2bb-category-wrap {
    position: relative;
    display: block;
    min-width: 0;
}
.b2bb-category-wrap::after {
    content: "▾";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #111;
    font-size: 15px;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}
.b2bb-library-category-select,
.b2bb-select-fake {
    width: 100%;
    height: 34px;
    border: 1px solid #dcdcdc;
    border-radius: 7px;
    background: #fff;
    color: #111;
    font: 14px/1.2 inherit;
    padding: 0 32px 0 13px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.b2bb-library-category-select:hover,
.b2bb-library-category-select:focus {
    border-color: var(--b2bb-green);
    box-shadow: 0 0 0 3px rgba(125, 161, 98, .18);
}
.b2bb-filter-submit {
    width: 43px;
    height: 43px;
    border: 0;
    border-radius: 7px;
    background: var(--b2bb-green);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.b2bb-filter-submit:hover,
.b2bb-filter-submit:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 8px 18px rgba(125, 161, 98, .28);
}
.b2bb-filter-submit svg { width: 20px; height: 20px; stroke-width: 3; }
.b2bb-filter-area {
    max-width: 856px;
    margin: 0 auto 52px;
    display: grid;
    grid-template-columns: 149px 1fr;
    gap: 14px;
    align-items: start;
}
.b2bb-active-filter-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    min-height: 84px;
    font-size: 16px;
    font-weight: 700;
}
.b2bb-active-filter-label span {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--b2bb-green);
    color: #fff;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.b2bb-filter-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.b2bb-filter-chip {
    min-height: 38px;
    border: 1px solid #d8d8d8;
    border-radius: 7px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777;
    background: #fff;
    font-size: 12px;
    line-height: 1.15;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.b2bb-filter-chip:hover,
.b2bb-filter-chip:focus-visible {
    color: #0c1b0b;
    border-color: #98bf7f;
    transform: translateY(-1px);
}
.b2bb-filter-chip.is-active { background: var(--b2bb-green-soft); color: #0c1b0b; border-color: #98bf7f; }
.b2bb-exercise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 22px;
    max-width: 1084px;
    margin: 0 auto;
}
.b2bb-library-card {
    min-height: 205px;
    border-radius: 14px;
    background: #f1f1f1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.b2bb-library-card:hover,
.b2bb-library-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(20, 20, 20, .12);
    outline: none;
}
.b2bb-library-card[hidden] { display: none !important; }
.b2bb-library-card__thumb-wrap {
    position: relative;
    width: 100%;
    height: 205px;
    background: #1a1a1a;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.b2bb-library-card__thumb-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,.05), transparent 58%);
    pointer-events: none;
}
.b2bb-library-card__thumb-wrap.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: b2bb-lib-shimmer 1.4s infinite;
    z-index: 1;
}
@keyframes b2bb-lib-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.b2bb-library-card__thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}
.b2bb-library-card__thumb-img[src=""],
.b2bb-library-card__thumb-img[hidden] {
    display: none;
}
.b2bb-library-card.has-thumb .b2bb-library-card__thumb-wrap::before {
    background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.22));
    z-index: 2;
}
.b2bb-library-card__duration {
    position: absolute;
    right: 12px;
    top: 12px;
    min-width: 76px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255,255,255,.94);
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    z-index: 5;
    padding: 0 8px;
}
.b2bb-library-card__play {
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: var(--b2bb-green);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
    transition: transform .18s ease, background .18s ease;
}
.b2bb-library-card:hover .b2bb-library-card__play,
.b2bb-library-card:focus-visible .b2bb-library-card__play {
    transform: translate(-50%, -50%) scale(1.08);
    background: #fff;
}
.b2bb-library-card__play svg { fill: currentColor; stroke: none; width: 24px; height: 24px; transform: translateX(2px); }
.b2bb-library-card__foot {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-height: 64px;
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 30px rgba(0,0,0,.10);
    display: grid;
    grid-template-columns: minmax(92px, .45fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    z-index: 7;
}
.b2bb-library-card__foot strong {
    min-width: 0;
    font-size: 14px;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.b2bb-library-card__tag {
    min-width: 0;
    width: 100%;
    min-height: 34px;
    border-radius: 8px;
    border: 1px solid #e4e4e4;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    color: #666;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #fff;
}
.b2bb-library-empty {
    max-width: 1084px;
    margin: 24px auto 0;
    text-align: center;
}
.b2bb-library-modal[hidden] { display: none !important; }
.b2bb-library-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.b2bb-library-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.62);
}
.b2bb-library-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 94vw);
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.b2bb-library-modal__dialog h2 {
    margin: 0 48px 16px 0;
    font-size: 22px;
    line-height: 1.25;
}
.b2bb-library-modal__close {
    position: absolute;
    right: 16px;
    top: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f2f2f2;
    color: #111;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.b2bb-library-modal__video {
    aspect-ratio: 16 / 9;
    background: #111;
    border-radius: 14px;
    overflow: hidden;
}
.b2bb-library-modal__video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.b2bb-library-modal__external {
    display: inline-flex;
    margin-top: 14px;
    color: var(--b2bb-green);
    font-weight: 700;
}
body.b2bb-modal-open { overflow: hidden; }
.b2bb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-top: 34px;
    font: 12px Inter, Arial, sans-serif;
}
.b2bb-pagination a, .b2bb-pagination span {
    color: #000;
    text-decoration: none;
}
.b2bb-pagination .is-page {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    border: 1px solid #eee;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.b2bb-pagination .is-arrow {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    border: 1px solid #eee;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #777;
}

/* ---------------- Milestones ---------------- */
.b2bb-milestone-header { margin-bottom: 36px; }
.b2bb-milestone-summary-grid {
    max-width: 1072px;
    display: grid;
    grid-template-columns: 345px 329px 1fr;
    gap: 8px;
    margin-bottom: 43px;
}
.b2bb-mile-summary {
    height: 115px;
    border-radius: 13px;
    background: #f4f4f4;
    border: 1px solid #e0ded8;
    padding: 19px 23px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
.b2bb-mile-summary h3 { margin: 0 0 9px; font-size: 20px; line-height: 1.15; }
.b2bb-mile-summary p { margin: 0; color: #9a9a9a; font-size: 14px; }
.b2bb-mile-summary.is-complete { background: var(--b2bb-green); color: #fff; }
.b2bb-mile-summary.is-complete p { color: #fff; }
.b2bb-mile-summary.is-complete svg { position: absolute; right: 22px; top: 46px; width: 24px; height: 24px; stroke-width: 3; }
.b2bb-mile-summary__bar { width: 272px; height: 6px; border-radius: 999px; background: #ededf3; overflow: hidden; margin-top: 8px; }
.b2bb-mile-summary__bar span { display: block; height: 100%; width: 50%; background: var(--b2bb-green); border-radius: inherit; }
.b2bb-milestone-detail {
    max-width: 1058px;
    min-height: 335px;
    border-radius: 16px;
    background: #f1f1f1;
    padding: 22px 20px;
    display: grid;
    grid-template-columns: 1fr 349px;
    gap: 8px;
}
.b2bb-milestone-goal {
    background: #fff;
    border-radius: 8px;
    padding: 17px 16px 16px;
    box-shadow: inset 0 0 0 1px #eee9df;
}
.b2bb-milestone-goal h4 { margin: 18px 0 15px; font-size: 18px; }
.b2bb-goal-box {
    min-height: 177px;
    border-radius: 14px;
    background: var(--b2bb-green-dark);
    color: #fff;
    padding: 15px 16px 21px;
}
.b2bb-goal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.b2bb-goal-head .b2bb-round-icon { width: 66px; height: 66px; flex: 0 0 66px; color: #fff; background: rgba(255,255,255,.18); }
.b2bb-goal-head h3 { margin: 0; font-size: 29px; line-height: 1.1; }
.b2bb-goal-box p { margin: 0 0 16px; color: rgba(255,255,255,.72); font-size: 13px; }
.b2bb-goal-progress { height: 29px; background: #eff0f6; border-radius: 4px; overflow: hidden; position: relative; }
.b2bb-goal-progress span { display: block; width: 60%; height: 100%; background: #8db372; }
.b2bb-goal-progress em { position: absolute; right: 12px; top: 6px; font-style: normal; color: #38d84d; font-size: 12px; }
.b2bb-reward {
    border-radius: 8px;
    background: var(--b2bb-green-soft);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 45px;
    color: #351111;
}
.b2bb-reward h3 { margin: 0; font-size: 24px; }
.b2bb-reward a { width: 293px; height: 59px; border-radius: 5px; background: var(--b2bb-green); color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 20px; }

/* ---------------- Journal ---------------- */
.b2bb-journal-title { text-align: center; margin-bottom: 66px; }
.b2bb-journal-card {
    max-width: 1081px;
    margin: 0 auto 41px;
    background: #fff;
    border-radius: 26px;
    padding: 31px 37px 21px;
}
.b2bb-journal-card h2 { margin: 0 0 13px; font-size: 16px; }
.b2bb-form-line { border-top: 1px solid #d5d5d5; padding: 20px 0; display: grid; grid-template-columns: 137px 1fr; gap: 57px; align-items: center; }
.b2bb-form-line--notes { align-items: start; }
.b2bb-form-line label { font-size: 16px; font-weight: 500; }
.b2bb-date-field {
    width: 270px;
    height: 46px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    color: #5c5c5c;
    font-size: 16px;
}
.b2bb-date-field svg { width: 17px; height: 17px; color: #999; }
.b2bb-date-field input { border: 0; outline: 0; width: 100%; font-family: inherit; font-size: 16px; color: #5c5c5c; }
.b2bb-date-field span:last-child { color: #aaa; font-size: 20px; }
.b2bb-pain-row { display: grid; grid-template-columns: 1fr 72px; gap: 34px; align-items: center; }
.b2bb-pain-bars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; max-width: 719px; }
.b2bb-pain-bars span { height: 10px; border-radius: 99px; background: #d9e9cd; display: block; }
.b2bb-pain-bars span:first-child { background: var(--b2bb-green); }
.b2bb-pain-scale { display: flex; justify-content: space-between; max-width: 708px; font-size: 14px; margin-top: 8px; }
.b2bb-pain-severe { color: #777; font-size: 12px; }
.b2bb-notes-field textarea {
    width: 100%;
    height: 84px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 19px 15px;
    resize: vertical;
    outline: 0;
    font-family: inherit;
    font-size: 14px;
}
.b2bb-notes-field textarea::placeholder { color: #b5b5b5; }
.b2bb-checkboxes { margin-top: 20px; display: flex; flex-direction: column; gap: 15px; }
.b2bb-checkline { display: flex; align-items: center; gap: 17px; color: #8a8a8a; font-size: 14px; }
.b2bb-checkline input { width: 19px; height: 19px; border: 1px solid #d8d8d8; }
.b2bb-journal-submit { height: 44px; border-radius: 8px; margin-top: 15px; }
.b2bb-journal-history { max-width: 1072px; margin: 0 auto; }
.b2bb-journal-history h2 { margin: 0 0 23px 8px; font-size: 16px; }
.b2bb-journal-history__line { height: 1px; background: #c9c9c9; margin-bottom: 20px; }
.b2bb-history-card { background: #fff; border-radius: 14px; padding: 39px 36px; min-height: 180px; }
.b2bb-history-card h3 { margin: 0 0 16px; font-size: 18px; }
.b2bb-history-card hr { border: 0; border-top: 1px solid #d0d0d0; margin: 0 0 22px; }
.b2bb-history-card__row { display: flex; justify-content: space-between; align-items: center; }
.b2bb-history-card__row strong { color: #8b8b8b; font-size: 18px; font-weight: 500; }
.b2bb-history-card__row a { color: var(--b2bb-green); font-size: 18px; }
.b2bb-history-card p { color: #666; }

/* ---------------- Appointments ---------------- */
.b2bb-appointment-header { text-align: center; margin-bottom: 47px; }
.b2bb-schedule-card {
    max-width: 1047px;
    min-height: 456px;
    border-radius: 10px;
    border: 1px solid #d9d9d9;
    background: #f4f4f4;
    margin: 0 auto 39px;
    display: grid;
    grid-template-columns: 1fr 399px;
    gap: 59px;
    padding: 27px 36px 24px 23px;
}
.b2bb-schedule-card h2 { margin: 0 0 65px; font-size: 27px; }
.b2bb-schedule-box {
    min-height: 92px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 18px;
}
.b2bb-schedule-box + .b2bb-schedule-box { margin-top: 13px; }
.b2bb-schedule-plus {
    width: 57px;
    height: 57px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #dedede;
    color: var(--b2bb-green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 57px;
}
.b2bb-schedule-plus svg { width: 34px; height: 34px; }
.b2bb-schedule-box strong { font-size: 26px; }
.b2bb-schedule-box h3 { margin: 0 0 8px; font-size: 22px; }
.b2bb-schedule-box p { margin: 0; color: #999; font-size: 18px; }
.b2bb-schedule-left .b2bb-btn { margin-top: 23px; height: 34px; width: 100%; }
.b2bb-calendar {
    height: 402px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    padding: 34px;
}
.b2bb-calendar__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 31px; }
.b2bb-calendar__top h3 { margin: 0; font-size: 22px; }
.b2bb-calendar__nav { display: flex; gap: 19px; font-size: 25px; }
.b2bb-calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 19px 20px; text-align: center; font-size: 20px; color: #666; }
.b2bb-calendar__grid strong { color: #222; font-weight: 700; }
.b2bb-calendar__grid .is-active { width: 44px; height: 44px; border-radius: 50%; background: var(--b2bb-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin: -10px auto; }
.b2bb-appointments-table-wrap { max-width: 1058px; margin: 0 auto; background: #f1f1f1; border-radius: 14px; padding: 20px 12px; }
.b2bb-appointments-table-wrap .b2bb-table-card { box-shadow: none; margin: 0; max-width: none; }

/* ---------------- Plans ---------------- */
.b2bb-plans-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
}
.b2bb-plans-header__left { padding-left: 0; }
.b2bb-plans-note {
    min-width: 377px;
    height: 45px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #727272;
    font-size: 16px;
}
.b2bb-plans-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1123px;
    margin: 0 auto 39px;
}
.b2bb-plan-card {
    min-height: 580px;
    border-radius: 16px;
    background: #fff;
    padding: 24px 10px 24px;
    text-align: center;
    position: relative;
}
.b2bb-plan-card.is-popular { background: #edffeb; padding-top: 74px; }
.b2bb-popular-ribbon {
    position: absolute;
    top: 12px;
    left: 10px;
    right: 10px;
    height: 47px;
    border-radius: 15px;
    background: var(--b2bb-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}
.b2bb-plan-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf7ed;
    color: #24a346;
    font-size: 32px;
}
.b2bb-plan-card h3 { margin: 0 0 8px; font-size: 36px; }
.b2bb-plan-card .price-word { display: block; font-size: 27px; color: var(--b2bb-green); margin-bottom: 31px; }
.b2bb-plan-card p { color: #666; font-size: 15px; margin: 0 0 30px; }
.b2bb-plan-card hr { border: 0; border-top: 1px solid #d7d7d7; margin: 0 0 34px; }
.b2bb-plan-price { margin-bottom: 25px; font-size: 36px; font-weight: 700; }
.b2bb-plan-price span { color: #c0c0c0; font-size: 20px; }
.b2bb-plan-card.is-popular .b2bb-plan-price { color: var(--b2bb-green); }
.b2bb-plan-list { list-style: none; padding: 0 30px; margin: 0 0 28px; text-align: left; display: flex; flex-direction: column; gap: 23px; color: #4d4d4d; font-size: 15px; }
.b2bb-plan-list li::before { content: "✓"; font-weight: 800; margin-right: 12px; }
.b2bb-plan-button {
    width: calc(100% - 10px);
    height: 51px;
    border-radius: 7px;
    border: 1px solid var(--b2bb-green);
    color: var(--b2bb-green);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin: auto auto 0;
    font-size: 16px;
}
.b2bb-plan-card.is-popular .b2bb-plan-button { background: var(--b2bb-green); color: #fff; }
.b2bb-plan-card--blue .price-word, .b2bb-plan-card--blue .b2bb-plan-button { color: var(--b2bb-blue); border-color: var(--b2bb-blue); }
.b2bb-plan-card--purple .price-word, .b2bb-plan-card--purple .b2bb-plan-button, .b2bb-plan-card--purple .b2bb-plan-price { color: var(--b2bb-purple); border-color: var(--b2bb-purple); }
.b2bb-help-strip {
    max-width: 1105px;
    min-height: 75px;
    background: #fff;
    border-radius: 14px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 31px 16px 18px;
}
.b2bb-help-strip__left { display: flex; align-items: center; gap: 18px; color: #666; }
.b2bb-help-strip__icon { width: 37px; height: 37px; border-radius: 50%; border: 3px solid #88d58b; color: #88d58b; display: flex; align-items: center; justify-content: center; font-size: 27px; }
.b2bb-help-strip strong { color: #666; }
.b2bb-help-strip small { display: block; margin-top: 4px; }
.b2bb-help-strip a { width: 183px; height: 45px; border: 1px solid #d9d9d9; border-radius: 8px; display: flex; align-items: center; justify-content: center; text-decoration: none; color: #777; font-size: 16px; }

/* ---------------- Settings ---------------- */
.b2bb-settings-layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; min-height: 529px; }
.b2bb-settings-side,
.b2bb-settings-panel { background: #fff; border-radius: 34px; }
.b2bb-settings-side { padding: 67px 56px; display: flex; flex-direction: column; align-items: center; }
.b2bb-settings-blob { width: 110px; height: 110px; border-radius: 50%; background: #eee9df; margin-bottom: 83px; }
.b2bb-settings-tabs { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.b2bb-settings-tabs a { text-decoration: none; color: #111; font-size: 15px; font-weight: 700; }
.b2bb-settings-tabs a.is-active { color: var(--b2bb-green); border-bottom: 1px solid var(--b2bb-green); padding-bottom: 12px; width: 88px; text-align: center; }
.b2bb-settings-panel { padding: 46px 47px; }
.b2bb-settings-panel h2 { margin: 0 0 21px; font-size: 16px; }
.b2bb-settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 55px; }
.b2bb-field label { display: block; margin-bottom: 8px; font: 12px Inter, Arial, sans-serif; }
.b2bb-field input {
    width: 100%;
    height: 37px;
    border: 1px solid #d9e0e0;
    border-radius: 8px;
    padding: 0 16px;
    font-family: Inter, Arial, sans-serif;
    font-size: 14px;
    outline: 0;
}
.b2bb-settings-submit { width: 140px; height: 37px; margin-top: 5px; }
.b2bb-password-title { margin-top: 47px !important; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
    .b2bb-dashboard-panel { grid-template-columns: 1fr; }
    .b2bb-dashboard-actions { grid-template-columns: 1fr; }
    .b2bb-care-grid,
    .b2bb-schedule-card,
    .b2bb-milestone-detail,
    .b2bb-settings-layout { grid-template-columns: 1fr; }
    .b2bb-exercise-grid,
    .b2bb-plans-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    :root { --b2bb-sidebar: 0px; }
    .b2bb-sidebar { transform: translateX(-100%); }
    .b2bb-page-wrap { margin-left: 0; width: 100%; }
    .b2bb-topbar { left: 0; }
    .b2bb-main { padding-left: 18px; padding-right: 18px; }
    .b2bb-dashboard-hero { flex-direction: column; align-items: flex-start; }
    .b2bb-exercise-grid,
    .b2bb-plans-grid { grid-template-columns: 1fr; }
    .b2bb-table-card { overflow-x: auto; }
    .b2bb-table { min-width: 790px; }
}

/* =========================================================
   Bout2BeBetter Doctor App Screens
   Figma doctor screens: dashboard, patients, care builder,
   milestone manager, notes, edit plans, subscription mgmt.
   ========================================================= */
.b2bb-layout--doctor .b2bb-sidebar__logo { height: 86px; }
.b2bb-sidebar__doctor-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 34px 38px;
}
.b2bb-sidebar__doctor-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #9a9a9a;
    display: inline-block;
    flex: 0 0 60px;
}
.b2bb-sidebar__doctor-profile strong {
    font-size: 16px;
    font-weight: 500;
    color: #202020;
}
.b2bb-sidebar__chevron { margin-left: auto; font-size: 24px; line-height: 1; }
.b2bb-sidebar__sub-link {
    width: 140px;
    min-height: 54px;
    margin-left: 88px;
    margin-top: 4px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: rgba(120,156,93,.62);
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    font-size: 15px;
}
.b2bb-sidebar__sub-link svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; }
.b2bb-sidebar__doctor-logout {
    min-height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 42px;
}
.b2bb-sidebar__doctor-logout a { color: #ff2457; display: inline-flex; }
.b2bb-sidebar__doctor-logout svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.b2bb-doctor-main { background: #fff; padding: 0; }
.b2bb-doctor-pad { padding: 36px 30px 55px; }
.b2bb-doctor-pad--dashboard { padding: 28px 24px 38px; background: #fff; }
.b2bb-doctor-pad--grey { background: #f4f4f4; }
.b2bb-doctor-container { max-width: 1124px; margin: 0 auto; }
.b2bb-doctor-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}
.b2bb-doctor-header h1 {
    margin: 0 0 7px;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -.8px;
    color: #202124;
}
.b2bb-doctor-header p { margin: 0; color: #666; font-size: 15px; }
.b2bb-doctor-actions { display: flex; align-items: center; gap: 20px; }
.b2bb-doctor-search {
    width: 520px;
    height: 50px;
    border: 1px solid #e6e6e6;
    border-radius: 11px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 10px 0 16px;
    color: #5a5f57;
}
.b2bb-doctor-search svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.b2bb-doctor-search input { border: 0; outline: 0; background: transparent; width: 100%; font-family: inherit; font-size: 14px; }
.b2bb-doctor-search button,
.b2bb-square-search {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 7px;
    background: var(--b2bb-green);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.b2bb-doctor-select,
.b2bb-doctor-outline {
    height: 50px;
    border: 1px solid #e6e6e6;
    border-radius: 9px;
    background: #fff;
    padding: 0 20px;
    font-family: inherit;
    font-size: 14px;
    color: #555;
}
.b2bb-doctor-outline { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-width: 158px; }
.b2bb-doctor-btn {
    height: 45px;
    min-width: 158px;
    border: 0;
    border-radius: 5px;
    background: var(--b2bb-green);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}
.b2bb-doctor-btn--light { background: #dfeee0; color: #2b6f3f; }
.b2bb-doctor-btn--ghost { background: #f8f9fb; color: #111; border: 1px solid #dfe5e8; }
.b2bb-doctor-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.b2bb-doctor-stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}
.b2bb-doctor-stat-card {
    min-height: 155px;
    border-radius: 7px;
    background: #fff;
    border: 1px solid #e8e8e8;
    overflow: hidden;
}
.b2bb-doctor-stat-card__top {
    height: 68px;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 13px 0 20px;
}
.b2bb-doctor-stat-card__label { display: flex; align-items: center; gap: 17px; font-weight: 700; }
.b2bb-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eaffdf;
    color: var(--b2bb-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.b2bb-stat-icon.is-muted { background: #f0f0f0; color: #a9a9a9; }
.b2bb-stat-icon.is-red { background: #ffe8e8; color: #ff315f; }
.b2bb-stat-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.b2bb-stat-more { width: 33px; height: 33px; border: 1px solid #e2e2e2; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #8f8f8f; }
.b2bb-stat-more svg { width: 19px; height: 19px; }
.b2bb-doctor-stat-card__body { padding: 15px 20px 16px; }
.b2bb-doctor-stat-card__body strong { display: block; font-size: 30px; line-height: 1; font-weight: 500; margin-bottom: 13px; }
.b2bb-doctor-stat-card__body small { color: #9b9b9b; }
.b2bb-doctor-stat-card__body .green { color: #12c445; margin-right: 8px; }
.b2bb-doctor-stat-card__body .red { color: #ff315f; margin-right: 8px; }

.b2bb-doctor-metric-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 42px;
    margin: 44px 0 28px;
}
.b2bb-doctor-metric {
    min-height: 78px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
}
.b2bb-doctor-metric strong { display: block; font-size: 15px; margin-bottom: 8px; }
.b2bb-doctor-metric span:last-child { font-size: 30px; line-height: 1; font-weight: 600; color: #000; }

.b2bb-doctor-dashboard-panel {
    min-height: 682px;
    border-radius: 14px;
    background: #f1f1f1;
    padding: 10px 20px 28px;
    display: grid;
    grid-template-columns: 424px 1fr;
    gap: 13px;
    position: relative;
}
.b2bb-recent-card,
.b2bb-doctor-table-shell {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eeeeee;
}
.b2bb-recent-card { height: 260px; padding: 22px 15px; margin-top: 0; overflow: hidden; }
.b2bb-recent-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.b2bb-recent-card h2,
.b2bb-doctor-table-shell h2 { margin: 0; font-size: 18px; color: #555b66; }
.b2bb-recent-card__view { width: 84px; height: 32px; border: 1px solid #e2e2e2; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: #555; font-size: 13px; }
.b2bb-update-row { height: 51px; display: flex; align-items: center; gap: 14px; border: 1px solid #f0f0f0; border-radius: 11px; padding: 0 8px 0 11px; margin-bottom: 11px; }
.b2bb-avatar-dot { width: 32px; height: 32px; border-radius: 50%; background: #d0d0d5; display: inline-flex; align-items: center; justify-content: center; color: #aaa; font-size: 7px; flex: 0 0 32px; }
.b2bb-update-row strong { font-size: 12px; display: block; }
.b2bb-update-row small { color: #9a9a9a; font-size: 11px; }
.b2bb-doctor-appointment-card { border-radius: 28px; padding: 23px 22px 34px; }
.b2bb-doctor-appointment-card__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid #eee; }
.b2bb-doctor-appointment-card__head h2 { color: #000; font-size: 18px; }
.b2bb-time-filter { min-width: 122px; height: 32px; border-radius: 18px; border: 1px solid #eeeeee; background: #f7f7f7; display: flex; align-items: center; justify-content: center; color: #666; }
.b2bb-doctor-big-table { width: 100%; border-collapse: collapse; font-family: inherit; }
.b2bb-doctor-big-table th { height: 38px; background: #f7f7f7; text-align: left; font-size: 18px; font-weight: 400; color: #898989; padding: 0 23px; }
.b2bb-doctor-big-table td { height: 48px; border-bottom: 1px solid #eeeeee; padding: 0 23px; font-size: 16px; }
.b2bb-doctor-big-table tr:last-child td { border-bottom: 0; }
.b2bb-name-cell { display: flex; align-items: center; gap: 15px; }
.b2bb-status-pill { min-width: 89px; height: 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.b2bb-status-pill--attending { color: #10bc2a; background: #eaffdf; }
.b2bb-status-pill--canceled { color: #ff315f; background: #ffe7ee; }

.b2bb-doctor-card-table-wrap { background: #f1f1f1; padding: 28px 40px; margin-left: -30px; margin-right: -30px; }
.b2bb-doctor-table-card {
    background: #fff;
    border: 1px solid #eeeeee;
    border-radius: 24px;
    overflow: hidden;
}
.b2bb-doctor-table-card table { width: 100%; border-collapse: collapse; }
.b2bb-doctor-table-card th { height: 48px; background: #f8f8f8; padding: 0 20px; text-align: left; font-size: 13px; font-weight: 500; color: #565656; }
.b2bb-doctor-table-card td { height: 53px; border-top: 1px solid #eeeeee; padding: 0 20px; font-size: 14px; color: #111; }
.b2bb-doctor-progress-cell { display: flex; flex-direction: column; gap: 5px; width: 110px; }
.b2bb-doctor-progress-cell small { font-size: 12px; color: #555; }
.b2bb-doctor-progress { height: 5px; border-radius: 999px; background: #ebebef; overflow: hidden; }
.b2bb-doctor-progress span { display: block; height: 100%; background: var(--b2bb-green); border-radius: inherit; }
.b2bb-doctor-pill { min-width: 92px; height: 19px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.b2bb-doctor-pill--green { color: #13b342; background: #e6f8ec; }
.b2bb-doctor-pill--purple { color: #8b4dff; background: #f0e4ff; }
.b2bb-doctor-pill--orange { color: #cf5a20; background: #ffe9df; }
.b2bb-doctor-pill--blue { color: #2499ec; background: #e6f5ff; }
.b2bb-table-action-group { display: flex; align-items: center; gap: 10px; }
.b2bb-tiny-button { height: 33px; min-width: 69px; border-radius: 7px; border: 1px solid #dfe5e8; background: #f8f9fb; color: #111; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 12px; font-weight: 700; }
.b2bb-tiny-button--green { background: #dfeee0; color: #2b6f3f; border-color: #c9e3cc; }
.b2bb-doctor-pagination { height: 54px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; color: #8a8a8a; }
.b2bb-pagination-pills { display: flex; gap: 10px; align-items: center; }
.b2bb-page-dot { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #eeeeee; display: inline-flex; align-items: center; justify-content: center; color: #888; text-decoration: none; }
.b2bb-page-dot.is-active { background: var(--b2bb-green); color: #fff; }

/* Care plan builder */
.b2bb-builder-main { background: #f4f4f4; min-height: calc(100vh - var(--b2bb-topbar)); }
.b2bb-builder-header { padding: 36px 31px 45px; display: flex; align-items: center; justify-content: space-between; }
.b2bb-builder-header h1 { margin: 0 0 8px; font-size: 28px; }
.b2bb-builder-header p { margin: 0; color: #666; font-size: 15px; }
.b2bb-builder-buttons { display: flex; align-items: center; gap: 22px; }
.b2bb-builder-cancel { width: 160px; height: 35px; border: 1px solid #777; border-radius: 5px; background: transparent; color: #111; font-family: inherit; }
.b2bb-builder-layout { display: grid; grid-template-columns: 303px 1fr; min-height: calc(100vh - 226px); }
.b2bb-builder-sidebar { border: 1px solid #bdbdbd; border-bottom: 0; border-left: 0; background: #f2f2f2; border-radius: 0 12px 0 0; overflow: hidden; }
.b2bb-builder-sidebar__head { height: 56px; display: flex; align-items: center; padding: 0 25px; color: #666; font-size: 16px; border-bottom: 1px solid #d5d5d5; }
.b2bb-builder-exercise { min-height: 117px; border-bottom: 1px solid #d5d5d5; padding: 33px 25px; }
.b2bb-builder-exercise.is-active { background: #efffe6; }
.b2bb-builder-exercise strong { display: block; font-size: 23px; margin-bottom: 10px; }
.b2bb-builder-exercise span { color: #666; font-size: 20px; }
.b2bb-builder-add { height: 50px; display: flex; align-items: center; gap: 20px; color: var(--b2bb-green); font-weight: 700; padding: 0 25px; text-decoration: none; border-bottom: 1px solid #d5d5d5; }
.b2bb-builder-form { background: #fff; border-radius: 0 22px 0 0; padding: 40px 52px 40px; }
.b2bb-builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.b2bb-builder-field label { display: block; font-size: 28px; font-weight: 700; margin-bottom: 23px; }
.b2bb-builder-field input,
.b2bb-builder-field textarea { width: 100%; border: 1px solid #d8d8d8; border-radius: 7px; padding: 0 16px; font-family: inherit; font-size: 16px; outline: none; }
.b2bb-builder-field input { height: 45px; }
.b2bb-builder-field textarea { height: 116px; padding-top: 13px; resize: vertical; }
.b2bb-builder-media-card { margin-top: 18px; border: 1px solid #d8d8d8; border-radius: 7px; padding: 21px 15px 25px; display: grid; grid-template-columns: 253px 1fr; gap: 25px; }
.b2bb-builder-video { height: 200px; border-radius: 18px; background: #2d2d2d; color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.b2bb-builder-video .b2bb-play-dot { width: 54px; height: 54px; border-radius: 50%; background: #a6a6a6; display: flex; align-items: center; justify-content: center; color: #fff; }
.b2bb-builder-media-card h2 { margin: 0 0 22px; color: var(--b2bb-green); font-size: 28px; }
.b2bb-builder-media-card label { display: block; margin: 0 0 9px; font-weight: 700; }
.b2bb-builder-media-card input { width: 100%; height: 45px; border: 1px solid #d8d8d8; border-radius: 7px; padding: 0 16px; font-family: inherit; margin-bottom: 20px; }
.b2bb-builder-media-card small { color: #8a8a8a; }
.b2bb-builder-view { float: right; color: #8a8a8a; }
.b2bb-builder-bottom { display: flex; gap: 9px; margin-top: 24px; }

/* Milestone manager */
.b2bb-milestone-manager-grid { background: #f1f1f1; margin: 22px -30px 0; padding: 32px 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.b2bb-manager-card { background: #fff; border-radius: 15px; padding: 25px 18px 24px; min-height: 612px; }
.b2bb-manager-card h2 { margin: 0 0 31px; color: #3d6d2c; font-size: 28px; }
.b2bb-manager-card h3 { margin: 0 0 16px; font-size: 18px; }
.b2bb-manager-card p { color: #666; margin: 0 0 23px; }
.b2bb-card-status { float: right; min-width: 94px; height: 20px; border-radius: 999px; background: #e8f7e6; color: #0e791a; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.b2bb-manager-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 14px 0 22px; }
.b2bb-manager-list ul { margin: 0; padding-left: 18px; color: #4f4f4f; font-size: 12px; line-height: 1.55; text-transform: uppercase; }
.b2bb-manager-section { border-top: 1px solid #d8d8d8; padding: 27px 0 22px; }
.b2bb-rule-row { display: flex; align-items: center; gap: 24px; color: #4f4f4f; font-size: 13px; }
.b2bb-unlock-row { display: flex; align-items: center; gap: 19px; color: #4f4f4f; font-size: 13px; }
.b2bb-manager-actions { display: flex; gap: 9px; margin-top: 27px; }
.b2bb-manager-actions .b2bb-tiny-button { min-width: 68px; }
.b2bb-delete { color: #ff2457; }

/* Notes */
.b2bb-notes-pad { background: #f4f4f4; padding: 19px 19px 70px; }
.b2bb-notes-card { max-width: 1080px; margin: 0 auto 30px; background: #fff; border-radius: 28px; padding: 32px 28px 26px; }
.b2bb-notes-card h1 { margin: 0 0 8px; font-size: 28px; }
.b2bb-notes-card p { margin: 0 0 22px; color: #666; }
.b2bb-notes-card textarea { width: 100%; height: 218px; border: 1px solid #d6d6d6; border-radius: 7px; resize: vertical; padding: 20px 16px; font-family: inherit; font-size: 16px; outline: 0; }
.b2bb-notes-card__action { display: flex; justify-content: flex-end; margin-top: 23px; }
.b2bb-note-history { max-width: 1080px; margin: 0 auto; background: #fff; border-radius: 13px; padding: 21px 18px 37px; }
.b2bb-note-history h2 { font-size: 15px; margin: 0 0 19px; }
.b2bb-note-line { display: grid; grid-template-columns: 130px 80px 1fr; align-items: center; min-height: 67px; position: relative; }
.b2bb-note-date { height: 42px; border-radius: 8px; background: #eef7ea; color: var(--b2bb-green); display: flex; align-items: center; justify-content: center; }
.b2bb-note-line:first-of-type .b2bb-note-date { background: var(--b2bb-green); color: #fff; }
.b2bb-note-rail { height: 67px; position: relative; }
.b2bb-note-rail::before { content: ''; position: absolute; left: 13px; top: -15px; bottom: -15px; width: 2px; background: var(--b2bb-green); }
.b2bb-note-rail::after { content: ''; position: absolute; left: 9px; top: 28px; width: 8px; height: 8px; border-radius: 50%; background: var(--b2bb-green); }
.b2bb-note-copy { min-height: 60px; border-radius: 14px; background: #f3f3f3; display: flex; align-items: center; padding: 0 26px; }

/* Doctor subscriptions */
.b2bb-subscription-table { margin-top: 45px; }
.b2bb-subscription-table .b2bb-doctor-table-card td { height: 53px; }
.b2bb-billing-status { display: inline-flex; align-items: center; gap: 10px; }
.b2bb-billing-status::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: #0cbc24; box-shadow: inset 0 2px 2px rgba(0,0,0,.18); }
.b2bb-billing-muted { color: #999; margin-left: 6px; }

/* Doctor edit plans uses patient plan cards with doctor-specific spacing */
.b2bb-doctor-plans-main { background: #fff; }
.b2bb-doctor-plans-main .b2bb-plans-header { padding: 36px 0 0; max-width: 1102px; margin: 0 auto 37px; }
.b2bb-doctor-plans-main .b2bb-plans-grid { margin-bottom: 0; }
.b2bb-doctor-plans-band { background: #f4f4f4; padding: 27px 20px 21px; }

@media (max-width: 1180px) {
    .b2bb-doctor-stat-row,
    .b2bb-doctor-metric-row,
    .b2bb-milestone-manager-grid { grid-template-columns: repeat(2, 1fr); }
    .b2bb-doctor-dashboard-panel,
    .b2bb-builder-layout,
    .b2bb-builder-media-card { grid-template-columns: 1fr; }
    .b2bb-builder-sidebar { border-right: 0; }
    .b2bb-doctor-search { width: 360px; }
}
@media (max-width: 900px) {
    .b2bb-doctor-header,
    .b2bb-doctor-actions { flex-direction: column; align-items: stretch; }
    .b2bb-doctor-search { width: 100%; }
    .b2bb-doctor-stat-row,
    .b2bb-doctor-metric-row,
    .b2bb-milestone-manager-grid { grid-template-columns: 1fr; }
    .b2bb-doctor-card-table-wrap { margin-left: -18px; margin-right: -18px; overflow-x: auto; }
    .b2bb-doctor-table-card { min-width: 980px; }
}

/* =========================================================
   Responsive/mobile usability pass
   - Fixes long names/emails overflowing in sidebar/topbar
   - Makes sidebar an off-canvas drawer on tablet/mobile
   - Adds hamburger support in the header
   - Makes grids, cards, forms, and tables usable on mobile
   ========================================================= */

/* Safer text wrapping/overflow across the app */
.b2bb-app,
.b2bb-app * {
    min-width: 0;
}

.b2bb-sidebar__link span:last-child,
.b2bb-sidebar__sub-link span:last-child,
.b2bb-sidebar__user strong,
.b2bb-sidebar__doctor-profile strong,
.b2bb-topbar__profile span:nth-child(2),
.b2bb-name-cell,
.b2bb-update-row strong,
.b2bb-mini-item strong,
.b2bb-library-card__foot strong,
.b2bb-table td,
.b2bb-doctor-table-card td,
.b2bb-doctor-big-table td {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.b2bb-sidebar__link span:last-child,
.b2bb-sidebar__sub-link span:last-child,
.b2bb-sidebar__user strong,
.b2bb-sidebar__doctor-profile strong,
.b2bb-topbar__profile span:nth-child(2) {
    display: block;
    white-space: nowrap;
}

.b2bb-sidebar__doctor-profile strong,
.b2bb-sidebar__user strong {
    max-width: 160px;
}

.b2bb-sidebar__doctor-profile {
    width: 100%;
    padding-left: 37px;
    padding-right: 24px;
    gap: 14px;
}

/* Better desktop sidebar search sizing */
.b2bb-sidebar__search {
    width: calc(100% - 48px);
    max-width: 212px;
    height: 40px;
    margin-left: 24px;
    margin-right: 24px;
    background: #e9e9e9;
    border: 1px solid transparent;
}
.b2bb-sidebar__search:focus-within {
    background: #fff;
    border-color: #d9d9d9;
    box-shadow: 0 0 0 3px rgba(120, 156, 93, .12);
}
.b2bb-sidebar__search input {
    min-width: 0;
    line-height: 1;
}

/* Hamburger is hidden on desktop */
.b2bb-menu-toggle,
.b2bb-sidebar-overlay {
    display: none;
}

.b2bb-topbar__spacer {
    flex: 1 1 auto;
}

/* Tables should never break the viewport */
.b2bb-table-card,
.b2bb-doctor-table-card,
.b2bb-doctor-table-shell,
.b2bb-appointments-table-wrap {
    max-width: 100%;
}
.b2bb-table-card,
.b2bb-doctor-table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.b2bb-table-card table,
.b2bb-doctor-table-card table,
.b2bb-doctor-big-table,
.b2bb-table {
    min-width: 780px;
}

@media (max-width: 1024px) {
    :root {
        --b2bb-sidebar: 280px;
        --b2bb-topbar: 70px;
    }

    body.b2bb-app {
        overflow-x: hidden;
        background: #f4f4f4;
    }
    body.b2bb-sidebar-open {
        overflow: hidden;
    }

    .b2bb-layout {
        display: block;
        min-height: 100vh;
        width: 100%;
        overflow-x: hidden;
    }

    .b2bb-sidebar {
        width: min(86vw, 292px);
        transform: translateX(-105%);
        transition: transform .25s ease;
        z-index: 1000;
        box-shadow: 20px 0 45px rgba(0,0,0,.14);
    }
    body.b2bb-sidebar-open .b2bb-sidebar {
        transform: translateX(0);
    }

    .b2bb-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.32);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        z-index: 990;
    }
    body.b2bb-sidebar-open .b2bb-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .b2bb-page-wrap {
        width: 100%;
        margin-left: 0;
        min-height: 100vh;
        overflow-x: hidden;
    }

    .b2bb-topbar {
        left: 0;
        height: var(--b2bb-topbar);
        padding: 0 14px;
        justify-content: space-between;
        gap: 10px;
        z-index: 900;
    }

    .b2bb-menu-toggle {
        width: 44px;
        height: 44px;
        border: 1.5px solid #eee9df;
        border-radius: 10px;
        background: #fff;
        color: #626c5d;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        flex: 0 0 44px;
        cursor: pointer;
    }
    .b2bb-menu-toggle span {
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        display: block;
    }

    .b2bb-topbar__actions {
        gap: 7px;
        min-width: 0;
        justify-content: flex-end;
    }
    .b2bb-topbar__icon {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }
    .b2bb-topbar__icon svg {
        width: 22px;
        height: 22px;
    }
    .b2bb-topbar__profile {
        min-width: 0;
        max-width: min(44vw, 210px);
        width: auto;
        height: 42px;
        margin-left: 4px;
        padding: 6px 8px;
        font-size: 13px;
    }
    .b2bb-topbar__avatar {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
    }

    .b2bb-main,
    .b2bb-builder-main {
        margin-top: var(--b2bb-topbar);
        min-height: calc(100vh - var(--b2bb-topbar));
    }
    .b2bb-main--dashboard,
    .b2bb-main--library,
    .b2bb-main--care,
    .b2bb-main--milestone,
    .b2bb-main--journal,
    .b2bb-main--appointments,
    .b2bb-main--plans,
    .b2bb-main--settings,
    .b2bb-doctor-container,
    .b2bb-notes-pad {
        padding: 22px 16px 42px !important;
    }

    .b2bb-page-title {
        font-size: clamp(24px, 5vw, 30px);
        line-height: 1.15;
    }
    .b2bb-page-subtitle {
        font-size: 14px;
    }

    /* Patient dashboard */
    .b2bb-dashboard-hero {
        max-width: none;
        gap: 16px;
        align-items: flex-start;
        margin-bottom: 22px;
    }
    .b2bb-dashboard-hero__avatar {
        width: 110px;
        height: 110px;
        flex-basis: 110px;
        padding: 6px;
    }
    .b2bb-dashboard-hero h1 {
        font-size: 24px;
    }
    .b2bb-dashboard-hero p {
        font-size: 14px;
        margin-bottom: 14px;
    }
    .b2bb-dashboard-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
    .b2bb-action-card {
        min-height: 72px;
        padding: 14px 12px;
    }

    .b2bb-dashboard-panel {
        max-width: none;
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 14px;
        gap: 14px;
        border-radius: 18px;
    }
    .b2bb-today-card,
    .b2bb-milestone-card,
    .b2bb-progress-widget {
        width: 100%;
    }
    .b2bb-milestone-mini {
        grid-template-columns: 58px 1fr;
    }
    .b2bb-scrollbar-fake {
        display: none;
    }

    /* Generic table/card rows */
    .b2bb-table-card__top,
    .b2bb-doctor-header,
    .b2bb-doctor-actions,
    .b2bb-appointment-header,
    .b2bb-plans-header,
    .b2bb-builder-header {
        flex-wrap: wrap;
        gap: 14px;
    }
    .b2bb-table-tools,
    .b2bb-doctor-actions,
    .b2bb-builder-buttons {
        width: 100%;
    }
    .b2bb-table-search,
    .b2bb-doctor-search,
    .b2bb-doctor-select,
    .b2bb-builder-buttons .b2bb-btn,
    .b2bb-builder-cancel {
        width: 100%;
        max-width: none;
    }

    /* Care plan */
    .b2bb-care-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .b2bb-care-progress {
        height: 42px;
    }
    .b2bb-care-video-wrap {
        padding: 16px 16px 124px;
    }
    .b2bb-care-video {
        height: clamp(220px, 48vw, 420px);
        border-radius: 16px;
        padding: 22px;
    }
    .b2bb-care-info-row {
        left: 16px;
        right: 16px;
        bottom: 16px;
        transform: none;
        grid-template-columns: 1fr 1fr;
    }

    /* Library */
    .b2bb-library-search-row {
        max-width: none;
        grid-template-columns: 1fr auto 44px;
        margin: 18px auto;
    }
    .b2bb-filter-area {
        max-width: none;
        grid-template-columns: 1fr;
        margin-bottom: 28px;
    }
    .b2bb-active-filter-label {
        justify-content: flex-start;
        min-height: auto;
    }
    .b2bb-filter-chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .b2bb-filter-chip {
        flex: 0 0 auto;
    }
    .b2bb-exercise-grid {
        max-width: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    /* Milestones */
    .b2bb-milestone-summary-grid,
    .b2bb-milestone-detail {
        max-width: none;
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .b2bb-mile-summary,
    .b2bb-milestone-detail {
        height: auto;
        min-height: auto;
    }
    .b2bb-mile-summary__bar {
        width: 100%;
    }
    .b2bb-reward {
        min-height: 180px;
    }

    /* Journal */
    .b2bb-journal-card,
    .b2bb-history-card {
        border-radius: 18px;
        padding: 20px 16px;
    }
    .b2bb-form-line,
    .b2bb-form-line--notes,
    .b2bb-pain-row {
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: start;
    }
    .b2bb-date-field,
    .b2bb-notes-field,
    .b2bb-pain-scale {
        width: 100%;
    }

    /* Appointments */
    .b2bb-schedule-card,
    .b2bb-schedule-box {
        grid-template-columns: 1fr;
        gap: 18px;
        max-width: none;
    }
    .b2bb-calendar {
        width: 100%;
        max-width: 398px;
        margin: 0 auto;
    }

    /* Plans/settings */
    .b2bb-plans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
    .b2bb-settings-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .b2bb-settings-side {
        min-height: auto;
    }
    .b2bb-settings-form {
        grid-template-columns: 1fr;
    }

    /* Doctor pages */
    .b2bb-doctor-stat-row,
    .b2bb-doctor-metric-row,
    .b2bb-milestone-manager-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
    .b2bb-doctor-dashboard-panel,
    .b2bb-builder-layout,
    .b2bb-builder-media-card {
        grid-template-columns: 1fr;
    }
    .b2bb-doctor-dashboard-panel {
        min-height: auto;
        padding: 14px;
    }
    .b2bb-recent-card {
        height: auto;
        max-height: 360px;
        overflow: auto;
    }
    .b2bb-doctor-card-table-wrap {
        margin-left: 0;
        margin-right: 0;
        padding: 18px 0;
        overflow-x: auto;
    }
    .b2bb-builder-header {
        padding: 24px 16px;
    }
    .b2bb-builder-layout {
        min-height: auto;
    }
    .b2bb-builder-sidebar {
        border: 1px solid #d5d5d5;
        border-radius: 14px;
    }
    .b2bb-builder-form {
        border-radius: 18px;
        padding: 24px 16px;
    }
    .b2bb-builder-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .b2bb-builder-field label {
        font-size: 20px;
        margin-bottom: 10px;
    }
    .b2bb-milestone-manager-grid {
        margin-left: 0;
        margin-right: 0;
        padding: 18px;
    }
    .b2bb-manager-card {
        min-height: auto;
    }
    .b2bb-note-line {
        grid-template-columns: 100px 38px 1fr;
    }
    .b2bb-doctor-plans-main .b2bb-plans-header {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 760px) {
    :root { --b2bb-topbar: 64px; }

    .b2bb-topbar {
        padding: 0 10px;
    }
    .b2bb-menu-toggle,
    .b2bb-topbar__icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
    .b2bb-topbar__profile {
        max-width: 145px;
        border-radius: 9px;
    }
    .b2bb-topbar__profile span:nth-child(2) {
        max-width: 82px;
    }
    .b2bb-topbar__chevron {
        font-size: 16px;
    }

    .b2bb-main--dashboard,
    .b2bb-main--library,
    .b2bb-main--care,
    .b2bb-main--milestone,
    .b2bb-main--journal,
    .b2bb-main--appointments,
    .b2bb-main--plans,
    .b2bb-main--settings,
    .b2bb-doctor-container,
    .b2bb-notes-pad {
        padding: 18px 12px 36px !important;
    }

    .b2bb-dashboard-hero {
        display: block;
        text-align: left;
    }
    .b2bb-dashboard-hero__avatar {
        width: 92px;
        height: 92px;
        margin-bottom: 12px;
    }
    .b2bb-dashboard-actions {
        grid-template-columns: 1fr;
    }
    .b2bb-action-card {
        min-height: 60px;
    }

    .b2bb-dashboard-panel,
    .b2bb-today-card,
    .b2bb-milestone-card,
    .b2bb-progress-widget,
    .b2bb-care-timeline,
    .b2bb-care-video-wrap,
    .b2bb-journal-card,
    .b2bb-history-card,
    .b2bb-schedule-card,
    .b2bb-table-card,
    .b2bb-doctor-table-card,
    .b2bb-notes-card,
    .b2bb-note-history {
        border-radius: 16px;
    }

    .b2bb-care-info-row,
    .b2bb-plans-grid,
    .b2bb-doctor-stat-row,
    .b2bb-doctor-metric-row,
    .b2bb-milestone-manager-grid,
    .b2bb-exercise-grid {
        grid-template-columns: 1fr;
    }
    .b2bb-care-video-wrap {
        padding-bottom: 214px;
    }
    .b2bb-care-info-row {
        grid-template-columns: 1fr;
    }
    .b2bb-care-video h2,
    .b2bb-builder-media-card h2,
    .b2bb-manager-card h2 {
        font-size: 22px;
    }

    .b2bb-library-search-row {
        height: auto;
        min-height: 50px;
        grid-template-columns: 1fr 44px;
        padding: 6px;
    }
    .b2bb-library-search-row .b2bb-category-wrap {
        grid-column: 1 / -1;
        order: 3;
    }
    .b2bb-library-category-select {
        height: 40px;
    }
    .b2bb-filter-area {
        grid-template-columns: 1fr;
        margin-bottom: 28px;
    }
    .b2bb-active-filter-label {
        justify-content: flex-start;
        min-height: auto;
    }
    .b2bb-library-card__foot {
        grid-template-columns: minmax(86px, .48fr) minmax(0, 1fr);
    }

    .b2bb-form-line,
    .b2bb-pain-row,
    .b2bb-form-line--notes,
    .b2bb-history-card__row {
        grid-template-columns: 1fr !important;
    }
    .b2bb-pain-bars {
        overflow-x: auto;
        padding-bottom: 6px;
    }
    .b2bb-pain-bars span {
        flex: 0 0 44px;
    }

    .b2bb-calendar__grid {
        gap: 6px;
    }
    .b2bb-calendar__grid span,
    .b2bb-calendar__grid button {
        min-width: 34px;
        min-height: 34px;
    }

    .b2bb-plans-header {
        align-items: flex-start;
    }
    .b2bb-plan-card {
        min-height: auto;
    }
    .b2bb-help-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .b2bb-settings-panel {
        padding: 24px 16px;
    }
    .b2bb-settings-tabs {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 4px;
    }
    .b2bb-settings-tabs a,
    .b2bb-settings-tabs button {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .b2bb-builder-media-card {
        grid-template-columns: 1fr;
    }
    .b2bb-builder-video {
        height: 200px;
    }
    .b2bb-builder-bottom,
    .b2bb-manager-actions,
    .b2bb-table-action-group {
        flex-wrap: wrap;
    }
    .b2bb-note-line {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 14px;
    }
    .b2bb-note-rail {
        display: none;
    }
    .b2bb-note-copy {
        padding: 16px;
    }

    .b2bb-doctor-card-table-wrap,
    .b2bb-table-card,
    .b2bb-doctor-table-card,
    .b2bb-doctor-table-shell {
        border-radius: 16px;
    }
    .b2bb-doctor-pagination {
        flex-wrap: wrap;
        gap: 10px;
        height: auto;
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .b2bb-topbar__icon:nth-of-type(2) {
        display: none;
    }
    .b2bb-topbar__profile {
        max-width: 128px;
    }
    .b2bb-topbar__profile span:nth-child(2) {
        max-width: 65px;
    }
    .b2bb-dashboard-hero h1,
    .b2bb-page-title,
    .b2bb-builder-header h1,
    .b2bb-notes-card h1 {
        font-size: 24px;
    }
    .b2bb-exercise-step {
        grid-template-columns: 40px 14px 1fr;
    }
    .b2bb-exercise-timeline::before {
        left: 48px;
    }
    .b2bb-exercise-step__box {
        padding: 12px;
    }
    .b2bb-library-card {
        height: 190px;
    }
    .b2bb-manager-list {
        grid-template-columns: 1fr;
    }
    .b2bb-sidebar__doctor-profile strong,
    .b2bb-sidebar__user strong {
        max-width: 175px;
    }
}

/* =========================================================
   Doctor dashboard overflow/display fix
   Keeps dashboard sections inside their cards on wide screens
   and prevents appointment table from overlapping recent updates.
   ========================================================= */
.b2bb-topbar__profile {
    max-width: min(260px, 32vw);
    overflow: hidden;
}
.b2bb-topbar__profile span:nth-child(2) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b2bb-layout--doctor .b2bb-doctor-container {
    width: 100%;
    margin-left: 0;
    margin-right: auto;
}

.b2bb-doctor-pad--dashboard .b2bb-doctor-container {
    max-width: 1124px;
}

.b2bb-doctor-dashboard-panel,
.b2bb-doctor-dashboard-panel > *,
.b2bb-doctor-appointment-card,
.b2bb-recent-card {
    min-width: 0;
}

.b2bb-doctor-dashboard-panel {
    grid-template-columns: minmax(360px, 424px) minmax(0, 1fr);
    align-items: start;
    overflow: hidden;
}

.b2bb-recent-card {
    width: 100%;
}
.b2bb-update-row > div {
    min-width: 0;
}
.b2bb-update-row small,
.b2bb-update-row strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b2bb-doctor-appointment-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.b2bb-doctor-appointment-card .b2bb-doctor-big-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th,
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td {
    padding-left: 12px;
    padding-right: 12px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th:nth-child(1),
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td:nth-child(1) { width: 34%; }
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th:nth-child(2),
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td:nth-child(2) { width: 15%; }
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th:nth-child(3),
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td:nth-child(3) { width: 22%; }
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th:nth-child(4),
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td:nth-child(4) { width: 20%; }
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th:nth-child(5),
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td:nth-child(5) { width: 9%; text-align: right; }

.b2bb-doctor-appointment-card .b2bb-name-cell {
    min-width: 0;
    width: 100%;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.b2bb-doctor-appointment-card .b2bb-name-cell .b2bb-avatar-dot {
    flex: 0 0 32px;
}
.b2bb-doctor-appointment-card .b2bb-status-pill {
    max-width: 100%;
    min-width: 0;
    padding: 0 10px;
}
.b2bb-doctor-appointment-card .b2bb-stat-more {
    margin-left: auto;
}

@media (min-width: 1181px) and (max-width: 1320px) {
    .b2bb-doctor-dashboard-panel {
        grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    }
    .b2bb-doctor-appointment-card {
        padding-left: 16px;
        padding-right: 16px;
    }
    .b2bb-doctor-appointment-card .b2bb-doctor-big-table th,
    .b2bb-doctor-appointment-card .b2bb-doctor-big-table td {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 13px;
    }
}

@media (max-width: 1180px) {
    .b2bb-doctor-dashboard-panel {
        grid-template-columns: 1fr;
        overflow: visible;
    }
    .b2bb-doctor-appointment-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .b2bb-doctor-appointment-card .b2bb-doctor-big-table {
        min-width: 720px;
        table-layout: auto;
    }
}

@media (max-width: 760px) {
    .b2bb-doctor-appointment-card {
        padding: 16px 14px 22px;
    }
    .b2bb-doctor-appointment-card__head {
        gap: 12px;
        align-items: flex-start;
        flex-direction: column;
    }
    .b2bb-doctor-appointment-card .b2bb-doctor-big-table {
        min-width: 650px;
    }
}

/* ============================================================
   LIVE DATA STATES — v2.5.0 additions
   Append this file's contents to the bottom of assets/css/app.css
   ============================================================ */

.b2bb-empty-note {
    color: #8A8A8F;
    font-size: 13px;
    text-align: center;
    padding: 18px 8px;
}

.b2bb-empty-note a {
    color: var(--green-primary, #779E5B);
    font-weight: 600;
    text-decoration: underline;
}

.b2bb-flag-pill {
    display: inline-block;
    margin: 8px 0 0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.b2bb-flag-pill--lapse {
    background: rgba(255, 45, 85, 0.1);
    color: #FF2D55;
}

.b2bb-flag-pill--behind {
    background: rgba(194, 80, 31, 0.1);
    color: #C2501F;
}

.b2bb-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #FF2D55;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

.b2bb-link-btn:hover {
    color: #C2501F;
}

.b2bb-status-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.b2bb-status-pill--scheduled {
    background: #E6F5FF;
    color: #42AAE7;
}

.b2bb-status-pill--completed {
    background: #EEFFEB;
    color: #30B965;
}

.b2bb-status-pill--cancelled,
.b2bb-status-pill--late_cancel {
    background: #FFEBEE;
    color: #FF2D55;
}

/* Exercise complete button states */
[data-complete-exercise] {
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-complete-exercise].is-loading {
    opacity: 0.6;
    pointer-events: none;
}

[data-complete-exercise].is-done {
    background: #30B965 !important;
    color: #FFFFFF !important;
    border-color: #30B965 !important;
}

.b2bb-exercise-step.is-done,
.b2bb-exercise-item.is-done {
    opacity: 0.7;
}

/* Modal generic */
[data-modal] {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

[data-modal].is-open {
    display: flex;
}

[data-modal] > .b2bb-modal-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 28px;
    max-width: 480px;
    width: 90%;
    max-height: 88vh;
    overflow-y: auto;
}

/* ============================================================
   LIVE DATA STATES — v2.5.0 additions
   Append this file's contents to the bottom of assets/css/app.css
   ============================================================ */

.b2bb-empty-note {
    color: #8A8A8F;
    font-size: 13px;
    text-align: center;
    padding: 18px 8px;
}

.b2bb-empty-note a {
    color: var(--green-primary, #779E5B);
    font-weight: 600;
    text-decoration: underline;
}

.b2bb-flag-pill {
    display: inline-block;
    margin: 8px 0 0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.b2bb-flag-pill--lapse {
    background: rgba(255, 45, 85, 0.1);
    color: #FF2D55;
}

.b2bb-flag-pill--behind {
    background: rgba(194, 80, 31, 0.1);
    color: #C2501F;
}

.b2bb-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #FF2D55;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

.b2bb-link-btn:hover {
    color: #C2501F;
}

.b2bb-status-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.b2bb-status-pill--scheduled {
    background: #E6F5FF;
    color: #42AAE7;
}

.b2bb-status-pill--completed {
    background: #EEFFEB;
    color: #30B965;
}

.b2bb-status-pill--cancelled,
.b2bb-status-pill--late_cancel {
    background: #FFEBEE;
    color: #FF2D55;
}

/* Exercise complete button states */
[data-complete-exercise] {
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-complete-exercise].is-loading {
    opacity: 0.6;
    pointer-events: none;
}

[data-complete-exercise].is-done {
    background: #30B965 !important;
    color: #FFFFFF !important;
    border-color: #30B965 !important;
}

.b2bb-exercise-step.is-done,
.b2bb-exercise-item.is-done {
    opacity: 0.7;
}

/* Modal generic */
[data-modal] {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

[data-modal].is-open {
    display: flex;
}

[data-modal] > .b2bb-modal-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 28px;
    max-width: 480px;
    width: 90%;
    max-height: 88vh;
    overflow-y: auto;
}

/* ============================================================
   PROGRESS TRACKER — patient-facing status card (shared)
   ============================================================ */
.b2bb-pt-status-card {
    border-radius: 12px;
    padding: 14px 18px;
}
.b2bb-pt-status-card strong { display: block; font-size: 14px; margin-bottom: 4px; }
.b2bb-pt-status-card p { margin: 0; font-size: 13px; line-height: 1.5; }
.b2bb-pt-status-card--green { background: #EEFFEB; color: #1F7A3D; }
.b2bb-pt-status-card--yellow { background: #FFF6E0; color: #8A6D1F; }
.b2bb-pt-status-card--red { background: #FFEBEE; color: #C2273D; }

.b2bb-pt-decision-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
}
.b2bb-pt-decision-badge--progress { background: #EEFFEB; color: #30B965; }
.b2bb-pt-decision-badge--hold { background: #FFF6E0; color: #C2901F; }
.b2bb-pt-decision-badge--regress { background: #FFEBEE; color: #FF2D55; }
/* ============================================================
   Interaction + Care Plan Fixes — v2.6.0
   Makes clickable areas obvious, fixes active selection states,
   and prevents progress bars from visually exceeding 100%.
   ============================================================ */
body.b2bb-app a,
body.b2bb-app button,
.b2bb-action-card,
.b2bb-btn,
.b2bb-table-more,
.b2bb-filter-chip,
.b2bb-exercise-card,
.b2bb-exercise-step.is-selectable,
.b2bb-mini-empty,
.b2bb-link-btn {
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease;
}

.b2bb-btn,
.b2bb-action-card,
.b2bb-table-more,
.b2bb-filter-chip,
.b2bb-exercise-card,
.b2bb-exercise-step.is-selectable,
.b2bb-mini-empty,
.b2bb-link-btn {
    cursor: pointer;
}

.b2bb-btn:hover,
.b2bb-action-card:hover,
.b2bb-table-more:hover,
.b2bb-filter-chip:hover,
.b2bb-exercise-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.b2bb-btn:active,
.b2bb-action-card:active,
.b2bb-table-more:active,
.b2bb-filter-chip:active,
.b2bb-exercise-card:active,
.b2bb-exercise-step.is-selectable:active {
    transform: translateY(0) scale(.99);
}

.b2bb-sidebar__link:hover {
    transform: translateX(3px);
}

.b2bb-sidebar__link.is-active {
    box-shadow: inset 3px 0 0 var(--b2bb-green), 0 8px 22px rgba(120,156,93,.16);
}

.b2bb-care-progress {
    display: flex !important;
    grid-template-columns: none !important;
    position: relative;
}

.b2bb-care-progress__fill,
.b2bb-care-progress__rest {
    min-width: 0;
    transition: width .25s ease;
    white-space: nowrap;
    overflow: hidden;
}

.b2bb-care-progress__fill:empty,
.b2bb-care-progress__rest:empty {
    display: none;
}

.b2bb-care-progress-count {
    margin: 10px 0 0;
    color: #6f6f6f;
    font-size: 13px;
    font-weight: 600;
}

.b2bb-exercise-step.is-selectable {
    border-radius: 16px;
    outline: none;
}

.b2bb-exercise-step.is-selectable:hover .b2bb-exercise-step__box,
.b2bb-exercise-step.is-selectable:focus-visible .b2bb-exercise-step__box {
    box-shadow: inset 0 0 0 1px rgba(120,156,93,.65), 0 8px 22px rgba(0,0,0,.08);
}

.b2bb-exercise-step.is-selectable:hover .b2bb-exercise-step__num,
.b2bb-exercise-step.is-selectable:focus-visible .b2bb-exercise-step__num {
    background: var(--b2bb-green-pale);
    color: var(--b2bb-green-dark);
}

.b2bb-exercise-step.is-active .b2bb-exercise-step__box,
.b2bb-exercise-step.is-active:hover .b2bb-exercise-step__box,
.b2bb-exercise-step.is-active:focus-visible .b2bb-exercise-step__box {
    background: var(--b2bb-green);
    color: #fff;
    box-shadow: 0 12px 26px rgba(120,156,93,.32);
}

.b2bb-exercise-step.is-active .b2bb-exercise-step__num,
.b2bb-exercise-step.is-active:hover .b2bb-exercise-step__num,
.b2bb-exercise-step.is-active:focus-visible .b2bb-exercise-step__num {
    background: var(--b2bb-green);
    color: #fff;
}

.b2bb-exercise-step.is-done:not(.is-active) .b2bb-exercise-step__box {
    background: var(--b2bb-green-pale);
    color: #202124;
}

.b2bb-exercise-step.is-done:not(.is-active) small {
    color: #698162;
}

.b2bb-mini-empty {
    background: #fff;
}

.b2bb-mini-empty:hover,
.b2bb-mini-empty:focus-visible {
    background: var(--b2bb-green);
    border-color: var(--b2bb-green);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(120,156,93,.16);
}

.b2bb-mini-empty.is-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.b2bb-care-video {
    padding: 24px;
}

.b2bb-care-video__embed {
    position: absolute;
    left: 24px;
    right: 24px;
    top: 72px;
    bottom: 54px;
    border-radius: 14px;
    overflow: hidden;
    background: #1f1f1f;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.b2bb-care-video__embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.b2bb-care-video__placeholder {
    width: 100%;
    height: 100%;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: rgba(255,255,255,.9);
    padding: 30px;
}

.b2bb-care-video__placeholder span {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.b2bb-care-video__placeholder svg {
    width: 28px;
    height: 28px;
    fill: #fff;
    stroke: none;
}

.b2bb-care-video__placeholder strong {
    font-size: 18px;
}

.b2bb-care-video__placeholder small {
    max-width: 320px;
    color: rgba(255,255,255,.65);
    line-height: 1.5;
}

.b2bb-video-open-link {
    position: absolute;
    right: 24px;
    bottom: 18px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    opacity: .82;
}

.b2bb-video-open-link:hover {
    opacity: 1;
}

.b2bb-care-video.has-video .b2bb-play,
.b2bb-care-video.has-no-video .b2bb-video-controls {
    display: none;
}

.b2bb-care-video.has-video .b2bb-video-controls {
    display: none;
}

.b2bb-care-info-box {
    transition: transform .18s ease, box-shadow .18s ease;
}

.b2bb-care-info-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,.10);
}

@media (max-width: 768px) {
    .b2bb-care-video__embed {
        left: 16px;
        right: 16px;
        top: 76px;
        bottom: 50px;
    }
    .b2bb-video-open-link {
        right: 16px;
    }
}

/* More obvious table/card hover states across doctor + patient dashboards */
.b2bb-table tbody tr,
.b2bb-doctor-table tbody tr,
.b2bb-card,
.b2bb-table-card,
.b2bb-dashboard-panel article,
.b2bb-appt-card,
.b2bb-plan-card,
.b2bb-journal-card,
.b2bb-mile-card,
.b2bb-doctor-card {
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.b2bb-table tbody tr:hover,
.b2bb-doctor-table tbody tr:hover {
    background: rgba(120,156,93,.07);
}

.b2bb-dashboard-panel article:hover,
.b2bb-appt-card:hover,
.b2bb-plan-card:hover,
.b2bb-mile-card:hover,
.b2bb-doctor-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0,0,0,.07);
}

.b2bb-btn:focus-visible,
.b2bb-action-card:focus-visible,
.b2bb-sidebar__link:focus-visible,
.b2bb-filter-chip:focus-visible,
.b2bb-table-more:focus-visible,
.b2bb-link-btn:focus-visible,
.b2bb-mini-empty:focus-visible {
    outline: 3px solid rgba(120,156,93,.35);
    outline-offset: 3px;
}

/* v2.7 milestone navigation + corrected progress display */
.b2bb-care-progress {
    position: relative;
    display: flex !important;
    grid-template-columns: none !important;
}
.b2bb-care-progress__fill,
.b2bb-care-progress__rest {
    height: 100%;
    font-size: 0 !important;
    transition: width .25s ease;
}
.b2bb-care-progress__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f763b;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255,255,255,.45);
    pointer-events: none;
}
.b2bb-milestone-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 8px;
}
.b2bb-milestone-chip {
    min-height: 42px;
    border-radius: 999px;
    border: 1px solid #e2e2e2;
    background: #fff;
    color: #243024;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    text-decoration: none;
    font-size: 13px;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
.b2bb-milestone-chip strong { font-weight: 700; }
.b2bb-milestone-chip span { color: #6f865f; font-weight: 700; }
.b2bb-milestone-chip:hover,
.b2bb-milestone-chip:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(120,156,93,.55);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
    outline: none;
}
.b2bb-milestone-chip.is-selected {
    background: var(--b2bb-green);
    border-color: var(--b2bb-green);
    color: #fff;
    box-shadow: 0 12px 26px rgba(120,156,93,.25);
}
.b2bb-milestone-chip.is-selected span { color: #fff; }
.b2bb-milestone-chip.is-complete:not(.is-selected) {
    background: var(--b2bb-green-pale);
    border-color: #d6edc6;
}
.b2bb-milestone-chip.is-locked {
    opacity: .55;
    cursor: not-allowed;
}
.b2bb-mile-summary {
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, outline-color .18s ease;
}
.b2bb-mile-summary.is-clickable {
    cursor: pointer;
}
.b2bb-mile-summary.is-clickable:hover,
.b2bb-mile-summary.is-clickable:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0,0,0,.10);
    border-color: rgba(120,156,93,.55);
    outline: none;
}
.b2bb-mile-summary.is-selected {
    outline: 3px solid rgba(120,156,93,.28);
    outline-offset: 3px;
}
.b2bb-mile-summary.is-locked {
    opacity: .55;
}
.b2bb-reward-note {
    max-width: 293px;
    margin: -24px 0 0;
    text-align: center;
    font-size: 14px;
    color: rgba(53,17,17,.75);
}
.b2bb-mini-muted {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e5e5e5;
    display: inline-block;
}

/* =========================================================
   v2.8 Journal interaction fixes
   ========================================================= */
.b2bb-pain-bars {
    align-items: center;
}
.b2bb-pain-option,
.b2bb-pain-bars span {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    display: block;
    width: 100%;
    min-width: 42px;
    height: 24px;
    border-radius: 999px;
    position: relative;
}
.b2bb-pain-option::before,
.b2bb-pain-bars span::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 10px;
    border-radius: 999px;
    background: #d9e9cd;
    transform: translateY(-50%);
    transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.b2bb-pain-option.is-active::before,
.b2bb-pain-bars span.is-active::before {
    background: var(--b2bb-green);
}
.b2bb-pain-option:hover::before,
.b2bb-pain-option:focus-visible::before,
.b2bb-pain-bars span:hover::before,
.b2bb-pain-bars span:focus-visible::before {
    box-shadow: 0 0 0 5px rgba(120,156,93,.14);
    transform: translateY(-50%) scaleY(1.12);
}
.b2bb-pain-option:focus-visible,
.b2bb-pain-bars span:focus-visible {
    outline: none;
}
.b2bb-journal-history__list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.b2bb-history-card {
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.b2bb-history-card:hover,
.b2bb-history-card.is-open {
    box-shadow: 0 16px 34px rgba(0,0,0,.07);
}
.b2bb-history-detail-toggle {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: var(--b2bb-green);
    font: inherit;
    font-size: 18px;
    text-decoration: underline;
    cursor: pointer;
    padding: 6px 0 6px 12px;
    transition: color .16s ease, transform .16s ease;
}
.b2bb-history-detail-toggle:hover,
.b2bb-history-detail-toggle:focus-visible {
    color: #4f6f3f;
    transform: translateY(-1px);
    outline: none;
}
.b2bb-history-card__summary {
    margin: 14px 0 0;
}
.b2bb-history-details {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    background: #f8f8f8;
}
.b2bb-history-details__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.b2bb-history-details__grid div,
.b2bb-history-details__notes {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ededed;
    padding: 14px 16px;
}
.b2bb-history-details span {
    display: block;
    color: #8a8a8a;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.b2bb-history-details strong {
    color: #222;
    font-size: 16px;
}
.b2bb-history-details__notes p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
}
@media (max-width: 768px) {
    .b2bb-pain-bars {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        overflow: visible;
    }
    .b2bb-pain-option,
    .b2bb-pain-bars span {
        min-width: 0;
    }
    .b2bb-history-details__grid {
        grid-template-columns: 1fr;
    }
    .b2bb-history-card__row {
        align-items: flex-start;
        gap: 8px;
    }
    .b2bb-history-detail-toggle {
        padding-left: 0;
    }
}


/* =========================================================
   v3.0 dashboard polish: remove fake menus, widen large screens,
   and make the mobile hamburger/sidebar actually feel clickable.
   ========================================================= */
.b2bb-stat-more,
.b2bb-table-more,
.b2bb-progress-widget__dots {
    display: none !important;
}

.b2bb-doctor-stat-card__top {
    justify-content: flex-start;
}
.b2bb-doctor-stat-card__label {
    min-width: 0;
}
.b2bb-doctor-stat-card__label > span:not(.b2bb-stat-icon) {
    min-width: 0;
}

.b2bb-menu-toggle:hover,
.b2bb-menu-toggle:focus-visible {
    background: #f5f8f3;
    border-color: var(--b2bb-green);
    box-shadow: 0 0 0 3px rgba(120,156,93,.14);
    outline: none;
}
body.b2bb-sidebar-open .b2bb-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.b2bb-sidebar-open .b2bb-menu-toggle span:nth-child(2) {
    opacity: 0;
}
body.b2bb-sidebar-open .b2bb-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
.b2bb-menu-toggle span {
    transition: transform .18s ease, opacity .18s ease;
}

@media (min-width: 1500px) {
    .b2bb-main--dashboard,
    .b2bb-doctor-pad--dashboard {
        padding-left: clamp(32px, 3.6vw, 72px);
        padding-right: clamp(32px, 3.6vw, 72px);
    }

    .b2bb-main--dashboard > .b2bb-dashboard-hero,
    .b2bb-main--dashboard > .b2bb-dashboard-panel,
    .b2bb-main--dashboard > .b2bb-table-card {
        width: 100%;
        max-width: 1480px;
    }

    .b2bb-dashboard-panel {
        grid-template-columns: minmax(320px, .9fr) minmax(440px, 1.35fr) minmax(320px, .9fr);
        gap: 20px;
    }

    .b2bb-dashboard-actions {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
        max-width: 900px;
        width: 100%;
    }

    .b2bb-layout--doctor .b2bb-doctor-container,
    .b2bb-doctor-pad--dashboard .b2bb-doctor-container {
        width: 100%;
        max-width: 1480px;
    }

    .b2bb-doctor-stat-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 22px;
    }

    .b2bb-doctor-dashboard-panel {
        grid-template-columns: minmax(420px, .9fr) minmax(620px, 1.45fr);
        gap: 22px;
    }

    .b2bb-recent-card {
        height: auto;
        min-height: 260px;
        overflow: auto;
    }

    .b2bb-doctor-appointment-card {
        min-width: 0;
    }
}

@media (min-width: 1700px) {
    .b2bb-main--dashboard > .b2bb-dashboard-hero,
    .b2bb-main--dashboard > .b2bb-dashboard-panel,
    .b2bb-main--dashboard > .b2bb-table-card,
    .b2bb-layout--doctor .b2bb-doctor-container,
    .b2bb-doctor-pad--dashboard .b2bb-doctor-container {
        max-width: 1560px;
    }
}

@media (max-width: 1024px) {
    body.b2bb-sidebar-open .b2bb-sidebar {
        transform: translateX(0) !important;
    }
    .b2bb-sidebar-overlay {
        cursor: pointer;
    }
}

/* v3.1 interaction + plan management fixes */
.b2bb-tiny-button[disabled],
.b2bb-plan-button[disabled],
.b2bb-doctor-btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

.b2bb-table-action-group .b2bb-tiny-button {
    min-width: 92px;
    justify-content: center;
}

.b2bb-pending-request-pill,
.b2bb-plan-request-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff6dc;
    color: #8a6400;
    font-size: 12px;
    font-weight: 700;
}
.b2bb-plan-request-status {
    display: flex;
    justify-content: space-between;
    border-radius: 16px;
    margin: 0 0 24px;
    max-width: 100%;
}
.b2bb-plan-request-status small {
    color: #8a6400;
    opacity: .75;
}

.b2bb-plan-request-wrap {
    margin: 28px 0;
}
.b2bb-plan-request-card,
.b2bb-plan-editor-card {
    background: #fff;
    border: 1px solid #efebe1;
    border-radius: 22px;
    box-shadow: 0 12px 36px rgba(0,0,0,.04);
}
.b2bb-plan-request-card {
    padding: 26px;
    max-width: 720px;
}
.b2bb-plan-request-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}
.b2bb-plan-request-card p {
    margin: 0 0 18px;
    color: #777;
}
.b2bb-plan-request-card label,
.b2bb-plan-editor-card label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-weight: 700;
    color: #1f1f1f;
    font-size: 13px;
}
.b2bb-plan-request-card textarea,
.b2bb-plan-editor-card input,
.b2bb-plan-editor-card textarea,
.b2bb-plan-editor-card select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: #1b1b1b;
    background: #fff;
}
.b2bb-plan-request-card textarea:focus,
.b2bb-plan-editor-card input:focus,
.b2bb-plan-editor-card textarea:focus,
.b2bb-plan-editor-card select:focus {
    outline: none;
    border-color: #779e5b;
    box-shadow: 0 0 0 3px rgba(119,158,91,.14);
}

.b2bb-plan-editor-head {
    align-items: center;
    gap: 18px;
}
.b2bb-plan-editor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 22px;
    max-width: 1440px;
    margin: 0 auto;
}
.b2bb-plan-editor-card {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.b2bb-plan-editor-card__top,
.b2bb-plan-editor-actions,
.b2bb-plan-editor-row--split {
    display: flex;
    align-items: center;
    gap: 12px;
}
.b2bb-plan-editor-card__top,
.b2bb-plan-editor-actions {
    justify-content: space-between;
}
.b2bb-plan-editor-row--split > label {
    flex: 1;
}
.b2bb-plan-editor-tier {
    color: #779e5b;
    background: #eef7e8;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 12px;
}
.b2bb-plan-editor-badge {
    color: #7c5b00;
    background: #fff3c4;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
}
.b2bb-plan-editor-card label small {
    color: #969696;
    font-weight: 500;
}

.b2bb-notes-picker-card {
    position: relative;
    padding: 34px 36px !important;
}
.b2bb-notes-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.b2bb-notes-search-wrap {
    position: relative;
    max-width: 760px;
    margin-top: 22px;
}
.b2bb-notes-search-field {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f7f7f7;
    border: 1px solid #e6e2d8;
    border-radius: 18px;
    padding: 9px 10px 9px 18px;
    box-sizing: border-box;
}
.b2bb-notes-search-field svg {
    width: 18px;
    height: 18px;
    color: #667085;
    flex-shrink: 0;
}
.b2bb-notes-search-field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    color: #1f1f1f;
}
.b2bb-notes-search-field button {
    width: 52px;
    height: 48px;
    border: 0;
    border-radius: 13px;
    background: #779e5b;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.b2bb-notes-direct-list {
    margin-top: 22px;
}
.b2bb-notes-direct-list > strong {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    color: #697386;
}
.b2bb-notes-patient-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}
.b2bb-notes-patient-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #efebe1;
    border-radius: 14px;
    text-decoration: none;
    color: #1f1f1f;
    background: #fff;
    transition: .18s ease;
}
.b2bb-notes-patient-chip:hover,
.b2bb-notes-patient-chip.is-active {
    border-color: #779e5b;
    background: #f5fbf1;
    transform: translateY(-1px);
}
.b2bb-notes-patient-chip span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}
.b2bb-notes-patient-chip small {
    display: block;
    color: #8a8a8a;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.b2bb-notes-empty-select {
    margin-left: 34px;
}

@media (min-width: 1700px) {
    .b2bb-plan-editor-grid {
        grid-template-columns: repeat(4, minmax(280px, 1fr));
    }
}
@media (max-width: 1180px) {
    .b2bb-plan-editor-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}
@media (max-width: 720px) {
    .b2bb-plan-editor-grid,
    .b2bb-notes-patient-chips {
        grid-template-columns: 1fr;
    }
    .b2bb-plan-request-status,
    .b2bb-notes-picker-head,
    .b2bb-plan-editor-card__top,
    .b2bb-plan-editor-actions,
    .b2bb-plan-editor-row--split {
        align-items: stretch;
        flex-direction: column;
    }
}

/* =========================================================
   v3.2 layout + visual polish pass
   - Removes name/title cutoffs
   - Makes patient/doctor screens scale across wide displays
   - Fixes care-plan heading/video spacing
   - Balances exercise library cards
   - Polishes plan cards and buttons
   ========================================================= */
:root {
    --b2bb-sidebar: 292px;
}

/* Overall scaling: use available canvas instead of narrow fixed columns */
.b2bb-page-wrap,
.b2bb-main,
.b2bb-doctor-main,
.b2bb-builder-main {
    width: calc(100vw - var(--b2bb-sidebar));
    max-width: none;
}
.b2bb-main--dashboard,
.b2bb-main--library,
.b2bb-main--care,
.b2bb-main--milestone,
.b2bb-main--journal,
.b2bb-main--appointments,
.b2bb-main--plans,
.b2bb-main--settings,
.b2bb-doctor-pad,
.b2bb-notes-pad {
    padding-left: clamp(28px, 3.2vw, 72px);
    padding-right: clamp(28px, 3.2vw, 72px);
}
.b2bb-main--care,
.b2bb-main--library,
.b2bb-main--plans,
.b2bb-main--settings {
    min-width: 0;
}
.b2bb-dashboard-hero,
.b2bb-dashboard-panel,
.b2bb-table-card,
.b2bb-care-progress,
.b2bb-care-grid,
.b2bb-exercise-grid,
.b2bb-plans-grid,
.b2bb-help-strip,
.b2bb-milestone-summary-grid,
.b2bb-milestone-detail,
.b2bb-doctor-container,
.b2bb-doctor-dashboard-panel,
.b2bb-doctor-stat-row,
.b2bb-doctor-metric-row,
.b2bb-notes-card,
.b2bb-note-history,
.b2bb-appointments-table-wrap {
    max-width: none !important;
}

/* Sidebar: show names and labels instead of clipping them */
.b2bb-sidebar {
    width: var(--b2bb-sidebar);
}
.b2bb-sidebar__nav {
    padding-left: 24px;
    padding-right: 24px;
}
.b2bb-sidebar__link {
    width: 100%;
    padding-left: 18px;
    padding-right: 16px;
    gap: 13px;
}
.b2bb-sidebar__link > span:not(.b2bb-sidebar__icon):not(.b2bb-sidebar__chevron),
.b2bb-sidebar__sub-link > span:not(.b2bb-sidebar__icon),
.b2bb-sidebar__user strong,
.b2bb-sidebar__doctor-profile strong {
    min-width: 0;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    line-height: 1.25;
    word-break: break-word;
}
.b2bb-sidebar__doctor-profile {
    margin-left: 0 !important;
    padding-left: 38px;
    padding-right: 22px;
}
.b2bb-sidebar__user {
    padding-left: 18px;
    padding-right: 18px;
    text-align: center;
}
.b2bb-sidebar__chevron,
.b2bb-topbar__chevron {
    flex: 0 0 auto;
    width: 22px;
    min-width: 22px;
    height: 22px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: currentColor;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
}
.b2bb-sidebar__sub-link {
    width: calc(100% - 72px);
    margin-left: 72px;
}
.b2bb-topbar__profile {
    min-width: 190px;
    max-width: min(360px, 30vw);
}
.b2bb-topbar__profile span:nth-child(2) {
    max-width: none;
}

/* Buttons should not split into two lines */
.b2bb-btn,
.b2bb-doctor-btn,
.b2bb-plan-button,
.b2bb-tiny-button,
.b2bb-settings-submit,
.b2bb-filter-submit {
    white-space: nowrap;
}
.b2bb-settings-submit {
    width: auto !important;
    min-width: 176px;
    padding-left: 24px;
    padding-right: 24px;
}
.b2bb-settings-form .b2bb-settings-submit {
    align-self: end;
}

/* Care plan: fix narrow/empty layout, title cutoffs, and timeline spacing */
.b2bb-care-grid {
    width: 100%;
    grid-template-columns: minmax(340px, 28%) minmax(0, 1fr);
    gap: clamp(18px, 2vw, 34px);
    align-items: start;
    margin-top: clamp(28px, 3vw, 46px);
}
.b2bb-care-progress {
    width: 100%;
}
.b2bb-care-timeline {
    padding: 20px 18px 30px;
}
.b2bb-care-timeline .b2bb-tag {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    padding-top: 7px;
    padding-bottom: 7px;
}
.b2bb-exercise-timeline {
    padding-left: 0;
}
.b2bb-exercise-timeline::before {
    left: 56px;
}
.b2bb-exercise-step {
    grid-template-columns: 48px 14px minmax(0, 1fr);
    gap: 10px;
    min-height: 88px;
}
.b2bb-exercise-step__box {
    min-height: 78px;
    padding: 13px 14px 13px 20px;
    grid-template-columns: minmax(0, 1fr) 22px;
}
.b2bb-exercise-step__box strong {
    display: block;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    font-size: clamp(13px, .9vw, 16px);
    line-height: 1.32;
}
.b2bb-exercise-step__box small {
    line-height: 1.25;
}
.b2bb-care-video-wrap {
    width: 100%;
    min-width: 0;
    padding: clamp(18px, 2vw, 28px) clamp(18px, 2vw, 30px) clamp(130px, 11vw, 170px);
}
.b2bb-care-video {
    width: 100%;
    height: clamp(430px, 36vw, 620px);
    padding: clamp(24px, 2vw, 34px);
}
.b2bb-care-video h2 {
    max-width: calc(100% - 135px);
    margin: 0;
    font-size: clamp(22px, 1.55vw, 31px);
    line-height: 1.18;
    letter-spacing: -.03em;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
}
.b2bb-care-video__duration {
    top: 32px;
    right: 30px;
}
.b2bb-care-video__embed {
    top: clamp(105px, 7.2vw, 135px);
    left: clamp(24px, 2vw, 34px);
    right: clamp(24px, 2vw, 34px);
    bottom: 56px;
}
.b2bb-care-info-row {
    width: calc(100% - clamp(36px, 4vw, 64px));
    left: clamp(18px, 2vw, 32px);
    right: clamp(18px, 2vw, 32px);
    transform: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.b2bb-care-info-box strong {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

/* Exercise library cards: balanced title + milestone, no clipped tag text */
.b2bb-library-search-row {
    width: min(100%, 980px);
    max-width: 980px;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 280px) 52px;
}
.b2bb-filter-submit {
    width: 48px;
    height: 48px;
    color: #fff;
}
.b2bb-filter-area {
    width: min(100%, 1180px);
    max-width: 1180px;
    grid-template-columns: 150px minmax(0, 1fr);
}
.b2bb-exercise-grid {
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: clamp(20px, 1.6vw, 30px);
}
.b2bb-library-card {
    min-height: clamp(230px, 17vw, 310px);
}
.b2bb-library-card__thumb-wrap {
    height: 100%;
    min-height: clamp(230px, 17vw, 310px);
}
.b2bb-library-card__play {
    top: 44%;
}
.b2bb-library-card__foot {
    left: 12px;
    right: 12px;
    bottom: 12px;
    min-height: 72px;
    grid-template-columns: minmax(110px, .9fr) minmax(140px, 1.15fr);
    gap: 14px;
    padding: 12px 14px;
}
.b2bb-library-card__foot strong {
    font-size: clamp(14px, .9vw, 17px);
    line-height: 1.15;
    -webkit-line-clamp: 3;
}
.b2bb-library-card__tag {
    min-height: 42px;
    height: auto;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
    padding: 8px 12px;
}

/* Plans: closer to the Figma cards and no badge/icon collisions */
.b2bb-plans-grid {
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(20px, 1.8vw, 32px);
    align-items: stretch;
}
.b2bb-plan-card {
    min-height: 620px;
    padding: 34px 18px 26px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.b2bb-plan-card.is-current,
.b2bb-plan-card.is-popular {
    padding-top: 88px;
}
.b2bb-plan-card.is-current.is-popular {
    padding-top: 142px;
}
.b2bb-popular-ribbon,
.b2bb-current-ribbon {
    position: absolute;
    left: 18px;
    right: 18px;
    height: 48px;
    border-radius: 15px;
    background: var(--b2bb-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    z-index: 2;
}
.b2bb-popular-ribbon { top: 12px; }
.b2bb-current-ribbon { top: 12px; }
.b2bb-plan-card.is-current.is-popular .b2bb-current-ribbon { top: 68px; }
.b2bb-plan-icon {
    flex: 0 0 64px;
}
.b2bb-plan-card h3 {
    font-size: clamp(30px, 2vw, 38px);
    line-height: 1.08;
    margin-bottom: 10px;
}
.b2bb-plan-card .price-word {
    line-height: 1.15;
}
.b2bb-plan-card p {
    min-height: 44px;
    line-height: 1.35;
}
.b2bb-plan-list {
    flex: 1 1 auto;
    padding: 0 clamp(18px, 2vw, 34px);
    gap: 18px;
    line-height: 1.35;
}
.b2bb-plan-button {
    margin-top: auto;
    min-height: 51px;
    height: auto;
    padding: 12px 18px;
    font-weight: 600;
}
.b2bb-plans-note {
    min-width: 0;
    max-width: 100%;
    padding: 0 18px;
    white-space: normal;
    text-align: center;
}

/* Settings and account forms */
.b2bb-settings-layout {
    width: 100%;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}
.b2bb-settings-panel {
    min-width: 0;
}
.b2bb-field input {
    min-width: 0;
}

/* Wide-screen scaling for doctor pages and tables */
.b2bb-layout--doctor .b2bb-doctor-container,
.b2bb-doctor-pad--dashboard .b2bb-doctor-container,
.b2bb-doctor-pad .b2bb-doctor-container {
    width: 100%;
    max-width: none !important;
}
.b2bb-doctor-stat-row {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
}
.b2bb-doctor-dashboard-panel {
    width: 100%;
    grid-template-columns: minmax(420px, 1fr) minmax(520px, 1.4fr);
}
.b2bb-doctor-table-card,
.b2bb-doctor-table-shell,
.b2bb-doctor-big-table-wrap {
    width: 100%;
}

@media (min-width: 1600px) {
    .b2bb-main--dashboard,
    .b2bb-main--library,
    .b2bb-main--care,
    .b2bb-main--milestone,
    .b2bb-main--journal,
    .b2bb-main--appointments,
    .b2bb-main--plans,
    .b2bb-main--settings,
    .b2bb-doctor-pad,
    .b2bb-notes-pad {
        padding-left: clamp(48px, 4vw, 96px);
        padding-right: clamp(48px, 4vw, 96px);
    }
    .b2bb-care-grid {
        grid-template-columns: minmax(370px, 25%) minmax(0, 1fr);
    }
    .b2bb-exercise-grid {
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    }
}

@media (max-width: 1180px) {
    :root { --b2bb-sidebar: 280px; }
    .b2bb-page-wrap,
    .b2bb-main,
    .b2bb-doctor-main,
    .b2bb-builder-main {
        width: calc(100vw - var(--b2bb-sidebar));
    }
    .b2bb-care-grid {
        grid-template-columns: minmax(300px, 36%) minmax(0, 1fr);
    }
    .b2bb-care-video h2 {
        max-width: 100%;
    }
    .b2bb-care-video__duration {
        position: static;
        display: block;
        margin-top: 8px;
    }
    .b2bb-care-video__embed {
        top: 118px;
    }
}

@media (max-width: 1024px) {
    .b2bb-page-wrap,
    .b2bb-main,
    .b2bb-doctor-main,
    .b2bb-builder-main {
        width: 100%;
    }
    .b2bb-sidebar {
        width: min(88vw, 310px);
    }
    .b2bb-sidebar__link > span:not(.b2bb-sidebar__icon):not(.b2bb-sidebar__chevron),
    .b2bb-sidebar__sub-link > span:not(.b2bb-sidebar__icon),
    .b2bb-sidebar__user strong,
    .b2bb-sidebar__doctor-profile strong {
        white-space: normal !important;
    }
}

@media (max-width: 860px) {
    .b2bb-care-grid,
    .b2bb-settings-layout,
    .b2bb-doctor-dashboard-panel {
        grid-template-columns: 1fr !important;
    }
    .b2bb-care-video {
        height: clamp(360px, 72vw, 520px);
    }
    .b2bb-care-info-row {
        grid-template-columns: 1fr;
        position: static;
        width: 100%;
        margin-top: 16px;
    }
    .b2bb-care-video-wrap {
        padding-bottom: 18px;
    }
}

@media (max-width: 560px) {
    .b2bb-library-search-row {
        grid-template-columns: 1fr 48px;
    }
    .b2bb-category-wrap {
        grid-column: 1 / -1;
    }
    .b2bb-exercise-grid,
    .b2bb-plans-grid {
        grid-template-columns: 1fr;
    }
    .b2bb-library-card__foot {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .b2bb-care-video__embed {
        top: 140px;
    }
    .b2bb-settings-form {
        grid-template-columns: 1fr;
    }
}

/* v3.3.0 — Uploaded Media Library video support */
.b2bb-care-video__embed video,
.b2bb-library-modal__video video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    border-radius: inherit;
    background: #111;
    object-fit: contain;
}
.b2bb-library-modal__video video {
    min-height: 360px;
}
.b2bb-library-card[data-video-kind="upload"] .b2bb-library-card__thumb-wrap::after {
    content: "Uploaded video";
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 2;
    color: #fff;
    background: rgba(0,0,0,.46);
    border-radius: 999px;
    padding: 6px 10px;
    font: 700 11px 'Plus Jakarta Sans', sans-serif;
    letter-spacing: .01em;
}
@media (max-width: 720px) {
    .b2bb-library-modal__video video { min-height: 240px; }
}
.b2bb-care-video__embed video[hidden],
.b2bb-library-modal__video video[hidden],
.b2bb-library-modal__video iframe[hidden] {
    display: none !important;
}

/* =========================================================
   v3.4 fixes: care progress fill, exercise spacing, info cards,
   styled appointment form, booked/available slots, doctor statuses.
   ========================================================= */
.b2bb-care-progress {
    position: relative !important;
    display: block !important;
    height: 52px !important;
    width: 100% !important;
    max-width: none !important;
    background: #eeeef4 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
}
.b2bb-care-progress__fill {
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    height: 100% !important;
    display: block !important;
    min-width: 0 !important;
    background: linear-gradient(90deg, #789c5d, #91b976) !important;
    border-radius: 16px !important;
    transition: width .25s ease !important;
}
.b2bb-care-progress__rest {
    display: none !important;
}
.b2bb-care-progress__label {
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: clamp(18px, 1.4vw, 25px) !important;
    font-weight: 800 !important;
    color: #4f763b !important;
    pointer-events: none !important;
}
.b2bb-care-progress.is-high .b2bb-care-progress__label {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.22) !important;
}
.b2bb-exercise-timeline {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}
.b2bb-exercise-step {
    min-height: auto !important;
    margin: 0 !important;
}
.b2bb-exercise-step__box {
    min-height: 82px !important;
}
.b2bb-care-video-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    padding-bottom: clamp(20px, 2vw, 30px) !important;
}
.b2bb-care-video {
    flex: 0 0 auto !important;
}
.b2bb-care-info-row {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: clamp(14px, 1.5vw, 22px) !important;
}
.b2bb-care-info-box {
    min-height: 92px !important;
    align-items: center !important;
    padding: 22px 24px !important;
}
.b2bb-care-info-box strong,
.b2bb-care-info-box small {
    overflow-wrap: anywhere !important;
}
.b2bb-care-info-box small {
    font-size: 12px !important;
    line-height: 1.45 !important;
}

/* Appointment form styling */
.b2bb-appt-form {
    display: grid !important;
    gap: 14px !important;
    margin-top: 18px !important;
}
.b2bb-form-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    color: #545454 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}
.b2bb-form-field > span {
    color: #5f5f5f !important;
}
.b2bb-appt-form input,
.b2bb-appt-form select,
.b2bb-appt-form textarea {
    width: 100% !important;
    min-height: 48px !important;
    border: 1px solid #dedede !important;
    border-radius: 12px !important;
    background: #fff !important;
    padding: 0 15px !important;
    color: #242424 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    outline: none !important;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease !important;
}
.b2bb-appt-form textarea {
    min-height: 82px !important;
    padding-top: 13px !important;
    resize: vertical !important;
}
.b2bb-appt-form input:focus,
.b2bb-appt-form select:focus,
.b2bb-appt-form textarea:focus {
    border-color: var(--b2bb-green) !important;
    box-shadow: 0 0 0 4px rgba(120,156,93,.15) !important;
}
.b2bb-slot-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important;
    gap: 10px !important;
}
.b2bb-slot-chip {
    appearance: none !important;
    border: 1px solid #dcebd1 !important;
    border-radius: 14px !important;
    background: #f4ffef !important;
    color: #334130 !important;
    min-height: 58px !important;
    padding: 9px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 3px !important;
    cursor: pointer !important;
    font-family: inherit !important;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease !important;
}
.b2bb-slot-chip strong {
    font-size: 14px !important;
    line-height: 1 !important;
}
.b2bb-slot-chip small {
    color: #789c5d !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
}
.b2bb-slot-chip:hover:not(:disabled),
.b2bb-slot-chip:focus-visible:not(:disabled) {
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(120,156,93,.16) !important;
    outline: none !important;
}
.b2bb-slot-chip.is-selected {
    background: var(--b2bb-green) !important;
    border-color: var(--b2bb-green) !important;
    color: #fff !important;
}
.b2bb-slot-chip.is-selected small {
    color: rgba(255,255,255,.88) !important;
}
.b2bb-slot-chip.is-booked,
.b2bb-slot-chip:disabled {
    background: #f0f0f0 !important;
    border-color: #e3e3e3 !important;
    color: #9a9a9a !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}
.b2bb-slot-chip.is-booked small,
.b2bb-slot-chip:disabled small {
    color: #b26b51 !important;
}
.b2bb-calendar__grid .has-booked {
    position: relative !important;
}
.b2bb-calendar__grid .has-booked::after {
    content: "" !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: #d97745 !important;
    position: absolute !important;
    left: 50% !important;
    bottom: -7px !important;
    transform: translateX(-50%) !important;
}
.b2bb-calendar-legend {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-top: 24px !important;
    color: #777 !important;
    font-size: 12px !important;
}
.b2bb-calendar-legend span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.b2bb-calendar-legend i {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: var(--b2bb-green) !important;
}
.b2bb-calendar-legend span:last-child i {
    background: #d97745 !important;
}

/* Doctor appointment status actions */
.b2bb-appt-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    min-width: 280px !important;
}
.b2bb-tiny-button {
    border: 1px solid #e3e3e3 !important;
    background: #fff !important;
    color: #333 !important;
    border-radius: 10px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    font-family: inherit !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease !important;
}
.b2bb-tiny-button:hover:not(:disabled),
.b2bb-tiny-button:focus-visible:not(:disabled) {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.08) !important;
    outline: none !important;
}
.b2bb-tiny-button--green { background: #eaffdf !important; border-color: #cfeebd !important; color: #3d7f2d !important; }
.b2bb-tiny-button--warning { background: #fff5dd !important; border-color: #ffe0a5 !important; color: #9a6416 !important; }
.b2bb-tiny-button--blue { background: #eaf4ff !important; border-color: #cfe5ff !important; color: #2468a8 !important; }
.b2bb-status-pill {
    white-space: nowrap !important;
    min-width: 90px !important;
    text-align: center !important;
}
.b2bb-status-pill--scheduled { background: #eaf4ff !important; color: #2468a8 !important; }
.b2bb-status-pill--completed { background: #eeffeb !important; color: #30b965 !important; }
.b2bb-status-pill--did-not-attend { background: #fff5dd !important; color: #9a6416 !important; }
.b2bb-status-pill--rescheduled { background: #f0eaff !important; color: #7a47d8 !important; }
.b2bb-status-pill--cancelled { background: #ffebee !important; color: #ff2d55 !important; }
.b2bb-muted-small { color: #999 !important; font-size: 12px !important; }

@media (max-width: 900px) {
    .b2bb-care-info-row {
        grid-template-columns: 1fr !important;
    }
    .b2bb-schedule-card {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    .b2bb-calendar {
        height: auto !important;
    }
    .b2bb-appt-actions {
        min-width: 0 !important;
    }
}

/* =========================================================
   v3.5 fixes — sidebar dropdowns, appointment table scroll,
   cleaner arrows, care-plan timeline circles, exercise uncheck
   ========================================================= */
.b2bb-sidebar__group {
    position: relative;
    margin: 3px 0;
}
.b2bb-sidebar__group > .b2bb-sidebar__link {
    padding-right: 54px !important;
}
.b2bb-sidebar__chevron-btn {
    position: absolute;
    top: 4px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
}
.b2bb-sidebar__chevron-btn:hover,
.b2bb-sidebar__chevron-btn:focus-visible {
    background: rgba(255,255,255,.18);
    outline: none;
}
.b2bb-sidebar__group:not(.is-open) .b2bb-sidebar__link:not(.is-active) + .b2bb-sidebar__chevron-btn:hover,
.b2bb-sidebar__group:not(.is-open) .b2bb-sidebar__link:not(.is-active) + .b2bb-sidebar__chevron-btn:focus-visible {
    background: #f4f4f4;
}
.b2bb-sidebar__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    transition: transform .18s ease;
}
.b2bb-sidebar__group.is-open .b2bb-sidebar__chevron {
    transform: rotate(180deg);
}
.b2bb-sidebar__submenu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 7px 0 8px 46px;
}
.b2bb-sidebar__sub-link {
    min-height: 42px;
    padding: 8px 12px 8px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #777;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.b2bb-sidebar__sub-link:hover,
.b2bb-sidebar__sub-link:focus-visible {
    background: #f4f4f4;
    color: #111;
    outline: none;
}
.b2bb-sidebar__sub-link.is-active {
    background: rgba(120,156,93,.20);
    color: var(--b2bb-green);
}
.b2bb-sidebar__sub-link .b2bb-sidebar__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.b2bb-recent-card__view {
    width: auto !important;
    min-width: 92px;
    gap: 6px;
    padding: 0 12px;
    color: #202124 !important;
    background: #fff !important;
    border-color: #e7e7e7 !important;
    box-shadow: none !important;
}
.b2bb-recent-card__view:hover,
.b2bb-recent-card__view:focus-visible {
    border-color: var(--b2bb-green) !important;
    color: var(--b2bb-green) !important;
    outline: none;
}
.b2bb-clean-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f2f5ef;
    color: var(--b2bb-green);
    font-weight: 900;
    line-height: 1;
}

.b2bb-doctor-appointment-card {
    overflow: hidden !important;
}
.b2bb-doctor-big-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}
.b2bb-doctor-big-table-wrap::-webkit-scrollbar {
    height: 8px;
}
.b2bb-doctor-big-table-wrap::-webkit-scrollbar-thumb {
    background: #ccd1c8;
    border-radius: 999px;
}
.b2bb-doctor-appointment-card .b2bb-doctor-big-table {
    min-width: 1040px !important;
    table-layout: auto !important;
}
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th,
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th:nth-child(1),
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td:nth-child(1) { width: 220px !important; }
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th:nth-child(2),
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td:nth-child(2) { width: 190px !important; }
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th:nth-child(3),
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td:nth-child(3) { width: 230px !important; }
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th:nth-child(4),
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td:nth-child(4) { width: 150px !important; }
.b2bb-doctor-appointment-card .b2bb-doctor-big-table th:nth-child(5),
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td:nth-child(5) { width: 430px !important; text-align: left !important; }
.b2bb-doctor-appointment-card .b2bb-name-cell {
    overflow: visible !important;
    text-overflow: clip !important;
}
.b2bb-appt-actions {
    min-width: 0 !important;
    width: max-content !important;
    max-width: none !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
}

.b2bb-exercise-timeline {
    padding-left: 4px !important;
}
.b2bb-exercise-timeline::before {
    left: 72px !important;
    width: 2px !important;
    background: #cfcfcf !important;
}
.b2bb-exercise-step {
    grid-template-columns: 58px 18px minmax(0, 1fr) !important;
    column-gap: 12px !important;
    align-items: center !important;
    margin-bottom: 16px !important;
}
.b2bb-exercise-step__num {
    width: 46px !important;
    height: 24px !important;
    min-width: 46px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    color: #999 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    user-select: none !important;
}
.b2bb-exercise-step.is-active .b2bb-exercise-step__num {
    background: var(--b2bb-green) !important;
    color: #fff !important;
}
.b2bb-exercise-step__dot {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    border-radius: 50% !important;
    background: #b7c6ae !important;
    box-shadow: 0 0 0 4px #fff !important;
}
.b2bb-exercise-step.is-active .b2bb-exercise-step__dot,
.b2bb-exercise-step.is-done .b2bb-exercise-step__dot {
    background: var(--b2bb-green) !important;
}
.b2bb-exercise-step__box {
    min-height: 82px !important;
    padding: 16px 16px 16px 20px !important;
    gap: 14px !important;
}
.b2bb-exercise-step__box strong {
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}
.b2bb-mini-check,
button.b2bb-mini-check,
button.b2bb-mini-empty {
    border: 0 !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease !important;
}
button.b2bb-mini-empty {
    background: #fff !important;
    box-shadow: inset 0 0 0 1px #d7d7d7 !important;
}
button.b2bb-mini-check,
.b2bb-mini-check.is-done {
    background: #6ee08c !important;
    color: #2f6d3e !important;
}
button.b2bb-mini-check:hover,
button.b2bb-mini-empty:hover,
button.b2bb-mini-check:focus-visible,
button.b2bb-mini-empty:focus-visible {
    transform: scale(1.08) !important;
    box-shadow: 0 0 0 4px rgba(120,156,93,.16) !important;
    outline: none !important;
}
button.b2bb-mini-check svg {
    width: 13px !important;
    height: 13px !important;
    stroke-width: 3 !important;
}
.b2bb-mini-check.is-loading,
.b2bb-mini-empty.is-loading {
    pointer-events: none !important;
    opacity: .7 !important;
    font-size: 12px !important;
}

/* =========================================================
   v3.6 fixes — sidebar dropdown behavior + sidebar search removal
   ========================================================= */
.b2bb-sidebar__submenu[hidden] {
    display: none !important;
}

.b2bb-sidebar__search {
    display: none !important;
}

.b2bb-sidebar__logo {
    margin-bottom: 18px;
}

.b2bb-sidebar__doctor-profile {
    margin-top: 8px;
}

/* =========================================================
   v3.7 fixes — patient dashboard spacing, real milestone scroll,
   and universal clickable hover/focus states.
   ========================================================= */
.b2bb-dashboard-hero__content {
    min-width: 0 !important;
}
.b2bb-dashboard-actions {
    width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(18px, 2vw, 30px) !important;
    margin-top: clamp(14px, 1.6vw, 24px) !important;
}
.b2bb-action-card {
    min-width: 0 !important;
    min-height: 92px !important;
    border: 1px solid rgba(0,0,0,.02) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.035) !important;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease !important;
    cursor: pointer !important;
}
.b2bb-action-card:hover,
.b2bb-action-card:focus-visible {
    transform: translateY(-2px) !important;
    box-shadow: 0 16px 34px rgba(0,0,0,.075) !important;
    border-color: rgba(120,156,93,.22) !important;
    outline: none !important;
}
.b2bb-action-card:not(.b2bb-action-card--dark):hover,
.b2bb-action-card:not(.b2bb-action-card--dark):focus-visible {
    background: #f7faf4 !important;
}
.b2bb-action-card__arrow {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 28px !important;
    margin-left: 12px !important;
    transition: transform .18s ease, background-color .18s ease !important;
}
.b2bb-action-card:hover .b2bb-action-card__arrow,
.b2bb-action-card:focus-visible .b2bb-action-card__arrow {
    transform: translateX(3px) !important;
    background: rgba(120,156,93,.12) !important;
}
.b2bb-action-card--dark:hover .b2bb-action-card__arrow,
.b2bb-action-card--dark:focus-visible .b2bb-action-card__arrow {
    background: rgba(255,255,255,.15) !important;
}

/* Make the milestone list use a real scrollbar instead of the fake decoration. */
.b2bb-milestone-card {
    overflow: hidden !important;
}
.b2bb-milestone-mini {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 14px !important;
    max-height: 244px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 2px 8px 2px 0 !important;
    scrollbar-width: thin !important;
    scrollbar-color: #8f9a88 #edf1ea !important;
}
.b2bb-milestone-mini::-webkit-scrollbar {
    width: 8px !important;
}
.b2bb-milestone-mini::-webkit-scrollbar-track {
    background: #edf1ea !important;
    border-radius: 999px !important;
}
.b2bb-milestone-mini::-webkit-scrollbar-thumb {
    background: #8f9a88 !important;
    border-radius: 999px !important;
}
.b2bb-mini-rail {
    min-height: 100% !important;
    padding-top: 10px !important;
}
.b2bb-mini-rail::before {
    top: 8px !important;
    bottom: 8px !important;
    height: auto !important;
    right: 14px !important;
}
.b2bb-mini-step {
    height: 72px !important;
    margin-bottom: 12px !important;
}
.b2bb-mini-step:last-child {
    margin-bottom: 0 !important;
}
.b2bb-mini-items {
    gap: 12px !important;
}
.b2bb-mini-item {
    min-height: 72px !important;
    padding: 12px 13px 12px 24px !important;
}
.b2bb-mini-item strong {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.25 !important;
}
.b2bb-scrollbar-fake {
    display: none !important;
}
.b2bb-milestone-note {
    margin-top: 16px !important;
}

/* Strong default interaction treatment for all clickable controls. */
.b2bb-page-wrap a,
.b2bb-page-wrap button,
.b2bb-main a,
.b2bb-main button,
.b2bb-doctor-main a,
.b2bb-doctor-main button,
.b2bb-builder-main a,
.b2bb-builder-main button,
.b2bb-sidebar a,
.b2bb-sidebar button,
.b2bb-topbar a,
.b2bb-topbar button,
.b2bb-link-btn,
.b2bb-btn,
.b2bb-doctor-btn,
.b2bb-tiny-button,
.b2bb-filter-chip,
.b2bb-slot-chip,
.b2bb-plan-button,
.b2bb-library-card,
.b2bb-exercise-step__box,
.b2bb-mini-check,
.b2bb-mini-empty {
    cursor: pointer !important;
}
.b2bb-page-wrap button:disabled,
.b2bb-main button:disabled,
.b2bb-doctor-main button:disabled,
.b2bb-builder-main button:disabled,
.b2bb-slot-chip:disabled,
.b2bb-btn[aria-disabled="true"] {
    cursor: not-allowed !important;
}
.b2bb-btn,
.b2bb-doctor-btn,
.b2bb-tiny-button,
.b2bb-link-btn,
.b2bb-plan-button,
.b2bb-filter-submit,
.b2bb-settings-submit,
.b2bb-topbar__icon-btn,
.b2bb-sidebar__link,
.b2bb-sidebar__sub-link,
.b2bb-card-title-row a,
.b2bb-table-card a,
.b2bb-library-card,
.b2bb-exercise-step__box,
.b2bb-mini-item,
.b2bb-journal-card,
.b2bb-appt-card,
.b2bb-mile-card,
.b2bb-doctor-card {
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease !important;
}
.b2bb-btn:hover,
.b2bb-doctor-btn:hover,
.b2bb-plan-button:hover,
.b2bb-filter-submit:hover,
.b2bb-settings-submit:hover,
.b2bb-topbar__icon-btn:hover,
.b2bb-card-title-row a:hover,
.b2bb-table-card a:hover,
.b2bb-link-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(120,156,93,.14) !important;
}
.b2bb-btn:focus-visible,
.b2bb-doctor-btn:focus-visible,
.b2bb-tiny-button:focus-visible,
.b2bb-link-btn:focus-visible,
.b2bb-plan-button:focus-visible,
.b2bb-filter-submit:focus-visible,
.b2bb-settings-submit:focus-visible,
.b2bb-topbar__icon-btn:focus-visible,
.b2bb-sidebar__link:focus-visible,
.b2bb-sidebar__sub-link:focus-visible,
.b2bb-card-title-row a:focus-visible,
.b2bb-table-card a:focus-visible,
.b2bb-library-card:focus-visible,
.b2bb-exercise-step__box:focus-visible,
.b2bb-mini-item:focus-within {
    outline: 3px solid rgba(120,156,93,.28) !important;
    outline-offset: 3px !important;
}
.b2bb-sidebar__link:hover,
.b2bb-sidebar__sub-link:hover {
    transform: translateX(2px) !important;
}
.b2bb-library-card:hover,
.b2bb-library-card:focus-visible,
.b2bb-exercise-step__box:hover,
.b2bb-exercise-step__box:focus-visible,
.b2bb-mini-item:hover,
.b2bb-journal-card:hover,
.b2bb-appt-card:hover,
.b2bb-mile-card:hover,
.b2bb-doctor-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 14px 30px rgba(0,0,0,.075) !important;
}

@media (max-width: 980px) {
    .b2bb-dashboard-actions {
        grid-template-columns: 1fr !important;
    }
    .b2bb-milestone-mini {
        max-height: 286px !important;
    }
}

/* v3.9.0 — Uploaded video previews + native player reliability */
.b2bb-library-card__thumb-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
    background: #111;
}
.b2bb-library-card__thumb-video[hidden] {
    display: none !important;
}
.b2bb-library-card.has-video-thumb .b2bb-library-card__thumb-wrap::before {
    background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.24));
    z-index: 2;
}
.b2bb-library-card__thumb-img:not([src=""]) {
    z-index: 1;
}
.b2bb-library-card__thumb-video.is-ready,
.b2bb-care-video__embed video.is-ready,
.b2bb-library-modal__video video.is-ready {
    background: #000;
}
.b2bb-care-video__embed video,
.b2bb-library-modal__video video {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.b2bb-care-video__embed video[hidden],
.b2bb-library-modal__video video[hidden] {
    display: none !important;
}
.b2bb-care-video__embed video.has-error + .b2bb-care-video__placeholder {
    display: flex !important;
}
.b2bb-library-card[data-video-kind="upload"] .b2bb-library-card__thumb-wrap::after {
    background: rgba(0,0,0,.72) !important;
    z-index: 6 !important;
}
.b2bb-library-card[data-video-kind="upload"].has-thumb .b2bb-library-card__thumb-wrap::after,
.b2bb-library-card[data-video-kind="upload"].has-video-thumb .b2bb-library-card__thumb-wrap::after {
    background: rgba(0,0,0,.58) !important;
}

/* =========================================================
   v4.0.0 — Small-screen overflow + tier pills + video previews
   ========================================================= */
html,
body.b2bb-app {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.b2bb-page-wrap,
.b2bb-main,
.b2bb-doctor-main,
.b2bb-builder-main {
    max-width: calc(100vw - var(--b2bb-sidebar)) !important;
    overflow-x: clip;
}

.b2bb-doctor-pad,
.b2bb-doctor-container,
.b2bb-doctor-pad--dashboard .b2bb-doctor-container {
    width: 100% !important;
    max-width: none !important;
}

.b2bb-doctor-stat-row {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
    width: 100% !important;
}

.b2bb-doctor-dashboard-panel {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr) !important;
    gap: clamp(14px, 2vw, 28px) !important;
    overflow: hidden !important;
}

.b2bb-doctor-table-shell,
.b2bb-doctor-appointment-card,
.b2bb-recent-card,
.b2bb-doctor-big-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.b2bb-doctor-big-table-wrap {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.b2bb-doctor-appointment-card .b2bb-doctor-big-table {
    min-width: 660px !important;
    width: 100% !important;
    table-layout: auto !important;
}

.b2bb-doctor-appointment-card .b2bb-doctor-big-table th,
.b2bb-doctor-appointment-card .b2bb-doctor-big-table td {
    white-space: nowrap !important;
}

.b2bb-doctor-table-card {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.b2bb-doctor-table-card table {
    min-width: 760px !important;
}

.b2bb-doctor-pill,
.b2bb-tier-pill,
.b2bb-plan-tier-pill {
    min-width: max-content !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 26px !important;
    padding: 5px 12px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
}

.b2bb-subscription-table .b2bb-doctor-table-card td,
.b2bb-subscription-table .b2bb-doctor-table-card th {
    vertical-align: middle !important;
}

.b2bb-library-card.has-thumb .b2bb-library-card__thumb-img,
.b2bb-library-card.has-video-thumb .b2bb-library-card__thumb-video {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.b2bb-library-card__thumb-video {
    filter: none !important;
}

.b2bb-library-card.has-thumb .b2bb-library-card__thumb-wrap,
.b2bb-library-card.has-video-thumb .b2bb-library-card__thumb-wrap {
    background: #111 !important;
}

.b2bb-care-video__embed video:not([hidden]),
.b2bb-library-modal__video video:not([hidden]) {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    object-fit: contain !important;
    background: #000 !important;
}

.b2bb-care-video__embed iframe[hidden],
.b2bb-care-video__embed video[hidden] {
    display: none !important;
}

@media (max-width: 1500px) {
    .b2bb-doctor-pad--dashboard {
        padding-left: clamp(16px, 2vw, 28px) !important;
        padding-right: clamp(16px, 2vw, 28px) !important;
    }
    .b2bb-doctor-dashboard-panel {
        grid-template-columns: 1fr !important;
        overflow: visible !important;
    }
    .b2bb-recent-card {
        max-height: 360px !important;
        overflow-y: auto !important;
    }
    .b2bb-doctor-appointment-card {
        overflow: hidden !important;
    }
}

@media (max-width: 1024px) {
    .b2bb-page-wrap,
    .b2bb-main,
    .b2bb-doctor-main,
    .b2bb-builder-main {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        overflow-x: hidden !important;
    }
    .b2bb-doctor-pad,
    .b2bb-doctor-container,
    .b2bb-main--care,
    .b2bb-main--library {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    .b2bb-doctor-stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 720px) {
    .b2bb-doctor-stat-row {
        grid-template-columns: 1fr !important;
    }
    .b2bb-doctor-appointment-card .b2bb-doctor-big-table,
    .b2bb-doctor-table-card table {
        min-width: 620px !important;
    }
}

/* ============================================================
   B2BB v4.2 — account settings functional tabs / billing
   ============================================================ */
.b2bb-settings-tabs button {
    appearance: none;
    border: 0;
    background: transparent;
    color: #111;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}
.b2bb-settings-tabs button.is-active,
.b2bb-settings-tabs a.is-active {
    color: var(--b2bb-green);
    border-bottom: 1px solid var(--b2bb-green);
    padding-bottom: 12px;
    width: 110px;
    text-align: center;
}
.b2bb-settings-tabs button:hover,
.b2bb-settings-tabs button:focus-visible,
.b2bb-settings-tabs a:hover,
.b2bb-settings-tabs a:focus-visible {
    color: var(--b2bb-green);
    outline: none;
}
.b2bb-settings-tab-panel[hidden] { display: none !important; }
.b2bb-settings-intro { color: var(--b2bb-muted); margin: -5px 0 22px; }
.b2bb-settings-check {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--b2bb-line);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.b2bb-settings-check:hover,
.b2bb-settings-check:focus-within {
    border-color: var(--b2bb-green);
    box-shadow: 0 10px 22px rgba(120,156,93,.12);
    transform: translateY(-1px);
}
.b2bb-settings-check input { accent-color: var(--b2bb-green); }
.b2bb-settings-submit--wide { width: auto !important; min-width: 175px; white-space: nowrap; }
.b2bb-billing-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.b2bb-billing-card > div {
    background: var(--b2bb-card);
    border-radius: 16px;
    padding: 18px;
}
.b2bb-billing-card strong { display: block; margin-top: 6px; font-size: 18px; }
.b2bb-billing-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0 26px; }
.b2bb-billing-support-form { border-top: 1px solid var(--b2bb-line); padding-top: 22px; }
.b2bb-billing-support-form h3 { margin: 0 0 8px; }
@media (max-width: 760px) {
    .b2bb-billing-card { grid-template-columns: 1fr; }
}
.b2bb-pt-status-card--blue { background: #E6F4FF; color: #1058A0; }


/* B2BB v4.2 — direct Stripe plan changes */
.b2bb-plan-button[href] { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.b2bb-plan-config-note { display: block; margin-top: 10px; color: var(--b2bb-muted); font-size: 12px; line-height: 1.45; text-align: center; }
.b2bb-plan-config-note code { font-size: 11px; white-space: normal; }

/* ============================================================
   B2BB v4.3 — avatar/icon fallbacks + doctor availability
   ============================================================ */
.b2bb-topbar__avatar,
.b2bb-sidebar__user-avatar,
.b2bb-sidebar__doctor-avatar,
.b2bb-icon-placeholder {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--b2bb-green);
    background: #eef9e7;
    border: 1px solid #daf0cf;
}
.b2bb-topbar__avatar {
    font-size: 12px;
    line-height: 1;
}
.b2bb-sidebar__user-avatar,
.b2bb-sidebar__doctor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex: 0 0 64px;
    font-size: 18px;
    box-shadow: inset 0 0 0 1px rgba(120, 156, 93, .08);
}
.b2bb-sidebar__user strong,
.b2bb-sidebar__doctor-profile strong,
.b2bb-topbar__profile span:not(.b2bb-topbar__avatar):not(.b2bb-topbar__chevron) {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.b2bb-icon-placeholder svg,
.b2bb-schedule-plus svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}
.b2bb-schedule-plus {
    background: #eef9e7 !important;
    border-color: #daf0cf !important;
}
.b2bb-availability-card {
    margin-bottom: 24px;
}
.b2bb-doctor-availability-card .b2bb-doctor-appointment-card__head {
    align-items: flex-start;
}
.b2bb-doctor-availability-card .b2bb-doctor-appointment-card__head h2 {
    margin-bottom: 6px;
}
.b2bb-availability-grid {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}
.b2bb-availability-row {
    display: grid;
    grid-template-columns: minmax(160px, 1.1fr) repeat(3, minmax(130px, .8fr));
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid #e6e1d8;
    border-radius: 16px;
    background: #fff;
}
.b2bb-availability-row label {
    display: grid;
    gap: 6px;
    color: var(--b2bb-muted);
    font-size: 12px;
    font-weight: 700;
}
.b2bb-availability-row select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #dedede;
    border-radius: 12px;
    background: #fff;
    color: var(--b2bb-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 0 12px;
    cursor: pointer;
}
.b2bb-availability-day {
    display: flex !important;
    align-items: center;
    gap: 10px !important;
    min-height: 44px;
    color: var(--b2bb-text) !important;
    font-size: 15px !important;
}
.b2bb-availability-day input {
    width: 20px;
    height: 20px;
    accent-color: var(--b2bb-green);
    cursor: pointer;
}
.b2bb-availability-save {
    margin-top: 18px;
    min-width: 190px;
}
.b2bb-slot-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px;
    border: 1px dashed #d8d8d8;
    border-radius: 12px;
    background: #fff;
}
.b2bb-calendar__grid .is-unavailable-day {
    color: #c4c4c4;
}
@media (max-width: 1100px) {
    .b2bb-availability-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .b2bb-availability-row {
        grid-template-columns: 1fr;
    }
}

/* v5.3 - Subscription scope/licensure clarity */
.b2bb-plan-scope-note,
.b2bb-plan-scope-editor-note {
    border: 1px solid rgba(120, 156, 93, 0.24);
    background: #f3fbef;
    border-radius: 14px;
    padding: 12px 14px;
    margin: 14px 0 4px;
    text-align: left;
    color: var(--b2bb-text);
}
.b2bb-plan-scope-note strong,
.b2bb-plan-scope-editor-note strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    color: #52743d;
    margin-bottom: 5px;
    text-transform: uppercase;
}
.b2bb-plan-scope-note span,
.b2bb-plan-scope-editor-note span {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: var(--b2bb-muted);
}
.b2bb-subscription-scope-mini {
    display: block;
    margin-top: 6px;
    color: #52743d;
    font-weight: 700;
    font-size: 12px;
}
.b2bb-doctor-pill {
    white-space: normal;
    line-height: 1.25;
    text-align: center;
}
@media (max-width: 760px) {
    .b2bb-plan-scope-note,
    .b2bb-plan-scope-editor-note {
        padding: 10px 12px;
        margin-top: 12px;
    }
}

/* =========================================================
   v5.6 — patient exercise details, profile photos, round rules
   ========================================================= */
.b2bb-action-card--dark,
.b2bb-action-card--dark * {
    color: #fff !important;
}
.b2bb-action-card--dark small {
    color: rgba(255,255,255,.82) !important;
}
.b2bb-care-info-box,
.b2bb-care-info-box * {
    color: #fff !important;
}
.b2bb-care-info-box small,
.b2bb-care-info-box small * {
    color: rgba(255,255,255,.78) !important;
}
.b2bb-care-exercise-copy {
    margin: 10px 0 0;
    display: grid;
    gap: 6px;
    max-width: calc(100% - 120px);
}
.b2bb-care-exercise-copy p {
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 13px;
    line-height: 1.45;
}
.b2bb-care-exercise-copy strong {
    color: #fff;
    font-weight: 800;
}
.b2bb-care-video__embed {
    top: 120px !important;
}
.b2bb-care-video__duration {
    color: rgba(255,255,255,.82) !important;
}
button.b2bb-mini-empty.is-partial {
    width: auto !important;
    min-width: 32px !important;
    padding: 0 7px !important;
    border-radius: 999px !important;
    background: #edf9e8 !important;
    color: var(--b2bb-green) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    box-shadow: inset 0 0 0 1px #cfe8c2 !important;
}
.b2bb-exercise-step.is-partial:not(.is-active) .b2bb-exercise-step__box {
    background: #f5fff0 !important;
    box-shadow: inset 0 0 0 1px #d7efca !important;
}
.b2bb-exercise-step.is-active .b2bb-exercise-step__box strong,
.b2bb-exercise-step.is-active .b2bb-exercise-step__box small {
    color: #fff !important;
}
.b2bb-profile-photo-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid var(--b2bb-line);
    border-radius: 16px;
    background: #fff;
}
.b2bb-profile-photo-preview,
.b2bb-dashboard-hero__avatar,
.b2bb-sidebar__user-avatar,
.b2bb-topbar__avatar {
    overflow: hidden;
}
.b2bb-profile-photo-preview {
    width: 92px;
    height: 92px;
    min-width: 92px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef9e7;
    color: var(--b2bb-green);
    font-weight: 800;
    font-size: 24px;
    border: 1px solid #daf0cf;
}
.b2bb-profile-photo-preview img,
.b2bb-dashboard-hero__avatar img,
.b2bb-sidebar__user-avatar img,
.b2bb-topbar__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.b2bb-topbar__avatar.has-photo,
.b2bb-sidebar__user-avatar.has-photo,
.b2bb-dashboard-hero__avatar.has-photo,
.b2bb-profile-photo-preview.has-photo {
    padding: 0 !important;
    background: transparent !important;
    border-color: #eee9df !important;
    color: transparent !important;
}
.b2bb-topbar__avatar {
    border-radius: 8px !important;
}
.b2bb-sidebar__user-avatar,
.b2bb-dashboard-hero__avatar,
.b2bb-profile-photo-preview {
    border-radius: 50% !important;
    aspect-ratio: 1 / 1;
}
.b2bb-cp-patient-card-avatar,
.b2bb-cp-selected-avatar,
.b2bb-sidebar__doctor-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
    flex: 0 0 48px !important;
}
.b2bb-cp-patient-card-avatar {
    border-radius: 50% !important;
}
.b2bb-photo-upload-label {
    cursor: pointer;
    margin-right: 10px;
}
@media(max-width:760px){
    .b2bb-profile-photo-row { flex-direction: column; align-items: flex-start; }
    .b2bb-care-exercise-copy { max-width: 100%; }
    .b2bb-care-video__embed { top: 148px !important; }
}

/* =========================================================
   v5.7 — Care Plan exercise copy should not be hidden by video
   ========================================================= */
.b2bb-care-video {
    height: auto !important;
    min-height: clamp(520px, 42vw, 700px) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    overflow: visible !important;
}
.b2bb-care-video h2 {
    max-width: 100% !important;
    flex: 0 0 auto !important;
}
.b2bb-care-exercise-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
    background: rgba(255,255,255,.05) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
}
.b2bb-care-exercise-copy p {
    display: block !important;
    margin: 0 !important;
    color: rgba(255,255,255,.9) !important;
    font-size: clamp(13px, .9vw, 15px) !important;
    line-height: 1.55 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}
.b2bb-care-exercise-copy strong {
    color: #fff !important;
}
.b2bb-care-video__embed {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: clamp(320px, 28vw, 500px) !important;
    min-height: 320px !important;
    flex: 1 1 auto !important;
}
.b2bb-care-video__duration {
    position: static !important;
    align-self: flex-end !important;
    margin-top: -6px !important;
}
.b2bb-care-info-row {
    margin-top: 16px !important;
}
@media (max-width: 760px) {
    .b2bb-care-video {
        min-height: auto !important;
        padding: 20px !important;
    }
    .b2bb-care-video__embed {
        height: 260px !important;
        min-height: 260px !important;
    }
    .b2bb-care-exercise-copy {
        padding: 10px 12px !important;
    }
}
