/* Scoped client membership workspace; existing forms, policies and handlers are unchanged. */
.tf-client-profile:has(.tf-membership-workspace){width:100%;max-width:1280px!important;margin-inline:auto!important;min-width:0;container-type:inline-size;container-name:membership-profile}
.tf-client-profile:has(.tf-membership-workspace) :is(.tf-profile-head,.tf-profile-tabs,.tf-profile-body,.tf-profile-alerts){box-sizing:border-box;min-width:0;max-width:100%}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-head{display:flex!important;flex-wrap:wrap;align-items:center;gap:16px;padding:20px!important}
.tf-client-profile:has(.tf-membership-workspace) .tf-back{flex-basis:100%}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-identity{flex:1 1 420px;min-width:0;gap:12px;flex-wrap:wrap}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-identity :is(p,small){overflow-wrap:anywhere}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-primary-actions{position:static!important;display:flex!important;flex-wrap:wrap;gap:8px;justify-content:flex-end;max-width:100%;margin:0!important}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-primary-actions .tribal-btn{min-height:44px;white-space:normal;max-width:100%;display:inline-flex;align-items:center;justify-content:center}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-alerts{margin:12px 20px!important;padding:16px!important}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-alerts>div{display:flex!important;flex-direction:row!important;align-items:center;flex-wrap:wrap;gap:12px 24px;justify-content:flex-start!important;min-height:0!important}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-alerts>div>span{display:block!important;flex:0 1 620px;min-width:0;min-height:0!important}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-alerts>div>span :is(b,small){display:block;margin-block:4px}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-alerts a{min-height:44px;display:inline-flex;align-items:center}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-tabs{display:flex;flex-wrap:nowrap!important;overflow-x:auto!important;padding-inline:20px!important}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-tabs>a{flex-shrink:0;min-height:44px}
.tf-client-profile:has(.tf-membership-workspace) .tf-profile-body{padding:20px!important}
.tf-membership-workspace .tf-membership-advanced>summary{cursor:pointer;padding:4px;line-height:1.5}
.tf-membership-workspace .tf-membership-advanced>summary small{display:block;margin:4px 0 0 16px;color:#697586}
.tf-membership-workspace .tf-linked-subscriptions .tf90-request{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;min-width:0}
.tf-client-profile .tf-profile-body>.tf-membership-workspace{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:16px;grid-column:1/-1!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box;justify-self:stretch;align-self:stretch;color:#102238}
.tf-membership-workspace> *{min-width:0!important;max-width:100%;box-sizing:border-box}
.tf-membership-workspace>.tf90-section,.tf-membership-workspace>.tf-workspace-disclosure{width:100%!important;justify-self:stretch;align-self:stretch}
body.tf-view-clients:not(.tf-client-portal) .tf-membership-workspace .tf-current-membership{display:block!important;width:100%!important}
body.tf-view-clients:not(.tf-client-portal) .tf-membership-workspace .tf-membership-upcoming .tf90-request{display:flex;flex-wrap:wrap;gap:16px;width:100%;box-sizing:border-box}
.tf-membership-workspace .tf-membership-upcoming .tf90-request>div{flex:1 1 240px;min-width:0}
.tf-membership-workspace .tf-membership-upcoming .tf90-request>form{flex:0 1 auto;max-width:100%}
@media(max-width:800px){body.tf-view-clients:not(.tf-client-portal) .tf-membership-workspace .tf-credit-adjust-form{grid-template-columns:minmax(0,1fr)!important}.tf-membership-workspace .tf-credit-adjust-form>label{grid-column:auto!important}.tf-membership-workspace .tf-membership-upcoming .tf90-request>form,.tf-membership-workspace .tf-membership-upcoming button{width:100%}}
.tf-membership-workspace [hidden]{display:none!important}
.tf-membership-workspace>.tf90-section{margin:0!important;padding:20px!important;border:1px solid #e3e8ee!important;border-radius:12px!important;background:#fff;box-shadow:0 2px 8px #10223805;min-width:0}
.tf-membership-workspace h2{font-size:19px!important;margin:0 0 12px!important;color:#102238}.tf-membership-workspace h3{font-size:16px!important;margin:0 0 8px!important}
.tf-membership-workspace p{line-height:1.5}.tf-membership-workspace .tribal-muted,.tf-membership-workspace small{color:#64748b}
.tf-membership-workspace .tf-current-membership{display:block!important}.tf-membership-workspace .tf-current-membership>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.tf-membership-workspace .tf-current-membership .tf-section-kicker{width:100%;font-size:12px;color:#64748b}.tf-membership-workspace .tf-current-membership h2{margin:0!important;font-size:23px!important}.tf-membership-workspace .tf-membership-access{flex-basis:100%}
.tf-membership-workspace .tf-current-membership dl{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px;margin:18px 0 0!important}.tf-membership-workspace .tf-current-membership dl>div{padding:12px;border-radius:8px;background:#f8fafc;min-width:0}.tf-membership-workspace dt{font-size:11px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.tf-membership-workspace dd{margin:6px 0 0;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.tf-membership-workspace .tf-status{border-radius:99px;background:#fff3d6;color:#875310;padding:5px 10px;font-size:12px;font-weight:700}.tf-membership-workspace .tf-status.status-active{background:#e7f5ee;color:#18724c}
.tf-membership-workspace .tf-workspace-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.tf-workspace-actions>h2,.tf-workspace-actions>p,.tf-workspace-actions>.tf90-alert,.tf-workspace-actions>.tf-subscription-preview{grid-column:1/-1}.tf-workspace-actions>h2,.tf-workspace-actions>p{margin:0!important}
.tf-membership-workspace .tf-workspace-actions>.tf-plan-change,.tf-membership-workspace .tf-stop-renewal{display:block!important;padding:16px!important;background:#fafbfc;border:1px solid #e6eaf0;border-radius:10px;margin:0!important;min-width:0}.tf-membership-workspace .tf-plan-change>div{margin:12px 0;display:grid;gap:4px}.tf-membership-workspace .tf-admin-cancellation{padding:0!important;margin:0!important;border:0!important;background:transparent!important;min-width:0;grid-column:2;grid-row:3;display:grid;gap:12px;align-content:start}.tf-admin-cancellation>section,.tf-admin-cancellation>[role=alert]{grid-column:1/-1}.tf-membership-workspace .tf-admin-cancellation details p{font-size:13px}.tf-membership-workspace .tf-admin-cancellation form{display:flex;flex-direction:column;gap:10px}.tf-membership-workspace .tf-admin-cancellation button[value=immediate]{color:#b42318!important;background:#fff!important;border:1px solid #e5b7b0!important}.tf-membership-workspace .is-scheduled{border-color:#edd39a!important}
.tf-membership-workspace :is(button,.tribal-btn,summary){min-height:44px;box-sizing:border-box;white-space:normal}.tf-membership-workspace summary{cursor:pointer}.tf-membership-workspace :is(input,select,textarea){box-sizing:border-box;max-width:100%;min-width:0}.tf-membership-workspace form{min-width:0}.tf-membership-workspace fieldset{margin:14px 0}.tf-membership-workspace fieldset label{display:block!important;margin:8px 0!important}
.tf-membership-workspace .tf-credit-secondary{display:flex;gap:16px;flex-wrap:wrap;margin-top:14px}.tf-membership-workspace .tf-credit-secondary>details{margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;flex:1;min-width:200px}.tf-membership-workspace .tf-credit-secondary summary,.tf-membership-workspace .tf90-assignment-notes summary{display:flex;align-items:center;justify-content:space-between;gap:12px}.tf-membership-workspace .tf-credit-adjust-disclosure{margin-top:10px}.tf-membership-workspace .tf-credit-adjust-form,.tf-membership-workspace .tf-workspace-history form{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding-top:16px}.tf-membership-workspace .tf90-settings label{min-width:0}.tf-membership-workspace .tf90-settings textarea{width:100%}
.tf-membership-workspace .tf-assignment-card{padding:14px;border:1px solid #e6eaf0;border-radius:10px;margin:10px 0;display:flex;gap:16px;justify-content:space-between;align-items:start;flex-wrap:wrap}.tf-membership-workspace .tf-assignment-identity{line-height:1.8}.tf-membership-workspace .tf-assignment-identity strong{display:block}.tf-membership-workspace .tf-assignment-card>details{padding:0!important;border:0!important;margin:0!important;box-shadow:none!important}.tf-membership-workspace .tf-assignment-card>details[open]{flex-basis:100%}.tf-membership-workspace .tf90-group-title{margin-top:16px!important}.tf-workspace-disclosure{margin:10px 0}.tf-workspace-disclosure>summary{display:flex;align-items:center;font-weight:600;gap:8px}.tf-workspace-disclosure>summary::before{content:'▸'}.tf-workspace-disclosure[open]>summary::before{content:'▾'}
.tf-membership-workspace .tf-membership-advanced header{display:flex;align-items:center;justify-content:space-between;gap:16px}.tf-membership-workspace .tf-membership-advanced header small{display:block}.tf-membership-workspace .tf-membership-advanced__body{margin-top:16px;min-width:0}.tf-membership-workspace .tf-technical-membership{display:grid!important;gap:10px!important;min-width:0}.tf-membership-workspace .tf-technical-field{display:grid;grid-template-columns:90px minmax(0,1fr) auto;align-items:center;gap:12px}.tf-membership-workspace code{overflow-wrap:anywhere;white-space:normal}.tf-reconcile-tool{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:12px 0}.tf-membership-workspace .tf-membership-recovery{margin:0!important;padding:14px!important}
@media(max-width:800px){.tf-membership-workspace>.tf90-section{padding:16px!important}.tf-membership-workspace .tf-current-membership dl{grid-template-columns:repeat(2,minmax(0,1fr))!important}.tf-membership-workspace .tf-workspace-actions{grid-template-columns:minmax(0,1fr)}.tf-membership-workspace .tf-admin-cancellation{grid-column:auto;grid-row:auto}.tf-membership-workspace .tf-credit-adjust-form,.tf-membership-workspace .tf-workspace-history form{grid-template-columns:minmax(0,1fr)!important}.tf-membership-workspace .tf-credit-secondary{display:block}.tf-membership-workspace .tf-credit-secondary>details{min-width:0}.tf-membership-workspace .tf-technical-field{grid-template-columns:minmax(0,1fr) auto}.tf-technical-field>span{grid-column:1/-1}.tf-membership-workspace .tf-assignment-card>details,.tf-membership-workspace .tf-assignment-card summary{width:100%}.tf-membership-workspace .tf-current-membership h2{font-size:21px!important}}
.tf-membership-workspace .tf-payment-required{color:#875310;background:#fff3d6;border-radius:6px;padding:5px 7px}.tf-membership-workspace .tf-admin-cancellation:has(>section){grid-column:1/-1;grid-row:auto}
.tf-active-services .tf-service-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.tf-service-card{border:1px solid #e3e8ee;border-radius:10px;padding:16px;min-width:0}.tf-service-card>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.tf-service-card p{color:#64748b}.tf-service-card dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tf-service-card dl>div{padding:10px;background:#f8fafc;border-radius:8px;min-width:0}.tf-service-card dd{overflow-wrap:anywhere}
@media(max-width:800px){.tf-active-services .tf-service-card-grid,.tf-service-card dl{grid-template-columns:minmax(0,1fr)}.tf-service-card{width:100%;box-sizing:border-box}}
/* Density responds to the actual content width, after the staff sidebar. */
.tf-membership-workspace>.tf90-section{padding:18px!important;align-self:start}
.tf-membership-workspace .tf-grace-panel>p{margin:8px 0;font-size:13px;line-height:1.5}
.tf-membership-workspace .tf-workspace-actions{align-items:stretch}
.tf-membership-workspace .tf-admin-cancellation{align-content:stretch}
.tf-membership-workspace .tf-stop-renewal{height:100%;box-sizing:border-box}
.tf-membership-workspace .tf-credit-secondary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tf-membership-workspace .tf-credit-secondary>details{min-width:0;flex:none}
.tf-membership-workspace .tf-credit-secondary summary{min-height:44px;padding:8px!important;line-height:1.5}
.tf-membership-workspace .tf-credit-empty-hint{font-size:13px;line-height:1.5;margin:0 8px 8px;color:var(--tribal-muted,#64748b)}
.tf-client-profile .tf-profile-body .tf-membership-workspace .tf-credit-secondary>details{margin:0!important;padding:0!important;min-height:0!important;box-shadow:none!important;background:transparent!important;align-self:start}
.tf-client-profile .tf-profile-body .tf-membership-workspace .tf-credit-secondary>details>summary{padding:8px!important;margin:0!important;min-height:44px!important}
.tf-membership-workspace .tf-assignment-card{gap:10px;padding:12px;margin:8px 0}
.tf-membership-workspace .tf-assignment-identity{min-width:0;overflow-wrap:anywhere;line-height:1.6}
.tf-membership-workspace .tf-membership-advanced{padding:12px 16px!important;background:#fafbfc!important;box-shadow:none!important}
.tf-membership-workspace :is(button,a,summary,input,select,textarea):focus-visible{outline:2px solid var(--tribal-orange,#ed6500);outline-offset:3px}
@container membership-profile (min-width:960px){
 .tf-client-profile .tf-profile-body>.tf-membership-workspace{grid-template-columns:minmax(0,3fr) minmax(0,2fr)!important;align-items:start}
 .tf-membership-workspace>*{grid-column:1/-1}
 .tf-membership-workspace>.tf-current-membership,.tf-membership-workspace>.tf-workspace-credits{grid-column:1}
 .tf-membership-workspace>.tf-grace-panel,.tf-membership-workspace>.tf-workspace-history{grid-column:2}
 .tf-membership-workspace .tf-current-membership dl{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .tf-membership-workspace .tf-workspace-history .tf-assignment-card>details{width:100%}
}
@container membership-profile (max-width:959px){
 .tf-membership-workspace .tf-current-membership dl{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@container membership-profile (max-width:680px){
 .tf-client-profile:has(.tf-membership-workspace) .tf-profile-head{padding:16px!important}
 .tf-client-profile:has(.tf-membership-workspace) .tf-profile-body{padding:12px!important;padding-bottom:calc(88px + env(safe-area-inset-bottom))!important}
 .tf-membership-workspace .tf-current-membership dl{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .tf-membership-workspace .tf-workspace-actions,.tf-membership-workspace .tf-credit-secondary{grid-template-columns:minmax(0,1fr)}
 .tf-membership-workspace .tf-admin-cancellation{grid-column:auto;grid-row:auto}
 .tf-membership-workspace .tf-stop-renewal{height:auto}
}
@container membership-profile (max-width:340px){.tf-membership-workspace .tf-current-membership dl{grid-template-columns:minmax(0,1fr)!important}}
