.spine3d-therapy-brand {
    --s3d-ui-bg: #1C1C1C;
    --s3d-surface-1: #1C1C1C;
    --s3d-surface-2: #222222;
    --s3d-surface-3: #3A3A3A;
    --s3d-table-header: #3A3A3A;
    --s3d-border: #2A2A2A;
    --s3d-text: #f2f2f2;
    --s3d-muted: #848484;
    --s3d-green: #89A94A;
    --s3d-teal: #178989;
    --s3d-orange: #D74B06;
    --s3d-orange-soft: #F59B42;
    --s3d-error: #AE0403;
    --s3d-focus: #A3C25C;
    --s3d-glow: #A3C25C;
    --s3d-accent-soft: rgba(137, 169, 74, 0.12);
    --s3d-accent-border: rgba(137, 169, 74, 0.35);
    --s3d-operational-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0)), var(--s3d-surface-1);
    --s3d-operational-surface-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.004)), var(--s3d-surface-1);
    --s3d-operational-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    --s3d-operational-accent: var(--s3d-accent-border);
    /* Bootstrap 5.3+ variables scoped only to therapy pages */
    --bs-body-bg: var(--s3d-ui-bg);
    --bs-body-color: var(--s3d-text);
    --bs-body-color-rgb: 242, 242, 242;
    --bs-emphasis-color: #ffffff;
    --bs-emphasis-color-rgb: 255, 255, 255;
    --bs-secondary-color: var(--s3d-muted);
    --bs-secondary-color-rgb: 132, 132, 132;
    --bs-tertiary-color: var(--s3d-muted);
    --bs-tertiary-color-rgb: 132, 132, 132;
    --bs-border-color: var(--s3d-border);
    --bs-border-color-translucent: rgba(255, 255, 255, 0.08);
    --bs-primary: var(--s3d-green);
    --bs-primary-rgb: 137, 169, 74;
    --bs-secondary: var(--s3d-teal);
    --bs-secondary-rgb: 23, 137, 137;
    --bs-success: var(--s3d-green);
    --bs-success-rgb: 137, 169, 74;
    --bs-info: var(--s3d-teal);
    --bs-info-rgb: 23, 137, 137;
    --bs-warning: var(--s3d-orange);
    --bs-warning-rgb: 215, 75, 6;
    --bs-danger: var(--s3d-error);
    --bs-danger-rgb: 174, 4, 3;
    --bs-link-color: var(--s3d-teal);
    --bs-link-hover-color: var(--s3d-glow);
    --bs-focus-ring-color: rgba(137, 169, 74, 0.35);
    --bs-card-bg: var(--s3d-surface-1);
    --bs-card-border-color: var(--s3d-border);
    --bs-modal-bg: var(--s3d-surface-1);
    --bs-modal-border-color: var(--s3d-border);
    --bs-modal-header-border-color: var(--s3d-border);
    --bs-modal-footer-border-color: var(--s3d-border);
    --bs-dropdown-bg: var(--s3d-surface-1);
    --bs-dropdown-border-color: var(--s3d-border);
    --bs-dropdown-link-color: var(--s3d-text);
    --bs-dropdown-link-hover-color: var(--s3d-text);
    --bs-dropdown-link-hover-bg: rgba(23, 137, 137, 0.12);
    --bs-dropdown-link-active-color: #ffffff;
    --bs-dropdown-link-active-bg: var(--s3d-accent-soft);
    --bs-list-group-bg: var(--s3d-surface-1);
    --bs-list-group-border-color: var(--s3d-border);
    --bs-list-group-color: var(--s3d-text);
    --bs-list-group-active-bg: var(--s3d-accent-soft);
    --bs-list-group-active-border-color: var(--s3d-green);
    --bs-list-group-active-color: #ffffff;
    --bs-nav-tabs-border-color: var(--s3d-border);
    --bs-nav-tabs-link-active-bg: var(--s3d-surface-1);
    --bs-nav-tabs-link-active-border-color: var(--s3d-focus) var(--s3d-focus) var(--s3d-surface-1);
    --bs-nav-link-color: var(--s3d-muted);
    --bs-nav-link-hover-color: var(--s3d-text);
    --bs-toast-bg: rgba(27, 27, 27, 0.94);
    --bs-toast-color: var(--s3d-text);
    --bs-toast-border-color: var(--s3d-border);
    --bs-toast-header-bg: rgba(255, 255, 255, 0.03);
    --bs-toast-header-color: var(--s3d-muted);
    --bs-toast-header-border-color: rgba(255, 255, 255, 0.06);
    --bs-code-color: var(--s3d-teal);
    --bs-highlight-bg: rgba(255, 255, 255, 0.04);
    --bs-box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    background-color: var(--s3d-ui-bg);
    color: var(--s3d-text);
}

html:has(.spine3d-therapy-brand),
body:has(.spine3d-therapy-brand),
.page.page--therapy-surface,
.page:has(article.content .spine3d-therapy-brand) {
    background: #1C1C1C;
    background-color: #1C1C1C;
}

.page.page--therapy-surface,
.page:has(article.content .spine3d-therapy-brand) {
    min-height: 100vh;
    min-height: 100dvh;
}

.page.page--therapy-surface main,
main.main--therapy-surface,
.page:has(article.content .spine3d-therapy-brand) main {
    background: transparent;
    min-height: 100vh;
    min-height: 100dvh;
}

article.content.content--therapy-surface,
article.content:has(.spine3d-therapy-brand) {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding-top: 0.8rem;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
    padding-bottom: 1.75rem;
    margin-top: 0;
    margin-bottom: 0;
    min-height: calc(100vh - 3.5rem);
    min-height: calc(100dvh - 3.5rem);
}

.page.page--therapy-surface .sidebar,
.sidebar.sidebar--therapy-surface,
.page:has(article.content .spine3d-therapy-brand) .sidebar {
    background-image:
        radial-gradient(520px circle at 12% 8%, rgba(23, 137, 137, 0.10), transparent 58%),
        radial-gradient(620px circle at 100% 100%, rgba(137, 169, 74, 0.12), transparent 58%),
        linear-gradient(180deg, #1C1C1C 0%, #0E0E0E 100%);
    border-right: none;
}

.page.page--therapy-surface .sidebar::after,
.sidebar.sidebar--therapy-surface::after,
.page:has(article.content .spine3d-therapy-brand) .sidebar::after {
    display: none;
}

.page.page--therapy-surface .top-row,
.top-row.top-row--therapy-surface,
.page:has(article.content .spine3d-therapy-brand) .top-row {
    background:
        linear-gradient(90deg, rgba(23, 137, 137, 0.03), rgba(23, 137, 137, 0) 22%),
        rgba(28, 28, 28, 0.97);
    border-bottom-color: rgba(42, 42, 42, 0.9);
    box-shadow: inset 0 -1px 0 rgba(42, 42, 42, 0.92);
}

.page.page--therapy-surface .top-row .lu-topbar-date,
.top-row.top-row--therapy-surface .lu-topbar-date,
.page:has(article.content .spine3d-therapy-brand) .top-row .lu-topbar-date {
    color: #848484;
}

.page.page--therapy-surface .top-row .lu-userbar-link,
.top-row.top-row--therapy-surface .lu-userbar-link,
.page:has(article.content .spine3d-therapy-brand) .top-row .lu-userbar-link {
    background: rgba(42, 42, 42, 0.72);
    border-color: rgba(42, 42, 42, 0.95);
    color: var(--s3d-text);
}

.page.page--therapy-surface .top-row .lu-userbar-link:hover,
.top-row.top-row--therapy-surface .lu-userbar-link:hover,
.page:has(article.content .spine3d-therapy-brand) .top-row .lu-userbar-link:hover {
    background: rgba(23, 137, 137, 0.10);
    border-color: rgba(23, 137, 137, 0.38);
}

/* Sidebar header: override the scoped !important navy background */
.page.page--therapy-surface .lu-navmenu .hx-sidebar-header,
.sidebar.sidebar--therapy-surface .lu-navmenu .hx-sidebar-header,
.page:has(article.content .spine3d-therapy-brand) .lu-navmenu .hx-sidebar-header {
    background: transparent !important;
}

.page.page--therapy-surface .lu-navmenu .lu-sidebar,
.sidebar.sidebar--therapy-surface .lu-navmenu .lu-sidebar,
.page:has(article.content .spine3d-therapy-brand) .lu-navmenu .lu-sidebar {
    --hx-sidebar-background-color: transparent;
    --hx-sidebar-item-color: rgba(242, 242, 242, 0.86);
    --hx-sidebar-item-icon-color: rgba(132, 132, 132, 0.92);
    --hx-sidebar-item-hover-background-color: 23, 137, 137;
    --hx-sidebar-item-hover-background-opacity: 0.08;
    --hx-sidebar-item-hover-color: #ffffff;
    --hx-sidebar-item-hover-icon-color: rgba(255, 255, 255, 0.96);
    --hx-sidebar-item-active-background-color: 23, 137, 137;
    --hx-sidebar-item-active-background-opacity: 0.12;
    --hx-sidebar-item-active-color: #ffffff;
    --hx-sidebar-item-active-icon-color: #ffffff;
    --hx-sidebar-parent-item-active-background-color: 23, 137, 137;
    --hx-sidebar-parent-item-active-background-opacity: 0.08;
    --hx-sidebar-parent-item-active-color: #ffffff;
    --hx-sidebar-parent-item-active-icon-color: #ffffff;
    --hx-sidebar-brand-name-color: rgba(255, 255, 255, 0.95);
    --hx-sidebar-toggler-background: rgba(42, 42, 42, 0.95);
}

.spine3d-therapy-brand,
.spine3d-therapy-brand .container,
.spine3d-therapy-brand .container-fluid {
    color: var(--s3d-text);
}

.spine3d-therapy-brand hr,
.spine3d-therapy-brand .border,
.spine3d-therapy-brand .border-top,
.spine3d-therapy-brand .border-bottom,
.spine3d-therapy-brand .border-start,
.spine3d-therapy-brand .border-end {
    border-color: var(--s3d-border) !important;
}

.spine3d-therapy-brand .bg-body,
.spine3d-therapy-brand .bg-white,
.spine3d-therapy-brand .bg-light {
    background-color: var(--s3d-surface-1) !important;
    color: var(--s3d-text) !important;
}

.spine3d-therapy-brand .bg-body-tertiary,
.spine3d-therapy-brand .bg-secondary-subtle {
    background-color: var(--s3d-surface-2) !important;
    color: var(--s3d-text) !important;
}

.spine3d-therapy-brand .text-dark,
.spine3d-therapy-brand .text-body {
    color: var(--s3d-text) !important;
}

.spine3d-therapy-brand .text-secondary,
.spine3d-therapy-brand .text-body-secondary {
    color: var(--s3d-muted) !important;
}

.spine3d-therapy-brand .lu-pagehead {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--s3d-border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: var(--s3d-operational-surface);
    box-shadow:
        inset 1px 0 0 var(--s3d-operational-accent),
        var(--s3d-operational-shadow);
}

.spine3d-therapy-brand .lu-pagehead-title {
    color: var(--s3d-text);
    letter-spacing: 0.01em;
    text-shadow: none;
}

.spine3d-therapy-brand .lu-pagehead-actions .btn {
    margin-top: 0.15rem;
}

.spine3d-therapy-brand .therapy-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.spine3d-therapy-brand .therapy-toolbar__field {
    flex: 1 1 14rem;
    min-width: min(100%, 14rem);
}

.spine3d-therapy-brand .therapy-toolbar__field--wide {
    flex-basis: 18rem;
}

.spine3d-therapy-brand .therapy-toolbar__field--compact {
    flex: 1 1 11rem;
    min-width: min(100%, 11rem);
}

.spine3d-therapy-brand .therapy-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.spine3d-therapy-brand .therapy-toolbar__switches {
    gap: 0.85rem;
}

.spine3d-therapy-brand .therapy-toolbar__switches .form-check {
    margin: 0;
}

.spine3d-therapy-brand .therapy-toolbar__status-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.spine3d-therapy-brand .therapy-toolbar .form-control,
.spine3d-therapy-brand .therapy-toolbar .form-select,
.spine3d-therapy-brand .therapy-toolbar .hx-search-box,
.spine3d-therapy-brand .therapy-toolbar .hx-input-text {
    width: 100%;
    max-width: 100%;
}

.spine3d-therapy-brand .therapy-data-grid {
    display: block;
}

.spine3d-therapy-brand .therapy-grid-pagination-stack {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.spine3d-therapy-brand .therapy-grid-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(42, 42, 42, 0.95);
}

.spine3d-therapy-brand .therapy-grid-pagination__summary {
    color: var(--s3d-muted);
    font-size: 0.82rem;
}

.spine3d-therapy-brand .therapy-grid-pagination__pager .pagination {
    margin-bottom: 0;
}

.spine3d-therapy-brand .therapy-mobile-card-list {
    display: none;
}

.spine3d-therapy-brand .therapy-mobile-card-list__empty {
    padding: 1rem;
    border: 1px dashed rgba(74, 138, 190, 0.28);
    border-radius: 14px;
    background: rgba(16, 22, 30, 0.45);
    color: var(--s3d-muted);
    text-align: center;
}

.spine3d-therapy-brand .therapy-mobile-card {
    border: 1px solid rgba(42, 42, 42, 0.95);
    border-radius: 16px;
    background: var(--s3d-operational-surface-strong);
    padding: 0.95rem;
    box-shadow: var(--s3d-operational-shadow);
}

.spine3d-therapy-brand .therapy-mobile-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.spine3d-therapy-brand .therapy-mobile-card__title {
    color: var(--s3d-text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.spine3d-therapy-brand .therapy-mobile-card__subtitle {
    color: var(--s3d-muted);
    font-size: 0.82rem;
    margin-top: 0.2rem;
    word-break: break-word;
}

.spine3d-therapy-brand .therapy-mobile-card__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.spine3d-therapy-brand .therapy-mobile-card__meta-item,
.spine3d-therapy-brand .therapy-mobile-card__detail {
    min-width: 0;
}

.spine3d-therapy-brand .therapy-mobile-card__meta-label,
.spine3d-therapy-brand .therapy-mobile-card__detail-label {
    display: block;
    color: var(--s3d-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.18rem;
}

.spine3d-therapy-brand .therapy-mobile-card__section,
.spine3d-therapy-brand .therapy-mobile-card__actions,
.spine3d-therapy-brand .therapy-mobile-card__details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.spine3d-therapy-brand .therapy-mobile-card__section--consent {
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.spine3d-therapy-brand .therapy-mobile-card__section-body {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.spine3d-therapy-brand .therapy-mobile-card__section-heading {
    color: var(--s3d-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.spine3d-therapy-brand .therapy-mobile-card__section-value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.spine3d-therapy-brand .therapy-mobile-card__details {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(42, 42, 42, 0.85);
}

.spine3d-therapy-brand .therapy-mobile-card__actions-disclosure {
    margin-top: 0.85rem;
    border-top: 1px solid rgba(42, 42, 42, 0.85);
    padding-top: 0.85rem;
}

.spine3d-therapy-brand .therapy-mobile-card__actions-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    cursor: pointer;
    list-style: none;
    color: var(--s3d-text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.spine3d-therapy-brand .therapy-mobile-card__actions-toggle::-webkit-details-marker {
    display: none;
}

.spine3d-therapy-brand .therapy-mobile-card__actions-toggle::after {
    content: "+";
    flex: 0 0 auto;
    color: var(--s3d-accent);
    font-size: 1rem;
    line-height: 1;
}

.spine3d-therapy-brand .therapy-mobile-card__actions-disclosure[open] .therapy-mobile-card__actions-toggle::after {
    content: "-";
}

.spine3d-therapy-brand .therapy-mobile-card__actions-panel {
    padding-top: 0.75rem;
}

.spine3d-therapy-brand .therapy-page-help {
    border: 1px solid var(--s3d-border);
    border-radius: 12px;
    background: var(--s3d-operational-surface-strong);
    color: var(--s3d-text);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--s3d-operational-shadow);
}

.spine3d-therapy-brand .therapy-page-help .therapy-page-help-summary {
    color: var(--s3d-text);
    padding: 0.8rem 1rem;
    border-radius: 0;
    background: var(--s3d-operational-surface-strong);
    border-color: var(--s3d-border);
}

.spine3d-therapy-brand .therapy-page-help .therapy-page-help-summary:hover {
    background: var(--s3d-operational-surface);
}

.spine3d-therapy-brand .therapy-page-help .therapy-page-help-summary:focus-visible {
    outline: 2px solid var(--s3d-focus);
    outline-offset: 2px;
}

.spine3d-therapy-brand .therapy-page-help .therapy-page-help-body,
.spine3d-therapy-brand .therapy-page-help .therapy-page-help-body p,
.spine3d-therapy-brand .therapy-page-help .therapy-page-help-body li,
.spine3d-therapy-brand .therapy-page-help .therapy-page-help-body span {
    color: var(--s3d-text);
}

.spine3d-therapy-brand .therapy-page-help .therapy-page-help-body {
    margin-top: 0 !important;
    padding: 0.75rem 1rem 0.95rem;
    border-top: 1px solid rgba(42, 42, 42, 0.95);
    background: var(--s3d-operational-surface);
}

.spine3d-therapy-brand .therapy-page-help .therapy-page-help-body a {
    color: var(--s3d-glow);
}

.spine3d-therapy-brand .therapy-page-help .therapy-page-help-body a:hover {
    color: var(--s3d-teal);
}

.spine3d-therapy-brand .therapy-page-help .therapy-page-help-body li::marker {
    color: var(--s3d-green);
}

.spine3d-therapy-brand .card,
.spine3d-therapy-brand [class*=" hx-card"],
.spine3d-therapy-brand [class^="hx-card"] {
    border-color: var(--s3d-border);
    background-color: var(--s3d-surface-1);
    color: var(--s3d-text);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--s3d-operational-shadow);
}

.spine3d-therapy-brand .card .card-body:has(table) {
    border-radius: inherit;
    overflow: hidden;
}

.spine3d-therapy-brand .card .table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

.spine3d-therapy-brand .card-header {
    background-color: var(--s3d-table-header);
    color: var(--s3d-text);
    border-bottom-color: var(--s3d-border);
}

.spine3d-therapy-brand .card.mb-3 {
    background: var(--s3d-operational-surface);
}

.spine3d-therapy-brand .therapy-catalog-filter-matrix {
    border-color: var(--s3d-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0)), var(--s3d-surface-1);
}

.spine3d-therapy-brand .therapy-catalog-filter-matrix .card-body {
    padding-top: 0.85rem;
    padding-bottom: 0.65rem;
}

.spine3d-therapy-brand .therapy-catalog-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.45rem;
}

.spine3d-therapy-brand .therapy-catalog-filter-label {
    width: 100px;
    font-weight: 600;
    color: var(--s3d-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.spine3d-therapy-brand .therapy-catalog-filter-label::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 1.2rem;
    border-radius: 2px;
    background-color: rgba(132, 132, 132, 0.8);
}

.spine3d-therapy-brand .therapy-catalog-filter-label--position::before {
    background-color: #4A8ABE;
}

.spine3d-therapy-brand .therapy-catalog-filter-label--region::before {
    background-color: #4E9E4E;
}

.spine3d-therapy-brand .therapy-catalog-filter-label--tool::before {
    background-color: #8A7A3A;
}

.spine3d-therapy-brand .therapy-catalog-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.spine3d-therapy-brand .therapy-catalog-filter-pill {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: transparent;
    color: var(--s3d-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.22rem 0.65rem;
    line-height: 1.15;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.spine3d-therapy-brand .therapy-catalog-filter-pill:hover,
.spine3d-therapy-brand .therapy-catalog-filter-pill:focus {
    border-color: #5A5A5A;
    color: var(--s3d-text);
}

.spine3d-therapy-brand .therapy-catalog-filter-pill.is-active {
    font-weight: 700;
}

.spine3d-therapy-brand .therapy-catalog-filter-pill--position.is-active {
    background-color: rgba(26, 58, 92, .15);
    border-color: rgba(74, 138, 190, .3);
    color: #B8D7EE;
    box-shadow: 0 0 3px rgba(74, 138, 190, .08);
}

.spine3d-therapy-brand .therapy-catalog-filter-pill--region.is-active {
    background-color: rgba(29, 92, 29, .15);
    border-color: rgba(78, 158, 78, .3);
    color: #B6EBB6;
    box-shadow: 0 0 3px rgba(78, 158, 78, .08);
}

.spine3d-therapy-brand .therapy-catalog-filter-pill--tool.is-active {
    background-color: rgba(58, 58, 26, .15);
    border-color: rgba(160, 141, 53, .3);
    color: #F2DF83;
    box-shadow: 0 0 3px rgba(160, 141, 53, .08);
}

.spine3d-therapy-brand .therapy-catalog-filter-pill:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

.spine3d-therapy-brand .therapy-catalog-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.35rem;
}

@media (max-width: 767.98px) {
    .spine3d-therapy-brand .therapy-catalog-filter-row {
        flex-direction: column;
        gap: 0.35rem;
    }

    .spine3d-therapy-brand .therapy-catalog-filter-label {
        width: auto;
    }
}

.spine3d-therapy-brand .card-body,
.spine3d-therapy-brand .modal-content,
.spine3d-therapy-brand .dropdown-menu {
    background-color: var(--s3d-surface-1);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .modal-header,
.spine3d-therapy-brand .modal-footer {
    border-color: var(--s3d-border);
}

.spine3d-therapy-brand .modal-title {
    color: var(--s3d-text);
}

/* Consent revoke dialog is rendered at body level by Bootstrap/HxModal. Keep it themed without relying on page nesting. */
body:has(.spine3d-therapy-brand) .therapy-consent-revoke-dialog .modal-content,
.therapy-consent-revoke-dialog .modal-content {
    background-color: var(--s3d-surface-1, #1C1C1C);
    color: var(--s3d-text, #f2f2f2);
    border: 1px solid var(--s3d-border, #2A2A2A);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.therapy-consent-revoke-dialog .modal-header,
.therapy-consent-revoke-dialog .modal-footer {
    border-color: var(--s3d-border, #2A2A2A);
    background-color: transparent;
}

.therapy-consent-revoke-dialog .modal-title,
.therapy-consent-revoke-dialog .modal-body {
    color: var(--s3d-text, #f2f2f2);
}

.therapy-consent-revoke-dialog .btn-close {
    filter: invert(1) grayscale(100%) brightness(175%);
    opacity: 0.72;
}

.therapy-consent-revoke-dialog .btn-close:hover,
.therapy-consent-revoke-dialog .btn-close:focus {
    opacity: 1;
}

.therapy-consent-revoke-dialog .therapy-consent-revoke-warning {
    margin: 0;
    padding: 0.95rem 1rem;
    border-radius: 8px;
    color: #f8e2c5;
    background-color: rgba(215, 75, 6, 0.18);
    border: 1px solid rgba(245, 155, 66, 0.42);
}

.therapy-consent-revoke-dialog .btn-secondary {
    background-color: var(--s3d-teal, #178989);
    border-color: var(--s3d-teal, #178989);
    color: #fff;
}

.therapy-consent-revoke-dialog .btn-secondary:hover,
.therapy-consent-revoke-dialog .btn-secondary:focus,
.therapy-consent-revoke-dialog .btn-secondary:active {
    background-color: var(--s3d-teal, #178989);
    border-color: var(--s3d-teal, #178989);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(23, 137, 137, 0.38), 0 0 10px rgba(23, 137, 137, 0.18);
}

.therapy-consent-revoke-dialog .btn-danger {
    background-color: var(--s3d-error, #AE0403);
    border-color: var(--s3d-error, #AE0403);
    color: #fff;
}

.therapy-consent-revoke-dialog .btn-danger:hover,
.therapy-consent-revoke-dialog .btn-danger:focus,
.therapy-consent-revoke-dialog .btn-danger:active {
    background-color: var(--s3d-error, #AE0403);
    border-color: var(--s3d-error, #AE0403);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(174, 4, 3, 0.42), 0 0 10px rgba(174, 4, 3, 0.16);
}

/* Ensure Bootstrap backdrop never covers the therapy modal dialog. */
body:has(.spine3d-therapy-brand) .modal-backdrop.show {
    z-index: 200000;
}

body:has(.spine3d-therapy-brand) .modal.show {
    z-index: 200010;
}

.spine3d-therapy-brand .btn-close {
    filter: invert(1) grayscale(100%) brightness(175%);
    opacity: 0.72;
}

.spine3d-therapy-brand .btn-close:hover,
.spine3d-therapy-brand .btn-close:focus {
    opacity: 1;
}

.spine3d-therapy-brand .dropdown-menu {
    border-color: var(--s3d-border);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.spine3d-therapy-brand .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.spine3d-therapy-brand .dropdown-item {
    color: var(--s3d-text);
}

.spine3d-therapy-brand .dropdown-item:hover,
.spine3d-therapy-brand .dropdown-item:focus {
    color: var(--s3d-text);
    background-color: rgba(23, 137, 137, 0.12);
}

.spine3d-therapy-brand .dropdown-item.active,
.spine3d-therapy-brand .dropdown-item:active {
    color: #fff;
    background-color: var(--s3d-accent-soft);
}

.spine3d-therapy-brand .dropdown-item.disabled,
.spine3d-therapy-brand .dropdown-item:disabled {
    color: rgba(132, 132, 132, 0.82);
}

.spine3d-therapy-brand .btn {
    border-radius: 10px;
    font-weight: 600;
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.spine3d-therapy-brand .btn:focus-visible {
    box-shadow: 0 0 0 1px rgba(137, 169, 74, 0.35), 0 0 10px rgba(137, 169, 74, 0.35);
}

.spine3d-therapy-brand .btn-primary {
    --bs-btn-color: #0E0E0E;
    --bs-btn-bg: var(--s3d-green);
    --bs-btn-border-color: var(--s3d-green);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: var(--s3d-green);
    --bs-btn-hover-border-color: var(--s3d-green);
    --bs-btn-focus-shadow-rgb: 137, 169, 74;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: var(--s3d-green);
    --bs-btn-active-border-color: var(--s3d-green);
    --bs-btn-disabled-color: rgba(132, 132, 132, 0.75);
    --bs-btn-disabled-bg: rgba(58, 58, 58, 0.55);
    --bs-btn-disabled-border-color: rgba(42, 42, 42, 0.9);
    background: var(--s3d-green);
    border-color: var(--s3d-green);
    color: #0E0E0E;
    box-shadow: none;
}

.spine3d-therapy-brand .btn-primary:hover,
.spine3d-therapy-brand .btn-primary:active,
.spine3d-therapy-brand .btn-primary:focus {
    background: var(--s3d-green);
    background-color: var(--s3d-green);
    border-color: var(--s3d-green);
    color: #0E0E0E;
    box-shadow: 0 0 0 1px rgba(137, 169, 74, 0.35), 0 0 10px rgba(137, 169, 74, 0.35);
}

.spine3d-therapy-brand .btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--s3d-teal);
    --bs-btn-border-color: var(--s3d-teal);
    --bs-btn-hover-bg: var(--s3d-teal);
    --bs-btn-hover-border-color: var(--s3d-teal);
    --bs-btn-active-bg: var(--s3d-teal);
    --bs-btn-active-border-color: var(--s3d-teal);
    --bs-btn-disabled-bg: rgba(58, 58, 58, 0.55);
    --bs-btn-disabled-border-color: rgba(42, 42, 42, 0.9);
    background-color: var(--s3d-teal);
    border-color: var(--s3d-teal);
    color: #fff;
}

.spine3d-therapy-brand .btn-secondary:hover,
.spine3d-therapy-brand .btn-secondary:active,
.spine3d-therapy-brand .btn-secondary:focus {
    background-color: var(--s3d-teal);
    border-color: var(--s3d-teal);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(23, 137, 137, 0.38), 0 0 10px rgba(23, 137, 137, 0.18);
}

.spine3d-therapy-brand .btn-success {
    background-color: var(--s3d-green);
    border-color: var(--s3d-green);
    color: #0E0E0E;
}

.spine3d-therapy-brand .btn-success:hover,
.spine3d-therapy-brand .btn-success:active,
.spine3d-therapy-brand .btn-success:focus {
    background-color: var(--s3d-green);
    border-color: var(--s3d-green);
    color: #0E0E0E;
    box-shadow: 0 0 0 1px rgba(137, 169, 74, 0.35), 0 0 10px rgba(137, 169, 74, 0.35);
}

.spine3d-therapy-brand .btn-outline-primary {
    --bs-btn-color: var(--s3d-green);
    --bs-btn-border-color: var(--s3d-green);
    --bs-btn-hover-color: var(--s3d-green);
    --bs-btn-hover-bg: var(--s3d-green);
    --bs-btn-hover-border-color: var(--s3d-green);
    --bs-btn-active-color: var(--s3d-green);
    --bs-btn-active-bg: var(--s3d-green);
    --bs-btn-active-border-color: var(--s3d-green);
    --bs-btn-disabled-color: rgba(132, 132, 132, 0.6);
    --bs-btn-disabled-border-color: rgba(42, 42, 42, 0.7);
    color: var(--s3d-muted);
    border-color: var(--s3d-border);
    background-color: transparent;
}

.spine3d-therapy-brand .btn-outline-primary:hover,
.spine3d-therapy-brand .btn-outline-primary:active,
.spine3d-therapy-brand .btn-outline-primary:focus {
    color: var(--s3d-green);
    background-color: var(--s3d-accent-soft);
    border-color: var(--s3d-green);
    box-shadow: 0 0 0 1px rgba(137, 169, 74, 0.35), 0 0 10px rgba(137, 169, 74, 0.35);
}

.spine3d-therapy-brand .btn-outline-secondary,
.spine3d-therapy-brand .btn-outline-dark {
    --bs-btn-color: var(--s3d-muted);
    --bs-btn-border-color: var(--s3d-border);
    --bs-btn-hover-color: var(--s3d-text);
    --bs-btn-hover-bg: var(--s3d-surface-3);
    --bs-btn-hover-border-color: var(--s3d-focus);
    --bs-btn-active-color: var(--s3d-text);
    --bs-btn-active-bg: var(--s3d-surface-3);
    --bs-btn-active-border-color: var(--s3d-focus);
    color: var(--s3d-muted);
    border-color: var(--s3d-border);
    background-color: transparent;
}

.spine3d-therapy-brand .btn-outline-secondary:hover,
.spine3d-therapy-brand .btn-outline-secondary:active,
.spine3d-therapy-brand .btn-outline-secondary:focus,
.spine3d-therapy-brand .btn-outline-dark:hover,
.spine3d-therapy-brand .btn-outline-dark:active,
.spine3d-therapy-brand .btn-outline-dark:focus {
    color: var(--s3d-text);
    background-color: var(--s3d-surface-3);
    border-color: var(--s3d-focus);
}

.spine3d-therapy-brand .btn-outline-success {
    --bs-btn-color: var(--s3d-muted);
    --bs-btn-border-color: var(--s3d-border);
    --bs-btn-hover-color: var(--s3d-green);
    --bs-btn-hover-bg: var(--s3d-green);
    --bs-btn-hover-border-color: var(--s3d-green);
    --bs-btn-active-color: var(--s3d-green);
    --bs-btn-active-bg: var(--s3d-green);
    --bs-btn-active-border-color: var(--s3d-green);
    color: var(--s3d-muted);
    border-color: var(--s3d-border);
    background-color: transparent;
}

.spine3d-therapy-brand .btn-outline-success:hover,
.spine3d-therapy-brand .btn-outline-success:active,
.spine3d-therapy-brand .btn-outline-success:focus {
    color: var(--s3d-green);
    background-color: var(--s3d-accent-soft);
    border-color: var(--s3d-green);
    box-shadow: 0 0 0 1px rgba(137, 169, 74, 0.35), 0 0 10px rgba(137, 169, 74, 0.35);
}

.spine3d-therapy-brand .btn-outline-info {
    --bs-btn-color: var(--s3d-teal);
    --bs-btn-border-color: var(--s3d-teal);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: rgba(23, 137, 137, 0.12);
    --bs-btn-hover-border-color: var(--s3d-teal);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: rgba(23, 137, 137, 0.18);
    --bs-btn-active-border-color: var(--s3d-teal);
    color: var(--s3d-teal);
    border-color: var(--s3d-teal);
    background-color: transparent;
}

.spine3d-therapy-brand .btn-outline-info:hover,
.spine3d-therapy-brand .btn-outline-info:active,
.spine3d-therapy-brand .btn-outline-info:focus {
    color: var(--s3d-teal);
    background-color: rgba(23, 137, 137, 0.10);
    border-color: var(--s3d-teal);
    box-shadow: 0 0 0 1px rgba(23, 137, 137, 0.38), 0 0 10px rgba(23, 137, 137, 0.18);
}

.spine3d-therapy-brand .btn-warning {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--s3d-orange);
    --bs-btn-border-color: var(--s3d-orange);
    --bs-btn-hover-bg: var(--s3d-orange-soft);
    --bs-btn-hover-border-color: var(--s3d-orange-soft);
    --bs-btn-active-bg: var(--s3d-orange);
    --bs-btn-active-border-color: var(--s3d-orange);
    background-color: var(--s3d-orange);
    border-color: var(--s3d-orange);
    color: #fff;
}

.spine3d-therapy-brand .btn-warning:hover,
.spine3d-therapy-brand .btn-warning:active,
.spine3d-therapy-brand .btn-warning:focus {
    background-color: var(--s3d-orange-soft);
    border-color: var(--s3d-orange-soft);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(215, 75, 6, 0.35), 0 0 10px rgba(245, 155, 66, 0.16);
}

.spine3d-therapy-brand .btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--s3d-error);
    --bs-btn-border-color: var(--s3d-error);
    --bs-btn-hover-bg: var(--s3d-error);
    --bs-btn-hover-border-color: var(--s3d-error);
    --bs-btn-active-bg: var(--s3d-error);
    --bs-btn-active-border-color: var(--s3d-error);
    --bs-btn-disabled-bg: rgba(58, 58, 58, 0.55);
    --bs-btn-disabled-border-color: rgba(42, 42, 42, 0.9);
    background-color: var(--s3d-error);
    border-color: var(--s3d-error);
    color: #fff;
}

.spine3d-therapy-brand .btn-danger:hover,
.spine3d-therapy-brand .btn-danger:active,
.spine3d-therapy-brand .btn-danger:focus {
    background-color: var(--s3d-error);
    border-color: var(--s3d-error);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(174, 4, 3, 0.42), 0 0 10px rgba(174, 4, 3, 0.16);
}

.spine3d-therapy-brand .btn-cta-orange,
.spine3d-therapy-brand .btn-spine-cta {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--s3d-orange);
    --bs-btn-border-color: var(--s3d-orange);
    --bs-btn-hover-bg: var(--s3d-orange-soft);
    --bs-btn-hover-border-color: var(--s3d-orange-soft);
    --bs-btn-active-bg: var(--s3d-orange);
    --bs-btn-active-border-color: var(--s3d-orange);
    background-color: var(--s3d-orange);
    border-color: var(--s3d-orange);
    color: #fff;
}

.spine3d-therapy-brand .btn-cta-orange:hover,
.spine3d-therapy-brand .btn-cta-orange:active,
.spine3d-therapy-brand .btn-cta-orange:focus,
.spine3d-therapy-brand .btn-spine-cta:hover,
.spine3d-therapy-brand .btn-spine-cta:active,
.spine3d-therapy-brand .btn-spine-cta:focus {
    background-color: var(--s3d-orange-soft);
    border-color: var(--s3d-orange-soft);
    color: #fff;
}

.spine3d-therapy-brand .btn:disabled,
.spine3d-therapy-brand .btn.disabled {
    background-color: rgba(58, 58, 58, 0.55);
    border-color: rgba(42, 42, 42, 0.95);
    color: rgba(132, 132, 132, 0.85);
    opacity: 1;
}

.spine3d-therapy-brand .btn-link,
.spine3d-therapy-brand a {
    color: var(--s3d-teal);
}

.spine3d-therapy-brand .btn-link:hover,
.spine3d-therapy-brand a:hover {
    color: var(--s3d-glow);
}

.spine3d-therapy-brand .form-control,
.spine3d-therapy-brand .form-select,
.spine3d-therapy-brand textarea.form-control {
    background-color: var(--s3d-surface-2);
    border-color: var(--s3d-border);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .form-control::placeholder {
    color: rgba(132, 132, 132, 0.92);
}

.spine3d-therapy-brand .form-control:focus,
.spine3d-therapy-brand .form-select:focus {
    border-color: var(--s3d-focus);
    box-shadow: 0 0 0 0.2rem rgba(137, 169, 74, 0.35);
    background-color: var(--s3d-surface-2);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .form-label,
.spine3d-therapy-brand label {
    color: var(--s3d-muted);
    font-weight: 600;
}

.spine3d-therapy-brand .form-control:disabled,
.spine3d-therapy-brand .form-select:disabled,
.spine3d-therapy-brand .form-control[readonly] {
    background-color: var(--s3d-surface-1);
    color: rgba(132, 132, 132, 0.86);
    border-color: var(--s3d-border);
}

.spine3d-therapy-brand .form-floating > label {
    color: var(--s3d-muted);
}

.spine3d-therapy-brand .input-group-text {
    background-color: var(--s3d-surface-3);
    border-color: var(--s3d-border);
    color: var(--s3d-muted);
}

.spine3d-therapy-brand .form-check-input {
    background-color: var(--s3d-surface-2);
    border-color: var(--s3d-border);
}

.spine3d-therapy-brand .form-check-input:checked {
    background-color: var(--s3d-green);
    border-color: var(--s3d-green);
}

.spine3d-therapy-brand .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(137, 169, 74, 0.35);
}

.spine3d-therapy-brand .form-switch .form-check-input {
    width: 2.3em;
    background-color: var(--s3d-surface-3);
    border-color: var(--s3d-border);
}

.spine3d-therapy-brand .form-switch .form-check-input:not(:checked) {
    background-color: var(--s3d-surface-2);
    border-color: rgba(132, 132, 132, 0.55);
    background-image: radial-gradient(circle, rgba(250, 250, 250, 0.95) 0 46%, transparent 49%);
    background-position: left 0.22rem center;
    background-size: 0.95rem 0.95rem;
}

.spine3d-therapy-brand .form-switch .form-check-input:checked {
    background-color: var(--s3d-green);
    border-color: var(--s3d-green);
}

.spine3d-therapy-brand .nav-link {
    color: var(--s3d-muted);
}

.spine3d-therapy-brand .nav-link:hover,
.spine3d-therapy-brand .nav-link:focus {
    color: var(--s3d-text);
}

.spine3d-therapy-brand .nav-tabs {
    border-bottom-color: var(--s3d-border);
}

.spine3d-therapy-brand .nav-tabs .nav-link {
    border-color: transparent;
    color: var(--s3d-muted);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.spine3d-therapy-brand .nav-tabs .nav-link:hover,
.spine3d-therapy-brand .nav-tabs .nav-link:focus {
    border-color: var(--s3d-border);
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .nav-tabs .nav-link.active,
.spine3d-therapy-brand .nav-tabs .nav-item.show .nav-link {
    color: var(--s3d-text);
    background-color: var(--s3d-surface-1);
    border-color: var(--s3d-focus) var(--s3d-focus) var(--s3d-surface-1);
    box-shadow: inset 0 2px 0 rgba(137, 169, 74, 0.35);
}

.spine3d-therapy-brand .nav-pills .nav-link.active,
.spine3d-therapy-brand .nav-pills .show > .nav-link {
    background-color: rgba(23, 137, 137, 0.14);
    color: var(--s3d-text);
    border: 1px solid rgba(23, 137, 137, 0.30);
}

.spine3d-therapy-brand .list-group {
    border-radius: 10px;
    overflow: hidden;
}

.spine3d-therapy-brand .list-group-item {
    background-color: var(--s3d-surface-1);
    border-color: var(--s3d-border);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .list-group-item-action:hover,
.spine3d-therapy-brand .list-group-item-action:focus {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .list-group-item.active {
    background:
        linear-gradient(90deg, var(--s3d-accent-soft), transparent),
        var(--s3d-surface-2);
    border-color: var(--s3d-green);
    color: #fff;
}

.spine3d-therapy-brand .list-group-item.disabled {
    background-color: var(--s3d-surface-1);
    color: rgba(132, 132, 132, 0.76);
}

.spine3d-therapy-brand .table {
    color: var(--s3d-text);
    border-color: var(--s3d-border);
    margin-bottom: 0;
}

.spine3d-therapy-brand .table > :not(caption) > * > * {
    background-color: transparent;
    color: inherit;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.spine3d-therapy-brand .table thead th {
    background-color: var(--s3d-table-header);
    color: var(--s3d-text);
    border-bottom-color: var(--s3d-border);
}

.spine3d-therapy-brand .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.02);
}

.spine3d-therapy-brand .table-hover > tbody > tr:hover > * {
    background-color: rgba(23, 137, 137, 0.06);
}

.spine3d-therapy-brand .badge.bg-primary {
    background-color: var(--s3d-teal) !important;
}

.spine3d-therapy-brand .therapy-catalog-taxonomy-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.spine3d-therapy-brand .badge.therapy-catalog-taxonomy-badge--position {
    background-color: rgba(26, 58, 92, .15) !important;
    border-color: rgba(74, 138, 190, .3) !important;
    color: #B8D7EE !important;
}

.spine3d-therapy-brand .badge.bg-success {
    background-color: var(--s3d-green) !important;
    color: #0E0E0E;
}

.spine3d-therapy-brand .badge.therapy-catalog-taxonomy-badge--region {
    background-color: rgba(29, 92, 29, .15) !important;
    border-color: rgba(78, 158, 78, .3) !important;
    color: #B6EBB6 !important;
}

.spine3d-therapy-brand .badge.bg-warning {
    background-color: var(--s3d-orange) !important;
    color: #fff;
}

.spine3d-therapy-brand .badge.bg-danger,
.spine3d-therapy-brand .text-bg-danger {
    background-color: var(--s3d-error) !important;
    color: #fff !important;
}

.spine3d-therapy-brand .text-bg-primary {
    background-color: var(--s3d-green) !important;
    color: #0E0E0E !important;
}

.spine3d-therapy-brand .text-bg-secondary,
.spine3d-therapy-brand .badge.bg-secondary {
    background-color: var(--s3d-teal) !important;
    color: #fff !important;
}

.spine3d-therapy-brand .badge.therapy-catalog-taxonomy-badge--tool {
    background-color: rgba(58, 58, 26, .15) !important;
    border-color: rgba(160, 141, 53, .3) !important;
    color: #F2DF83 !important;
}

.spine3d-therapy-brand .therapy-catalog-taxonomy-badge--position:hover,
.spine3d-therapy-brand .therapy-catalog-taxonomy-badge--position:active {
    background-color: rgba(26, 58, 92, .32) !important;
    box-shadow: 0 0 3px rgba(74, 138, 190, .08);
}

.spine3d-therapy-brand .therapy-catalog-taxonomy-badge--region:hover,
.spine3d-therapy-brand .therapy-catalog-taxonomy-badge--region:active {
    background-color: rgba(29, 92, 29, .28) !important;
    box-shadow: 0 0 3px rgba(78, 158, 78, .08);
}

.spine3d-therapy-brand .therapy-catalog-taxonomy-badge--tool:hover,
.spine3d-therapy-brand .therapy-catalog-taxonomy-badge--tool:active {
    background-color: rgba(58, 58, 26, .28) !important;
    box-shadow: 0 0 3px rgba(160, 141, 53, .08);
}

.spine3d-therapy-brand .text-bg-success {
    background-color: var(--s3d-green) !important;
    color: #0E0E0E !important;
}

.spine3d-therapy-brand .text-bg-warning {
    background-color: var(--s3d-orange) !important;
    color: #fff !important;
}

.spine3d-therapy-brand .text-bg-info {
    background-color: var(--s3d-teal) !important;
    color: #fff !important;
}

.spine3d-therapy-brand .badge.bg-light {
    background-color: rgba(58, 58, 58, 0.55) !important;
    color: var(--s3d-text) !important;
    border: 1px solid rgba(42, 42, 42, 0.95);
}

.spine3d-therapy-brand .badge.bg-light.text-dark {
    color: var(--s3d-text) !important;
}

.spine3d-therapy-brand .alert {
    border-radius: 10px;
    border-width: 1px;
}

.spine3d-therapy-brand .alert-info {
    color: var(--s3d-text);
    background-color: rgba(23, 137, 137, 0.10);
    border-color: rgba(23, 137, 137, 0.24);
}

.spine3d-therapy-brand .alert-warning {
    color: var(--s3d-text);
    background-color: rgba(215, 75, 6, 0.12);
    border-color: rgba(215, 75, 6, 0.28);
}

.spine3d-therapy-brand .alert-danger {
    color: var(--s3d-text);
    background-color: rgba(174, 4, 3, 0.16);
    border-color: rgba(174, 4, 3, 0.35);
}

.spine3d-therapy-brand .text-muted,
.spine3d-therapy-brand .small.text-muted {
    color: var(--s3d-muted) !important;
}

.spine3d-therapy-brand .pagination .page-link {
    background-color: var(--s3d-surface-2);
    border-color: var(--s3d-border);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .pagination .page-link:hover,
.spine3d-therapy-brand .pagination .page-link:focus {
    background-color: var(--s3d-surface-3);
    border-color: var(--s3d-focus);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .pagination .page-item.active .page-link {
    background-color: var(--s3d-teal);
    border-color: var(--s3d-teal);
}

.spine3d-therapy-brand .toast {
    background-color: rgba(27, 27, 27, 0.96);
    color: var(--s3d-text);
    border: 1px solid var(--s3d-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

.spine3d-therapy-brand .toast-header {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--s3d-muted);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.spine3d-therapy-brand .toast .text-muted {
    color: var(--s3d-muted) !important;
}

.spine3d-therapy-brand .accordion-item {
    background-color: var(--s3d-surface-1);
    border-color: var(--s3d-border);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .accordion-button {
    background-color: var(--s3d-surface-2);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .accordion-button:not(.collapsed) {
    color: var(--s3d-text);
    background:
        linear-gradient(90deg, rgba(23, 137, 137, 0.10), rgba(23, 137, 137, 0)),
        var(--s3d-surface-2);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.spine3d-therapy-brand .accordion-button:focus {
    border-color: var(--s3d-focus);
    box-shadow: 0 0 0 0.2rem rgba(137, 169, 74, 0.35);
}

.spine3d-therapy-brand .progress {
    background-color: var(--s3d-surface-3);
    border: 1px solid var(--s3d-border);
}

.spine3d-therapy-brand .progress-bar {
    background-color: var(--s3d-green);
}

.spine3d-therapy-brand code,
.spine3d-therapy-brand pre {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--s3d-text);
    border-radius: 6px;
}

.spine3d-therapy-brand .therapy-wizard-step {
    border: 1px solid var(--s3d-border);
    background: var(--s3d-surface-1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.spine3d-therapy-brand .therapy-wizard-step .card-header {
    background:
        linear-gradient(90deg, var(--s3d-accent-soft), transparent 24%),
        var(--s3d-table-header);
}

.spine3d-therapy-brand .therapy-wizard-step.is-completed {
    border-left: 4px solid var(--s3d-green);
}

.spine3d-therapy-brand .therapy-wizard-step.is-locked {
    opacity: 0.88;
}

@media (max-width: 767.98px) {
    .spine3d-therapy-brand .lu-pagehead {
        padding: 0.8rem 0.85rem;
        border-radius: 10px;
    }

    .spine3d-therapy-brand .therapy-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .spine3d-therapy-brand .therapy-toolbar__field,
    .spine3d-therapy-brand .therapy-toolbar__field--wide,
    .spine3d-therapy-brand .therapy-toolbar__field--compact,
    .spine3d-therapy-brand .therapy-toolbar__actions,
    .spine3d-therapy-brand .therapy-toolbar__status-group {
        width: 100%;
        min-width: 0;
        flex: 1 1 auto;
    }

    .spine3d-therapy-brand .therapy-toolbar__actions .btn,
    .spine3d-therapy-brand .therapy-toolbar__status-group .btn,
    .spine3d-therapy-brand .therapy-toolbar__switches .form-check {
        width: 100%;
    }

    .spine3d-therapy-brand .therapy-data-grid .table-responsive,
    .spine3d-therapy-brand .therapy-data-grid table,
    .spine3d-therapy-brand .therapy-data-grid thead,
    .spine3d-therapy-brand .therapy-data-grid tbody {
        display: none !important;
    }

    .spine3d-therapy-brand .therapy-mobile-card-list {
        display: grid;
        gap: 0.75rem;
    }

    .spine3d-therapy-brand .therapy-grid-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .spine3d-therapy-brand .therapy-grid-pagination__pager {
        width: 100%;
    }

    .spine3d-therapy-brand .therapy-grid-pagination__pager .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }

    .spine3d-therapy-brand .therapy-mobile-card__meta {
        grid-template-columns: 1fr;
    }

    .spine3d-therapy-brand .therapy-mobile-card__section,
    .spine3d-therapy-brand .therapy-mobile-card__actions,
    .spine3d-therapy-brand .therapy-mobile-card__details {
        flex-direction: column;
        align-items: stretch;
    }

    .spine3d-therapy-brand .therapy-mobile-card__actions .btn,
    .spine3d-therapy-brand .therapy-mobile-card__section .btn {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .spine3d-therapy-brand .lu-pagehead {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
    }

    .spine3d-therapy-brand .lu-pagehead-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .spine3d-therapy-brand .lu-pagehead-actions .btn {
        flex: 1 1 auto;
        min-width: 9rem;
        width: auto;
    }
}

@media (max-width: 991.98px) {
    .page.page--therapy-surface .top-row.auth,
    .top-row.top-row--therapy-surface.auth,
    .page:has(article.content .spine3d-therapy-brand) .top-row.auth {
        height: auto;
        min-height: 3.5rem;
        align-items: stretch;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
        gap: 0.7rem;
    }

    .page.page--therapy-surface .top-row.auth > div:first-child,
    .top-row.top-row--therapy-surface.auth > div:first-child,
    .page:has(article.content .spine3d-therapy-brand) .top-row.auth > div:first-child {
        width: 100%;
        align-items: flex-start !important;
        gap: 0.45rem !important;
    }

    .page.page--therapy-surface .top-row .lu-topbar-date,
    .top-row.top-row--therapy-surface .lu-topbar-date,
    .page:has(article.content .spine3d-therapy-brand) .top-row .lu-topbar-date {
        font-size: 0.85rem;
    }

    .page.page--therapy-surface .top-row .lu-userbar,
    .top-row.top-row--therapy-surface .lu-userbar,
    .page:has(article.content .spine3d-therapy-brand) .top-row .lu-userbar {
        width: 100%;
        justify-content: flex-start;
    }

    article.content.content--therapy-surface,
    article.content:has(.spine3d-therapy-brand) {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-bottom: 1.1rem;
    }
}

/* ========================
   Therapy Customization
   ======================== */
article.content:has(.spine3d-therapy-brand .therapy-customization-shell) {
    max-height: calc(100vh - 3.5rem);
    max-height: calc(100dvh - 3.5rem);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

article.content:has(.spine3d-therapy-brand .therapy-customization-shell)::-webkit-scrollbar {
    width: 10px;
}

article.content:has(.spine3d-therapy-brand .therapy-customization-shell)::-webkit-scrollbar-track {
    background: rgba(42, 42, 42, 0.78);
    border-radius: 999px;
}

article.content:has(.spine3d-therapy-brand .therapy-customization-shell)::-webkit-scrollbar-thumb {
    background: rgba(23, 137, 137, 0.72);
    border-radius: 999px;
    border: 2px solid rgba(42, 42, 42, 0.78);
}

article.content:has(.spine3d-therapy-brand .therapy-customization-shell)::-webkit-scrollbar-thumb:hover {
    background: var(--s3d-focus);
}

.spine3d-therapy-brand .therapy-customization-hero {
    background:
        radial-gradient(520px circle at 0 0, rgba(137, 169, 74, 0.12), transparent 58%),
        linear-gradient(135deg, rgba(23, 137, 137, 0.10), rgba(23, 137, 137, 0) 42%),
        var(--s3d-surface-1);
}

.spine3d-therapy-brand .therapy-customization-kicker {
    color: var(--s3d-glow);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.spine3d-therapy-brand .therapy-customization-title {
    color: var(--s3d-text);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.spine3d-therapy-brand .therapy-customization-switch {
    min-width: min(100%, 18rem);
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(42, 42, 42, 0.95);
    background: rgba(14, 14, 14, 0.52);
}

.spine3d-therapy-brand .therapy-customization-panel .card-body {
    padding: 1.1rem 1.15rem 1.2rem;
}

.spine3d-therapy-brand .therapy-identity-tile,
.spine3d-therapy-brand .therapy-contact-tile,
.spine3d-therapy-brand .therapy-preview-rule {
    border: 1px solid rgba(42, 42, 42, 0.95);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        var(--s3d-surface-2);
    padding: 0.9rem 1rem;
}

.spine3d-therapy-brand .therapy-identity-tile__label,
.spine3d-therapy-brand .therapy-preview-rule__label {
    color: var(--s3d-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.spine3d-therapy-brand .therapy-identity-tile__value,
.spine3d-therapy-brand .therapy-preview-rule__value {
    color: var(--s3d-text);
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.spine3d-therapy-brand .therapy-identity-tile__meta {
    color: var(--s3d-muted);
    font-size: 0.82rem;
    margin-top: 0.4rem;
}

.spine3d-therapy-brand .therapy-logo-current {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(42, 42, 42, 0.95);
}

.spine3d-therapy-brand .therapy-logo-current__img {
    display: block;
    max-height: 68px;
    max-width: 220px;
    object-fit: contain;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(42, 42, 42, 0.95);
    border-radius: 10px;
    background: rgba(14, 14, 14, 0.72);
}

.spine3d-therapy-brand .therapy-customization-sticky {
    position: sticky;
    top: 1rem;
}

.spine3d-therapy-brand .therapy-brand-preview {
    border: 1px solid rgba(23, 137, 137, 0.22);
    border-radius: 14px;
    padding: 1rem;
    background:
        radial-gradient(420px circle at 100% 0, rgba(23, 137, 137, 0.12), transparent 58%),
        linear-gradient(180deg, rgba(23, 137, 137, 0.08), rgba(23, 137, 137, 0)),
        var(--s3d-surface-2);
}

.spine3d-therapy-brand .therapy-brand-preview--default {
    border-color: rgba(42, 42, 42, 0.95);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
        var(--s3d-surface-2);
}

.spine3d-therapy-brand .therapy-brand-preview__identity {
    min-width: 0;
    flex: 1 1 14rem;
}

.spine3d-therapy-brand .therapy-brand-preview__eyebrow {
    color: var(--s3d-glow);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.spine3d-therapy-brand .therapy-brand-preview__title {
    color: var(--s3d-text);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
}

.spine3d-therapy-brand .therapy-brand-preview__subtitle {
    color: var(--s3d-muted);
    font-size: 0.92rem;
    margin-top: 0.35rem;
    line-height: 1.45;
}

.spine3d-therapy-brand .therapy-brand-preview__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 7rem;
    min-height: 4.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    border: 1px solid rgba(42, 42, 42, 0.95);
    background: rgba(14, 14, 14, 0.8);
}

.spine3d-therapy-brand .therapy-brand-preview__logo img {
    max-width: 150px;
    max-height: 56px;
    object-fit: contain;
}

.spine3d-therapy-brand .therapy-brand-preview__secondary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.95rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(42, 42, 42, 0.95);
}

.spine3d-therapy-brand .therapy-preview-rulegrid {
    display: grid;
    gap: 0.8rem;
}

@media (max-width: 767.98px) {
    .spine3d-therapy-brand .therapy-customization-sticky {
        position: static;
    }
}

/* ========================
   TherapyBrandingHeader
   ======================== */
.therapy-branding-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background-color: var(--s3d-surface-1, #1C1C1C);
    border: 1px solid var(--s3d-border, #2A2A2A);
}

.therapy-branding-header__logo-img {
    max-height: 48px;
    max-width: 160px;
    object-fit: contain;
}

.therapy-branding-header__logo-img--secondary {
    max-height: 32px;
    max-width: 120px;
    opacity: 0.6;
}

.therapy-branding-header__name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--s3d-text, #f2f2f2);
    line-height: 1.2;
}

.therapy-branding-header__therapist {
    font-size: 0.8rem;
    color: var(--s3d-muted, #848484);
    margin-top: 0.1rem;
}

/* ========================
   Visual Refinements v2
   ======================== */

/* lu-divider: gradient horizontal separator */
.spine3d-therapy-brand hr.lu-divider {
    height: 1px;
    border: 0;
    background: linear-gradient(
        90deg,
        rgba(137, 169, 74, 0.35) 0%,
        rgba(23, 137, 137, 0.32) 55%,
        transparent 100%
    );
    opacity: 1;
    margin: 1.1rem 0;
}

/* Chevron animation for CollapsibleInfoAlert expand/collapse */
.spine3d-therapy-brand .therapy-page-help-chevron {
    display: inline-block;
    transition: transform 0.22s ease, color 0.22s ease;
    font-size: 0.78rem;
    margin-left: 0.45rem;
    vertical-align: middle;
    color: var(--s3d-muted);
}

.spine3d-therapy-brand .therapy-page-help.is-open .therapy-page-help-chevron {
    transform: rotate(90deg);
    color: var(--s3d-glow);
}

/* Progress bar: gradient fill + pill shape + clean track */
.spine3d-therapy-brand .progress {
    background-color: rgba(42, 42, 42, 0.85);
    border: none;
    border-radius: 999px;
    overflow: hidden;
}

.spine3d-therapy-brand .progress-bar.bg-success {
    background: linear-gradient(90deg, var(--s3d-teal) 0%, var(--s3d-green) 100%);
    border-radius: 999px;
    transition: width 0.55s ease;
}

/* Table header: uppercase label style, subtle gradient */
.spine3d-therapy-brand .table thead th {
    background: linear-gradient(180deg, rgba(62, 62, 62, 0.9) 0%, var(--s3d-table-header) 100%);
    color: var(--s3d-muted);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--s3d-border);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

/* Modal: subtle teal ring + deeper shadow */
body:has(.spine3d-therapy-brand) .modal-content {
    box-shadow:
        0 0 0 1px rgba(23, 137, 137, 0.13),
        0 24px 56px rgba(0, 0, 0, 0.50);
}

/* bg-dark badge fix for dark theme (used for REVOKED consent) */
.spine3d-therapy-brand .badge.bg-dark {
    background-color: rgba(58, 58, 58, 0.75) !important;
    border: 1px solid rgba(120, 128, 140, 0.35) !important;
    color: var(--s3d-text) !important;
}

/* fw-semibold section headings inside card bodies */
.spine3d-therapy-brand .card-body .fw-semibold {
    color: rgba(235, 240, 248, 0.95);
}

/* Admin tool cards (.card.mb-3): subtle left accent bar */
.spine3d-therapy-brand .card.mb-3 {
    border-left: 2px solid rgba(23, 137, 137, 0.32);
}

/* Filter matrix card keeps its existing style (no extra left border) */
.spine3d-therapy-brand .therapy-catalog-filter-matrix.card.mb-3 {
    border-left-color: var(--s3d-border);
}

/* HxSearchBox dark theme */
.spine3d-therapy-brand .hx-search-box .form-control,
.spine3d-therapy-brand [class*="search-box"] .form-control {
    background-color: var(--s3d-surface-2);
    border-color: var(--s3d-border);
    color: var(--s3d-text);
}

.spine3d-therapy-brand .hx-search-box .dropdown-menu {
    background-color: var(--s3d-surface-1);
    border-color: var(--s3d-border);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
}

.spine3d-therapy-brand .hx-search-box .dropdown-item {
    color: var(--s3d-text);
}

.spine3d-therapy-brand .hx-search-box .dropdown-item:hover,
.spine3d-therapy-brand .hx-search-box .dropdown-item:focus {
    background-color: rgba(23, 137, 137, 0.12);
    color: var(--s3d-text);
}

/* Pagehead kicker — subtle brand accent line above title */
.spine3d-therapy-brand .lu-pagehead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(137, 169, 74, 0.35),
        rgba(23, 137, 137, 0.14) 50%,
        transparent 100%
    );
}


/* Upsert plan modal — wider than standard modal-xl */
@media (min-width: 1200px) {
    .therapy-plan-upsert-modal .modal-dialog {
        max-width: min(1480px, 92vw);
    }
}

/* Patients, Plans, Sessions grids: switch to card-stack below 1280px */
@media (max-width: 1280px) {
    .spine3d-therapy-brand .therapy-data-grid--patients .table-responsive,
    .spine3d-therapy-brand .therapy-data-grid--patients table,
    .spine3d-therapy-brand .therapy-data-grid--patients thead,
    .spine3d-therapy-brand .therapy-data-grid--patients tbody,
    .spine3d-therapy-brand .therapy-data-grid--sessions .table-responsive,
    .spine3d-therapy-brand .therapy-data-grid--sessions table,
    .spine3d-therapy-brand .therapy-data-grid--sessions thead,
    .spine3d-therapy-brand .therapy-data-grid--sessions tbody {
        display: none !important;
    }

    .spine3d-therapy-brand .therapy-data-grid--patients .therapy-mobile-card-list,
    .spine3d-therapy-brand .therapy-data-grid--sessions .therapy-mobile-card-list {
        display: grid;
        gap: 0.75rem;
    }

    .spine3d-therapy-brand .therapy-data-grid--patients .therapy-grid-pagination,
    .spine3d-therapy-brand .therapy-data-grid--sessions .therapy-grid-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .spine3d-therapy-brand .therapy-data-grid--patients .therapy-grid-pagination__pager,
    .spine3d-therapy-brand .therapy-data-grid--sessions .therapy-grid-pagination__pager {
        width: 100%;
    }
}

/* Plans grid: switch to card-stack below 1280px */
@media (max-width: 1280px) {
    .spine3d-therapy-brand .therapy-data-grid--plans .table-responsive,
    .spine3d-therapy-brand .therapy-data-grid--plans table,
    .spine3d-therapy-brand .therapy-data-grid--plans thead,
    .spine3d-therapy-brand .therapy-data-grid--plans tbody {
        display: none !important;
    }

    .spine3d-therapy-brand .therapy-data-grid--plans .therapy-mobile-card-list {
        display: grid;
        gap: 0.75rem;
    }

    .spine3d-therapy-brand .therapy-data-grid--plans .therapy-grid-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .spine3d-therapy-brand .therapy-data-grid--plans .therapy-grid-pagination__pager {
        width: 100%;
    }
}
