/* ──────────────────────────────────────────────────────────────────────────
   globals.css — auto-scoped
   Every CSS class selector lives under `.legacy-shell` so the legacy
   therapist shell can't bleed into Claude design refresh routes.
   `:root` tokens and base resets (* html body a button input textarea select)
   remain global. Refresh routes (`/clients`, `/calendar`) inject their own
   canonical CSS via getClaudeRouteStyles() and live under `.claude-ui`.
   Pre-scope backup: globals.css.before-isolation.bak
   ────────────────────────────────────────────────────────────────────────── */

:root {
  --tw-bg: #f4f0e8;
  --tw-sidebar-bg: #eae5dc;
  --tw-surface: #fdfaf5;
  --tw-surface-2: #f5f1ea;
  --tw-border: #ddd7cd;
  --tw-border-card: #e6e0d6;
  --tw-border-inner: #ede8e0;
  --tw-text: #1c1912;
  --tw-text-muted: #65605a;
  --tw-text-soft: #9e9890;
  --tw-accent: #675ba0;
  --tw-accent-bg: #ebebf3;
  --tw-accent-strong: #544888;
  --tw-warning: #9a6a2e;
  --tw-warning-soft: #f2e3ca;
  --tw-notif: #7a5ea8;
  --tw-pending: #c2610f;
  --tw-pending-bg: #fdebd6;
  --tw-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --tw-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.09), 0 1px 3px rgba(0, 0, 0, 0.05);
  --tw-shadow-tooltip: 0 4px 14px rgba(0, 0, 0, 0.13), 0 1px 4px rgba(0, 0, 0, 0.08);
  --tw-font-ui: var(--font-body), -apple-system, sans-serif;
  --tw-type-brand: 14px;
  --tw-type-page-title: 26px;
  --tw-type-nav: 14px;
  --tw-type-button: 13px;
  --tw-type-card-title: 14px;
  --tw-type-meta: 12px;
  --tw-type-session: 13px;
  --tw-type-chip: 11px;
  --tw-type-role: 11px;
  --tw-weight-regular: 400;
  --tw-weight-medium: 500;
  --tw-weight-semibold: 600;
  --tw-weight-bold: 700;
  --tw-sidebar-width: 240px;
  --tw-topbar-height: 54px;
  --tw-content-max: 1200px;
  --tw-content-pad-y: 44px;
  --tw-content-pad-x: 48px;
  --tw-search-width: 248px;
  --tw-card-min: 296px;
  --tw-radius-card: 12px;
  --tw-radius-btn: 8px;
  --tw-radius-inner: 7px;
  --tw-radius-chip: 6px;
  --tw-radius-pill: 999px;
  --tw-motion-fast: 120ms;
  --bg: #f4f0e8;
  --sidebar-bg: #eae5dc;
  --surface: #fdfaf5;
  --surface-2: #f5f1ea;
  --text: #1c1912;
  --text-muted: #65605a;
  --text-soft: #9e9890;
  --border: #ddd7cd;
  --border-card: #e6e0d6;
  --border-inner: #ede8e0;
  --accent: #675ba0;
  --accent-bg: #ebebf3;
  --accent-strong: #544888;
  --accent-soft: #ebebf3;
  --warning: #9a6a2e;
  --warning-soft: #f2e3ca;
  --notif: #7a5ea8;
  --pending: #c2610f;
  --pending-bg: #fdebd6;
  --danger: #a25c68;
  --danger-soft: #f4e3e7;
  --success: #6e8b7b;
  --success-soft: #e6f0ea;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.09), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-tooltip: 0 4px 14px rgba(0, 0, 0, 0.13), 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-focus: 0 0 0 3px var(--accent-soft);
  --radius-card: 12px;
  --radius-control: 8px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

/* Typical session length — one shared editable dropdown pill (value + "min" + chevron
   menu), used identically in the Client-facing profile and in Calendar settings so the
   field looks the same in both. Global so both modals render it the same way. */
.pf-dur { position: relative; display: inline-flex; align-items: center; width: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 0 4px 0 12px; }
.pf-dur:focus-within { border-color: var(--accent, #7A5EA8); box-shadow: 0 0 0 3px var(--accent-light); }
.pf-dur-input { field-sizing: content; width: 3.5ch; min-width: 3.5ch; text-align: center; border: none; outline: none; background: transparent; padding: 9px 0; font: 500 13px/1.5 'Inter', var(--font-web); color: var(--text); }
.pf-dur-input::placeholder { color: var(--text-soft); }
.pf-dur-unit { font: 400 13px/1.3 var(--font-web); color: var(--text-muted); margin: 0 2px 0 5px; flex-shrink: 0; }
.pf-dur-chev { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 30px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; flex-shrink: 0; }
.pf-dur-chev:hover { color: var(--accent, #7A5EA8); }
.pf-dur-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; background: var(--surface); border: 1px solid var(--border-card); border-radius: 10px; box-shadow: var(--shadow-modal, 0 12px 32px rgba(28,25,18,.16)); overflow: hidden; padding: 4px; }
.pf-dur-menu.up { top: auto; bottom: calc(100% + 4px); }
.pf-dur-opt { display: block; width: 100%; text-align: left; padding: 7px 10px; border: none; background: transparent; font: 500 13px/1.3 var(--font-web); color: var(--text); cursor: pointer; border-radius: 7px; }
.pf-dur-opt:hover { background: rgba(28,25,18,.05); }
.pf-dur-opt.on { background: var(--accent-bg); color: var(--text); font-weight: 600; }

.legacy-shell .shell-page {
  min-height: 100vh;
}

.legacy-shell .shell-frame {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.legacy-shell .shell-sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 28px 0 32px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.legacy-shell .sidebar-brand {
  padding: 0 20px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.legacy-shell .brand-mark {
  display: block;
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legacy-shell .brand-title {
  margin: 0;
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}

.legacy-shell .brand-copy {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.legacy-shell .sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 10px;
}

.legacy-shell .nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 7px;
}

.legacy-shell .nav-icon {
  opacity: 0.55;
  flex-shrink: 0;
}

.legacy-shell .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.legacy-shell .nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  padding-left: 10px;
  font-weight: 600;
}

.legacy-shell .nav-link.active .nav-icon {
  opacity: 1;
  color: var(--accent);
}

.legacy-shell .sidebar-footer {
  margin-top: auto;
  padding: 18px 20px 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
  border-top: 1px solid var(--border);
}

.legacy-shell .shell-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}

.legacy-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  min-height: 54px;
  padding: 10px 48px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.legacy-shell .topbar-spacer {
  min-height: 1px;
}

.legacy-shell .topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.legacy-shell .notification-button {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.legacy-shell .notification-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.legacy-shell .notification-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #7a5ea8;
  color: white;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg);
}

.legacy-shell .therapist-chip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
  border: 0;
}

.legacy-shell .content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 48px;
  display: grid;
  gap: 28px;
}

.legacy-shell .page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.legacy-shell .page-header h1 {
  margin: 0 0 8px;
  font-family: var(--font-heading), serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
}

.legacy-shell .page-header p {
  margin: 0;
  max-width: 760px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
}

.legacy-shell .hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.legacy-shell .button,
.legacy-shell .button-ghost,
.legacy-shell .button-subtle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-control);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.legacy-shell .button {
  background: var(--accent);
  color: white;
}

.legacy-shell .button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.legacy-shell .button-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.legacy-shell .button-ghost:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

.legacy-shell .button-subtle {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-muted);
}

.legacy-shell .button-subtle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.legacy-shell .grid {
  display: grid;
  gap: 20px;
}

.legacy-shell .grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legacy-shell .grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legacy-shell .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  display: grid;
  gap: 16px;
}

.legacy-shell .card.flat {
  padding: 0;
  background: transparent;
  border: 0;
}

.legacy-shell .card.toned {
  background: var(--surface-2);
}

.legacy-shell .card strong,
.legacy-shell .card h2,
.legacy-shell .card h3 {
  margin: 0;
}

.legacy-shell .card h2,
.legacy-shell .card h3 {
  font-family: var(--font-heading), serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.legacy-shell .card-copy {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.legacy-shell .kicker {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legacy-shell .section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.legacy-shell .subtle {
  color: var(--text-muted);
  font-size: 14px;
}

.legacy-shell .utility-row {
  display: grid;
  gap: 16px;
}

.legacy-shell .search-field {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.legacy-shell .search-field:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

.legacy-shell .search-icon {
  margin-right: 10px;
  color: var(--text-muted);
  font-size: 18px;
}

.legacy-shell .search-input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.legacy-shell .search-input::placeholder {
  color: var(--text-soft);
}

.legacy-shell .filters-sort-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.legacy-shell .filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.legacy-shell .filter-pill {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.legacy-shell .filter-pill.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.legacy-shell .sort-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legacy-shell .sort-label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.legacy-shell .sort-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  outline: none;
}

.legacy-shell .sort-select:hover,
.legacy-shell .sort-select:focus {
  border-color: var(--accent);
}

.legacy-shell .clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.legacy-shell .client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  transition: all 0.2s ease;
  display: grid;
  gap: 14px;
}

.legacy-shell .client-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.legacy-shell .client-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.legacy-shell .client-name {
  margin: 0;
  font-family: var(--font-heading), serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.legacy-shell .unread-badge {
  min-width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  padding: 0 7px;
}

.legacy-shell .card-state-row,
.legacy-shell .card-attention {
  margin: 0;
}

.legacy-shell .pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legacy-shell .pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
}

.legacy-shell .pill.state-new,
.legacy-shell .pill.status-pending,
.legacy-shell .pill.session-pending {
  background: var(--warning-soft);
  border-color: var(--warning);
  color: #8b5e2f;
}

.legacy-shell .pill.state-active,
.legacy-shell .pill.status-signed,
.legacy-shell .pill.session-scheduled {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #6a5a88;
}

.legacy-shell .pill.state-paused,
.legacy-shell .pill.session-closure {
  background: var(--surface-2);
  border-color: #b8adb9;
  color: var(--text-muted);
}

.legacy-shell .pill.state-ended,
.legacy-shell .pill.status-withdrawn,
.legacy-shell .pill.alert-blocked {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-muted);
}

.legacy-shell .attention-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--warning);
  background: var(--warning-soft);
  color: #8b5e2f;
}

.legacy-shell .attention-badge.blocked {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: #7a4854;
}

.legacy-shell .attention-badge.info {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #6a5a88;
}

.legacy-shell .card-operational {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.legacy-shell .card-operational strong {
  color: var(--text);
  font-weight: 600;
}

.legacy-shell .card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--surface-2);
}

.legacy-shell .card-action-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  text-align: center;
}

.legacy-shell .card-action-btn.primary {
  background: var(--accent);
  color: white;
}

.legacy-shell .card-action-btn.primary:hover {
  background: var(--accent-strong);
}

.legacy-shell .card-action-btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.legacy-shell .card-action-btn.secondary:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

.legacy-shell .card-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.legacy-shell .banner-stack {
  display: grid;
  gap: 12px;
}

.legacy-shell .banner {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface);
}

.legacy-shell .banner.warning {
  background: var(--warning-soft);
  border-color: var(--warning);
}

.legacy-shell .banner.blocked {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.legacy-shell .banner.info {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.legacy-shell .meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.legacy-shell .meta {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-control);
  background: var(--surface);
  border: 1px solid var(--border);
}

.legacy-shell .meta label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legacy-shell .workspace-header,
.legacy-shell .invite-layout {
  display: grid;
  gap: 20px;
}

.legacy-shell .choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.legacy-shell .choice-card {
  display: grid;
  gap: 10px;
  text-align: left;
  padding: 20px;
  background: #3a3a3a;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: #f4f2fb;
  transition: all 0.2s ease;
}

.legacy-shell .choice-card:hover {
  background: #444444;
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
}

.legacy-shell .choice-card.selected {
  background: #444444;
  border-color: var(--accent);
}

.legacy-shell .choice-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 700;
}

.legacy-shell .helper-panel {
  align-content: start;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.legacy-shell .field-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legacy-shell .invite-result-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--accent-soft);
}

.legacy-shell .invite-artifact {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(140, 122, 174, 0.25);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.legacy-shell .invite-artifact label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legacy-shell .invite-artifact code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.legacy-shell .workspace-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}

.legacy-shell .workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legacy-shell .tab {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.legacy-shell .tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.legacy-shell .input-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legacy-shell .field {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.legacy-shell .field.full {
  grid-column: 1 / -1;
}

.legacy-shell .field input,
.legacy-shell .field select,
.legacy-shell .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.legacy-shell .field input:focus,
.legacy-shell .field select:focus,
.legacy-shell .field textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

.legacy-shell .field textarea {
  min-height: 110px;
  resize: vertical;
}

.legacy-shell .field-hint {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.legacy-shell .modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(14, 17, 23, 0.62);
  backdrop-filter: blur(4px);
}

.legacy-shell .modal-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
}

.legacy-shell .modal-fullscreen {
  width: min(1240px, calc(100% - 48px));
  height: calc(100% - 48px);
  margin: 24px auto;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.legacy-shell .modal-header,
.legacy-shell .modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.legacy-shell .modal-footer {
  border-bottom: 0;
  border-top: 1px solid var(--border);
}

.legacy-shell .modal-header h2 {
  margin: 0;
  font-family: var(--font-heading), serif;
  font-size: 28px;
  font-weight: 600;
}

.legacy-shell .modal-body {
  overflow-y: auto;
  padding: 22px 24px 28px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.legacy-shell .compact-profile-card {
  gap: 14px;
}

.legacy-shell .profile-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legacy-shell .delivery-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.legacy-shell .assignment-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legacy-shell .subsection-stack {
  display: grid;
  gap: 12px;
}

.legacy-shell .section-title.compact {
  align-items: baseline;
}

.legacy-shell .section-title.compact h4 {
  margin: 0;
  font-family: var(--font-heading), serif;
  font-size: 18px;
  font-weight: 600;
}

.legacy-shell .delivery-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.legacy-shell .delivery-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.legacy-shell .delivery-card input[type="radio"] {
  margin: 0;
}

.legacy-shell .choice-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.legacy-shell .framework-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legacy-shell .framework-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.legacy-shell .extended-block {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.legacy-shell .extended-block h4 {
  margin: 0;
  font-family: var(--font-heading), serif;
  font-size: 18px;
  font-weight: 600;
}

.legacy-shell .extended-subblock {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-2);
}

.legacy-shell .condition-grid {
  display: grid;
  gap: 10px;
}

.legacy-shell .condition-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: center;
}

.legacy-shell .framework-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
}

.legacy-shell .steps {
  display: grid;
  gap: 14px;
}

.legacy-shell .step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface);
}

.legacy-shell .step-index {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.legacy-shell .card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legacy-shell .empty-note {
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.legacy-shell .empty-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.legacy-shell .empty-state-title {
  margin: 0 0 12px;
  font-family: var(--font-heading), serif;
  font-size: 24px;
  font-weight: 600;
}

.legacy-shell .empty-state-text {
  margin: 0 auto;
  max-width: 540px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .legacy-shell .workspace-grid,
.legacy-shell .choice-grid,
.legacy-shell .delivery-option-grid,
.legacy-shell .assignment-grid,
.legacy-shell .grid.two,
.legacy-shell .meta-grid,
.legacy-shell .input-grid {
    grid-template-columns: 1fr;
  }

  .legacy-shell .condition-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .legacy-shell .shell-frame {
    display: block;
  }

  .legacy-shell .shell-sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .legacy-shell .sidebar-nav {
    grid-auto-flow: row;
  }

  .legacy-shell .topbar,
.legacy-shell .content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .legacy-shell .page-header,
.legacy-shell .filters-sort-row,
.legacy-shell .client-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .legacy-shell .modal-fullscreen {
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    margin: 12px;
  }
}

@media (max-width: 720px) {
  .legacy-shell .content {
    padding: 24px 16px 32px;
  }

  .legacy-shell .topbar {
    padding: 16px;
  }

  .legacy-shell .clients-grid {
    grid-template-columns: 1fr;
  }

  .legacy-shell .modal-header,
.legacy-shell .modal-body,
.legacy-shell .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .legacy-shell .modal-header h2 {
    font-size: 22px;
  }
}

/* Therapist workspace visual refresh: option-b-v3 direction */
:root {
  --bg: #f4f0e8;
  --surface: #fdfaf5;
  --surface-2: #f5f1ea;
  --text: #1c1912;
  --text-muted: #65605a;
  --text-soft: #9e9890;
  --border: #ddd7cd;
  --border-card: #e6e0d6;
  --border-inner: #ede8e0;
  --accent: #6b5ca4;
  --accent-strong: #574990;
  --accent-soft: #eceaf6;
  --warning: #9a6a2e;
  --warning-soft: #f2e3ca;
  --danger: #944d5c;
  --danger-soft: #f0e0e4;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-focus: 0 0 0 3px rgba(107, 92, 164, 0.12);
  --radius-card: 12px;
  --radius-control: 8px;
}

body {
  font-family: var(--font-body), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
}

.legacy-shell .shell-sidebar {
  background: #eae5dc;
  border-right: 1px solid var(--border);
  width: 240px;
  padding: 28px 0 32px;
}

.legacy-shell .sidebar-brand {
  padding: 0 20px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.legacy-shell .brand-mark,
.legacy-shell .brand-copy {
  display: none;
}

.legacy-shell .brand-title {
  margin: 0;
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.legacy-shell .sidebar-nav {
  display: grid;
  gap: 1px;
  padding: 0 10px;
}

.legacy-shell .nav-link {
  border-left: 0;
  border-radius: 7px;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 500;
}

.legacy-shell .nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-left-color: transparent;
  padding-left: 10px;
  font-weight: 600;
}

.legacy-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
}

.legacy-shell .notification-button {
  background: var(--surface);
  border-color: var(--border);
}

.legacy-shell .notification-dot {
  background: var(--accent-strong);
  width: 18px;
  height: 18px;
  font-size: 10px;
}

.legacy-shell .therapist-chip {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border: 1px solid rgba(107, 92, 164, 0.16);
}

.legacy-shell .therapist-shell-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.legacy-shell .therapist-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legacy-shell .therapist-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.legacy-shell .therapist-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.legacy-shell .therapist-role {
  margin-top: 1px;
  font-size: 11px;
  color: var(--text-soft);
}

.legacy-shell .therapist-content {
  max-width: 1200px;
  width: 100%;
  padding: 44px 48px;
  gap: 28px;
  margin: 0 auto;
}

.legacy-shell .therapist-page-header {
  align-items: center;
}

.legacy-shell .page-header h1,
.legacy-shell .client-name,
.legacy-shell .card h2,
.legacy-shell .card h3 {
  font-family: var(--font-body), sans-serif;
}

.legacy-shell .page-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.3px;
  font-family: var(--font-body), sans-serif;
}

.legacy-shell .page-header p {
  margin-top: 8px;
  max-width: 760px;
}

.legacy-shell .clients-add-button,
.legacy-shell .button {
  min-height: 38px;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.legacy-shell .clients-utility-row {
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.legacy-shell .clients-search-field,
.legacy-shell .sort-select,
.legacy-shell .filter-pill {
  background: var(--surface);
}

.legacy-shell .clients-search-field {
  width: 248px;
  padding: 8px 13px;
  border-radius: 8px;
  gap: 8px;
  transition: border-color 0.12s, box-shadow 0.12s;
  flex-shrink: 0;
}

.legacy-shell .clients-search-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.legacy-shell .clients-search-field .search-icon {
  margin-right: 0;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.legacy-shell .filters-sort-row.clients-filters-row {
  flex: 1;
  flex-wrap: wrap;
  gap: 12px;
  width: auto;
  align-items: center;
}

.legacy-shell .filter-pills {
  gap: 6px;
}

.legacy-shell .filter-pill {
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  border-color: var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: transparent;
}

.legacy-shell .filter-pill.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.legacy-shell .sort-control {
  margin-left: auto;
  gap: 8px;
  flex-shrink: 0;
}

.legacy-shell .sort-label {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.legacy-shell .clients-search-field .search-input {
  font-size: 13px;
}

.legacy-shell .clients-search-field .search-input::placeholder {
  color: var(--text-soft);
}

.legacy-shell .sort-select {
  padding: 7px 26px 7px 11px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239E9890' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.legacy-shell .clients-grid-refined {
  grid-template-columns: repeat(auto-fill, minmax(296px, 1fr));
  gap: 14px;
}

.legacy-shell .client-card-refined {
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 0;
  gap: 0;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: var(--surface);
}

.legacy-shell .client-card-refined.card-invited {
  border-left: 3px solid rgba(194, 97, 15, 0.22);
}

.legacy-shell .client-card-refined.card-paused {
  border-left: 3px solid rgba(0, 0, 0, 0.09);
}

.legacy-shell .client-card-refined:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.legacy-shell .client-card-header-refined {
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 18px 0;
}

.legacy-shell .client-card-ident {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
  flex: 1;
}

.legacy-shell .client-avatar-refined {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: #e8e4f0;
  color: var(--accent-strong);
  border-color: rgba(103, 91, 160, 0.14);
  border: 1px solid rgba(103, 91, 160, 0.14);
  margin-top: 2px;
}

.legacy-shell .client-identity-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 20px;
  flex: 1;
}

.legacy-shell .client-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.legacy-shell .client-name-refined {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.legacy-shell .client-warning-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  cursor: default;
}

.legacy-shell .client-pending-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  background: var(--pending-bg);
  border: 1.5px solid rgba(194, 97, 15, 0.3);
  color: var(--pending);
  line-height: 1;
  user-select: none;
}

.legacy-shell .client-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: -4px;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: var(--shadow-tooltip);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
  z-index: 100;
}

.legacy-shell .client-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 7px;
  border: 5px solid transparent;
  border-bottom-color: var(--border);
}

.legacy-shell .client-tooltip::after {
  content: "";
  position: absolute;
  bottom: calc(100% - 1px);
  right: 7px;
  border: 5px solid transparent;
  border-bottom-color: var(--surface);
}

.legacy-shell .client-warning-icon:hover .client-tooltip {
  opacity: 1;
  transition-delay: 0.15s;
}

.legacy-shell .client-meta-stack {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.legacy-shell .client-state-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  width: fit-content;
  white-space: nowrap;
}

.legacy-shell .client-state-chip.state-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(107, 92, 164, 0.16);
}

.legacy-shell .client-state-chip.state-new {
  background: var(--pending-bg);
  color: var(--pending);
  border-color: rgba(194, 97, 15, 0.2);
}

.legacy-shell .client-state-chip.state-paused,
.legacy-shell .client-state-chip.state-ended {
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--border-inner);
}

.legacy-shell .client-meta-separator {
  color: var(--border-card);
  font-size: 13px;
  line-height: 1;
}

.legacy-shell .client-relationship-meta {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.3;
  font-weight: 500;
}

.legacy-shell .unread-badge-refined {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
}

.legacy-shell .card-operational-refined {
  padding: 0;
  border: 0;
  font-size: 13px;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 7px;
}

.legacy-shell .session-icon-refined {
  color: var(--text-soft);
  flex-shrink: 0;
}

.legacy-shell .session-line-primary {
  color: var(--text);
  font-weight: 500;
}

.legacy-shell .session-line-empty {
  color: var(--text-soft);
  font-style: italic;
  font-weight: 400;
}

.legacy-shell .card-actions-refined {
  padding: 12px 18px;
  border-top: 1px solid var(--border-inner);
  background: rgba(245, 241, 234, 0.4);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  gap: 8px;
}

.legacy-shell .card-action-btn {
  border-radius: 8px;
  min-height: 40px;
  font-size: 13px;
}

.legacy-shell .card-action-btn.primary {
  background: var(--accent);
  flex: 1 1 auto;
  min-width: 0;
  padding-inline: 16px;
}

.legacy-shell .card-action-btn.secondary {
  border: 1px solid var(--border);
  white-space: nowrap;
  color: var(--text-muted);
  background: transparent;
  padding-inline: 14px;
  flex: 0 0 auto;
}

.legacy-shell .card-action-btn.secondary:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .legacy-shell .shell-sidebar {
    width: 220px;
  }

  .legacy-shell .therapist-content {
    padding: 24px;
  }

  .legacy-shell .clients-grid-refined {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════
   Add Client stepped modal  (ac- prefix)
══════════════════════════════════════════════ */

/* Override modal grid to accommodate step indicator row */
.legacy-shell .ac-modal {
  grid-template-rows: auto auto 1fr auto;
}

/* ── Header ── */
.legacy-shell .ac-modal-header {
  align-items: flex-start;
}

.legacy-shell .ac-header-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.legacy-shell .ac-modal-title {
  margin: 0;
  font-family: var(--font-body), -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.25px;
  color: var(--text);
}

.legacy-shell .ac-modal-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.55;
}

.legacy-shell .ac-close-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 13px;
  font-size: 13px;
  flex-shrink: 0;
}

/* ── Step indicator track ── */
.legacy-shell .ac-step-track {
  display: flex;
  align-items: center;
  padding: 11px 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  gap: 0;
  background: var(--surface);
}

.legacy-shell .ac-step-item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.legacy-shell .ac-step-connector {
  width: 24px;
  height: 1px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.legacy-shell .ac-step-connector.filled {
  background: var(--accent);
}

.legacy-shell .ac-step-node {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  flex-shrink: 0;
  margin-right: 6px;
  transition: all 0.15s;
}

.legacy-shell .ac-step-node.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.legacy-shell .ac-step-node.done {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.legacy-shell .ac-step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
}

.legacy-shell .ac-step-label.active {
  color: var(--accent);
  font-weight: 600;
}

.legacy-shell .ac-step-label.done {
  color: var(--text-muted);
}

/* ── Modal body ── */
.legacy-shell .ac-modal-body {
  padding: 24px 28px 28px;
}

/* ── Step body wrapper ── */
.legacy-shell .ac-step-body {
  display: grid;
  gap: 16px;
  max-width: 820px;
}

/* ── Path selection cards ── */
.legacy-shell .ac-choice-grid {
  max-width: 760px;
}

.legacy-shell .ac-choice-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.legacy-shell .ac-choice-title {
  font-size: 15px;
  font-weight: 600;
  color: #f0edfb;
  line-height: 1.35;
}

.legacy-shell .ac-choose-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 16px;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(103, 91, 160, 0.45);
  background: rgba(103, 91, 160, 0.22);
  color: #cac4f0;
  cursor: pointer;
  transition: all 0.15s;
  width: fit-content;
}

.legacy-shell .ac-choose-btn:hover {
  background: rgba(103, 91, 160, 0.42);
  border-color: var(--accent);
  color: white;
}

.legacy-shell .choice-card.selected .ac-choose-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ── Profile card ── */
.legacy-shell .ac-profile-card {
  padding: 22px;
}

.legacy-shell .ac-optional {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.legacy-shell .ac-helper-note {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.45;
}

/* ── Availability grid ── */
.legacy-shell .ac-warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: var(--radius-control);
  color: #7a4854;
  font-size: 13px;
  line-height: 1.5;
}

.legacy-shell .ac-warning-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--danger);
}

.legacy-shell .ac-avail-card {
  padding: 20px;
  overflow-x: auto;
}

.legacy-shell .ac-avail-grid {
  display: grid;
  grid-template-columns: 82px repeat(7, 1fr);
  gap: 4px;
  min-width: 480px;
}

.legacy-shell .ac-avail-corner {
  /* top-left placeholder */
}

.legacy-shell .ac-avail-day-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: 2px 0 8px;
  letter-spacing: 0.04em;
}

.legacy-shell .ac-avail-time-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  padding-right: 6px;
}

.legacy-shell .ac-avail-slot {
  height: 42px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.legacy-shell .ac-avail-slot:hover {
  background: var(--accent-soft);
  border-color: rgba(107, 92, 164, 0.35);
}

.legacy-shell .ac-avail-slot.available {
  background: var(--accent-soft);
  border-color: rgba(107, 92, 164, 0.5);
}

.legacy-shell .ac-avail-slot.available:hover {
  background: rgba(107, 92, 164, 0.22);
  border-color: var(--accent);
}

.legacy-shell .ac-avail-summary {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.legacy-shell .ac-avail-summary.zero {
  color: var(--danger);
}

/* ── Invite delivery sub-section ── */
.legacy-shell .ac-delivery-sub {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface-2);
}

.legacy-shell .ac-delivery-sub-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* ── Summary card ── */
.legacy-shell .ac-summary-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow-card);
  max-width: 560px;
}

.legacy-shell .ac-summary-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.legacy-shell .ac-summary-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e8e4f0;
  border: 1px solid rgba(103, 91, 160, 0.14);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.legacy-shell .ac-summary-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.legacy-shell .ac-summary-meta {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.legacy-shell .ac-summary-rows {
  display: grid;
  gap: 0;
  border: 1px solid var(--border-inner);
  border-radius: 8px;
  overflow: hidden;
}

.legacy-shell .ac-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  border-bottom: 1px solid var(--border-inner);
  font-size: 13px;
}

.legacy-shell .ac-summary-row:last-child {
  border-bottom: none;
}

.legacy-shell .ac-summary-label {
  color: var(--text-soft);
  font-weight: 500;
}

.legacy-shell .ac-summary-value {
  color: var(--text);
  font-weight: 500;
}

/* ── Submit button ── */
.legacy-shell .ac-submit-btn {
  min-width: 200px;
}

/* ── Success state ── */
.legacy-shell .ac-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 20px 24px;
  text-align: center;
}

.legacy-shell .ac-success-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--success-soft, #e6f0ea);
  border: 1px solid var(--success, #6e8b7b);
  color: var(--success, #6e8b7b);
  display: flex;
  align-items: center;
  justify-content: center;
}

.legacy-shell .ac-success-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-body), sans-serif;
}

.legacy-shell .ac-invite-result {
  width: 100%;
  max-width: 520px;
  text-align: left;
}

.legacy-shell .ac-success-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .legacy-shell .ac-step-track {
    padding: 10px 16px;
    gap: 0;
  }

  .legacy-shell .ac-step-label {
    display: none;
  }

  .legacy-shell .ac-step-node {
    margin-right: 0;
  }

  .legacy-shell .ac-step-connector {
    width: 16px;
  }

  .legacy-shell .ac-modal-body {
    padding: 16px 16px 20px;
  }

  .legacy-shell .ac-summary-card {
    max-width: 100%;
  }

  .legacy-shell .assignment-grid {
    grid-template-columns: 1fr;
  }
}

/* Literal F2 shell and My Clients surface */
.legacy-shell .shell {
  display: flex;
  min-height: 100vh;
}

.legacy-shell .sidebar {
  width: var(--tw-sidebar-width);
  background: var(--tw-sidebar-bg);
  border-right: 1px solid var(--tw-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 28px 0 32px;
}

.legacy-shell .brand {
  padding: 0 20px 22px;
  border-bottom: 1px solid var(--tw-border);
  margin-bottom: 14px;
}

.legacy-shell .brand-name,
.legacy-shell .brand-title {
  font-family: var(--tw-font-ui);
  font-size: var(--tw-type-brand);
  font-weight: var(--tw-weight-semibold);
  letter-spacing: -0.2px;
}

.legacy-shell .nav {
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.legacy-shell .nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  font-family: var(--tw-font-ui);
  font-size: var(--tw-type-nav);
  font-weight: var(--tw-weight-medium);
  color: var(--tw-text-muted);
  border-radius: var(--tw-radius-inner);
  transition:
    background var(--tw-motion-fast),
    color var(--tw-motion-fast);
}

.legacy-shell .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--tw-text);
}

.legacy-shell .nav-link.active {
  background: var(--tw-accent-bg);
  color: var(--tw-accent);
  font-weight: var(--tw-weight-semibold);
}

.legacy-shell .nav-icon {
  opacity: 0.55;
}

.legacy-shell .nav-link.active .nav-icon {
  opacity: 1;
  color: var(--tw-accent);
}

.legacy-shell .sidebar-footer {
  margin-top: auto;
  padding: 18px 20px 0;
  border-top: 1px solid var(--tw-border);
}

.legacy-shell .therapist-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legacy-shell .therapist-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tw-accent);
  color: white;
  font-size: 11px;
  font-weight: var(--tw-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.legacy-shell .therapist-name {
  font-size: 13px;
  font-weight: var(--tw-weight-semibold);
}

.legacy-shell .therapist-role {
  font-size: var(--tw-type-role);
  color: var(--tw-text-soft);
  margin-top: 1px;
}

.legacy-shell .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.legacy-shell .topbar {
  height: var(--tw-topbar-height);
  min-height: var(--tw-topbar-height);
  background: var(--tw-bg);
  border-bottom: 1px solid var(--tw-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 48px;
  gap: 10px;
  flex-shrink: 0;
}

.legacy-shell .topbar-btn,
.legacy-shell .notification-button {
  position: relative;
  width: 32px;
  height: 32px;
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius-inner);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tw-text-muted);
  transition:
    border-color var(--tw-motion-fast),
    color var(--tw-motion-fast);
}

.legacy-shell .topbar-btn:hover,
.legacy-shell .notification-button:hover {
  border-color: var(--tw-accent);
  color: var(--tw-accent);
}

.legacy-shell .notif-dot,
.legacy-shell .notification-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--tw-notif);
  color: white;
  font-size: 8px;
  font-weight: var(--tw-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--tw-bg);
}

.legacy-shell .topbar-avatar,
.legacy-shell .therapist-chip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tw-accent);
  color: white;
  font-size: 11px;
  font-weight: var(--tw-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.legacy-shell .content {
  padding: var(--tw-content-pad-y) var(--tw-content-pad-x);
  max-width: var(--tw-content-max);
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.legacy-shell .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legacy-shell .page-title,
.legacy-shell .page-header h1 {
  font-family: var(--tw-font-ui);
  font-size: var(--tw-type-page-title);
  font-weight: var(--tw-weight-semibold);
  letter-spacing: -0.3px;
  margin: 0;
}

.legacy-shell .btn-add,
.legacy-shell .clients-add-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--tw-radius-btn);
  background: var(--tw-accent);
  color: white;
  font-size: var(--tw-type-button);
  font-weight: var(--tw-weight-semibold);
  border: none;
  transition: background var(--tw-motion-fast);
}

.legacy-shell .btn-add:hover,
.legacy-shell .clients-add-button:hover {
  background: var(--tw-accent-strong);
}

.legacy-shell .utility-bar,
.legacy-shell .clients-utility-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.legacy-shell .search-wrap,
.legacy-shell .clients-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--tw-surface);
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius-btn);
  padding: 8px 13px;
  width: var(--tw-search-width);
  transition:
    border-color var(--tw-motion-fast),
    box-shadow var(--tw-motion-fast);
}

.legacy-shell .search-wrap:focus-within,
.legacy-shell .clients-search-field:focus-within {
  border-color: var(--tw-accent);
  box-shadow: 0 0 0 3px var(--tw-accent-bg);
}

.legacy-shell .search-wrap input,
.legacy-shell .clients-search-field input,
.legacy-shell .search-input {
  border: none;
  background: transparent;
  font-family: var(--tw-font-ui);
  font-size: 13px;
  outline: none;
  flex: 1;
  color: var(--tw-text);
}

.legacy-shell .search-wrap input::placeholder,
.legacy-shell .clients-search-field input::placeholder,
.legacy-shell .search-input::placeholder {
  color: var(--tw-text-soft);
}

.legacy-shell .pills,
.legacy-shell .filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.legacy-shell .pill,
.legacy-shell .filter-pill {
  padding: 6px 13px;
  border-radius: var(--tw-radius-pill);
  font-family: var(--tw-font-ui);
  font-size: 13px;
  font-weight: var(--tw-weight-medium);
  border: 1px solid var(--tw-border);
  color: var(--tw-text-muted);
  background: transparent;
  cursor: pointer;
  transition:
    border-color var(--tw-motion-fast),
    color var(--tw-motion-fast),
    background var(--tw-motion-fast);
}

.legacy-shell .pill:hover,
.legacy-shell .filter-pill:hover {
  border-color: var(--tw-accent);
  color: var(--tw-accent);
}

.legacy-shell .pill.on,
.legacy-shell .filter-pill.selected {
  background: var(--tw-accent);
  border-color: var(--tw-accent);
  color: white;
  font-weight: var(--tw-weight-semibold);
}

.legacy-shell .sort-wrap,
.legacy-shell .sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.legacy-shell .sort-label {
  font-size: 13px;
  color: var(--tw-text-soft);
}

.legacy-shell .sort-select {
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius-btn);
  padding: 7px 26px 7px 11px;
  font-family: var(--tw-font-ui);
  font-size: 13px;
  font-weight: var(--tw-weight-medium);
  color: var(--tw-text);
  background: var(--tw-surface);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239E9890' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.legacy-shell .card-grid,
.legacy-shell .clients-grid-refined {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--tw-card-min), 1fr));
  gap: 14px;
}

.legacy-shell .client-card {
  background: var(--tw-surface);
  border: 1px solid var(--tw-border-card);
  border-radius: var(--tw-radius-card);
  display: flex;
  flex-direction: column;
  box-shadow: var(--tw-shadow-card);
  transition:
    box-shadow 180ms,
    transform 180ms,
    border-color 180ms;
}

.legacy-shell .client-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tw-shadow-hover);
  border-color: var(--tw-border);
}

.legacy-shell .client-card.card-invited {
  border-left: 3px solid rgba(194, 97, 15, 0.22);
}

.legacy-shell .client-card.card-paused {
  border-left: 3px solid rgba(0, 0, 0, 0.09);
}

.legacy-shell .card-head {
  padding: 20px 18px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.legacy-shell .card-ident {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  flex: 1;
  min-width: 0;
}

.legacy-shell .card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: var(--tw-weight-bold);
  flex-shrink: 0;
  background: #e8e4f0;
  color: var(--tw-accent-strong);
  border: 1px solid rgba(103, 91, 160, 0.14);
  margin-top: 2px;
}

.legacy-shell .card-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding-bottom: 20px;
}

.legacy-shell .name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.legacy-shell .card-name {
  font-family: var(--tw-font-ui);
  font-size: var(--tw-type-card-title);
  font-weight: var(--tw-weight-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  line-height: 1.3;
}


.legacy-shell .tooltip-text {
  position: absolute;
  top: calc(100% + 8px);
  right: -4px;
  white-space: nowrap;
  background: var(--tw-surface);
  border: 1px solid var(--tw-border);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: var(--tw-weight-medium);
  color: var(--tw-text-muted);
  box-shadow: var(--tw-shadow-tooltip);
  pointer-events: none;
  opacity: 0;
  transition: opacity 100ms ease;
  z-index: 100;
}

.legacy-shell .tooltip-text::before {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 8px;
  border: 5px solid transparent;
  border-bottom-color: var(--tw-border);
}

.legacy-shell .tooltip-text::after {
  content: "";
  position: absolute;
  bottom: calc(100% - 1px);
  right: 8px;
  border: 5px solid transparent;
  border-bottom-color: var(--tw-surface);
}


.legacy-shell .alert-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--tw-notif);
  color: white;
  font-size: 10px;
  font-weight: var(--tw-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}

.legacy-shell .sub-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 18px;
}

.legacy-shell .state-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--tw-radius-chip);
  font-family: var(--tw-font-ui);
  font-size: var(--tw-type-chip);
  font-weight: var(--tw-weight-semibold);
  border: 1px solid transparent;
  white-space: nowrap;
}

.legacy-shell .st-active {
  background: #D7E5E2;
  color: #3E6560;
  border-color: rgba(62, 101, 96, 0.18);
}

/* Invited (client action pending) = indigo; Not invited (therapist action
   pending) = amber. Distinct so the two "new" states read apart at a glance. */
.legacy-shell .st-invited {
  background: #DCDDED;
  color: #4A4F84;
  border-color: rgba(74, 79, 132, 0.18);
}

.legacy-shell .st-notinvited {
  background: var(--tw-pending-bg);
  color: var(--tw-pending);
  border-color: rgba(194, 97, 15, 0.2);
}

.legacy-shell .st-paused {
  background: var(--tw-surface-2);
  color: var(--tw-text-muted);
  border-color: var(--tw-border-inner);
}

.legacy-shell .sub-sep {
  color: var(--tw-border-card);
  font-size: 13px;
}

.legacy-shell .modality-text {
  font-family: var(--tw-font-ui);
  font-size: var(--tw-type-meta);
  font-weight: var(--tw-weight-medium);
  color: var(--tw-text-soft);
}

.legacy-shell .session-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legacy-shell .sess-icon {
  color: var(--tw-text-soft);
  flex-shrink: 0;
}

.legacy-shell .sess-text {
  font-family: var(--tw-font-ui);
  font-size: var(--tw-type-session);
  font-weight: var(--tw-weight-medium);
  color: var(--tw-text);
}

.legacy-shell .sess-text.empty {
  color: var(--tw-text-soft);
  font-style: italic;
  font-weight: var(--tw-weight-regular);
}

.legacy-shell .card-foot {
  padding: 12px 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(245, 241, 234, 0.4);
  border-top: 1px solid var(--tw-border-inner);
  border-radius: 0 0 var(--tw-radius-card) var(--tw-radius-card);
}

.legacy-shell .btn-primary {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--tw-radius-btn);
  background: var(--tw-accent);
  color: white;
  font-family: var(--tw-font-ui);
  font-size: var(--tw-type-button);
  font-weight: var(--tw-weight-semibold);
  border: none;
  transition: background var(--tw-motion-fast);
  text-align: center;
}

.legacy-shell .btn-primary:hover {
  background: var(--tw-accent-strong);
}

.legacy-shell .btn-msg {
  padding: 8px 14px;
  border-radius: var(--tw-radius-btn);
  background: transparent;
  color: var(--tw-text-muted);
  font-family: var(--tw-font-ui);
  font-size: var(--tw-type-button);
  font-weight: var(--tw-weight-medium);
  border: 1px solid var(--tw-border);
  transition:
    border-color var(--tw-motion-fast),
    color var(--tw-motion-fast);
  white-space: nowrap;
}

.legacy-shell .btn-msg:hover {
  border-color: var(--tw-accent);
  color: var(--tw-accent);
}

.legacy-shell .btn-msg-wrap {
  position: relative;
  display: inline-flex;
  cursor: not-allowed;
}

.legacy-shell .btn-msg-wrap .btn-msg[disabled] {
  opacity: 0.38;
  pointer-events: none;
}

.legacy-shell .btn-msg-wrap .tooltip-text {
  top: auto;
  bottom: calc(100% + 8px);
  right: 50%;
  transform: translateX(50%);
  text-align: center;
  max-width: 200px;
  white-space: normal;
  line-height: 1.4;
}

.legacy-shell .btn-msg-wrap .tooltip-text::before {
  top: 100%;
  bottom: auto;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: transparent;
  border-top-color: var(--tw-border);
}

.legacy-shell .btn-msg-wrap .tooltip-text::after {
  top: calc(100% - 1px);
  bottom: auto;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: transparent;
  border-top-color: var(--tw-surface);
}

.legacy-shell .btn-msg-wrap:hover .tooltip-text {
  opacity: 1;
  transition-delay: 150ms;
}

@media (max-width: 920px) {
  .legacy-shell .content,
.legacy-shell .therapist-content {
    padding: 24px;
  }

  .legacy-shell .card-grid,
.legacy-shell .clients-grid-refined {
    grid-template-columns: 1fr;
  }
}

/* Scoped literal F2 surface for /clients */
.legacy-shell .shell-f2 .shell-frame {
  display: flex;
  min-height: 100vh;
  background: var(--tw-bg);
}

.legacy-shell .shell-f2 .sidebar {
  width: 240px;
  background: var(--tw-sidebar-bg);
  border-right: 1px solid var(--tw-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 28px 0 32px;
}

.legacy-shell .shell-f2 .brand {
  padding: 0 20px 22px;
  border-bottom: 1px solid var(--tw-border);
  margin-bottom: 14px;
}

.legacy-shell .shell-f2 .brand-name,
.legacy-shell .shell-f2 .brand-title {
  font-family: var(--tw-font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.legacy-shell .shell-f2 .nav {
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.legacy-shell .shell-f2 .nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--tw-text-muted);
  border-radius: var(--tw-radius-inner);
  transition: background 120ms, color 120ms;
}

.legacy-shell .shell-f2 .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--tw-text);
}

.legacy-shell .shell-f2 .nav-link.active {
  background: var(--tw-accent-bg);
  color: var(--tw-accent);
  font-weight: 600;
}

.legacy-shell .shell-f2 .nav-icon {
  opacity: 0.55;
}

.legacy-shell .shell-f2 .nav-link.active .nav-icon {
  opacity: 1;
  color: var(--tw-accent);
}

.legacy-shell .shell-f2 .sidebar-footer {
  margin-top: auto;
  padding: 18px 20px 0;
  border-top: 1px solid var(--tw-border);
}

.legacy-shell .shell-f2 .therapist-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legacy-shell .shell-f2 .therapist-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tw-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legacy-shell .shell-f2 .therapist-name {
  font-size: 13px;
  font-weight: 600;
}

.legacy-shell .shell-f2 .therapist-role {
  font-size: 11px;
  color: var(--tw-text-soft);
  margin-top: 1px;
}

.legacy-shell .shell-f2 .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.legacy-shell .shell-f2 .topbar {
  height: 54px;
  background: var(--tw-bg);
  border-bottom: 1px solid var(--tw-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 48px;
  gap: 10px;
  flex-shrink: 0;
}

.legacy-shell .shell-f2 .topbar-btn,
.legacy-shell .shell-f2 .notification-button {
  position: relative;
  width: 32px;
  height: 32px;
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius-inner);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tw-text-muted);
  transition: border-color 120ms, color 120ms;
}

.legacy-shell .shell-f2 .topbar-btn:hover,
.legacy-shell .shell-f2 .notification-button:hover {
  border-color: var(--tw-accent);
  color: var(--tw-accent);
}

.legacy-shell .shell-f2 .notif-dot,
.legacy-shell .shell-f2 .notification-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--tw-notif);
  color: white;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--tw-bg);
}

.legacy-shell .shell-f2 .topbar-avatar,
.legacy-shell .shell-f2 .therapist-chip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tw-accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legacy-shell .shell-f2 .content-f2 {
  padding: 44px 48px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.legacy-shell .shell-f2 .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legacy-shell .shell-f2 .page-title,
.legacy-shell .shell-f2 .page-header h1 {
  font-family: var(--tw-font-ui);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
}

.legacy-shell .shell-f2 .btn-add,
.legacy-shell .shell-f2 .clients-add-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--tw-radius-btn);
  background: var(--tw-accent);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: background 120ms;
}

.legacy-shell .shell-f2 .btn-add:hover,
.legacy-shell .shell-f2 .clients-add-button:hover {
  background: var(--tw-accent-strong);
}

.legacy-shell .shell-f2 .utility-bar,
.legacy-shell .shell-f2 .clients-utility-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.legacy-shell .shell-f2 .search-wrap,
.legacy-shell .shell-f2 .clients-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--tw-surface);
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius-btn);
  padding: 8px 13px;
  width: 248px;
  flex: 0 0 248px;
  transition: border-color 120ms, box-shadow 120ms;
}

.legacy-shell .shell-f2 .search-wrap:focus-within,
.legacy-shell .shell-f2 .clients-search-field:focus-within {
  border-color: var(--tw-accent);
  box-shadow: 0 0 0 3px var(--tw-accent-bg);
}

.legacy-shell .shell-f2 .search-input {
  border: none;
  background: transparent;
  font-family: var(--tw-font-ui);
  font-size: 13px;
  outline: none;
  flex: 1;
  color: var(--tw-text);
}

.legacy-shell .shell-f2 .search-input::placeholder {
  color: var(--tw-text-soft);
}

.legacy-shell .shell-f2 .pills,
.legacy-shell .shell-f2 .filter-pills {
  display: flex;
  gap: 6px;
}

.legacy-shell .shell-f2 .pill,
.legacy-shell .shell-f2 .filter-pill {
  padding: 6px 13px;
  border-radius: var(--tw-radius-pill);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--tw-border);
  color: var(--tw-text-muted);
  background: transparent;
  transition: border-color 120ms, color 120ms, background 120ms;
}

.legacy-shell .shell-f2 .pill:hover,
.legacy-shell .shell-f2 .filter-pill:hover {
  border-color: var(--tw-accent);
  color: var(--tw-accent);
}

.legacy-shell .shell-f2 .pill.on,
.legacy-shell .shell-f2 .filter-pill.selected {
  background: var(--tw-accent);
  border-color: var(--tw-accent);
  color: white;
  font-weight: 600;
}

.legacy-shell .shell-f2 .sort-wrap,
.legacy-shell .shell-f2 .sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.legacy-shell .shell-f2 .sort-label {
  font-size: 13px;
  color: var(--tw-text-soft);
}

.legacy-shell .shell-f2 .sort-select {
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-radius-btn);
  padding: 7px 26px 7px 11px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tw-text);
  background: var(--tw-surface);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239E9890' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.legacy-shell .shell-f2 .card-grid.clients-grid-refined {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(296px, 1fr));
  gap: 14px;
}

.legacy-shell .shell-f2 .client-card {
  background: var(--tw-surface);
  border: 1px solid var(--tw-border-card);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--tw-shadow-card);
  transition: box-shadow 180ms, transform 180ms, border-color 180ms;
}

.legacy-shell .shell-f2 .client-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tw-shadow-hover);
  border-color: var(--tw-border);
}

.legacy-shell .shell-f2 .client-card.card-invited {
  border-left: 3px solid rgba(194, 97, 15, 0.22);
}

.legacy-shell .shell-f2 .client-card.card-paused {
  border-left: 3px solid rgba(0, 0, 0, 0.09);
}

.legacy-shell .shell-f2 .card-head {
  padding: 20px 18px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.legacy-shell .shell-f2 .card-ident {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  flex: 1;
  min-width: 0;
}

.legacy-shell .shell-f2 .card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: #e8e4f0;
  color: var(--tw-accent-strong);
  border: 1px solid rgba(103, 91, 160, 0.14);
  margin-top: 2px;
}

.legacy-shell .shell-f2 .card-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding-bottom: 20px;
}

.legacy-shell .shell-f2 .name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.legacy-shell .shell-f2 .card-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  line-height: 1.3;
}


.legacy-shell .shell-f2 .tooltip-text {
  position: absolute;
  top: calc(100% + 8px);
  right: -4px;
  white-space: nowrap;
  background: var(--tw-surface);
  border: 1px solid var(--tw-border);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tw-text-muted);
  box-shadow: var(--tw-shadow-tooltip);
  pointer-events: none;
  opacity: 0;
  transition: opacity 100ms ease;
  z-index: 100;
}

.legacy-shell .shell-f2 .tooltip-text::before {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 8px;
  border: 5px solid transparent;
  border-bottom-color: var(--tw-border);
}

.legacy-shell .shell-f2 .tooltip-text::after {
  content: "";
  position: absolute;
  bottom: calc(100% - 1px);
  right: 8px;
  border: 5px solid transparent;
  border-bottom-color: var(--tw-surface);
}

.legacy-shell .shell-f2 .btn-msg-wrap:hover .tooltip-text {
  opacity: 1;
  transition-delay: 150ms;
}

.legacy-shell .shell-f2 .alert-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--tw-notif);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}

.legacy-shell .shell-f2 .sub-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 18px;
}

.legacy-shell .shell-f2 .state-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--tw-radius-chip);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.legacy-shell .shell-f2 .st-active {
  background: #D7E5E2;
  color: #3E6560;
  border-color: rgba(62, 101, 96, 0.18);
}

.legacy-shell .shell-f2 .st-invited {
  background: #DCDDED;
  color: #4A4F84;
  border-color: rgba(74, 79, 132, 0.18);
}

.legacy-shell .shell-f2 .st-notinvited {
  background: var(--tw-pending-bg);
  color: var(--tw-pending);
  border-color: rgba(194, 97, 15, 0.2);
}

.legacy-shell .shell-f2 .st-paused {
  background: var(--tw-surface-2);
  color: var(--tw-text-muted);
  border-color: var(--tw-border-inner);
}

.legacy-shell .shell-f2 .sub-sep {
  color: var(--tw-border-card);
  font-size: 13px;
}

.legacy-shell .shell-f2 .modality-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--tw-text-soft);
}

.legacy-shell .shell-f2 .session-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legacy-shell .shell-f2 .sess-icon {
  color: var(--tw-text-soft);
  flex-shrink: 0;
}

.legacy-shell .shell-f2 .sess-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--tw-text);
}

.legacy-shell .shell-f2 .sess-text.empty {
  color: var(--tw-text-soft);
  font-style: italic;
  font-weight: 400;
}

.legacy-shell .shell-f2 .card-foot {
  padding: 12px 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(245, 241, 234, 0.4);
  border-top: 1px solid var(--tw-border-inner);
  border-radius: 0 0 12px 12px;
}

.legacy-shell .shell-f2 .btn-primary {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--tw-radius-btn);
  background: var(--tw-accent);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border: none;
  text-align: center;
}

.legacy-shell .shell-f2 .btn-msg {
  padding: 8px 14px;
  border-radius: var(--tw-radius-btn);
  background: transparent;
  color: var(--tw-text-muted);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--tw-border);
  white-space: nowrap;
}

.legacy-shell .shell-f2 .btn-msg-wrap {
  position: relative;
  display: inline-flex;
  cursor: not-allowed;
}

.legacy-shell .shell-f2 .btn-msg-wrap .btn-msg[disabled] {
  opacity: 0.38;
  pointer-events: none;
}

.legacy-shell .shell-f2 .btn-msg-wrap .tooltip-text {
  top: auto;
  bottom: calc(100% + 8px);
  right: 50%;
  transform: translateX(50%);
  text-align: center;
  max-width: 200px;
  white-space: normal;
  line-height: 1.4;
}

.legacy-shell .shell-f2 .btn-msg-wrap .tooltip-text::before {
  top: 100%;
  bottom: auto;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: transparent;
  border-top-color: var(--tw-border);
}

.legacy-shell .shell-f2 .btn-msg-wrap .tooltip-text::after {
  top: calc(100% - 1px);
  bottom: auto;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: transparent;
  border-top-color: var(--tw-surface);
}

@media (max-width: 920px) {
  .legacy-shell .shell-f2 .content-f2 {
    padding: 24px;
  }

  .legacy-shell .shell-f2 .card-grid.clients-grid-refined {
    grid-template-columns: 1fr;
  }
}
