/* SERHILL desktop Trainer Workspace. Desktop only by contract; mobile remains on the existing app shell. */
@media (min-width: 783px) {
  html:has(body.serhill-desktop-workspace-active),
  body.serhill-desktop-workspace-active {
    height: 100%;
    overflow: hidden;
  }

  body.serhill-desktop-workspace-active {
    background: #f4f6f8;
  }

  body.serhill-desktop-workspace-active .portal-page {
    height: calc(100vh - 106px);
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background: #f4f6f8;
  }

  body.admin-bar.serhill-desktop-workspace-active .portal-page {
    height: calc(100vh - 138px);
  }

  body.serhill-desktop-workspace-active .sp-dashboard.sp-desktop-workspace-source {
    width: 100%;
    max-width: none;
    height: calc(100vh - 106px);
    min-height: 0;
    margin: 106px 0 0;
    padding: 0;
    overflow: hidden;
    color: var(--sp-ink);
    font-family: "DM Sans", Arial, sans-serif;
  }

  body.admin-bar.serhill-desktop-workspace-active .sp-dashboard.sp-desktop-workspace-source {
    height: calc(100vh - 138px);
    margin-top: 138px;
  }

  .sp-desktop-workspace {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #f4f6f8;
  }

  .admin-bar .sp-desktop-workspace {
    height: 100%;
    min-height: 0;
  }

  .sp-dw-sidebar {
    position: relative;
    top: auto;
    z-index: 32;
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    padding: 22px 14px 18px;
    border-right: 1px solid var(--sp-line);
    background: #fff;
  }

  .admin-bar .sp-dw-sidebar { top: auto; height: 100%; }

  .sp-dw-brand {
    display: grid;
    gap: 2px;
    padding: 0 12px 22px;
  }

  .sp-dw-brand strong {
    color: var(--sp-ink);
    font: 800 23px/1 Manrope, Arial, sans-serif;
    letter-spacing: -.035em;
  }

  .sp-dw-brand span {
    color: #2f668f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
  }

  .sp-dw-primary {
    min-height: 48px;
    margin: 0 4px 18px;
    padding: 0 16px;
    border: 1px solid var(--sp-blue);
    border-radius: 12px;
    background: var(--sp-blue);
    color: #fff;
    font: 800 12px/1 "DM Sans", Arial, sans-serif;
    letter-spacing: .03em;
    cursor: pointer;
  }

  .sp-dw-nav, .sp-dw-nav-secondary { display: grid; gap: 4px; }
  .sp-dw-nav-secondary { margin-top: auto; padding-top: 18px; border-top: 1px solid #edf0f2; }

  .sp-dw-nav button,
  .sp-dw-nav a,
  .sp-dw-nav-secondary button {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    padding: 0 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #44515d;
    font: 700 13px/1 "DM Sans", Arial, sans-serif;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }

  .sp-dw-nav svg, .sp-dw-nav-secondary svg, .sp-dw-search svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .sp-dw-nav button:hover,
  .sp-dw-nav a:hover,
  .sp-dw-nav-secondary button:hover { background: #f0f4f7; color: var(--sp-blue); }

  .sp-dw-nav button.is-active,
  .sp-dw-nav-secondary button.is-active {
    background: #eaf1f6;
    color: #174f7a;
  }

  .sp-dw-nav b {
    display: grid;
    min-width: 24px;
    height: 22px;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #eef2f5;
    color: #4e5c68;
    font-size: 10px;
  }

  .sp-dw-nav .is-active b { background: #fff; color: #174f7a; }
  .sp-dw-nav em { color: #82909b; font-size: 11px; font-style: normal; }

  .sp-dw-user {
    display: grid;
    gap: 2px;
    margin: 14px 0 0;
    padding: 14px 11px 0;
    border-top: 1px solid #edf0f2;
  }

  .sp-dw-user strong { overflow: hidden; color: var(--sp-ink); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
  .sp-dw-user span { overflow: hidden; color: var(--sp-muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
  .sp-dw-user a { margin-top: 5px; color: #2f668f; font-size: 10px; font-weight: 800; text-decoration: none; }

  .sp-dw-main {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  .sp-dw-topbar {
    position: relative;
    top: auto;
    z-index: 31;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 520px);
    align-items: center;
    gap: 28px;
    min-height: 92px;
    padding: 15px 30px;
    border-bottom: 1px solid var(--sp-line);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .admin-bar .sp-dw-topbar { top: auto; }

  .sp-dw-title { min-width: 0; }
  .sp-dw-title > span { display: block; margin-bottom: 3px; color: #2f668f; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
  .sp-dw-title h1 { margin: 0; color: var(--sp-ink); font: 800 24px/1.08 Manrope, Arial, sans-serif; letter-spacing: -.025em; }
  .sp-dw-title p { overflow: hidden; margin: 4px 0 0; color: var(--sp-muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }

  .sp-dw-search {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #d7dde2;
    border-radius: 12px;
    background: #f5f7f9;
    color: #687581;
  }

  .sp-dw-search:focus-within { border-color: #91a9bb; background: #fff; box-shadow: 0 0 0 3px rgba(23,79,122,.08); }
  .sp-dw-search input { width: 100%; min-width: 0; height: 42px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--sp-ink); font: 600 13px "DM Sans", Arial, sans-serif; }

  .sp-dw-content {
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    padding: 28px 30px 72px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  .sp-dw-view {
    width: min(100%, 1480px);
    margin: 0 auto;
  }

  .sp-dw-view[hidden] { display: none !important; }
  .sp-dw-view > .sp-account-head[hidden], .sp-dw-view > .sp-dashboard-nav[hidden] { display: none !important; }
  .sp-dw-view > :first-child { margin-top: 0 !important; }

  .sp-dw-overview {
    display: grid;
    grid-template-columns: minmax(360px, 1.25fr) minmax(520px, 1fr);
    gap: 20px;
    margin: 0 0 26px;
  }

  .sp-dw-welcome {
    min-height: 190px;
    padding: 28px 30px;
    border: 1px solid #213140;
    border-radius: 16px;
    background: #17212b;
    color: #fff;
  }

  .sp-dw-welcome > span { color: #8db5d1; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
  .sp-dw-welcome h2 { margin: 36px 0 8px; color: #fff; font: 800 clamp(28px, 3vw, 42px)/1.05 Manrope, Arial, sans-serif; letter-spacing: -.035em; }
  .sp-dw-welcome p { max-width: 700px; margin: 0; color: #c4cdd4; font-size: 13px; line-height: 1.55; }

  .sp-dw-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .sp-dw-metrics button {
    display: grid;
    align-content: space-between;
    min-height: 89px;
    padding: 16px 18px;
    border: 1px solid var(--sp-line);
    border-radius: 14px;
    background: #fff;
    color: var(--sp-ink);
    text-align: left;
    cursor: pointer;
  }

  .sp-dw-metrics button:hover { border-color: #aebdca; box-shadow: 0 8px 20px rgba(23,33,43,.05); }
  .sp-dw-metrics strong { font: 800 26px/1 Manrope, Arial, sans-serif; }
  .sp-dw-metrics span { color: var(--sp-muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

  /* Existing portal components remain canonical; only their desktop containment changes. */
  .sp-dw-view .sp-coach-section,
  .sp-dw-view .sp-progress,
  .sp-dw-view .sp-management,
  .sp-dw-view .sp-management-support {
    max-width: none;
    margin: 0 0 24px;
    padding: 24px;
    border: 1px solid var(--sp-line);
    border-radius: 14px;
    background: #fff;
  }

  .sp-dw-view .sp-coach-section > h2,
  .sp-dw-view .sp-progress > h2 {
    margin: 7px 0 18px;
    font-size: clamp(25px, 2.6vw, 36px);
  }

  .sp-dw-view .sp-form { margin-top: 20px; }
  .sp-dw-view .sp-client-list { border-radius: 12px; overflow: hidden; }
  .sp-dw-view .sp-client-fold > summary, .sp-dw-view .sp-request-client > summary { min-height: 58px; }
  .sp-dw-view .sp-training-history { margin-top: 28px; }
  .sp-dw-view .sp-owner-links { margin: 0 0 24px; }
  .sp-dw-view .sp-owner-links a { border-radius: 10px; }

  .sp-dw-view[data-dw-panel="clients"].is-searching .sp-request-empty[hidden] { display: none !important; }

  @media (max-width: 1180px) {
    .sp-desktop-workspace { grid-template-columns: 212px minmax(0, 1fr); }
    .sp-dw-sidebar { padding-right: 10px; padding-left: 10px; }
    .sp-dw-topbar { grid-template-columns: minmax(220px, 1fr) minmax(240px, 390px); padding-right: 22px; padding-left: 22px; }
    .sp-dw-content { padding-right: 22px; padding-left: 22px; }
    .sp-dw-overview { grid-template-columns: 1fr; }
    .sp-dw-metrics { grid-template-columns: repeat(4, 1fr); }
  }
}


/* v0.41.113 — desktop information architecture aligned with mobile without changing mobile. */
@media (min-width: 783px) {
  body.serhill-desktop-workspace-active .sp-dashboard-nav,
  body.serhill-desktop-workspace-active .sp-dashboard-nav-title { display:none!important; }

  .sp-dw-view[data-dw-panel="clients"] > .sp-dw-clients-legacy { display:none!important; }
  .sp-dwc-root{display:grid;gap:18px;color:var(--sp-ink)}
  .sp-dwc-tabs{display:flex;gap:26px;border-bottom:1px solid var(--sp-line)}
  .sp-dwc-tabs button{min-height:48px;padding:0 2px;border:0;border-bottom:3px solid transparent;background:transparent;color:#6d7a86;font:800 13px "DM Sans",Arial,sans-serif;cursor:pointer}
  .sp-dwc-tabs button.is-active{border-bottom-color:var(--sp-blue);color:var(--sp-ink)}
  .sp-dwc-toolbar{display:grid;grid-template-columns:minmax(280px,480px) minmax(0,1fr);gap:18px;align-items:center}
  .sp-dwc-search{display:grid;grid-template-columns:20px 1fr;align-items:center;gap:10px;min-height:46px;padding:0 14px;border:1px solid #d7dde2;border-radius:12px;background:#fff;color:#75838f}
  .sp-dwc-search svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.75}
  .sp-dwc-search input{width:100%;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;font:600 13px "DM Sans",Arial,sans-serif}
  .sp-dwc-filters{display:flex;gap:8px;overflow-x:auto;justify-content:flex-end}
  .sp-dwc-filters button{flex:0 0 auto;min-height:36px;padding:0 13px;border:1px solid #d8e0e7;border-radius:999px;background:#fff;color:#4c5965;font:700 11px "DM Sans",Arial,sans-serif;cursor:pointer}
  .sp-dwc-filters button.is-active{border-color:#b8cddd;background:#eaf1f6;color:#174f7a}
  .sp-dwc-summary{margin:2px 0 10px;color:#788590;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
  .sp-dwc-list,.sp-dwc-app-list{display:grid;border:1px solid var(--sp-line);border-radius:14px;background:#fff;overflow:hidden}
  .sp-dwc-row{display:grid;grid-template-columns:44px minmax(220px,1fr) auto 18px;align-items:center;gap:14px;min-height:72px;padding:10px 18px;border:0;border-bottom:1px solid #edf0f2;background:#fff;color:var(--sp-ink);text-align:left;cursor:pointer}
  .sp-dwc-row:last-child{border-bottom:0}.sp-dwc-row:hover{background:#f7f9fb}.sp-dwc-row>b{color:#9aa6b0;font-size:24px;font-weight:400}
  .sp-dwc-avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:#e8eef5;color:#285c86;font-size:13px;font-weight:800}
  .sp-dwc-person{min-width:0}.sp-dwc-person strong,.sp-dwc-person small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sp-dwc-person strong{font-size:14px}.sp-dwc-person small{margin-top:4px;color:#74808b;font-size:11px}
  .sp-dwc-status{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:0 10px;border-radius:999px;background:#edf3f6;color:#48606f;font-size:10px;font-style:normal;font-weight:800;white-space:nowrap}
  .sp-dwc-status-active{background:#e9f5ef;color:#287252}.sp-dwc-status-paused{background:#f0f1f3;color:#68737d}.sp-dwc-status-overdue,.sp-dwc-status-no_payment{background:#fff0ef;color:#a33d35}.sp-dwc-status-review,.sp-dwc-status-no_plan{background:#eef3ff;color:#355eaf}
  .sp-dwc-help{margin:0;color:#6f7c87;font-size:12px}.sp-dwc-empty{padding:28px;text-align:center;color:#7b8791;background:#fff}

  .sp-dwc-detail{display:grid;gap:16px}.sp-dwc-detail[hidden]{display:none!important}
  .sp-dwc-detail>header{display:flex;align-items:center;gap:18px;min-height:50px;border-bottom:1px solid var(--sp-line)}
  .sp-dwc-detail>header button{border:0;background:transparent;color:#2f668f;font:800 12px "DM Sans",Arial,sans-serif;cursor:pointer}.sp-dwc-detail>header strong{font-size:14px}
  .sp-dwc-detail-body{display:grid;gap:16px;min-width:0}
  .sp-dwc-client-head{display:flex;align-items:center;gap:16px;padding:20px;border:1px solid var(--sp-line);border-radius:14px;background:#fff}.sp-dwc-client-head .sp-dwc-avatar{width:58px;height:58px}.sp-dwc-client-head h2{margin:0 0 6px;font:800 21px/1.1 Manrope,Arial,sans-serif}.sp-dwc-client-head p{margin:6px 0 0;color:#71808c;font-size:12px}
  .sp-dwc-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.sp-dwc-actions button{min-height:46px;border:1px solid #dbe2e8;border-radius:11px;background:#fff;color:#234f72;font:800 12px "DM Sans",Arial,sans-serif;cursor:pointer}.sp-dwc-actions button:hover{background:#f3f7fa}
  .sp-dwc-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.sp-dwc-facts>div{padding:16px;border:1px solid var(--sp-line);border-radius:12px;background:#fff}.sp-dwc-facts small,.sp-dwc-facts strong{display:block}.sp-dwc-facts small{color:#7a8792;font-size:9px;font-weight:800;letter-spacing:.08em}.sp-dwc-facts strong{margin-top:6px;font-size:13px}
  .sp-dwc-attention,.sp-dwc-note{padding:16px 18px;border:1px solid #dfe5ea;border-radius:12px;background:#fff}.sp-dwc-attention{border-left:4px solid #557dac}.sp-dwc-attention p,.sp-dwc-note p{margin:6px 0;color:#586672;font-size:12px;line-height:1.5}.sp-dwc-attention span{color:#2f668f;font-size:11px;font-weight:700}.sp-dwc-note small{color:#7b8792;font-size:9px;font-weight:800;letter-spacing:.08em}
  .sp-dwc-focused-tool{display:block!important;width:100%!important;max-width:none!important;margin:0!important}
  .sp-dwc-detail-body>.sp-dwc-focused-tool{border:0!important;box-shadow:none!important}

  /* Remove the old "cards inside cards inside details" visual hierarchy in the desktop shell. */
  .sp-dw-view .sp-coach-section .sp-coach-section,
  .sp-dw-view .sp-progress .sp-progress,
  .sp-dw-view details details{box-shadow:none!important}
}

/* v0.41.114 — desktop Training exposes the same existing workflows as mobile. */
@media (min-width: 783px) {
  .sp-dw-view[data-dw-panel="training"] > #training { display:none; }
  .sp-dwt-root{display:grid;gap:18px}
  .sp-dwt-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .sp-dwt-summary>button{min-height:128px;padding:20px;border:1px solid var(--sp-line);border-radius:14px;background:#fff;color:var(--sp-ink);text-align:left;cursor:pointer;display:grid;align-content:start;gap:8px}
  .sp-dwt-summary>button:hover{border-color:#aec0ce;box-shadow:0 8px 20px rgba(23,33,43,.05)}
  .sp-dwt-summary span{font-size:9px;font-weight:800;letter-spacing:.11em;color:#718492}
  .sp-dwt-summary strong{font:800 18px/1.15 Manrope,Arial,sans-serif}
  .sp-dwt-summary small{color:#73808b;font-size:11px;line-height:1.45}
  .sp-dwt-actions{display:grid;grid-template-columns:minmax(250px,420px) auto;gap:14px 18px;align-items:end;padding:20px;border:1px solid var(--sp-line);border-radius:14px;background:#fff}
  .sp-dwt-actions-head{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0f2;padding-bottom:12px}
  .sp-dwt-actions-head>span{font-size:9px;font-weight:800;letter-spacing:.11em;color:#718492}
  .sp-dwt-actions-head>button{border:0;background:transparent;color:#2f668f;font:800 11px "DM Sans",Arial,sans-serif;cursor:pointer}
  .sp-dwt-client{display:grid;gap:6px}.sp-dwt-client>span{font-size:9px;font-weight:800;letter-spacing:.09em;color:#718492}.sp-dwt-client select{min-height:44px;border:1px solid #d7dde2;border-radius:10px;background:#fff;padding:0 12px;font:600 12px "DM Sans",Arial,sans-serif}
  .sp-dwt-create{min-height:44px;padding:0 18px;border:1px solid #173e5d;border-radius:10px;background:#173e5d;color:#fff;font:800 12px "DM Sans",Arial,sans-serif;cursor:pointer}.sp-dwt-create:disabled{opacity:.45;cursor:not-allowed}
  .sp-dwt-create-menu{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.sp-dwt-create-menu[hidden]{display:none!important}
  .sp-dwt-create-menu button{min-height:104px;padding:16px;border:1px solid #dbe2e8;border-radius:12px;background:#f9fbfc;color:var(--sp-ink);text-align:left;cursor:pointer}.sp-dwt-create-menu button:hover{background:#f2f6f9}
  .sp-dwt-create-menu strong,.sp-dwt-create-menu small{display:block}.sp-dwt-create-menu strong{font-size:13px}.sp-dwt-create-menu small{margin-top:7px;color:#70808c;font-size:10px;line-height:1.45}
  .sp-dwt-workspace{display:grid;gap:14px}.sp-dwt-workspace[hidden]{display:none!important}.sp-dwt-workspace>header{display:flex;align-items:center;gap:18px;min-height:48px;border-bottom:1px solid var(--sp-line)}
  .sp-dwt-workspace>header button{border:0;background:transparent;color:#2f668f;font:800 11px "DM Sans",Arial,sans-serif;cursor:pointer}.sp-dwt-workspace>header strong{font-size:14px}
  .sp-dwt-workspace-body{min-width:0;display:grid;gap:12px}.sp-dwt-workspace-body>#training{display:block!important;width:100%;max-width:none;margin:0}.sp-dwt-workspace-body>#training.sp-coach-section{padding:0;border:0;background:transparent}
  .sp-dwt-workspace-body>#training>.sp-kicker,.sp-dwt-workspace-body>#training>h2{display:none}
  .sp-dwt-workspace-body .sp-workout-form,.sp-dwt-workspace-body [data-advanced-builder]{max-width:none!important;margin:0!important}
  .sp-dwt-session-index{display:grid;border:1px solid var(--sp-line);border-radius:14px;background:#fff;overflow:hidden}
  .sp-dwt-session-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:18px;min-height:76px;padding:12px 16px;border-bottom:1px solid #edf0f2}.sp-dwt-session-row:last-child{border-bottom:0}
  .sp-dwt-session-row div{min-width:0}.sp-dwt-session-row small,.sp-dwt-session-row strong,.sp-dwt-session-row span{display:block}.sp-dwt-session-row small{color:#7c8994;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.sp-dwt-session-row strong{margin-top:3px;font-size:13px}.sp-dwt-session-row span{margin-top:3px;color:#788590;font-size:10px}.sp-dwt-session-row em{font-style:normal;color:#60717e;font-size:10px;font-weight:800}
  .sp-dwt-session-row button{min-height:34px;padding:0 12px;border:1px solid #d5dfe6;border-radius:9px;background:#fff;color:#285f88;font:800 10px "DM Sans",Arial,sans-serif;cursor:pointer}
  .sp-dwt-empty{padding:34px;text-align:center;color:#7a8792}
  .sp-dwt-session-open{display:block!important;width:100%;max-width:none;margin:0!important}
  /* Tablet/compact desktop: keep the same hierarchy, but normalize scale instead of
     turning the three summary cards into oversized full-width blocks. */
  @media (max-width:1180px){
    .sp-dwt-root{gap:14px}
    .sp-dwt-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
    .sp-dwt-summary>button{min-height:96px;padding:14px;gap:5px;border-radius:12px}
    .sp-dwt-summary strong{font-size:14px;line-height:1.2}
    .sp-dwt-summary small{font-size:10px;line-height:1.35}
    .sp-dwt-actions{grid-template-columns:minmax(0,1fr) minmax(150px,190px);gap:12px 14px;padding:16px}
    .sp-dwt-client select,.sp-dwt-create{min-height:48px}
    .sp-dwt-create{width:100%;padding:0 14px}
    .sp-dwt-create-menu{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
    .sp-dwt-create-menu button{min-height:88px;padding:13px}
    .sp-dwt-create-menu strong{font-size:12px}
    .sp-dwt-create-menu small{font-size:9.5px}
  }
  @media (max-width:900px){
    .sp-dwt-summary>button{min-height:90px;padding:12px}
    .sp-dwt-summary strong{font-size:13px}
    .sp-dwt-summary small{display:none}
    .sp-dwt-actions{grid-template-columns:minmax(0,1fr) minmax(138px,168px);padding:14px}
    .sp-dwt-create-menu button{min-height:82px;padding:11px}
  }
}

/* v0.41.116 — desktop Gmail/workspace visual pass.
   Presentation only. Mobile remains fully governed by the existing app shell. */
@media (min-width: 783px) {
  body.serhill-desktop-workspace-active,
  body.serhill-desktop-workspace-active .portal-page,
  .sp-desktop-workspace {
    background: #eef2f5;
  }

  /* Gmail-like shell: navigation lives on the canvas, not inside a card/box. */
  .sp-desktop-workspace {
    grid-template-columns: 232px minmax(0, 1fr);
    column-gap: 0;
  }

  .sp-dw-sidebar {
    padding: 20px 10px 18px 12px;
    border-right: 0;
    background: transparent;
  }

  .sp-dw-brand { padding: 2px 14px 20px; }

  .sp-dw-primary {
    width: fit-content;
    min-width: 142px;
    min-height: 46px;
    margin: 0 4px 18px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 2px 7px rgba(23, 33, 43, .08);
  }

  .sp-dw-nav,
  .sp-dw-nav-secondary { gap: 1px; }

  .sp-dw-nav-secondary {
    padding-top: 12px;
    border-top: 0;
  }

  .sp-dw-nav button,
  .sp-dw-nav a,
  .sp-dw-nav-secondary button {
    min-height: 36px;
    padding: 0 13px;
    border-radius: 0 18px 18px 0;
    font-size: 12px;
    font-weight: 700;
  }

  .sp-dw-nav button:hover,
  .sp-dw-nav a:hover,
  .sp-dw-nav-secondary button:hover {
    background: rgba(255,255,255,.52);
    box-shadow: none;
  }

  .sp-dw-nav button.is-active,
  .sp-dw-nav-secondary button.is-active {
    background: #dce8f1;
    color: #174f7a;
  }

  .sp-dw-nav b {
    min-width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 10px;
  }

  .sp-dw-nav .is-active b { background: transparent; }

  .sp-dw-user {
    margin-top: 10px;
    padding: 12px 13px 0;
    border-top: 0;
  }

  /* Main workspace becomes one continuous application surface. */
  .sp-dw-main {
    margin: 10px 10px 10px 0;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(23,33,43,.06);
  }

  .sp-dw-topbar {
    top: 116px;
    min-height: 76px;
    padding: 12px 24px;
    border-bottom: 1px solid #e6ebef;
    background: rgba(255,255,255,.98);
  }

  .admin-bar .sp-dw-topbar { top: 148px; }

  .sp-dw-title > span { display: none; }
  .sp-dw-title h1 { font-size: 21px; }
  .sp-dw-title p { font-size: 10px; }

  .sp-dw-search {
    min-height: 44px;
    border: 0;
    border-radius: 22px;
    background: #eef3f7;
  }

  .sp-dw-search:focus-within {
    border: 0;
    background: #fff;
    box-shadow: 0 1px 5px rgba(23,33,43,.15);
  }

  .sp-dw-content { padding: 18px 22px 56px; }
  .sp-dw-view { width: 100%; max-width: none; }

  /* Flatten generic old portal cards when they are hosted inside the desktop workspace. */
  .sp-dw-view .sp-coach-section,
  .sp-dw-view .sp-progress,
  .sp-dw-view .sp-management,
  .sp-dw-view .sp-management-support {
    margin-bottom: 18px;
    padding: 18px 0;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  /* Clients: desktop data table/list, not mobile cards. */
  .sp-dwc-root { gap: 12px; }
  .sp-dwc-tabs { gap: 30px; }
  .sp-dwc-tabs button { min-height: 44px; font-size: 12px; }

  .sp-dwc-toolbar {
    grid-template-columns: minmax(240px, 410px) minmax(0,1fr);
    gap: 14px;
    padding: 4px 0 2px;
  }

  .sp-dwc-search {
    min-height: 40px;
    border: 0;
    border-radius: 20px;
    background: #f1f4f6;
  }

  .sp-dwc-filters button {
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 15px;
    background: transparent;
  }

  .sp-dwc-filters button:hover { background: #f2f5f7; }
  .sp-dwc-filters button.is-active { background: #e2ebf2; }

  .sp-dwc-list,
  .sp-dwc-app-list {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .sp-dwc-row {
    grid-template-columns: 38px minmax(220px,1.3fr) minmax(120px,.5fr) 22px;
    min-height: 58px;
    padding: 7px 10px;
    border-bottom: 1px solid #edf0f2;
    background: transparent;
  }

  .sp-dwc-row:first-child { border-top: 1px solid #edf0f2; }
  .sp-dwc-row:hover { background: #f6f8fa; }
  .sp-dwc-avatar { width: 34px; height: 34px; font-size: 11px; }
  .sp-dwc-person strong { font-size: 13px; }
  .sp-dwc-person small { margin-top: 2px; font-size: 10px; }
  .sp-dwc-status { min-height: 24px; justify-self: start; }

  /* Client detail: one desktop record view with separators, not stacked mobile cards. */
  .sp-dwc-detail-body { gap: 0; }

  .sp-dwc-client-head {
    padding: 14px 4px 16px;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    border-radius: 0;
    background: transparent;
  }

  .sp-dwc-actions {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid #edf0f2;
  }

  .sp-dwc-actions button {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 17px;
    background: transparent;
  }

  .sp-dwc-actions button:hover { background: #eef3f7; }

  .sp-dwc-facts {
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 0;
    border-bottom: 1px solid #edf0f2;
  }

  .sp-dwc-facts > div {
    min-height: 72px;
    padding: 14px 16px 14px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .sp-dwc-attention,
  .sp-dwc-note {
    padding: 14px 4px;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    border-radius: 0;
    background: transparent;
  }

  .sp-dwc-attention { border-left: 0; }

  /* Training: actions become a desktop command strip/list, not three mobile-style cards. */
  .sp-dwt-root { gap: 12px; }

  .sp-dwt-summary {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 0;
    border-top: 1px solid #edf0f2;
    border-bottom: 1px solid #edf0f2;
  }

  .sp-dwt-summary > button {
    min-height: 70px;
    padding: 12px 16px;
    border: 0;
    border-right: 1px solid #edf0f2;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 4px;
  }

  .sp-dwt-summary > button:last-child { border-right: 0; }
  .sp-dwt-summary > button:hover { background: #f6f8fa; box-shadow: none; }
  .sp-dwt-summary strong { font-size: 14px; }
  .sp-dwt-summary small { font-size: 10px; }

  .sp-dwt-actions {
    grid-template-columns: minmax(240px, 410px) auto;
    gap: 10px 14px;
    padding: 14px 0;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    border-radius: 0;
    background: transparent;
  }

  .sp-dwt-actions-head {
    padding-bottom: 8px;
    border-bottom: 0;
  }

  .sp-dwt-client select {
    min-height: 40px;
    border-radius: 8px;
  }

  .sp-dwt-create {
    min-height: 40px;
    border-radius: 8px;
  }

  .sp-dwt-create-menu {
    gap: 0;
    border-top: 1px solid #edf0f2;
  }

  .sp-dwt-create-menu button {
    min-height: 68px;
    padding: 12px 14px;
    border: 0;
    border-right: 1px solid #edf0f2;
    border-radius: 0;
    background: transparent;
  }

  .sp-dwt-create-menu button:last-child { border-right: 0; }
  .sp-dwt-create-menu button:hover { background: #f6f8fa; }

  .sp-dwt-session-index {
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .sp-dwt-session-row {
    min-height: 62px;
    padding: 10px 8px;
  }

  /* Tablet remains desktop workspace, just denser. */
  @media (max-width: 1100px) {
    .sp-desktop-workspace { grid-template-columns: 204px minmax(0,1fr); }
    .sp-dw-main { margin-right: 6px; }
    .sp-dw-content { padding: 16px 16px 48px; }
    .sp-dw-topbar { grid-template-columns: minmax(180px,1fr) minmax(220px,360px); gap: 14px; padding-inline: 18px; }
    .sp-dwt-summary > button { min-height: 64px; padding: 10px 12px; }
    .sp-dwt-summary small { display: block; }
    .sp-dwt-actions { grid-template-columns: minmax(0,1fr) minmax(140px,180px); padding: 12px 0; }
  }
}

/* v0.41.117 — Gmail-concept desktop workspace refinement.
   Desktop/tablet presentation only. No mobile markup, styles or business logic changed. */
@media (min-width: 783px) {
  :root {
    --sp-dw-canvas: #ffffff;
    --sp-dw-glass: rgba(255,255,255,.80);
    --sp-dw-glass-strong: rgba(255,255,255,.92);
    --sp-dw-hover: rgba(232,239,244,.66);
    --sp-dw-active: rgba(205,224,238,.78);
    --sp-dw-line: rgba(56,72,85,.11);
    --sp-dw-shadow: 0 1px 2px rgba(24,39,52,.05), 0 10px 34px rgba(24,39,52,.055);
  }

  body.serhill-desktop-workspace-active,
  body.serhill-desktop-workspace-active .portal-page,
  .sp-desktop-workspace {
    background: var(--sp-dw-canvas) !important;
  }

  body.serhill-desktop-workspace-active .sp-dashboard.sp-desktop-workspace-source {
    background: transparent;
  }

  .sp-desktop-workspace {
    grid-template-columns: 236px minmax(0,1fr);
    gap: 10px;
    padding: 10px 12px 12px 8px;
  }

  /* Navigation sits directly on the page canvas — no panel/card behind it. */
  .sp-dw-sidebar {
    top: 116px;
    height: calc(100vh - 126px);
    min-height: 560px;
    padding: 8px 8px 12px 4px;
    border: 0;
    background: transparent !important;
  }
  .admin-bar .sp-dw-sidebar {
    top: 148px;
    height: calc(100vh - 158px);
  }

  .sp-dw-brand {
    padding: 6px 14px 18px 16px;
  }
  .sp-dw-brand strong {
    font-size: 22px;
  }

  .sp-dw-primary {
    width: auto;
    min-width: 0;
    min-height: 54px;
    margin: 2px 8px 18px 4px;
    padding: 0 19px;
    border: 1px solid rgba(23,79,122,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.94);
    color: #174f7a;
    box-shadow: 0 2px 6px rgba(24,39,52,.08), 0 7px 18px rgba(24,39,52,.06);
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
  }
  .sp-dw-primary:hover {
    background: #fff;
    box-shadow: 0 3px 8px rgba(24,39,52,.10), 0 10px 24px rgba(24,39,52,.08);
    transform: translateY(-1px);
  }

  .sp-dw-nav,
  .sp-dw-nav-secondary { gap: 1px; }

  .sp-dw-nav button,
  .sp-dw-nav a,
  .sp-dw-nav-secondary button {
    min-height: 40px;
    padding: 0 14px 0 16px;
    border-radius: 0 20px 20px 0;
    background: transparent;
    color: #3f4c57;
    font-size: 13px;
    font-weight: 650;
    transition: background-color .14s ease, color .14s ease, transform .14s ease;
  }
  .sp-dw-nav button:hover,
  .sp-dw-nav a:hover,
  .sp-dw-nav-secondary button:hover {
    background: var(--sp-dw-hover);
    color: #174f7a;
  }
  .sp-dw-nav button.is-active,
  .sp-dw-nav-secondary button.is-active {
    background: var(--sp-dw-active);
    color: #143f61;
    font-weight: 800;
  }
  .sp-dw-nav svg,
  .sp-dw-nav-secondary svg {
    width: 19px;
    height: 19px;
  }
  .sp-dw-user {
    padding: 12px 14px 0 16px;
  }

  /* One rounded translucent application surface, prepared for future custom backgrounds. */
  .sp-dw-main {
    margin: 0;
    min-height: calc(100vh - 128px);
    overflow: clip;
    border: 1px solid rgba(65,83,98,.08);
    border-radius: 24px;
    background: var(--sp-dw-glass);
    box-shadow: var(--sp-dw-shadow);
    -webkit-backdrop-filter: blur(18px) saturate(112%);
    backdrop-filter: blur(18px) saturate(112%);
  }
  .admin-bar .sp-dw-main { min-height: calc(100vh - 160px); }

  .sp-dw-topbar {
    top: 116px;
    min-height: 78px;
    padding: 12px 24px 11px;
    border-bottom: 1px solid var(--sp-dw-line);
    background: rgba(255,255,255,.68);
    -webkit-backdrop-filter: blur(18px) saturate(115%);
    backdrop-filter: blur(18px) saturate(115%);
  }
  .admin-bar .sp-dw-topbar { top: 148px; }

  .sp-dw-title h1 {
    font-size: 21px;
    letter-spacing: -.025em;
  }
  .sp-dw-title p {
    margin-top: 3px;
    color: #75828d;
  }

  .sp-dw-search {
    min-height: 48px;
    padding-inline: 16px;
    border: 1px solid transparent;
    border-radius: 24px;
    background: rgba(233,240,245,.88);
    transition: background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
  }
  .sp-dw-search:hover { background: rgba(228,237,243,.96); }
  .sp-dw-search:focus-within {
    border-color: rgba(85,120,147,.14);
    background: rgba(255,255,255,.98);
    box-shadow: 0 2px 8px rgba(24,39,52,.10);
  }

  .sp-dw-content {
    padding: 16px 22px 48px;
    background: transparent;
  }

  /* Global desktop motion: restrained, fast, and functional. */
  .sp-dw-main button,
  .sp-dw-main a,
  .sp-dw-main input,
  .sp-dw-main select,
  .sp-dw-main summary,
  .sp-dwc-row,
  .sp-dwt-session-row {
    transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease;
  }

  /* HOME: preserve content, but make it part of one workspace instead of separate dashboard cards. */
  .sp-dw-overview {
    gap: 12px;
    margin-bottom: 18px;
  }
  .sp-dw-welcome {
    min-height: 168px;
    padding: 24px 26px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(24,43,59,.96), rgba(24,62,91,.92));
    box-shadow: 0 8px 28px rgba(24,43,59,.12);
  }
  .sp-dw-welcome h2 { margin-top: 30px; }
  .sp-dw-metrics { gap: 8px; }
  .sp-dw-metrics button {
    min-height: 80px;
    padding: 13px 15px;
    border: 1px solid rgba(65,83,98,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.58);
    box-shadow: none;
  }
  .sp-dw-metrics button:hover {
    border-color: rgba(65,83,98,.12);
    background: rgba(255,255,255,.86);
    box-shadow: 0 4px 14px rgba(24,39,52,.05);
  }

  /* CLIENTS: Gmail-like dense records inside the shared surface. */
  .sp-dwc-root { gap: 10px; }
  .sp-dwc-tabs {
    gap: 30px;
    border-bottom-color: var(--sp-dw-line);
  }
  .sp-dwc-tabs button {
    min-height: 46px;
    border-bottom-width: 2px;
  }
  .sp-dwc-toolbar {
    padding: 4px 0 5px;
  }
  .sp-dwc-search {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 21px;
    background: rgba(234,240,244,.78);
  }
  .sp-dwc-search:focus-within {
    background: #fff;
    box-shadow: 0 2px 7px rgba(24,39,52,.08);
  }
  .sp-dwc-filters button {
    min-height: 32px;
    padding-inline: 12px;
    border-radius: 16px;
  }
  .sp-dwc-filters button.is-active {
    background: rgba(208,224,236,.70);
  }
  .sp-dwc-list,
  .sp-dwc-app-list {
    overflow: hidden;
    border: 1px solid rgba(65,83,98,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.28);
  }
  .sp-dwc-row {
    min-height: 60px;
    padding: 8px 12px;
    border-bottom-color: var(--sp-dw-line);
    background: rgba(255,255,255,.34);
  }
  .sp-dwc-row:first-child { border-top: 0; }
  .sp-dwc-row:hover {
    background: rgba(238,243,247,.86);
  }
  .sp-dwc-status {
    border: 1px solid rgba(65,83,98,.05);
  }

  .sp-dwc-detail > header {
    border-bottom-color: var(--sp-dw-line);
  }
  .sp-dwc-client-head,
  .sp-dwc-actions,
  .sp-dwc-facts,
  .sp-dwc-attention,
  .sp-dwc-note {
    border-color: var(--sp-dw-line);
  }
  .sp-dwc-actions button:hover { background: var(--sp-dw-hover); }

  /* TRAINING: commands behave like a desktop workspace toolbar, not mobile cards. */
  .sp-dwt-root { gap: 10px; }
  .sp-dwt-summary {
    overflow: hidden;
    border: 1px solid rgba(65,83,98,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.28);
  }
  .sp-dwt-summary > button {
    min-height: 74px;
    padding: 12px 15px;
    border-right-color: var(--sp-dw-line);
    background: rgba(255,255,255,.30);
  }
  .sp-dwt-summary > button:hover {
    background: rgba(238,243,247,.88);
  }
  .sp-dwt-actions {
    padding: 13px 4px 14px;
    border-bottom-color: var(--sp-dw-line);
  }
  .sp-dwt-client select {
    border-color: rgba(65,83,98,.13);
    border-radius: 10px;
    background: rgba(255,255,255,.86);
  }
  .sp-dwt-create {
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(24,39,52,.08);
  }
  .sp-dwt-create:hover { transform: translateY(-1px); }
  .sp-dwt-create-menu {
    overflow: hidden;
    border: 1px solid rgba(65,83,98,.08);
    border-radius: 12px;
    background: rgba(255,255,255,.24);
  }
  .sp-dwt-create-menu button {
    min-height: 70px;
    border-right-color: var(--sp-dw-line);
    background: rgba(255,255,255,.28);
  }
  .sp-dwt-create-menu button:hover { background: rgba(238,243,247,.86); }
  .sp-dwt-session-index {
    overflow: hidden;
    border: 1px solid rgba(65,83,98,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.24);
  }
  .sp-dwt-session-row {
    border-bottom-color: var(--sp-dw-line);
    background: rgba(255,255,255,.28);
  }
  .sp-dwt-session-row:hover { background: rgba(238,243,247,.82); }

  /* Existing server-rendered sections inherit the workspace surface instead of becoming cards. */
  .sp-dw-view .sp-coach-section,
  .sp-dw-view .sp-progress,
  .sp-dw-view .sp-management,
  .sp-dw-view .sp-management-support {
    border-bottom-color: var(--sp-dw-line);
    background: transparent !important;
  }

  @media (max-width: 1180px) {
    .sp-desktop-workspace {
      grid-template-columns: 208px minmax(0,1fr);
      gap: 7px;
      padding: 7px 8px 9px 5px;
    }
    .sp-dw-sidebar { padding-left: 0; padding-right: 4px; }
    .sp-dw-brand { padding-left: 14px; }
    .sp-dw-primary { min-height: 50px; margin-right: 5px; }
    .sp-dw-nav button,
    .sp-dw-nav a,
    .sp-dw-nav-secondary button { min-height: 38px; padding-left: 14px; font-size: 12px; }
    .sp-dw-main { border-radius: 20px; }
    .sp-dw-topbar { min-height: 72px; padding-inline: 18px; }
    .sp-dw-search { min-height: 44px; }
    .sp-dw-content { padding: 14px 16px 42px; }
    .sp-dwt-summary > button { min-height: 68px; }
  }

  @media (max-width: 900px) {
    .sp-desktop-workspace { grid-template-columns: 190px minmax(0,1fr); }
    .sp-dw-brand strong { font-size: 20px; }
    .sp-dw-primary { padding-inline: 15px; font-size: 11px; }
    .sp-dw-topbar { grid-template-columns: minmax(150px,1fr) minmax(190px,300px); }
    .sp-dw-title p { display: none; }
    .sp-dwc-toolbar { grid-template-columns: minmax(190px,1fr); }
    .sp-dwc-filters { justify-content: flex-start; }
    .sp-dwt-summary small { display: none; }
  }
}

@media (prefers-reduced-motion: reduce) and (min-width: 783px) {
  .sp-desktop-workspace *,
  .sp-desktop-workspace *::before,
  .sp-desktop-workspace *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
}

/* v0.41.118 — optional built-in web workspace background.
   Desktop/tablet only. Mobile presentation remains unchanged. */
@media (min-width: 783px) {
  body.serhill-desktop-workspace-active.serhill-desktop-background-enabled {
    background-color: #eef2f5 !important;
    background-image: url("desktop-workspace-background.jpg") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
    background-attachment: fixed !important;
  }

  body.serhill-desktop-workspace-active.serhill-desktop-background-enabled .portal-page,
  body.serhill-desktop-workspace-active.serhill-desktop-background-enabled .sp-desktop-workspace {
    background: transparent !important;
  }

  body.serhill-desktop-workspace-active.serhill-desktop-background-enabled .sp-dw-main {
    background: rgba(255,255,255,var(--sp-user-workspace-alpha,.78)) !important;
    border-color: rgba(255,255,255,.62);
    box-shadow: 0 1px 2px rgba(24,39,52,.05), 0 12px 38px rgba(24,39,52,.075);
    -webkit-backdrop-filter: blur(20px) saturate(112%);
    backdrop-filter: blur(20px) saturate(112%);
  }

  body.serhill-desktop-workspace-active.serhill-desktop-background-enabled .sp-dw-topbar {
    background: rgba(255,255,255,var(--sp-user-topbar-alpha,.60)) !important;
  }
}

/* v0.41.119 — viewport-owned desktop workspace.
   Keep the site chrome stationary and make only the central workspace content scroll. */
@media (min-width: 783px) {
  html:has(body.serhill-desktop-workspace-active),
  body.serhill-desktop-workspace-active {
    height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  body.serhill-desktop-workspace-active .portal-page {
    height: 100vh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.serhill-desktop-workspace-active .sp-dashboard.sp-desktop-workspace-source {
    height: calc(100vh - 106px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.admin-bar.serhill-desktop-workspace-active .sp-dashboard.sp-desktop-workspace-source {
    height: calc(100vh - 138px) !important;
  }

  .sp-desktop-workspace {
    box-sizing: border-box;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .sp-dw-sidebar,
  .admin-bar .sp-dw-sidebar {
    position: relative !important;
    top: auto !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden;
  }

  .sp-dw-main,
  .admin-bar .sp-dw-main {
    display: flex;
    height: 100% !important;
    min-height: 0 !important;
    flex-direction: column;
    overflow: hidden !important;
  }

  .sp-dw-topbar,
  .admin-bar .sp-dw-topbar {
    position: relative !important;
    top: auto !important;
    flex: 0 0 auto;
  }

  .sp-dw-content {
    min-height: 0 !important;
    flex: 1 1 auto;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }
}

/* v0.41.120 — desktop workspace geometry correction.
   Keep the full application frame visible inside the viewport, closer to the Gmail
   workspace composition: compact fixed portal header, stationary navigation, one
   clearly bounded main surface, and scrolling only inside that surface. */
@media (min-width: 783px) {
  /* The public-site header was visually too tall for an application workspace.
     Compact it only while the desktop Trainer Workspace is active. */
  body.serhill-desktop-workspace-active .site-header .container.nav {
    min-height: 78px;
  }
  body.serhill-desktop-workspace-active .site-header .brand strong {
    font-size: 22px;
  }
  body.serhill-desktop-workspace-active .site-header .brand span {
    margin-top: 5px;
    font-size: 8px;
  }
  body.serhill-desktop-workspace-active .portal-header-actions .portal-header-messages,
  body.serhill-desktop-workspace-active .portal-account-menu summary {
    padding: 8px 10px;
    border-radius: 11px;
  }

  /* Do not size the app from normal document flow. The theme header is fixed, so
     anchor the workspace directly between that header and the viewport bottom.
     This also prevents the lower rounded edge from being clipped on iPad Safari. */
  body.serhill-desktop-workspace-active .portal-page {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }

  body.serhill-desktop-workspace-active .sp-dashboard.sp-desktop-workspace-source,
  body.admin-bar.serhill-desktop-workspace-active .sp-dashboard.sp-desktop-workspace-source {
    position: fixed !important;
    z-index: 18;
    inset: 78px 0 0 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.admin-bar.serhill-desktop-workspace-active .sp-dashboard.sp-desktop-workspace-source {
    inset-block-start: 110px !important; /* 32px WP admin bar + 78px portal header */
  }

  /* There is no document content below an active workspace. Hiding the theme footer
     removes the illusion that the app has been cut off above another page section. */
  body.serhill-desktop-workspace-active .site-footer {
    display: none !important;
  }

  .sp-desktop-workspace {
    height: 100% !important;
    padding: 10px 12px 12px 8px;
    gap: 10px;
  }

  .sp-dw-sidebar,
  .admin-bar .sp-dw-sidebar {
    height: 100% !important;
    padding-top: 6px;
    padding-bottom: 14px;
  }

  /* Keep the whole rounded rectangle visible: top, sides and especially bottom. */
  .sp-dw-main,
  .admin-bar .sp-dw-main {
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 24px;
  }

  /* Slightly leaner application toolbar gives the data area more room without
     changing any functions or their hierarchy. */
  .sp-dw-topbar,
  .admin-bar .sp-dw-topbar {
    min-height: 68px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .sp-dw-search {
    min-height: 44px;
  }

  .sp-dw-content {
    padding-bottom: 28px;
  }

  @media (max-width: 1180px) {
    body.serhill-desktop-workspace-active .site-header .container.nav {
      min-height: 74px;
    }
    body.serhill-desktop-workspace-active .sp-dashboard.sp-desktop-workspace-source {
      inset-block-start: 74px !important;
    }
    body.admin-bar.serhill-desktop-workspace-active .sp-dashboard.sp-desktop-workspace-source {
      inset-block-start: 106px !important;
    }
    .sp-desktop-workspace {
      grid-template-columns: 204px minmax(0,1fr);
      padding: 8px 9px 10px 5px;
      gap: 7px;
    }
    .sp-dw-main,
    .admin-bar .sp-dw-main {
      border-radius: 21px;
    }
    .sp-dw-topbar,
    .admin-bar .sp-dw-topbar {
      min-height: 64px;
    }
  }
}


/* v0.41.129 — desktop information architecture: all existing functions are exposed from the left workspace navigation. */
@media (min-width: 783px) {
  .sp-dw-sidebar { padding-bottom: 14px; }
  .sp-dw-nav-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(78,92,104,.22) transparent;
  }
  .sp-dw-nav { align-content: start; gap: 2px; padding-right: 2px; }
  .sp-dw-nav-secondary { display: none !important; }

  .sp-dw-group { display: grid; gap: 0; }
  .sp-dw-group-head { position: relative; }
  .sp-dw-group-head i {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 999px;
    color: #71808c;
    font: 700 17px/1 Arial, sans-serif;
    font-style: normal;
    transition: transform .18s ease, background-color .18s ease, color .18s ease;
  }
  .sp-dw-group.is-open > .sp-dw-group-head i { transform: rotate(45deg); }
  .sp-dw-group-head:hover i { background: rgba(23,79,122,.07); color: #174f7a; }

  .sp-dw-subnav {
    display: grid;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 0 0 42px;
    transition: max-height .22s ease, opacity .18s ease, padding .22s ease;
  }
  .sp-dw-group.is-open > .sp-dw-subnav {
    max-height: 360px;
    opacity: 1;
    padding: 2px 0 7px 42px;
  }
  .sp-dw-subnav > button,
  .sp-dw-subnav > a {
    display: flex;
    position: relative;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #5a6772;
    font: 650 11px/1.25 "DM Sans", Arial, sans-serif;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }
  .sp-dw-subnav > button::before,
  .sp-dw-subnav > a::before {
    content: '';
    position: absolute;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #a3adb5;
  }
  .sp-dw-subnav > button:hover,
  .sp-dw-subnav > a:hover { background: rgba(255,255,255,.52); color: #174f7a; }
  .sp-dw-subnav b {
    margin-left: auto;
    min-width: 19px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(23,79,122,.08);
    color: #174f7a;
    font-size: 9px;
    text-align: center;
  }

  .sp-dw-user { flex: 0 0 auto; }

  /* A sidebar function opens one focused canonical block in the work surface. */
  .sp-dw-view.is-nav-focused > * { display: none !important; }
  .sp-dw-view.is-nav-focused > .sp-dw-nav-focus { display: block !important; }
  .sp-dw-view.is-nav-focused > .sp-dw-nav-focus[hidden] { display: block !important; }
  .sp-dw-view.is-nav-focused > .sp-dw-nav-focus.sp-dw-clients-legacy { opacity: 1; pointer-events: auto; }

  /* On desktop the persistent left navigation replaces redundant section-return controls.
     Record-level return buttons remain because they return to a logical parent record/list. */
  .sp-dw-view.is-nav-focused .sp-dashboard-nav,
  .sp-dw-view.is-nav-focused .sp-training-workspace-nav { display: none !important; }

  @media (max-width: 1180px) {
    .sp-dw-group.is-open > .sp-dw-subnav { padding-left: 36px; }
    .sp-dw-subnav > button, .sp-dw-subnav > a { font-size: 10.5px; }
  }
}
\n\n/* v0.41.130 — desktop owner home cleanup and canonical grouped navigation. */\n@media (min-width:783px) {\n  .serhill-desktop-workspace-active .sp-dw-migrated-links { display:none !important; }\n\n  .serhill-desktop-workspace-active .sp-dw-owner-home-intro {\n    margin: 0 0 18px;\n    padding: 24px 28px;\n    border: 1px solid rgba(255,255,255,.58);\n    border-radius: 22px;\n    background: linear-gradient(135deg, rgba(23,52,75,.96), rgba(30,78,111,.92));\n    color: #fff;\n    box-shadow: 0 18px 38px rgba(15,35,51,.10);\n  }\n  .serhill-desktop-workspace-active .sp-dw-owner-home-intro > span {\n    display:block; margin-bottom:18px; color:#9fc1d8; font:700 11px/1.2 \"DM Sans\",Arial,sans-serif; letter-spacing:.16em;\n  }\n  .serhill-desktop-workspace-active .sp-dw-owner-home-intro h2 {\n    margin:0 0 8px; color:#fff; font:700 clamp(28px,3vw,42px)/1.08 Manrope,Arial,sans-serif;\n  }\n  .serhill-desktop-workspace-active .sp-dw-owner-home-intro p {\n    max-width:820px; margin:0; color:rgba(255,255,255,.78); font:500 14px/1.55 \"DM Sans\",Arial,sans-serif;\n  }\n\n  .serhill-desktop-workspace-active .sp-dw-owner-home-stats {\n    display:grid !important;\n    grid-template-columns:repeat(4,minmax(0,1fr)) !important;\n    gap:10px !important;\n    margin:0 0 20px !important;\n    padding:0 !important;\n    overflow:visible !important;\n  }\n  .serhill-desktop-workspace-active .sp-dw-owner-home-stats > div {\n    min-width:0 !important; min-height:92px !important; padding:16px 18px !important;\n    border:1px solid rgba(30,65,91,.10) !important; border-radius:16px !important;\n    background:rgba(255,255,255,.72) !important; color:var(--sp-ink) !important;\n    box-shadow:none !important; backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);\n  }\n  .serhill-desktop-workspace-active .sp-dw-owner-home-stats strong { color:var(--sp-ink) !important; font-size:28px !important; }\n  .serhill-desktop-workspace-active .sp-dw-owner-home-stats span { color:#61717e !important; font-size:10px !important; letter-spacing:.08em; }\n\n  .serhill-desktop-workspace-active .sp-dw-view[data-dw-panel=\"home\"] > #coach-overview,\n  .serhill-desktop-workspace-active .sp-dw-view[data-dw-panel=\"home\"] > .sp-owner-coaches { margin-top:18px; }\n\n  .serhill-desktop-workspace-active .sp-dw-search[hidden] { display:none !important; }\n  .serhill-desktop-workspace-active .sp-dw-topbar:has(.sp-dw-search[hidden]) { grid-template-columns:1fr; }\n\n  .serhill-desktop-workspace-active .sp-dw-nav-focus {\n    border-radius:18px;\n    background:rgba(255,255,255,.34);\n  }\n}\n@media (min-width:783px) and (max-width:1100px) {\n  .serhill-desktop-workspace-active .sp-dw-owner-home-stats { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }\n}\n

/* v0.41.131 — desktop navigation toggles, persistent client search, paged client roster. */
@media (min-width:783px) {
  .serhill-desktop-workspace-active .sp-dw-group-head { padding-right: 14px !important; }
  .serhill-desktop-workspace-active .sp-dw-group-head i { display:none !important; }
  .serhill-desktop-workspace-active .sp-dw-group-head::after {
    content:"";
    width:7px; height:7px; margin-left:auto;
    border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
    transform:rotate(45deg); opacity:.48;
    transition:transform .18s ease, opacity .18s ease;
  }
  .serhill-desktop-workspace-active .sp-dw-group.is-open > .sp-dw-group-head::after {
    transform:rotate(225deg); opacity:.72;
  }
  .serhill-desktop-workspace-active .sp-dwc-more {
    width:100%; min-height:46px; border:0; border-top:1px solid var(--sp-line);
    background:rgba(246,249,251,.86); color:#174f7a; cursor:pointer;
    font:800 12px/1.2 "DM Sans",Arial,sans-serif; letter-spacing:.01em;
    transition:background .18s ease;
  }
  .serhill-desktop-workspace-active .sp-dwc-more:hover { background:rgba(232,241,247,.96); }
  .serhill-desktop-workspace-active .sp-dwc-detail:not([hidden]) { min-height:100%; }
  .serhill-desktop-workspace-active .sp-dwc-root[hidden] { display:none !important; }
}


/* v0.41.132 — selected client fully replaces the desktop roster. */
@media (min-width:783px) {
  .serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"].sp-dwc-client-open > .sp-dwc-root,
  .serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"].sp-dwc-client-open > .sp-dwc-clients-legacy {
    display:none !important;
  }
  .serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"].sp-dwc-client-open > .sp-dwc-detail {
    display:grid !important;
    min-height:100%;
  }
}


/* v0.41.134 — per-user web Workspace appearance controls.
   The controls are intentionally invisible below the desktop breakpoint. */
.sp-web-workspace-settings { display: none !important; }
@media (min-width: 783px) {
  .sp-web-workspace-settings {
    display: grid !important;
    gap: 14px;
    margin-top: 20px;
    padding: 18px;
    border: 1px solid rgba(31,72,106,.14);
    border-radius: 16px;
    background: rgba(255,255,255,.56);
  }
  .sp-web-workspace-settings legend { font-weight: 700; padding: 0 7px; }
  .sp-web-workspace-settings > p { margin: 0; color: #667482; }
  .sp-web-workspace-bg-preview { max-width: 440px; overflow: hidden; border-radius: 14px; border: 1px solid rgba(31,72,106,.13); }
  .sp-web-workspace-bg-preview img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
  .sp-web-workspace-default-note { font-size: 13px; }
  .sp-web-workspace-transparency { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
  .sp-web-workspace-transparency input[type="range"] { grid-column: 1 / -1; width: 100%; }
  .sp-web-workspace-transparency small { grid-column: 1 / -1; }
}

/* v0.41.135 — make the per-user Workspace transparency value authoritative.
   Desktop/tablet only; the mobile shell is intentionally untouched. */
@media (min-width: 783px) {
  body.serhill-desktop-workspace-active {
    --sp-user-workspace-alpha: .78;
    --sp-user-topbar-alpha: .66;
  }
  body.serhill-desktop-workspace-active .sp-dw-main {
    background-color: rgba(255,255,255,var(--sp-user-workspace-alpha)) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-topbar {
    background-color: rgba(255,255,255,var(--sp-user-topbar-alpha)) !important;
  }
}

/* v0.41.137 — desktop Schedule five-hour Ledger strip + precise subnavigation state. */
@media (min-width:783px) {
  .serhill-desktop-workspace-active .sp-dw-subnav > button.is-active,
  .serhill-desktop-workspace-active .sp-dw-subnav > a.is-active {
    background: rgba(43,111,157,.12) !important;
    color: #174f7a !important;
    font-weight: 800 !important;
  }
  .serhill-desktop-workspace-active .sp-dw-group.is-current > .sp-dw-group-head:not(.is-active) {
    background: transparent !important;
  }
  .serhill-desktop-workspace-active .sp-dw-group.is-current > .sp-dw-group-head:not(.is-active):hover {
    background: rgba(255,255,255,.36) !important;
  }

  .serhill-desktop-workspace-active .sp-dws-window {
    margin: 0 0 18px;
    padding: 15px 16px 16px;
    border: 1px solid rgba(31,72,106,.10);
    border-radius: 18px;
    background: rgba(255,255,255,.46);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .serhill-desktop-workspace-active .sp-dws-window > header {
    display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
    margin:0 0 11px; padding:0 2px;
  }
  .serhill-desktop-workspace-active .sp-dws-window > header div { display:grid; gap:2px; }
  .serhill-desktop-workspace-active .sp-dws-window > header span {
    color:#778793; font:800 9px/1.2 "DM Sans",Arial,sans-serif; letter-spacing:.14em;
  }
  .serhill-desktop-workspace-active .sp-dws-window > header strong {
    color:#18354a; font:750 15px/1.2 Manrope,Arial,sans-serif;
  }
  .serhill-desktop-workspace-active .sp-dws-window > header a {
    color:#2b6f9d; text-decoration:none; font:700 11px/1.2 "DM Sans",Arial,sans-serif;
  }
  .serhill-desktop-workspace-active .sp-dws-window-cards {
    display:flex; gap:9px; overflow-x:auto; padding:1px 1px 3px;
    scrollbar-width:thin;
  }
  .serhill-desktop-workspace-active .sp-dws-window-card {
    flex:0 0 148px; min-height:92px; display:grid; align-content:start; gap:4px;
    padding:12px 13px; border:1px solid rgba(31,72,106,.11); border-radius:14px;
    background:rgba(255,255,255,.70); color:#1b3448; text-decoration:none;
    box-shadow:0 4px 14px rgba(20,49,70,.035);
    transition:transform .16s ease, background .16s ease, box-shadow .16s ease;
  }
  .serhill-desktop-workspace-active .sp-dws-window-card:hover {
    transform:translateY(-1px); background:rgba(255,255,255,.88); box-shadow:0 8px 18px rgba(20,49,70,.07);
  }
  .serhill-desktop-workspace-active .sp-dws-window-card time {
    color:#2b6f9d; font:800 12px/1.2 "DM Sans",Arial,sans-serif;
  }
  .serhill-desktop-workspace-active .sp-dws-window-card strong {
    display:-webkit-box; overflow:hidden; -webkit-line-clamp:2; -webkit-box-orient:vertical;
    color:#152f43; font:750 13px/1.25 Manrope,Arial,sans-serif;
  }
  .serhill-desktop-workspace-active .sp-dws-window-card small {
    display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    color:#74828d; font:600 10px/1.2 "DM Sans",Arial,sans-serif;
  }
  .serhill-desktop-workspace-active .sp-dws-window-empty {
    min-height:70px; display:flex; align-items:center; padding:0 6px;
    color:#74828d; font:600 12px/1.4 "DM Sans",Arial,sans-serif;
  }
}


/* v0.41.138 — authoritative, high-range live Workspace transparency preview.
   Desktop/tablet only. Mobile shell remains untouched. */
@media (min-width: 783px) {
  body.serhill-desktop-workspace-active {
    --sp-user-workspace-alpha: .78;
    --sp-user-topbar-alpha: .68;
    --sp-user-workspace-blur: 16px;
  }
  body.serhill-desktop-workspace-active .sp-dw-main,
  body.serhill-desktop-workspace-active.serhill-desktop-background-enabled .sp-dw-main {
    background: rgba(255,255,255,var(--sp-user-workspace-alpha)) !important;
    -webkit-backdrop-filter: blur(var(--sp-user-workspace-blur)) saturate(108%);
    backdrop-filter: blur(var(--sp-user-workspace-blur)) saturate(108%);
  }
  body.serhill-desktop-workspace-active .sp-dw-topbar,
  body.serhill-desktop-workspace-active.serhill-desktop-background-enabled .sp-dw-topbar {
    background: rgba(255,255,255,var(--sp-user-topbar-alpha)) !important;
  }
}

/* v0.41.139 — desktop Nutrition is presented inside the central Workspace.
   Existing Meal Planner pages/forms are embedded; mobile assets are untouched. */
@media (min-width:783px) {
  .serhill-desktop-workspace-active .sp-dw-nutrition-managed > .sp-dw-nutrition-legacy { display:none !important; }
  .serhill-desktop-workspace-active .sp-dwn-root { width:100%; min-width:0; }
  .serhill-desktop-workspace-active .sp-dwn-stage { width:100%; min-width:0; }
  .serhill-desktop-workspace-active .sp-dwn-frame {
    display:block; width:100%; min-height:720px; border:0; background:transparent;
  }
  .serhill-desktop-workspace-active .sp-dwn-detail-bar {
    position:sticky; top:0; z-index:4; display:flex; align-items:center; min-height:46px;
    margin:0 0 12px; padding:4px 0 10px; background:rgba(255,255,255,.22);
    -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  }
  .serhill-desktop-workspace-active .sp-dwn-detail-bar button {
    border:0; border-radius:999px; padding:9px 13px; background:rgba(43,111,157,.10);
    color:#174f7a; font:750 12px/1.2 "DM Sans",Arial,sans-serif; cursor:pointer;
  }
  .serhill-desktop-workspace-active .sp-dwn-detail-bar button:hover { background:rgba(43,111,157,.16); }
}


/* v0.41.140 — explicit SERHILL-default background action in web Profile only. */
@media (min-width: 783px) {
  .sp-web-workspace-default-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 2px 0 10px;
  }
  .sp-web-workspace-default-actions .sp-button-secondary {
    width: auto;
    min-height: 38px;
    padding: 8px 14px;
  }
  .sp-web-workspace-default-actions small {
    flex: 1 1 260px;
    margin: 0;
  }
}


/* v0.41.142 — desktop Legacy Builder visual refinement.
   Presentation-only polish for the workout creation UI; no behavior changes and no mobile impact. */
@media (min-width: 783px) {
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-list {
    gap: 22px;
    margin: 22px 0;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-exercise {
    overflow: hidden;
    border: 1px solid rgba(27,62,89,.12);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(250,252,253,.88) 100%);
    box-shadow: 0 14px 36px rgba(21,48,69,.06);
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-exercise > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 22px 16px;
    border-bottom: 1px solid rgba(27,62,89,.08);
    background: linear-gradient(180deg, rgba(248,251,253,.92) 0%, rgba(255,255,255,.72) 100%);
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-name label,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details label,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-set-editor > label,
  body.serhill-desktop-workspace-active .sp-live-builder > label {
    display: grid;
    gap: 8px;
    color: #536472;
    font: 700 12px/1.3 "DM Sans", Arial, sans-serif;
    letter-spacing: .01em;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-count {
    color: #2a6f9d;
    font-size: 11px;
    letter-spacing: .12em;
  }
  body.serhill-desktop-workspace-active .sp-live-builder input[type="text"],
  body.serhill-desktop-workspace-active .sp-live-builder input[type="number"],
  body.serhill-desktop-workspace-active .sp-live-builder input[type="search"],
  body.serhill-desktop-workspace-active .sp-live-builder select,
  body.serhill-desktop-workspace-active .sp-live-builder textarea {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid rgba(31,73,106,.16);
    border-radius: 15px;
    background: rgba(255,255,255,.96);
    color: #17364d;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  }
  body.serhill-desktop-workspace-active .sp-live-builder textarea {
    min-height: 108px;
    padding: 14px 15px;
    line-height: 1.5;
    resize: vertical;
  }
  body.serhill-desktop-workspace-active .sp-live-builder input::placeholder,
  body.serhill-desktop-workspace-active .sp-live-builder textarea::placeholder {
    color: #96a2ac;
  }
  body.serhill-desktop-workspace-active .sp-live-builder input:focus,
  body.serhill-desktop-workspace-active .sp-live-builder select:focus,
  body.serhill-desktop-workspace-active .sp-live-builder textarea:focus {
    outline: none;
    border-color: rgba(66,121,162,.55);
    box-shadow: 0 0 0 4px rgba(66,121,162,.12), inset 0 1px 0 rgba(255,255,255,.92);
    background: #fff;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-remove-exercise,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-remove-set {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    border: 1px solid rgba(31,73,106,.14);
    border-radius: 15px;
    background: rgba(255,255,255,.92);
    color: #4a6173;
    box-shadow: 0 6px 16px rgba(15,37,54,.05);
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-remove-exercise:hover,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-remove-set:hover {
    transform: translateY(-1px);
    background: rgba(245,249,252,.98);
    box-shadow: 0 9px 20px rgba(15,37,54,.08);
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-technique {
    margin: 18px 22px 10px;
    border: 1px solid rgba(31,73,106,.10);
    border-radius: 18px;
    background: rgba(246,249,252,.82);
    overflow: hidden;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-technique > summary {
    padding: 14px 16px;
    color: #225f8b;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-technique > p {
    padding: 0 16px 16px;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-exercise-history-stats {
    gap: 12px;
    padding: 0 22px 18px;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-exercise-history-stats span {
    padding: 13px 14px;
    border: 1px solid rgba(31,73,106,.08);
    border-radius: 16px;
    background: rgba(245,248,250,.92);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-exercise-history-stats small {
    color: #748493;
    font-size: 10px;
    letter-spacing: .06em;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-exercise-history-stats strong {
    color: #163349;
    font: 800 15px/1.2 Manrope, Arial, sans-serif;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-previous-set-list {
    margin: 0 22px 16px;
    padding: 12px 14px;
    border: 1px solid rgba(31,73,106,.08);
    border-radius: 16px;
    background: rgba(249,251,252,.78);
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-sets {
    margin: 0 22px 16px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(31,73,106,.10);
    border-radius: 20px;
    background: rgba(255,255,255,.78);
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-head {
    padding: 0 4px 10px;
    color: #7b8b97;
    font-size: 10px;
    letter-spacing: .07em;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row {
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid rgba(31,73,106,.07);
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row > b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(33,91,131,.08);
    color: #1a4f76;
    font: 800 14px/1 Manrope, Arial, sans-serif;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row .sp-planned-field {
    position: relative;
    display: block;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row .sp-planned-field.is-suggested input {
    border-color: rgba(224,184,79,.35);
    background: rgba(255,251,242,.96);
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row .sp-suggestion-marker {
    position: absolute;
    top: 50%;
    right: 11px;
    transform: translateY(-50%);
    color: #b88922;
    font-size: 12px;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row .sp-set-note {
    grid-column: 2 / 7;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-add-set,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-add-exercise {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(27,62,89,.22);
    background: rgba(255,255,255,.94);
    color: #205e8b;
    font: 800 16px/1 Manrope, Arial, sans-serif;
    box-shadow: 0 10px 20px rgba(15,37,54,.04);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-add-set {
    margin: 2px 22px 12px;
    padding: 0 18px;
    width: auto;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-add-exercise {
    width: 100%;
    margin-top: 4px;
    border-style: solid;
    border-color: rgba(43,111,157,.20);
    background: rgba(247,250,252,.86);
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-add-set:hover,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-add-exercise:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(15,37,54,.07);
    background: #fff;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details {
    gap: 14px;
    margin: 0 22px 14px;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-set-editor > label,
  body.serhill-desktop-workspace-active .sp-live-builder > label {
    margin: 0 22px 16px;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-session-comment,
  body.serhill-desktop-workspace-active .sp-live-builder > .sp-session-comment {
    margin: 8px 0 0;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-session-builder-actions {
    margin-top: 8px;
    align-items: center;
  }
}


/* v0.41.143 — desktop workspace polish: training builder compactness, unified buttons, cleaner Profile/Support. */
@media (min-width: 783px) {
  /* Keep Profile navigation logical: account view hides support duplication; management view shows only support. */
  .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="account"] .sp-management-support { display: none !important; }
  .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="management"] .sp-profile-editor,
  .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="management"] .sp-management[data-business-support] { display: none !important; }

  /* Consistent button language across the desktop portal workspace. */
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button-secondary,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-link-button,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-mode-button,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-dwc-actions button,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-dw-metrics button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 15px;
    font: 800 14px/1 "DM Sans", Arial, sans-serif;
    letter-spacing: .02em;
    text-transform: none;
    box-shadow: 0 8px 18px rgba(15,37,54,.04);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
  }
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button:hover,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button-secondary:hover,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-link-button:hover,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-mode-button:hover,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-dwc-actions button:hover,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-dw-metrics button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15,37,54,.08);
  }
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button {
    border-color: var(--sp-blue);
    background: var(--sp-blue);
  }
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button-secondary,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-link-button,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-mode-button,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-dwc-actions button {
    border-color: rgba(27,62,89,.16) !important;
    background: rgba(255,255,255,.96) !important;
    color: #1d3e56 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-main .sp-mode-button.is-active {
    border-color: rgba(43,111,157,.24) !important;
    background: rgba(235,243,248,.95) !important;
    color: #174f7a !important;
  }

  /* Global field polish inside the main desktop workspace. */
  body.serhill-desktop-workspace-active .sp-dw-main .sp-form input[type="text"],
  body.serhill-desktop-workspace-active .sp-dw-main .sp-form input[type="email"],
  body.serhill-desktop-workspace-active .sp-dw-main .sp-form input[type="password"],
  body.serhill-desktop-workspace-active .sp-dw-main .sp-form input[type="search"],
  body.serhill-desktop-workspace-active .sp-dw-main .sp-form input[type="number"],
  body.serhill-desktop-workspace-active .sp-dw-main .sp-form input[type="date"],
  body.serhill-desktop-workspace-active .sp-dw-main .sp-form input[type="file"],
  body.serhill-desktop-workspace-active .sp-dw-main .sp-form select,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-form textarea,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-roster-search {
    border-radius: 15px;
    border-color: rgba(31,73,106,.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  }
  body.serhill-desktop-workspace-active .sp-dw-main .sp-form textarea { min-height: 150px; }

  /* Make the live-session builder fit better on tablet/rotated desktop widths. */
  .sp-dw-view[data-dw-panel="training"] .sp-coach-section,
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-exercise,
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-sets,
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-builder-technique,
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-previous-set-list {
    border-radius: 20px;
  }
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-builder-set-row,
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-builder-set-head {
    grid-template-columns: 38px minmax(82px, .9fr) minmax(88px, .9fr) minmax(110px, 1fr) minmax(128px, 1fr) 40px;
    gap: 8px;
  }
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-builder-set-row > b {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-builder-set-row input,
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-details input,
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-details select,
  .sp-dw-view[data-dw-panel="training"] .sp-session-basics input,
  .sp-dw-view[data-dw-panel="training"] .sp-session-basics select,
  .sp-dw-view[data-dw-panel="training"] .sp-session-builder textarea {
    min-height: 44px;
  }
  .sp-dw-view[data-dw-panel="training"] .sp-session-builder textarea,
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder textarea { min-height: 124px; }
  .sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions {
    gap: 12px;
    margin-top: 14px;
  }
  .sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions .sp-button,
  .sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions .sp-button-secondary {
    min-width: 220px;
  }
  .sp-dw-view[data-dw-panel="training"] .sp-session-basics {
    gap: 12px;
    grid-template-columns: minmax(0,1.08fr) minmax(0,.82fr) minmax(0,.95fr);
  }
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-details {
    gap: 12px;
    margin-bottom: 10px;
  }
  .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-add-exercise { min-height: 56px; }

  /* Profile/account area cleanup. */
  .sp-dw-view[data-dw-panel="profile"] .sp-profile-editor,
  .sp-dw-view[data-dw-panel="profile"] .sp-management-support,
  .sp-dw-view[data-dw-panel="profile"] .sp-management[data-business-support] {
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(15,37,54,.05);
  }
  .sp-dw-view[data-dw-panel="profile"] .sp-profile-editor > h2,
  .sp-dw-view[data-dw-panel="profile"] .sp-management-support h2 {
    margin-bottom: 12px;
    line-height: 1.08;
  }
  .sp-dw-view[data-dw-panel="profile"] .sp-profile-edit-fold > summary {
    padding: 14px 0;
    color: #1d4e73;
  }
  .sp-dw-view[data-dw-panel="profile"] .sp-form.sp-compact-form,
  .sp-dw-view[data-dw-panel="profile"] .sp-management-support-form .sp-form {
    gap: 16px;
    margin-top: 16px;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(250,252,253,.95) 0%, rgba(255,255,255,.98) 100%);
  }
  .sp-dw-view[data-dw-panel="profile"] .sp-profile-settings {
    padding: 18px;
    border-radius: 18px;
    background: rgba(248,250,252,.92);
  }
  .sp-dw-view[data-dw-panel="profile"] .sp-web-workspace-bg-preview img,
  .sp-dw-view[data-dw-panel="profile"] .sp-profile-preview img {
    border-radius: 18px;
  }
  .sp-dw-view[data-dw-panel="profile"] .sp-management-support-form > p {
    max-width: 760px;
    margin-bottom: 0;
  }
  .sp-dw-view[data-dw-panel="profile"] .sp-management-support-form .sp-form {
    max-width: 820px;
  }
  .sp-dw-view[data-dw-panel="profile"] .sp-management-support-form textarea {
    min-height: 170px;
  }

}

@media (min-width: 783px) and (max-width: 1120px) {
.sp-desktop-workspace { grid-template-columns: 206px minmax(0, 1fr); }
.sp-dw-topbar { grid-template-columns: minmax(0, 1fr) minmax(220px, 350px); gap: 18px; min-height: 84px; padding: 12px 18px; }
.sp-dw-content { padding: 18px 18px 52px; }
.sp-dw-title h1 { font-size: 22px; }
.sp-dw-search { min-height: 44px; }
.sp-dw-sidebar { padding: 18px 10px 14px; }
.sp-dw-brand { padding: 0 10px 18px; }
.sp-dw-primary { margin-bottom: 14px; }
.sp-dw-nav button,
.sp-dw-nav a,
.sp-dw-nav-secondary button { gap: 8px; padding: 0 10px; font-size: 12px; }

.sp-dw-view .sp-coach-section,
.sp-dw-view .sp-management,
.sp-dw-view .sp-management-support,
.sp-dw-view .sp-progress { padding: 18px; }

.sp-dw-view[data-dw-panel="training"] .sp-session-basics { grid-template-columns: 1fr 1fr; }
.sp-dw-view[data-dw-panel="training"] .sp-session-basics label:first-child { grid-column: 1 / -1; }
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-exercise > header,
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-sets,
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-exercise-history-stats,
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-previous-set-list,
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-builder-technique,
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-details,
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-add-set,
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-set-editor > label,
.sp-dw-view[data-dw-panel="training"] .sp-live-builder > label { margin-left: 14px; margin-right: 14px; }
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-exercise > header { padding: 18px 14px 14px; }
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-sets { padding: 14px 14px 12px; }
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-builder-set-row,
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-builder-set-head {
  grid-template-columns: 34px minmax(72px, .8fr) minmax(76px, .8fr) minmax(96px, .95fr) minmax(106px, 1fr) 36px;
  gap: 6px;
}
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-builder-set-head { font-size: 9px; }
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-builder-set-row .sp-set-note { grid-column: 2 / 7; }
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-add-set,
.sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-add-exercise,
.sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions .sp-button,
.sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions .sp-button-secondary {
  min-width: 0;
  width: 100%;
}
.sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions { display: grid; grid-template-columns: 1fr 1fr; }
.sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions > *:last-child:nth-child(odd) { grid-column: 1 / -1; }

.sp-dw-view[data-dw-panel="profile"] .sp-profile-preview { gap: 16px; }
.sp-dw-view[data-dw-panel="profile"] .sp-profile-preview img { width: 96px; height: 96px; flex-basis: 96px; }
.sp-dw-view[data-dw-panel="profile"] .sp-form.sp-compact-form,
.sp-dw-view[data-dw-panel="profile"] .sp-management-support-form .sp-form { padding: 18px; }
}


/* v0.41.144 — authoritative tablet/desktop cleanup.
   Direct selectors + explicit overrides so the changes are visible on iPad landscape/rotated web Workspace. */
@media (min-width: 783px) {

  /* Workspace geometry: give the work area more usable width without changing mobile. */
  body.serhill-desktop-workspace-active .sp-dw-content {
    padding: 18px 20px 52px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view {
    width: 100% !important;
    max-width: 1360px !important;
  }

  /* Unified desktop button system — clearly visible, softer and consistent. */
  body.serhill-desktop-workspace-active .sp-dw-main button.sp-button,
  body.serhill-desktop-workspace-active .sp-dw-main a.sp-button,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button-secondary,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-add-set,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-add-exercise {
    min-height: 46px !important;
    padding: 0 18px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: .01em !important;
    text-transform: none !important;
    box-shadow: 0 8px 20px rgba(20,48,70,.055) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button-secondary {
    border: 1px solid rgba(26,62,88,.18) !important;
    background: rgba(255,255,255,.96) !important;
    color: #183d58 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-main .sp-link-button {
    min-height: 38px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: rgba(111,77,57,.07) !important;
    color: #76513d !important;
    text-decoration: none !important;
    font-size: 12px !important;
  }

  /* Legacy Builder: visibly softer + more compact. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder {
    width: 100% !important;
    max-width: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-list {
    gap: 16px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-exercise {
    border: 1px solid rgba(27,62,89,.10) !important;
    border-radius: 20px !important;
    background: rgba(255,255,255,.84) !important;
    box-shadow: 0 10px 28px rgba(20,48,70,.045) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-live-builder-exercise > header {
    padding: 16px 18px 13px !important;
    border-bottom: 1px solid rgba(27,62,89,.07) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder input[type="text"],
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder input[type="number"],
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder input[type="date"],
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder select,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder textarea {
    min-height: 42px !important;
    padding-left: 13px !important;
    padding-right: 13px !important;
    border: 1px solid rgba(31,73,106,.13) !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.92) !important;
    box-shadow: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder textarea {
    min-height: 104px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder input:focus,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder select:focus,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder textarea:focus {
    border-color: rgba(43,111,157,.48) !important;
    box-shadow: 0 0 0 3px rgba(43,111,157,.10) !important;
  }

  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-exercise-history-stats {
    gap: 8px !important;
    padding: 0 18px 12px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-exercise-history-stats span {
    min-height: 66px !important;
    padding: 10px 11px !important;
    border-radius: 13px !important;
    border: 1px solid rgba(31,73,106,.07) !important;
    background: rgba(244,248,250,.90) !important;
  }

  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder-sets {
    margin: 0 18px 12px !important;
    padding: 12px 14px 10px !important;
    border: 1px solid rgba(31,73,106,.08) !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,.62) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-head {
    grid-template-columns: 34px minmax(68px,.82fr) minmax(72px,.82fr) minmax(90px,1fr) minmax(104px,1.08fr) 38px !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row {
    padding: 9px 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-head {
    padding: 0 0 7px !important;
    font-size: 9px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row > b {
    width: 30px !important;
    height: 30px !important;
    font-size: 12px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row .sp-set-note {
    grid-column: 2 / 7 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder-details {
    gap: 10px !important;
    margin: 0 18px 10px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-add-set {
    margin: 0 18px 10px !important;
    width: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder .sp-set-editor > label,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder > label {
    margin-left: 18px !important;
    margin-right: 18px !important;
    margin-bottom: 12px !important;
  }

  /* Cleaner top part of live-session creation. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-workout-wizard,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-copy-history,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-progression-notice {
    padding: 16px !important;
    border-radius: 18px !important;
    border-color: rgba(31,73,106,.09) !important;
    background: rgba(249,251,252,.72) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-session-basics {
    gap: 10px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions {
    gap: 10px !important;
    padding-top: 8px !important;
    align-items: center !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions .sp-button,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions .sp-button-secondary {
    min-width: 190px !important;
    width: auto !important;
  }

  /* Account Profile and Contact Management: one visual system, less boxy. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-editor,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management-support {
    padding: 20px !important;
    border: 1px solid rgba(31,73,106,.09) !important;
    border-radius: 20px !important;
    background: rgba(255,255,255,.80) !important;
    box-shadow: 0 12px 30px rgba(20,48,70,.045) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-preview {
    gap: 15px !important;
    padding: 14px 0 4px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-preview img {
    width: 86px !important;
    height: 86px !important;
    flex-basis: 86px !important;
    border-radius: 18px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-form.sp-compact-form,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management-support-form .sp-form {
    gap: 14px !important;
    margin-top: 14px !important;
    padding: 18px !important;
    border: 1px solid rgba(31,73,106,.08) !important;
    border-radius: 18px !important;
    background: rgba(249,251,252,.72) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-settings {
    gap: 9px !important;
    padding: 14px !important;
    border: 1px solid rgba(31,73,106,.08) !important;
    border-radius: 15px !important;
    background: rgba(255,255,255,.72) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management-support-form .sp-form {
    max-width: 760px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management-support-form textarea {
    min-height: 150px !important;
  }

  /* Canonical access: Contact Management lives in left menu, not duplicated below Account Profile. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"]:not([data-dw-profile-state="management"]) .sp-management-support {
    display: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="management"] .sp-profile-editor,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="management"] .sp-management[data-business-support] {
    display: none !important;
  }
}

/* Tablet / iPad web Workspace: use a two-row set editor instead of squeezing six columns. */
@media (min-width: 783px) and (max-width: 1040px) {
  body.serhill-desktop-workspace-active .sp-desktop-workspace {
    grid-template-columns: 188px minmax(0,1fr) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-sidebar {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-topbar {
    grid-template-columns: minmax(0,1fr) minmax(210px,320px) !important;
    gap: 14px !important;
    min-height: 80px !important;
    padding: 10px 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-content {
    padding: 14px 14px 44px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view .sp-coach-section {
    padding: 14px !important;
  }

  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-head {
    display: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row {
    display: grid !important;
    grid-template-columns: 32px minmax(0,1fr) minmax(0,1fr) 38px !important;
    grid-template-rows: auto auto auto !important;
    gap: 7px !important;
    padding: 10px 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row > b {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row > .sp-planned-field:nth-of-type(1) {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row > .sp-planned-field:nth-of-type(2) {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row > input[aria-label="Actual reps"] {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row > input[aria-label="Actual weight"] {
    grid-column: 3 !important;
    grid-row: 2 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row > .sp-remove-set {
    grid-column: 4 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-builder-set-row > .sp-set-note {
    grid-column: 2 / 5 !important;
    grid-row: 3 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-session-basics {
    grid-template-columns: 1fr 1fr !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-session-basics label:first-child {
    grid-column: 1 / -1 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions .sp-button,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-session-builder-actions .sp-button-secondary {
    width: 100% !important;
    min-width: 0 !important;
  }
}



/* v0.41.145 — desktop layout system cleanup.
   Stop small controls from stretching across the workspace, normalize surfaces,
   refine Advanced Builder/Profile/working hours/chat, mobile untouched. */
@media (min-width: 783px) {
  /* ---------- General desktop form rhythm ---------- */
  body.serhill-desktop-workspace-active .sp-dw-main {
    --sp-ui-control-h: 44px;
    --sp-ui-radius: 14px;
    --sp-ui-field-max: 640px;
    --sp-ui-form-max: 980px;
  }

  body.serhill-desktop-workspace-active .sp-dw-view .sp-form {
    width: min(100%, var(--sp-ui-form-max)) !important;
    max-width: var(--sp-ui-form-max) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view .sp-form > label:not(.sp-check):not(.sp-web-workspace-transparency),
  body.serhill-desktop-workspace-active .sp-dw-view .sp-profile-settings > label:not(.sp-check),
  body.serhill-desktop-workspace-active .sp-dw-view .sp-profile-field {
    width: min(100%, var(--sp-ui-field-max)) !important;
    max-width: var(--sp-ui-field-max) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view .sp-form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  body.serhill-desktop-workspace-active .sp-dw-view .sp-form select {
    min-height: var(--sp-ui-control-h) !important;
    border-radius: var(--sp-ui-radius) !important;
  }

  /* Don't paint a giant white rectangle behind every form. */
  body.serhill-desktop-workspace-active .sp-dw-view .sp-form,
  body.serhill-desktop-workspace-active .sp-dw-view .sp-compact-form {
    background: transparent !important;
    box-shadow: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view .sp-profile-settings,
  body.serhill-desktop-workspace-active .sp-dw-view .sp-management-support-form .sp-form,
  body.serhill-desktop-workspace-active .sp-dw-view .sp-trainer-hours {
    background: rgba(255,255,255,.58) !important;
    border: 1px solid rgba(31,73,106,.09) !important;
  }

  /* ---------- Training overview ---------- */
  body.serhill-desktop-workspace-active .sp-dwt-action,
  body.serhill-desktop-workspace-active .sp-dwt-card,
  body.serhill-desktop-workspace-active .sp-workout-wizard {
    border-radius: 16px !important;
  }

  /* ---------- Legacy Builder ---------- */
  body.serhill-desktop-workspace-active .sp-live-builder .sp-exercise-name,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-exercise-picker {
    max-width: 760px !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details {
    grid-template-columns: repeat(2, minmax(180px, 360px)) !important;
    justify-content: start !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details label {
    width: 100% !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details input,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details select {
    max-width: 360px !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-session-comment,
  body.serhill-desktop-workspace-active .sp-live-builder > label {
    max-width: 900px !important;
  }

  /* ---------- Advanced Builder ---------- */
  body.serhill-desktop-workspace-active .sp-advanced-builder {
    width: 100% !important;
    max-width: none !important;
    border: 0 !important;
    background: transparent !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-top,
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-client-strip {
    background: rgba(255,255,255,.52) !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-form {
    padding: 14px 0 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
    gap: 12px 14px !important;
    align-items: end !important;
    max-width: 1040px !important;
    margin: 0 0 18px !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate label {
    min-width: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate select {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px !important;
    padding: 8px 12px !important;
    border: 1px solid rgba(31,73,106,.13) !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.88) !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate .sp-button {
    width: 100% !important;
    max-width: 360px !important;
    justify-self: start !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-exercise {
    padding: 16px 18px !important;
    border: 1px solid rgba(31,73,106,.09) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.62) !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-setgrid {
    grid-template-columns: 34px minmax(120px, 260px) minmax(150px, 1fr) !important;
    gap: 8px 12px !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-setgrid input {
    min-height: 42px !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.78) !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-actions {
    position: static !important;
    width: fit-content !important;
    max-width: 100% !important;
    margin: 14px 0 0 !important;
    padding: 10px 0 0 !important;
    border-top: 0 !important;
    background: transparent !important;
    flex-wrap: wrap !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-actions .sp-button {
    min-width: 120px !important;
  }

  /* ---------- Profile ---------- */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-editor {
    width: 100% !important;
    max-width: 1080px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-edit-fold .sp-form {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-settings {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-training-profile-grid {
    width: min(100%, 900px) !important;
    max-width: 900px !important;
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
    gap: 12px 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-field {
    max-width: 760px !important;
  }

  /* Working hours should size to the content, not become a huge blank slab. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours-form {
    width: min(100%, 720px) !important;
    max-width: 720px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours {
    padding: 18px !important;
    border-radius: 18px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours-grid {
    max-width: 470px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours-form .sp-button {
    width: min(100%, 470px) !important;
  }

  /* Trainer-plan/module cards: clean spacing without white nested rectangles. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management[data-business-support] {
    max-width: 1080px !important;
    margin-inline: auto !important;
    background: rgba(255,255,255,.42) !important;
  }

  /* ---------- Contact management ---------- */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management-support {
    width: min(100%, 920px) !important;
    max-width: 920px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-management-support-form .sp-form {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  body.serhill-desktop-workspace-active .sp-management-support-form .sp-form > label {
    width: 100% !important;
    max-width: 760px !important;
  }
  body.serhill-desktop-workspace-active .sp-management-support-form textarea {
    min-height: 160px !important;
  }
  body.serhill-desktop-workspace-active .sp-management-support-form .sp-button {
    width: auto !important;
    min-width: 210px !important;
  }

  /* ---------- Messages / chat ---------- */
  body.serhill-desktop-workspace-active .sp-dwc-focused-tool[data-client-chat],
  body.serhill-desktop-workspace-active .sp-dwc-focused-tool .sp-chat,
  body.serhill-desktop-workspace-active .sp-chat {
    width: 100% !important;
    max-width: 920px !important;
  }
  body.serhill-desktop-workspace-active .sp-dwc-focused-tool .sp-chat,
  body.serhill-desktop-workspace-active .sp-chat {
    margin: 0 auto !important;
    padding: 18px !important;
    border: 1px solid rgba(31,73,106,.09) !important;
    border-radius: 20px !important;
    background: rgba(255,255,255,.68) !important;
    box-shadow: 0 12px 30px rgba(20,48,70,.045) !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-head {
    margin-bottom: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-head h2 {
    margin: 4px 0 !important;
    font-size: 26px !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-status {
    border-radius: 999px !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-messages {
    height: min(46vh, 460px) !important;
    padding: 14px !important;
    border: 1px solid rgba(31,73,106,.07) !important;
    border-radius: 16px !important;
    background: rgba(242,246,248,.68) !important;
  }
  body.serhill-desktop-workspace-active .sp-message {
    border-radius: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-form {
    width: 100% !important;
    max-width: none !important;
    gap: 10px !important;
    margin-top: 12px !important;
    padding: 0 !important;
    border: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-form > label {
    width: 100% !important;
    max-width: none !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-form textarea {
    min-height: 92px !important;
    border-radius: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-actions {
    justify-content: flex-start !important;
    gap: 12px !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-actions .sp-button {
    min-width: 150px !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-attach {
    min-height: 44px !important;
    align-items: center !important;
    padding: 0 12px !important;
    border: 1px solid rgba(31,73,106,.12) !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.74) !important;
  }

  /* Keep client list/messages list compact and centered. */
  body.serhill-desktop-workspace-active .sp-dwc-root,
  body.serhill-desktop-workspace-active .sp-dwc-detail {
    width: 100% !important;
    max-width: 1080px !important;
    margin-inline: auto !important;
  }
}

/* Medium desktop/tablet: reduce columns intelligently rather than stretching. */
@media (min-width: 783px) and (max-width: 1180px) {
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
    max-width: 820px !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate .sp-button {
    grid-column: 1 / -1 !important;
    max-width: 320px !important;
  }
}

/* Narrow desktop/tablet portrait: one usable column, still not mobile UI. */
@media (min-width: 783px) and (max-width: 900px) {
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-training-profile-grid {
    grid-template-columns: 1fr !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details {
    grid-template-columns: 1fr !important;
  }
}


/* v0.41.146 — cohesive desktop scale system.
   One visual grammar for scalable controls, panels and action groups.
   Desktop/tablet only; mobile app shell stays untouched. */
@media (min-width: 783px) {
  body.serhill-desktop-workspace-active .sp-dw-main {
    --sp-desk-content: 1120px;
    --sp-desk-form: 820px;
    --sp-desk-field: 520px;
    --sp-desk-field-wide: 720px;
    --sp-desk-control-h: 42px;
    --sp-desk-radius: 14px;
    --sp-desk-card-radius: 18px;
    --sp-desk-border: rgba(29,67,94,.11);
    --sp-desk-surface: rgba(255,255,255,.62);
    --sp-desk-surface-soft: rgba(247,250,252,.52);
  }

  /* ===== Core geometry ===== */
  body.serhill-desktop-workspace-active .sp-dw-view {
    width: min(100%, var(--sp-desk-content)) !important;
    max-width: var(--sp-desk-content) !important;
    margin-inline: auto !important;
  }

  body.serhill-desktop-workspace-active .sp-dw-view > .sp-coach-section,
  body.serhill-desktop-workspace-active .sp-dw-view > .sp-management,
  body.serhill-desktop-workspace-active .sp-dw-view > .sp-management-support,
  body.serhill-desktop-workspace-active .sp-dw-view > .sp-progress {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Big wrapper panels should not become giant white sheets. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] > .sp-coach-section,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] > .sp-coach-section,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"] > .sp-request-overview {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* ===== Control sizing grammar ===== */
  body.serhill-desktop-workspace-active .sp-dw-main input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  body.serhill-desktop-workspace-active .sp-dw-main select,
  body.serhill-desktop-workspace-active .sp-dw-main textarea {
    box-sizing: border-box !important;
    border-radius: var(--sp-desk-radius) !important;
  }

  body.serhill-desktop-workspace-active .sp-dw-main .sp-form > label:not(.sp-check):not(.sp-hours-share),
  body.serhill-desktop-workspace-active .sp-dw-main .sp-profile-settings > label:not(.sp-check),
  body.serhill-desktop-workspace-active .sp-dw-main .sp-profile-field {
    width: min(100%, var(--sp-desk-field)) !important;
    max-width: var(--sp-desk-field) !important;
  }

  body.serhill-desktop-workspace-active .sp-dw-main .sp-form textarea,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-session-comment,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-live-builder > label {
    width: min(100%, var(--sp-desk-field-wide)) !important;
    max-width: var(--sp-desk-field-wide) !important;
  }

  /* Buttons are content-sized by default, not bars. */
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button-secondary,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-add-set,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-add-exercise,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-link-button {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 13px !important;
    white-space: nowrap !important;
  }

  /* Explicit full-width buttons only where the action is structurally primary. */
  body.serhill-desktop-workspace-active .sp-dw-primary {
    width: calc(100% - 8px) !important;
  }

  /* ===== Profile ===== */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-editor {
    width: min(100%, 920px) !important;
    max-width: 920px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-preview {
    width: min(100%, 760px) !important;
    padding: 16px !important;
    border: 1px solid var(--sp-desk-border) !important;
    border-radius: var(--sp-desk-card-radius) !important;
    background: var(--sp-desk-surface) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-edit-fold {
    width: min(100%, 760px) !important;
    margin-top: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-edit-fold > summary {
    min-height: 46px !important;
    padding: 0 14px !important;
    display: flex !important;
    align-items: center !important;
    border: 1px solid var(--sp-desk-border) !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.48) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-edit-fold > summary:after {
    margin-left: auto !important;
    font-size: 18px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-compact-form {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
    padding: 18px 0 0 !important;
    border: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-settings {
    width: min(100%, 640px) !important;
    max-width: 640px !important;
    padding: 15px !important;
    border: 1px solid var(--sp-desk-border) !important;
    border-radius: 15px !important;
    background: var(--sp-desk-surface-soft) !important;
  }

  /* Working hours = compact tool card. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours {
    width: min(100%, 720px) !important;
    max-width: 720px !important;
    margin: 16px auto 0 !important;
    padding: 18px !important;
    border: 1px solid var(--sp-desk-border) !important;
    border-radius: var(--sp-desk-card-radius) !important;
    background: var(--sp-desk-surface) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours > p {
    max-width: 620px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours .sp-profile-edit-fold {
    width: 100% !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours-form {
    width: 100% !important;
    max-width: 640px !important;
    padding: 14px 0 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-hours-share {
    width: min(100%, 600px) !important;
    padding: 13px !important;
    border-radius: 14px !important;
    background: rgba(247,250,252,.60) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours-grid {
    width: fit-content !important;
    max-width: 100% !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours-row {
    grid-template-columns: 68px 118px 12px 118px !important;
    gap: 8px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours-row input[type="time"] {
    width: 118px !important;
    min-height: 38px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours-form .sp-button {
    margin-top: 14px !important;
  }

  /* Trainer Plan = one coherent card group, not multiple nested white slabs. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management[data-business-support] {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
    margin-inline: auto !important;
    padding: 20px !important;
    border: 1px solid var(--sp-desk-border) !important;
    border-radius: var(--sp-desk-card-radius) !important;
    background: rgba(255,255,255,.46) !important;
  }
  body.serhill-desktop-workspace-active .sp-trainer-module-access {
    margin: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-trainer-module-access-head {
    max-width: 720px !important;
    margin-bottom: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-trainer-module-card {
    padding: 14px !important;
    border: 1px solid var(--sp-desk-border) !important;
    border-radius: 15px !important;
    background: rgba(255,255,255,.44) !important;
  }
  body.serhill-desktop-workspace-active .sp-trainer-module-card.is-active {
    background: rgba(240,249,244,.52) !important;
  }
  body.serhill-desktop-workspace-active .sp-trainer-module-grid {
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    gap: 10px !important;
  }

  /* ===== Contact management ===== */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management-support {
    width: min(100%, 820px) !important;
    max-width: 820px !important;
    margin-inline: auto !important;
    padding: 22px !important;
    border: 1px solid var(--sp-desk-border) !important;
    border-radius: var(--sp-desk-card-radius) !important;
    background: rgba(255,255,255,.58) !important;
  }
  body.serhill-desktop-workspace-active .sp-management-support-form h2 {
    max-width: 680px !important;
    margin: 6px 0 8px !important;
    font-size: clamp(30px, 3.1vw, 44px) !important;
    line-height: 1.02 !important;
  }
  body.serhill-desktop-workspace-active .sp-management-support-form > p {
    max-width: 620px !important;
    font-size: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-management-support-form .sp-form {
    width: min(100%, 640px) !important;
    max-width: 640px !important;
    margin-top: 18px !important;
    padding: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-management-support-form .sp-form > label {
    width: 100% !important;
    max-width: 640px !important;
  }
  body.serhill-desktop-workspace-active .sp-management-support-form textarea {
    min-height: 150px !important;
  }
  body.serhill-desktop-workspace-active .sp-management-support-form .sp-button {
    width: auto !important;
    min-width: 190px !important;
  }

  /* ===== Legacy Builder ===== */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder-exercise {
    width: 100% !important;
    max-width: 940px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-name {
    max-width: 700px !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-exercise-history-stats {
    grid-template-columns: repeat(4,minmax(120px,1fr)) !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-sets {
    width: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-head {
    grid-template-columns: 34px 130px 140px 150px minmax(160px,1fr) 38px !important;
    gap: 8px !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details {
    grid-template-columns: 260px 320px !important;
    justify-content: start !important;
    gap: 12px !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details input,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details select {
    width: 100% !important;
    max-width: none !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-session-builder-actions {
    width: min(100%, 720px) !important;
  }

  /* ===== Advanced Builder ===== */
  body.serhill-desktop-workspace-active .sp-advanced-builder {
    max-width: 1020px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate {
    grid-template-columns: repeat(3, minmax(190px, 1fr)) !important;
    max-width: 900px !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate .sp-button {
    width: auto !important;
    min-width: 190px !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-exercise {
    width: 100% !important;
    max-width: 900px !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-setgrid {
    grid-template-columns: 34px 150px minmax(180px, 1fr) !important;
  }

  /* ===== Client requests & intake ===== */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"] .sp-request-overview {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-request-overview > p {
    max-width: 720px !important;
    margin-bottom: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-request-fold {
    border: 1px solid var(--sp-desk-border) !important;
    border-radius: var(--sp-desk-card-radius) !important;
    overflow: hidden !important;
    background: rgba(255,255,255,.55) !important;
  }
  body.serhill-desktop-workspace-active .sp-request-fold > summary {
    min-height: 58px !important;
    padding: 12px 16px !important;
  }
  body.serhill-desktop-workspace-active .sp-request-summary-counts {
    gap: 8px !important;
  }
  body.serhill-desktop-workspace-active .sp-request-tools {
    grid-template-columns: minmax(240px, 460px) 210px !important;
    justify-content: start !important;
    padding: 12px 16px !important;
  }
  body.serhill-desktop-workspace-active .sp-request-tools input,
  body.serhill-desktop-workspace-active .sp-request-tools select {
    min-height: 42px !important;
    border-radius: 13px !important;
  }
  body.serhill-desktop-workspace-active .sp-request-client > summary {
    min-height: 66px !important;
    padding: 9px 48px 9px 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-request-client-person > img {
    width: 40px !important;
    height: 40px !important;
    flex-basis: 40px !important;
  }
  body.serhill-desktop-workspace-active .sp-request-client > article.sp-client-row {
    display: grid !important;
    grid-template-columns: 180px minmax(0, 430px) !important;
    gap: 22px !important;
    justify-content: start !important;
    padding: 16px 20px 18px !important;
    background: rgba(247,250,252,.42) !important;
  }
  body.serhill-desktop-workspace-active .sp-request-client > article.sp-client-row > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  body.serhill-desktop-workspace-active .sp-request-client .sp-profile-card {
    gap: 10px !important;
  }
  body.serhill-desktop-workspace-active .sp-request-client .sp-profile-card img {
    width: 56px !important;
    height: 56px !important;
  }
  body.serhill-desktop-workspace-active .sp-request-client .sp-button {
    margin-top: 8px !important;
  }

  /* ===== Messaging ===== */
  body.serhill-desktop-workspace-active .sp-dwc-root,
  body.serhill-desktop-workspace-active .sp-dwc-detail {
    max-width: 920px !important;
  }
  body.serhill-desktop-workspace-active .sp-chat {
    max-width: 820px !important;
    margin-inline: auto !important;
    padding: 16px !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-messages {
    height: min(44vh, 420px) !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-form {
    max-width: 100% !important;
  }
  body.serhill-desktop-workspace-active .sp-chat-form textarea {
    max-width: 100% !important;
  }
}

/* Medium laptop/tablet: preserve proportions instead of stretching. */
@media (min-width: 783px) and (max-width: 1180px) {
  body.serhill-desktop-workspace-active .sp-dw-main {
    --sp-desk-content: 980px;
    --sp-desk-field: 480px;
    --sp-desk-field-wide: 660px;
  }

  body.serhill-desktop-workspace-active .sp-trainer-module-grid {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }

  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-head {
    grid-template-columns: 32px minmax(90px,1fr) minmax(100px,1fr) minmax(110px,1fr) minmax(130px,1.15fr) 36px !important;
  }

  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate {
    grid-template-columns: repeat(2, minmax(190px,1fr)) !important;
    max-width: 720px !important;
  }

  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate .sp-button {
    grid-column: 1 / -1 !important;
  }
}

/* Narrow desktop/tablet: stack logically, still desktop UI. */
@media (min-width: 783px) and (max-width: 920px) {
  body.serhill-desktop-workspace-active .sp-trainer-module-grid {
    grid-template-columns: 1fr !important;
  }
  body.serhill-desktop-workspace-active .sp-request-tools {
    grid-template-columns: 1fr !important;
  }
  body.serhill-desktop-workspace-active .sp-request-client > article.sp-client-row {
    grid-template-columns: 1fr !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details {
    grid-template-columns: 1fr !important;
  }
  body.serhill-desktop-workspace-active .sp-advanced-builder .sp-ab-generate {
    grid-template-columns: 1fr !important;
  }
}


/* v0.41.147 — desktop visual consolidation and functional payment tabs.
   Reduce oversized controls/surfaces, unify spacing and hierarchy across problem areas. */
@media (min-width: 783px) {
  body.serhill-desktop-workspace-active .sp-dw-main {
    --sp147-content: 1080px;
    --sp147-tool: 860px;
    --sp147-form: 720px;
    --sp147-field: 520px;
    --sp147-radius: 16px;
    --sp147-border: rgba(29,67,94,.10);
    --sp147-surface: rgba(255,255,255,.56);
    --sp147-soft: rgba(247,250,252,.48);
  }

  /* Base composition */
  body.serhill-desktop-workspace-active .sp-dw-view {
    width: min(100%, var(--sp147-content)) !important;
    max-width: var(--sp147-content) !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view > * {
    min-width: 0 !important;
  }

  /* Common compact controls */
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-button-secondary,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-add-set,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-add-exercise,
  body.serhill-desktop-workspace-active .sp-dw-main .sp-mode-button {
    width: auto !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
    text-transform: none !important;
  }

  /* -------- Schedule -------- */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] {
    max-width: 980px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] > .sp-coach-section {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] .sp-form {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
    margin: 18px 0 0 !important;
    padding: 18px !important;
    border: 1px solid var(--sp147-border) !important;
    border-radius: var(--sp147-radius) !important;
    background: var(--sp147-surface) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] .sp-form h3 {
    margin: 0 0 14px !important;
    font-size: 26px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] .sp-form > label {
    width: min(100%, 520px) !important;
    max-width: 520px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] .sp-form-grid {
    grid-template-columns: 260px 300px !important;
    justify-content: start !important;
    gap: 12px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] .sp-form-grid > label {
    width: 100% !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] .sp-notice {
    width: min(100%, 620px) !important;
    margin: 4px 0 !important;
    padding: 13px 15px !important;
    border-radius: 12px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] textarea {
    width: min(100%, 520px) !important;
    min-height: 110px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] .sp-form > .sp-button {
    width: auto !important;
    min-width: 180px !important;
  }

  /* -------- Training overview -------- */
  body.serhill-desktop-workspace-active .sp-dwt-root {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-dwt-summary {
    gap: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--sp147-border) !important;
    border-radius: var(--sp147-radius) !important;
    background: var(--sp147-surface) !important;
  }
  body.serhill-desktop-workspace-active .sp-dwt-summary > button {
    min-height: 74px !important;
    padding: 13px 15px !important;
    border: 0 !important;
    border-right: 1px solid var(--sp147-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dwt-summary > button:last-child {
    border-right: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dwt-actions {
    grid-template-columns: minmax(240px, 360px) auto !important;
    width: 100% !important;
    margin-top: 12px !important;
    padding: 14px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--sp147-border) !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  body.serhill-desktop-workspace-active .sp-dwt-actions-head {
    padding-bottom: 8px !important;
    border-bottom: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dwt-create {
    width: auto !important;
    min-width: 180px !important;
    padding-inline: 22px !important;
    border-radius: 13px !important;
  }

  /* -------- Legacy Builder -------- */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="training"] .sp-live-builder-exercise {
    max-width: 900px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-head {
    grid-template-columns: 34px 125px 140px 145px minmax(150px, 210px) 38px !important;
    justify-content: start !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row .sp-set-note {
    grid-column: 2 / 6 !important;
    max-width: 660px !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-live-builder-details {
    grid-template-columns: 260px 300px !important;
    justify-content: start !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-add-exercise {
    width: min(100%, 900px) !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-session-comment,
  body.serhill-desktop-workspace-active .sp-live-builder > label {
    max-width: 620px !important;
  }
  body.serhill-desktop-workspace-active .sp-session-builder-actions {
    width: auto !important;
    max-width: 680px !important;
  }

  /* -------- Analytics modal -------- */
  body.serhill-desktop-workspace-active .sp-legacy-analytics-modal > section {
    width: min(680px, calc(100vw - 40px)) !important;
    padding: 20px !important;
    border-radius: 18px !important;
  }
  body.serhill-desktop-workspace-active .sp-legacy-analytics-modal > section > header h3 {
    margin: 5px 0 0 !important;
    font-size: 30px !important;
  }
  body.serhill-desktop-workspace-active .sp-legacy-analytics-modal .sp-bests {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 9px !important;
    margin: 18px 0 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-legacy-analytics-modal .sp-bests h3 {
    grid-column: 1 / -1 !important;
    margin: 0 0 4px !important;
    font-size: 20px !important;
  }
  body.serhill-desktop-workspace-active .sp-legacy-analytics-modal .sp-bests span {
    min-width: 0 !important;
    padding: 12px 14px !important;
    border-radius: 13px !important;
    background: var(--sp147-soft) !important;
  }

  /* -------- Meal Planner -------- */
  body.serhill-desktop-workspace-active .sp-dwn-root {
    width: min(100%, 1000px) !important;
    max-width: 1000px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-meal-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-meal-top h1 {
    font-size: clamp(38px, 4vw, 54px) !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-meal-calculator {
    grid-template-columns: 220px minmax(420px,1fr) 180px !important;
    gap: 18px !important;
    padding: 20px !important;
    border: 1px solid var(--sp147-border) !important;
    border-radius: var(--sp147-radius) !important;
    background: var(--sp147-surface) !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-meal-calculator h2 {
    font-size: 30px !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-calculator-fields {
    grid-template-columns: 120px 74px 180px 180px !important;
    gap: 10px !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-target-card {
    min-height: 112px !important;
    padding: 16px !important;
    border-radius: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-meal-panel {
    padding: 20px !important;
    border: 1px solid var(--sp147-border) !important;
    border-radius: var(--sp147-radius) !important;
    background: var(--sp147-surface) !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-meal-builder {
    gap: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-meal-history > h2,
  body.serhill-desktop-workspace-active .sp-dwn-root [data-dwn-list] > h2 {
    font-size: 28px !important;
  }

  /* -------- Profile / Trainer plan -------- */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] {
    max-width: 960px !important;
  }
  body.serhill-desktop-workspace-active .sp-profile-editor {
    max-width: 820px !important;
  }
  body.serhill-desktop-workspace-active .sp-profile-preview,
  body.serhill-desktop-workspace-active .sp-profile-edit-fold {
    max-width: 680px !important;
  }
  body.serhill-desktop-workspace-active .sp-trainer-hours {
    max-width: 660px !important;
  }
  body.serhill-desktop-workspace-active .sp-management[data-business-support] {
    max-width: 900px !important;
  }
  body.serhill-desktop-workspace-active .sp-trainer-module-access-head {
    max-width: 620px !important;
  }
  body.serhill-desktop-workspace-active .sp-trainer-module-grid {
    gap: 8px !important;
  }
  body.serhill-desktop-workspace-active .sp-trainer-module-card {
    padding: 13px !important;
  }

  /* -------- Client payments -------- */
  body.serhill-desktop-workspace-active .sp-payment-request-center {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
    margin-inline: auto !important;
    padding: 20px !important;
    border: 1px solid var(--sp147-border) !important;
    border-radius: 18px !important;
    background: var(--sp147-surface) !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-center > h2 {
    margin: 5px 0 7px !important;
    font-size: 34px !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-center-summary {
    margin: 10px 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-tabs {
    display: inline-flex !important;
    width: auto !important;
    margin: 10px 0 16px !important;
    padding: 4px !important;
    gap: 4px !important;
    border: 1px solid var(--sp147-border) !important;
    border-radius: 13px !important;
    background: rgba(247,250,252,.62) !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-tabs button {
    width: auto !important;
    min-height: 36px !important;
    padding: 0 13px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #516475 !important;
    font-weight: 800 !important;
    cursor: pointer !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-tabs button.is-active {
    background: #fff !important;
    color: #174f7a !important;
    box-shadow: 0 4px 12px rgba(20,48,70,.07) !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-panel {
    width: 100% !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-panel .sp-form {
    width: min(100%, 620px) !important;
    max-width: 620px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-fields {
    grid-template-columns: 180px 220px !important;
    gap: 10px !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-row {
    padding: 13px !important;
    border-radius: 13px !important;
  }

  /* -------- My Products -------- */
  body.serhill-desktop-workspace-active [data-purchased-programs],
  body.serhill-desktop-workspace-active .sp-resource-library {
    width: min(100%, 820px) !important;
    max-width: 820px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active [data-purchased-programs] h2,
  body.serhill-desktop-workspace-active [data-purchased-programs] h3 {
    margin-bottom: 10px !important;
  }
  body.serhill-desktop-workspace-active [data-purchased-programs] .sp-resource-list {
    margin-top: 12px !important;
  }
  body.serhill-desktop-workspace-active [data-purchased-programs] .sp-resource-list > div,
  body.serhill-desktop-workspace-active .sp-purchased-program {
    padding: 13px 0 !important;
    gap: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-product-actions {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
  }
  body.serhill-desktop-workspace-active .sp-product-actions .sp-link {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 36px !important;
    padding: 0 11px !important;
    border: 1px solid var(--sp147-border) !important;
    border-radius: 10px !important;
    text-decoration: none !important;
  }
}

@media (min-width: 783px) and (max-width: 1040px) {
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="schedule"] .sp-form-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-row,
  body.serhill-desktop-workspace-active .sp-live-builder .sp-builder-set-head {
    grid-template-columns: 32px minmax(88px,1fr) minmax(95px,1fr) minmax(105px,1fr) minmax(120px,1.1fr) 36px !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-meal-calculator {
    grid-template-columns: 1fr !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-calculator-fields {
    grid-template-columns: repeat(2,minmax(160px,1fr)) !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root .sp-target-card {
    max-width: 260px !important;
  }
}


/* v0.41.148 — final desktop alignment pass for Training client prompt,
   Payment Requests, Profile coherence and Nutrition embedded scrolling/surfaces. */
@media (min-width: 783px) {

  /* ---------- Training client-required dialog ---------- */
  .sp-dwt-client-prompt[hidden] { display: none !important; }
  .sp-dwt-client-prompt {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 24px;
  }
  .sp-dwt-client-prompt-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(19,31,43,.52);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .sp-dwt-client-prompt-card {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 48px));
    padding: 24px;
    border: 1px solid rgba(29,67,94,.12);
    border-radius: 20px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 28px 70px rgba(15,31,45,.24);
  }
  .sp-dwt-client-prompt-card > span {
    color: #2f668f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
  }
  .sp-dwt-client-prompt-card h2 {
    margin: 8px 40px 8px 0;
    font: 800 30px/1.06 Manrope,Arial,sans-serif;
    letter-spacing: -.03em;
  }
  .sp-dwt-client-prompt-card p {
    margin: 0 0 18px;
    color: #687685;
    font-size: 14px;
    line-height: 1.5;
  }
  .sp-dwt-client-prompt-card label {
    display: grid;
    gap: 7px;
  }
  .sp-dwt-client-prompt-card label small {
    color: #6d7b87;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
  }
  .sp-dwt-client-prompt-card select {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid rgba(29,67,94,.16);
    border-radius: 13px;
    background: #fff;
    color: #17212b;
    font: 700 14px "DM Sans",Arial,sans-serif;
  }
  .sp-dwt-client-prompt-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(29,67,94,.12);
    border-radius: 12px;
    background: #fff;
    color: #42596b;
    font-size: 22px;
    cursor: pointer;
  }

  /* ---------- Payment Requests: one compact card, no giant inner white frame ---------- */
  body.serhill-desktop-workspace-active .sp-payment-request-center {
    width: min(100%, 720px) !important;
    max-width: 720px !important;
    padding: 20px !important;
    margin-inline: auto !important;
    border: 1px solid rgba(29,67,94,.10) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.48) !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-center > p {
    max-width: 560px !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-center .sp-payment-center-summary {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    margin: 6px 0 8px !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-center .sp-payment-request-panel {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-center .sp-payment-request-creator,
  body.serhill-desktop-workspace-active .sp-payment-request-center .sp-payment-request-history-fold {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-center .sp-payment-request-creator > summary,
  body.serhill-desktop-workspace-active .sp-payment-request-center .sp-payment-request-history-fold > summary {
    display: none !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-center .sp-form {
    width: 100% !important;
    max-width: 620px !important;
    margin: 0 !important;
    padding: 14px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-center .sp-form > label {
    width: min(100%, 460px) !important;
    max-width: 460px !important;
    gap: 6px !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-center .sp-form textarea {
    width: min(100%, 560px) !important;
    max-width: 560px !important;
    min-height: 104px !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-fields {
    grid-template-columns: 180px 220px !important;
    gap: 10px !important;
    width: auto !important;
    max-width: 420px !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-fields > label {
    width: 100% !important;
  }
  body.serhill-desktop-workspace-active .sp-payment-request-center .sp-form > .sp-button {
    margin-top: 4px !important;
    width: auto !important;
    min-width: 180px !important;
  }

  /* ---------- Profile: one axis, one outer width ---------- */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] {
    width: min(100%, 900px) !important;
    max-width: 900px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-editor,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management[data-business-support],
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management-support {
    width: 100% !important;
    max-width: 900px !important;
    margin: 0 auto 16px !important;
    box-sizing: border-box !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-editor {
    padding: 20px !important;
    border: 1px solid rgba(29,67,94,.10) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.44) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-preview,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-edit-fold,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-compact-form,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-settings {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-preview {
    padding: 14px !important;
    background: rgba(255,255,255,.42) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-edit-fold > summary {
    width: 100% !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-compact-form {
    padding: 16px 0 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-compact-form > label:not(.sp-check),
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-settings > label:not(.sp-check),
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-profile-field {
    width: min(100%, 580px) !important;
    max-width: 580px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours {
    padding: 20px !important;
    border: 1px solid rgba(29,67,94,.10) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.44) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-hours-form {
    width: 100% !important;
    max-width: 620px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management[data-business-support] {
    padding: 20px !important;
    border: 1px solid rgba(29,67,94,.10) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.40) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-grid {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    gap: 10px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-card {
    background: rgba(255,255,255,.36) !important;
  }

  /* ---------- Nutrition embed: transparent frame + normal Workspace scrolling ---------- */
  body.serhill-desktop-workspace-active .sp-dwn-root {
    width: 100% !important;
    max-width: 980px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-stage {
    width: 100% !important;
    min-width: 0 !important;
    background: transparent !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-frame {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-detail-bar {
    margin-bottom: 10px !important;
    background: transparent !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-detail-bar button {
    width: auto !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    border: 1px solid rgba(29,67,94,.10) !important;
    border-radius: 11px !important;
    background: rgba(255,255,255,.42) !important;
  }
}

@media (min-width: 783px) and (max-width: 980px) {
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-grid {
    grid-template-columns: 1fr !important;
  }
}


/* v0.41.149 — focus hierarchy / transparent nutrition chrome / trainer-plan polish. */
@media (min-width: 783px) {

  /* PAYMENT REQUESTS — make the actual tool the visual focus. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"] .sp-payment-request-center {
    width: min(100%, 680px) !important;
    max-width: 680px !important;
    margin: 22px auto 36px !important;
    padding: 22px 24px !important;
    border: 1px solid rgba(29,67,94,.11) !important;
    border-radius: 20px !important;
    background: rgba(255,255,255,.62) !important;
    box-shadow: 0 16px 38px rgba(18,44,63,.06) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"] .sp-payment-request-center > h2 {
    font-size: 32px !important;
    margin-bottom: 6px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"] .sp-payment-request-center > p {
    max-width: 520px !important;
    margin-bottom: 10px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"] .sp-payment-request-tabs {
    margin: 10px 0 18px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"] .sp-payment-request-center .sp-form {
    max-width: 560px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"] .sp-payment-request-center .sp-form > label {
    max-width: 500px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="clients"] .sp-payment-request-center .sp-form textarea {
    max-width: 540px !important;
  }

  /* NUTRITION — the Workspace background remains visible around the real working cards. */
  body.serhill-desktop-workspace-active .sp-dwn-root,
  body.serhill-desktop-workspace-active .sp-dwn-stage,
  body.serhill-desktop-workspace-active .sp-dwn-view,
  body.serhill-desktop-workspace-active .sp-dwn-frame {
    background: transparent !important;
    box-shadow: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
    margin-inline: auto !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-stage {
    padding: 0 !important;
    border: 0 !important;
  }

  /* PROFILE / TRAINER PLAN — bring back the subtle green tint and clean spacing. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management[data-business-support] {
    background: rgba(239,248,243,.58) !important;
    border-color: rgba(63,127,86,.12) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-access-head {
    margin-bottom: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-plan-summary,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-card {
    background: rgba(244,251,247,.70) !important;
    border-color: rgba(63,127,86,.12) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-grid {
    gap: 10px !important;
    margin-top: 10px !important;
    margin-bottom: 12px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-card {
    min-height: 112px !important;
    padding: 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-access > .sp-button,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-access form .sp-button {
    margin-top: 12px !important;
  }
}


/* v0.41.150 — Add Client / onboarding block cleanup */
@media (min-width: 783px) {
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-access details.sp-trainer-invite-card {
    width: min(100%, 880px) !important;
    max-width: 880px !important;
    margin: 14px auto 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-summary {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    list-style: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 0 14px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-summary::-webkit-details-marker {
    display: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-summary .sp-button {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-summary-copy {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-summary-copy strong {
    font-size: 13px !important;
    line-height: 1.25 !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
    color: #2d6792 !important;
    font-weight: 800 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-summary-copy em {
    font-style: normal !important;
    color: #607286 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-body {
    padding: 22px 24px !important;
    border: 1px solid rgba(29,67,94,.10) !important;
    border-radius: 22px !important;
    background: rgba(255,255,255,.52) !important;
    box-shadow: 0 16px 38px rgba(18,44,63,.05) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-body h3 {
    margin: 8px 0 8px !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-body > p {
    max-width: 720px !important;
    margin: 0 0 16px !important;
    color: #58697b !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 16px 18px !important;
    align-items: end !important;
    padding: 18px !important;
    border: 1px solid rgba(29,67,94,.10) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.34) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-form > label {
    max-width: none !important;
    margin: 0 !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-form > label input {
    width: min(100%, 520px) !important;
    max-width: 520px !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-form > .sp-button {
    align-self: end !important;
    min-width: 144px !important;
    justify-self: start !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-invite-status {
    grid-column: 1 / -1 !important;
  }
}
@media (max-width: 782px) {
  .sp-trainer-invite-summary {
    display: grid;
    gap: 10px;
  }
  .sp-trainer-invite-summary-copy {
    display: grid;
    gap: 4px;
  }
  .sp-trainer-invite-summary-copy strong {
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #2d6792;
  }
  .sp-trainer-invite-summary-copy em {
    font-style: normal;
    color: #607286;
    font-size: 14px;
    line-height: 1.45;
  }
}


/* v0.41.151 — profile tint correction and cleaner nutrition embed surfaces. */
@media (min-width: 783px) {
  /* Profile: keep only subscription cards green, not the whole wrapper. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-management[data-business-support] {
    background: rgba(255,255,255,.42) !important;
    border-color: rgba(29,67,94,.10) !important;
  }
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-module-card,
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"] .sp-trainer-plan-summary {
    background: rgba(244,251,247,.78) !important;
    border-color: rgba(63,127,86,.14) !important;
  }

  /* Nutrition: remove the last embedded white slabs and keep only actual work cards surfaced. */
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="nutrition"],
  body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="nutrition"] > *:not(.sp-dwn-root) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-root,
  body.serhill-desktop-workspace-active .sp-dwn-stage,
  body.serhill-desktop-workspace-active .sp-dwn-frame,
  body.serhill-desktop-workspace-active .sp-dwn-view {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  body.serhill-desktop-workspace-active .sp-dwn-frame {
    color-scheme: light;
  }
}

/* v0.41.207 — desktop Upcoming index exposes the same lifecycle actions as mobile. */
.sp-dwt-session-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}

/* v0.41.237 — single trainer client roster heading. */
.sp-dwc-title{padding:2px 0 12px;color:var(--sp-ink);font:800 15px "DM Sans",Arial,sans-serif;border-bottom:1px solid var(--sp-line)}

/* v0.41.240 — cancelled Ledger events stay visible but are visually de-emphasized */
.sp-dws-window-card.is-cancelled{background:#fff1f1!important;border-color:#e7b9b9!important;box-shadow:0 6px 18px rgba(142,49,49,.05)!important}
.sp-dws-window-card.is-cancelled time,.sp-dws-window-card.is-cancelled strong{color:#7c3232!important}
.sp-dws-window-card.is-cancelled small{color:#a14f4f!important;font-weight:800}

/* v0.41.343 — Profile Service Center state isolation. */
body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="account"] .sp-service-center,
body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="management"] .sp-service-center {display:none!important;}
body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="service"] .sp-profile-editor,
body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="service"] .sp-management,
body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="service"] .sp-management-support,
body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="service"] .sp-trainer-hours,
body.serhill-desktop-workspace-active .sp-dw-view[data-dw-panel="profile"][data-dw-profile-state="service"] .sp-ledger-password-card {display:none!important;}
