/* The workspace extends the warm sage and rose language of the client dashboard. */
body:has(.shell), body:has(.login-wrap) {
  --bg: #f7f8f2;
  --panel: #fffefa;
  --panel-soft: #eef3e9;
  --ink: #293e36;
  --muted: #68766b;
  --line: #e3e7dc;
  --brand: #426c58;
  --brand-dark: #30523f;
  --rose-soft: #f9edf2;
  --rose-line: #eed9e2;
  --rose-ink: #946074;
  --blue: #426c58;
  --shadow: 0 5px 24px #30493306;
  --shadow-soft: 0 3px 12px #30493305;
  background: var(--bg);
  line-height: 1.6;
  accent-color: var(--brand);
}
:where(.shell, .login-wrap, .modal) :is(button, a.buttonlike) { min-height: 44px; border-radius: 12px; background: var(--brand); font-weight: 600; padding: 10px 16px; line-height: 1.4; }
:where(.shell, .login-wrap, .modal) :is(button, a.buttonlike):hover { box-shadow: 0 5px 16px #30493312; }
:where(.shell, .login-wrap, .modal) :is(button, a.buttonlike).secondary { background: #fffefa; border-color: #d7dfd2; color: #42634f; }
:where(.shell, .login-wrap, .modal) button.danger { background: #a94052; }
:where(.shell, .login-wrap, .modal) button:disabled { opacity: .5; cursor: wait; transform: none; }
:where(.shell, .login-wrap, .modal) :is(input, select, textarea) { min-height: 46px; border-radius: 12px; background: #fcfdf9; padding: 11px 13px; border-color: #dce2d6; }
:where(.shell, .login-wrap, .modal) :is(input, select, textarea):focus { border-color: #71927a; box-shadow: 0 0 0 4px #71927a18; background: white; }
:where(.shell, .login-wrap, .modal) input:is([type=checkbox], [type=radio]) { min-height: auto; width: auto; }
:where(.shell, .login-wrap, .modal) :focus-visible { outline: 2px solid #426c58; outline-offset: 4px; }
.shell { grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { padding: 26px 18px 20px; background: #fffefae8; gap: 16px; border-color: #e4e8dd; overflow-y: auto; }
.brand { background: transparent; border: 0; box-shadow: none; padding: 8px 4px 24px; grid-template-columns: 42px minmax(0, 1fr); gap: 4px 10px; border-radius: 0; border-bottom: 1px solid var(--line); }
.brand img { width: 42px; height: 42px; }
.brand b { font-size: 14px; font-weight: 650; }
.brand span { font-size: 12px; }
.nav-caption { color: var(--muted); font-size: 11px; padding-inline: 14px; }
.nav { gap: 5px; }
.nav button { display: flex; align-items: center; gap: 12px; min-height: 47px; padding: 12px 14px; color: #627063; font-size: 14px; background: transparent; }
.nav button svg { flex-shrink: 0; }
.nav button:hover, .nav button.active { background: #edf2e7; border-color: transparent; color: #345740; box-shadow: none; transform: none; }
.nav button.active { font-weight: 750; }
.nav button.active::after { content: ''; margin-inline-start: auto; width: 6px; height: 6px; border-radius: 50%; background: #79977c; }
.userline { padding: 14px 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.main { width: min(1320px, 100%); padding: 36px clamp(20px, 3vw, 48px) 90px; gap: 26px; }
.topbar { border: 0; box-shadow: none; background: transparent; padding: 0 0 22px; border-bottom: 1px solid var(--line); border-radius: 0; flex-wrap: nowrap; }
.workspace-eyebrow { font-size: 11px; color: #768771; }
#pageTitle { margin: 4px 0 6px; font-size: clamp(25px, 2.6vw, 34px); line-height: 1.25; font-weight: 650; letter-spacing: -.8px; }
.topbar p { font-size: 13px; line-height: 1.7; margin: 0; }
.topbar > .badge { background: var(--rose-soft); color: var(--rose-ink); border: 1px solid var(--rose-line); white-space: nowrap; padding: 7px 12px; }
#view > div { display: grid; gap: 22px; min-width: 0; }
.shell :is(.panel, .card, .toolbar, .toolbar-panel), .login-wrap .login { border-radius: 24px; border-color: var(--line); box-shadow: var(--shadow); background: var(--panel); }
.shell .panel { padding: 24px; }
.shell :is(.panel-soft, .row, .priority-lead-card) { border-radius: 16px; }
.shell .panel-soft { background: #f5f7ef; padding: 18px; }
.shell .row { padding: 16px; box-shadow: none; background: #fffefa; }
.shell .row:hover { border-color: #b9cab2; box-shadow: 0 4px 16px #30493308; }
.shell .panel h2 { font-size: 19px; font-weight: 650; line-height: 1.5; }
.shell .panel h3 { font-size: 16px; }
.shell .grid { gap: 18px; }
.shell .cards { gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.shell button.card { padding: 22px; gap: 9px; min-height: 185px; background: #fffefa; color: var(--ink); font-weight: 400; }
.shell button.card:hover { border-color: #aec3a8; box-shadow: 0 10px 30px #3049330c; }
.card-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-symbol { display: grid; place-items: center; width: 42px; height: 42px; background: #edf2e7; color: #648165; border-radius: 14px; }
.card:nth-child(3n + 2) .card-symbol { background: var(--rose-soft); color: var(--rose-ink); }
.card-arrow { color: #82927d; font-size: 22px; }
.shell .card h3 { font-size: 18px; font-weight: 650; }
.shell .card p { font-size: 13px; line-height: 1.8; }
.shell .priority-leads { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.shell .priority-lead-card { background: #f0f4eb; border-color: #dce5d5; padding: 18px; }
.shell .priority-lead-card.urgent, .shell .row.urgent { background: #fcf1ee; border-color: #eedad4; }
.shell .metrics { gap: 12px; }
.shell .metrics > div { background: #f0f4eb; border: 1px solid #e3e9dc; border-radius: 16px; padding: 18px; }
.shell .metrics > div:nth-child(even) { background: var(--rose-soft); border-color: var(--rose-line); }
.shell .metrics b { color: #42644d; font-size: 28px; font-weight: 600; }
.shell .metrics span { color: #6e7c69; font-size: 12px; }
.shell .badge { border-radius: 999px; font-weight: 600; }
.shell .toolbar { padding: 18px; gap: 12px; }
.shell .field { gap: 8px; }
.shell .field label { color: #61715f; font-size: 12px; font-weight: 600; }
.shell .form-row { gap: 16px; }
.shell .chip { border-radius: 999px; }
.shell .chip.active, .shell button.secondary.active { color: #345740; background: #e8f0e1; border-color: #adc2a4; box-shadow: none; }
.shell .empty { background: #f6f8f1; border-color: #e1e7d8; border-radius: 16px; color: #6c7d66; padding: 24px; line-height: 1.8; }
.modal { --brand: #426c58; --blue: #426c58; --ink: #293e36; --line: #e3e7dc; border-radius: 24px; }
.modal::backdrop { background: #233c354d; backdrop-filter: blur(4px); }
.login-wrap { background: radial-gradient(ellipse at 15% 10%, #f2dce677, transparent 50%), radial-gradient(ellipse at 85% 90%, #dfead777, transparent 50%); padding: 24px; }
.login-wrap .login { padding: 36px; gap: 20px; }
.login h1 { color: #345740; font-size: 26px; line-height: 1.3; }
.login p { font-size: 14px; line-height: 1.8; }
.mobile-header, .menu-close, .nav-backdrop { display: none; }
@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .main { padding: 0 20px 100px; gap: 22px; overflow: visible; }
  .mobile-header { display: flex; align-items: center; gap: 12px; min-height: 74px; position: sticky; top: 0; z-index: 85; background: #f7f8f2f2; backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
  .mobile-header > span { font-size: 13px; color: #345740; font-weight: 650; flex: 1; }
  .mobile-header small { display: block; color: #74826d; font-size: 10px; font-weight: 400; }
  .mobile-header img { object-fit: contain; }
  .mobile-header .menu-toggle { display: grid; place-items: center; width: 44px; padding: 10px; background: #fffefa; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(310px, calc(100vw - 48px)); height: 100dvh; z-index: 110; padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)); transform: translateX(105%); visibility: hidden; transition: transform .24s ease, visibility .24s; overflow-y: auto; box-shadow: -15px 0 60px #233c3518; }
  .nav-open .sidebar { transform: translateX(0); visibility: visible; }
  .shell .menu-close { display: grid; place-items: center; align-self: flex-end; width: 44px; padding: 0; font-size: 27px; }
  .sidebar .brand { grid-template-columns: 42px minmax(0, 1fr); padding: 0 0 20px; }
  .sidebar .brand img { width: 42px; height: 42px; }
  .sidebar .nav { display: grid; overflow: visible; padding: 0; }
  .sidebar .nav button { width: 100%; }
  .sidebar .userline { display: block; }
  .shell .nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; height: 100dvh; border: 0; border-radius: 0; padding: 0; z-index: 100; background: #233c3566; backdrop-filter: blur(3px); transform: none; }
  body.navigation-open { overflow: hidden; }
  .topbar { gap: 10px; padding-bottom: 20px; }
  #pageTitle { font-size: 28px; }
  .shell .panel { padding: 20px; }
}
@media (max-width: 600px) {
  .main { padding-inline: 16px; gap: 20px; }
  .topbar { align-items: flex-start; }
  .topbar > .badge { font-size: 10px; padding: 6px 8px; }
  #pageTitle { font-size: 26px; }
  .topbar p { font-size: 12px; }
  .shell :is(.panel, .toolbar, .toolbar-panel) { padding: 18px 16px; border-radius: 22px; }
  .shell .panel h2 { font-size: 18px; }
  .shell :is(input:not([type=checkbox]):not([type=radio]), select, textarea), .login-wrap input, .modal :is(input, select, textarea) { font-size: 16px; }
  .shell .form-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .shell .cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .shell button.card { min-height: 150px; padding: 20px; }
  .shell .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell .metrics > div { padding: 14px; }
  .shell .row-main { flex-wrap: wrap; gap: 12px; }
  .shell .row-main > * { min-width: 0; max-width: 100%; }
  .shell .actions { gap: 8px; }
  .shell .actions > :is(button, a.buttonlike) { flex: 1 1 auto; }
  .shell .filters select { flex: 1 1 140px; }
  .shell .password-toggle, .login-wrap .password-toggle { min-height: 36px; padding: 6px 10px; font-size: 12px; }
  .login-wrap { padding: 18px; }
  .login-wrap .login { padding: 28px 22px; }
  .modal { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .shell *, .login-wrap * { transition: none !important; scroll-behavior: auto !important; }
}
/* Closed drawers must not contribute to the RTL document's scroll width. */
@media (max-width: 980px) {
  .sidebar { display: none; transform: none; }
  .nav-open .sidebar { display: flex; animation: workspace-drawer-in .24s ease both; }
}
@keyframes workspace-drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .nav-open .sidebar { animation: none; } }
.shell .tooltip::after { visibility: hidden; }
.shell .tooltip:hover::after, .shell .tooltip:focus::after { visibility: visible; }
@media (max-width: 600px) {
  .shell .tooltip::after { position: fixed; inset: auto 16px 100px; width: auto; transform: none; text-align: start; }
}
.shell .assistant-fab { min-height: 52px; padding: 15px; border-radius: 50%; background: #fff; color: #426c5b; }
.shell .assistant-write { min-height: 32px; padding: 7px; border-radius: 50%; background: #fff; color: #738078; }
.shell .assistant-fab.is-recording { border-radius: 28px; background: #f9edf2; color: #946074; border-color: #eed9e2; }
.daily-start { display: flex; align-items: center; justify-content: space-between; gap: 22px; background: linear-gradient(115deg, #f4e7e2, #f1f5eb) !important; }
.daily-start h2 { margin: 6px 0 !important; font-size: 24px !important; }
.daily-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; }
.daily-all summary, .measurement-more summary { cursor: pointer; color: #52704f; font-weight: 600; padding: 12px 0; }
.daily-all[open] > .list { margin-top: 12px; }
.priority-next { color: #426c58; font-size: 12px; margin-top: 6px; }
.shell .quick-launch { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); inset-inline-start: 28px; z-index: 81; display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; box-shadow: 0 6px 24px #233c3526; }
.quick-launch > span { font-size: 23px; line-height: 1; }
.quick-dialog { width: min(540px, calc(100vw - 32px)); max-height: 88dvh; padding: 26px; border: 1px solid #e3e7dc; border-radius: 24px; color: #293e36; background: #fffefa; overflow-y: auto; }
.quick-dialog::backdrop { background: #233c3566; backdrop-filter: blur(4px); }
.quick-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.quick-dialog h2 { margin: 4px 0 0; font-size: 24px; }
.quick-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.quick-options button { display: grid; gap: 6px; text-align: start; padding: 16px !important; }
.quick-options button[aria-pressed=false] { background: #edf2e7; color: #42634f; }
.quick-options small { display: block; font-size: 11px; opacity: .8; font-weight: 400; }
.quick-results { display: grid; gap: 8px; max-height: 40dvh; overflow-y: auto; }
.quick-results button { display: flex; align-items: center; justify-content: space-between; text-align: start; }
.quick-results small { display: block; color: #73806f; margin-top: 4px; }
.quick-dialog [role=status] { font-size: 13px; color: #68766b; line-height: 1.7; }
.client-snapshot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.client-snapshot > span { display: grid; align-content: start; gap: 6px; padding: 14px; border-radius: 16px; background: #f0f4eb; }
.client-snapshot > span:nth-child(2) { background: #faf0ed; }
.client-snapshot small { color: #68766b; font-size: 11px; }
.client-snapshot b { font-size: 13px; }
.client-notice:empty { display: none; }
.client-notice:not(:empty) { border-radius: 12px; background: #eaf3e5; padding: 12px 16px; color: #345740; margin: 0; }
#newClientFields { background: #f6f8f1; border-radius: 18px; padding: 18px; }
[data-client-row][hidden] { display: none !important; }
.measurement-more .tanita-grid { margin-top: 12px; }
@media (max-width: 980px) {
  .daily-start { flex-direction: column; align-items: stretch; }
  .shell .quick-launch { inset-inline-start: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  .daily-shortcuts { display: grid; grid-template-columns: 1fr 1fr; }
  .daily-shortcuts > :first-child { grid-column: 1 / -1; }
  .quick-dialog { margin: auto auto 0; width: 100%; max-width: none; max-height: 92dvh; border-radius: 24px 24px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .quick-dialog input { font-size: 16px; }
  .client-snapshot { grid-template-columns: 1fr 1fr; gap: 8px; }
  .client-snapshot > :last-child { grid-column: 1 / -1; }
  .client-primary-actions { position: sticky; top: 0; z-index: 2; background: #fffefa; padding-block: 8px; }
}
.client-questionnaire > summary { cursor: pointer; padding: 16px 20px; background: #f3f6ee; border: 1px solid #e3e7dc; border-radius: 16px; font-weight: 600; color: #52704f; }
.client-questionnaire[open] > form { margin-top: 12px; }
@media (min-width: 981px) { .shell .quick-launch { inset-inline-start: 280px; } }
#measurementForm > .tanita-grid, #clubTanitaFields > .tanita-grid { grid-template-columns: minmax(0, 1fr); }
#measurementForm > .tanita-grid .tanita-field, #clubTanitaFields > .tanita-grid .tanita-field { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; background: #f3f6ee; }
#measurementForm .tanita-icon { background: #e2ebda; color: #55754d; }
#measurementForm .tanita-input { grid-column: 1 / -1; }
/* Calm, full-width work areas: one white canvas per screen, with quiet section dividers. */
.main { width: min(1440px, 100%); padding-inline: clamp(18px, 4vw, 58px); }
.topbar { padding-bottom: 16px; }
#pageTitle { margin: 0; font-size: clamp(25px, 2.2vw, 30px); font-weight: 650; letter-spacing: -.5px; }
.topbar p:empty { display: none; }
.topbar > div:first-child { display: grid; gap: 4px; }
.topbar > div:first-child .muted { font-size: 13px; }
.shell #view .panel { padding: 22px 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.shell #view > .grid, .shell #view > div > .grid { gap: 16px; }
.shell #view > .grid > .panel:first-child,
.shell #view > div > .panel:first-child,
.shell #view > div > .grid > .panel:first-child,
.shell #view > div > .grid > form.panel:first-child {
  padding: clamp(22px, 3.3vw, 42px);
  border: 1px solid #e6e8df;
  border-radius: 24px;
  background: #fffefa;
  box-shadow: 0 5px 24px #30493306;
}
.shell #view > .club-page {
  padding: clamp(22px, 3.3vw, 42px);
  border: 1px solid #e6e8df;
  border-radius: 24px;
  background: #fffefa;
  box-shadow: 0 5px 24px #30493306;
}
.shell #view > .club-page #clubInventorySection { padding: 12px 0 0; }
.shell #view .panel + .panel { border-top: 1px solid #e9ebe4; }
.shell #view .panel .panel { padding: 16px 0; }
.shell #view .clients-list-panel #newClientFields { padding: 18px; }
.shell #view .clients-list-panel #newClientForm { display: grid; grid-template-columns: 1fr; }
.shell #view .clients-list-panel #newClientForm .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shell #view .clients-list-panel #newClientForm button { min-width: 0; width: fit-content; }
.shell #view .filters { gap: 10px; padding: 14px; border-radius: 16px; background: #f7f8f3; }
.shell #view .status-row { gap: 8px; }
.shell #view .status-row button.chip, .shell #view .filters button.chip {
  min-height: 38px; padding: 7px 14px; border: 1px solid #e2e7de; border-radius: 999px;
  background: #fffefa; color: #627063; font-weight: 550; box-shadow: none; outline: 0;
}
.shell #view .status-row button.chip:hover, .shell #view .filters button.chip:hover { border-color: #cbd9c6; background: #f3f6ef; }
.shell #view .status-row button.chip.active, .shell #view .filters button.chip.active {
  color: #455f49; background: #e8efe3; border-color: #ceddc7; box-shadow: inset 0 0 0 1px #d8e3d2;
}
.shell #view .chip { white-space: normal; }
.shell #view .status-row .badge { background: #f1f4ee; border-color: #e4e8df; color: #657367; }
.shell #view .status-row .badge:nth-child(3n + 2) { background: var(--rose-soft); border-color: var(--rose-line); color: var(--rose-ink); }
.shell #view .status-row .badge:nth-child(3n) { background: #f6f1e4; border-color: #eee6d1; color: #7f7150; }
.home-dashboard { display: grid; gap: 0; }
.shell #view > div > .home-dashboard { padding: clamp(22px, 3.3vw, 42px); }
.dashboard-heading, .dashboard-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dashboard-heading { padding-bottom: 22px; border-bottom: 1px solid #e9ebe4; }
.dashboard-heading h2 { margin: 3px 0; font-size: 22px; }
.dashboard-heading p, .dashboard-section-heading p { margin: 0; font-size: 12px; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px 0; }
.dashboard-metric { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 20px; border: 1px solid #e4e9df; border-radius: 18px; background: #f1f5ec; color: #324a39; text-decoration: none; transition: transform .15s, border-color .15s; }
.dashboard-metric:hover { transform: translateY(-2px); border-color: #bccdb6; }
.metric-score { background: #f4f1e7; border-color: #e9e3d2; }
.metric-leads { background: var(--rose-soft); border-color: var(--rose-line); }
.metric-label { font-size: 12px; color: #657367; }
.dashboard-metric strong { font-size: clamp(27px, 3vw, 36px); font-weight: 650; line-height: 1.2; }
.dashboard-metric strong small { font-size: 14px; color: #7c775f; }
.metric-caption { color: #758174; font-size: 11px; line-height: 1.5; }
.home-dashboard .daily-shortcuts { display: flex; flex-wrap: wrap; gap: 9px; padding: 0 0 22px; }
.dashboard-section { padding: 20px 0; border-top: 1px solid #e9ebe4; }
.dashboard-section-heading { margin-bottom: 12px; }
.dashboard-section-heading h3 { font-size: 16px; margin: 0 0 3px; }
.dashboard-text-link, .dashboard-open-link { color: #5b745c; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dashboard-task-list { display: grid; }
.dashboard-task { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid #edf0e9; }
.dashboard-task:last-child { border-bottom: 0; }
.dashboard-task-copy { min-width: 0; }
.dashboard-task-copy > a { color: #344c3b; text-decoration: none; }
.dashboard-task-copy p { margin: 4px 0 0; color: #748075; font-size: 12px; line-height: 1.6; }
.dashboard-task-actions { display: flex; align-items: center; gap: 12px; }
.task-priority { padding: 4px 9px; border-radius: 999px; background: #edf1e9; color: #66745f; font-size: 10px; white-space: nowrap; }
.priority-high { background: #f7e9e6; color: #936360; }
.priority-medium { background: #f3efe3; color: #82744f; }
.dashboard-dismiss { min-height: 34px !important; padding: 5px 10px !important; color: #657367 !important; background: transparent !important; border-color: #e2e7de !important; font-size: 11px; }
.dashboard-empty { padding: 16px 0; margin: 0; color: #788477; font-size: 13px; }
.dashboard-all-tasks { border-top: 1px solid #e9ebe4; }
.dashboard-all-tasks > summary { padding: 16px 0; color: #5b745c; font-size: 13px; font-weight: 600; cursor: pointer; }
.dashboard-status:not(:empty) { margin: 0; padding: 12px; border-radius: 12px; background: #edf3e9; color: #466047; font-size: 12px; }
.shell #view .row, .shell #view .dashboard-task { box-shadow: none; }
.club-page-toolbar { padding-bottom: 14px; border-bottom: 1px solid #e9ebe4; }
.club-page-toolbar .muted { font-size: 13px; }
.shell #view .metrics > div:nth-child(4n), .shell #view .metrics > div:nth-child(4n + 1) { background: #f1f5ec; border-color: #e4e9df; }
.shell #view .metrics > div:nth-child(4n + 2) { background: var(--rose-soft); border-color: var(--rose-line); }
.shell #view .metrics > div:nth-child(4n + 3) { background: #f4f1e7; border-color: #e9e3d2; }
.workspace-eyebrow { color: #8a7850; }
@media (max-width: 600px) {
  .main { padding-inline: 14px; }
  .shell #view > .grid > .panel:first-child,
  .shell #view > div > .panel:first-child,
  .shell #view > div > .grid > .panel:first-child,
  .shell #view > div > .grid > form.panel:first-child,
  .shell #view > .club-page,
  .shell #view > div > .home-dashboard { padding: 20px 16px; border-radius: 20px; }
  .shell #view .panel { padding: 18px 0; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dashboard-metric { padding: 14px 12px; border-radius: 15px; }
  .dashboard-metric:first-child { grid-column: 1 / -1; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading #sendDailyReportBtn { min-height: 38px; padding: 7px 10px; font-size: 11px; }
  .dashboard-task { align-items: flex-start; flex-direction: column; gap: 9px; }
  .dashboard-task-actions { width: 100%; }
  .dashboard-task-actions .dashboard-open-link { margin-inline-start: auto; }
  .home-dashboard .daily-shortcuts { display: grid; grid-template-columns: 1fr 1fr; }
  .home-dashboard .daily-shortcuts > :first-child { grid-column: 1 / -1; }
  .shell #view .clients-list-panel #newClientForm .form-row { grid-template-columns: minmax(0,1fr); }
  .shell #view .status-row button.chip, .shell #view .filters button.chip { min-height: 36px; }
}
/* The application canvas itself is the single white surface. Feature content starts directly on it. */
body:has(.shell) { --bg: #fffefa; background: #fffefa; }
.shell { background: #fffefa; }
.main { width: 100%; max-width: none; min-height: 100vh; padding: 28px clamp(20px, 3.2vw, 52px) 92px; gap: 12px; background: #fffefa; }
.mobile-header { background: #fffefa; }
#view > div, .shell #view > .grid, .shell #view > div > .grid { gap: 0; }
.shell #view .panel,
.shell #view > .club-page,
.shell #view > .grid > .panel:first-child,
.shell #view > div > .panel:first-child,
.shell #view > div > .grid > .panel:first-child,
.shell #view > div > .grid > form.panel:first-child,
.shell #view > div > .home-dashboard {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.shell #view .panel + .panel { border-top: 1px solid #eceee8; }
.shell #view .clients-list-panel { display: grid; gap: 16px; align-content: start; }
.shell #view .clients-list-panel > .row-main { padding-bottom: 14px; border-bottom: 1px solid #eceee8; }
.shell #view .clients-list-panel > .search-field { max-width: none; }
.shell #view .clients-list-panel .client-list { display: grid; gap: 10px; }
.shell #view .clients-list-panel .client-list > .row { border-radius: 16px; border-color: #e5e9e1; background: #fff; }
.shell #view .clients-list-panel #newClientFields { padding: 18px; border: 1px solid #e7ebe3; border-radius: 16px; background: #f8f9f5; }
.shell #view .toolbar { padding: 0 0 14px; border: 0; border-bottom: 1px solid #eceee8; border-radius: 0; background: transparent; box-shadow: none; }
.shell #view .filters { padding: 0; border-radius: 0; background: transparent; }
.shell #view .status-row { gap: 7px; }
.shell #view > .club-page { display: grid; gap: 0; }
.shell #view > .club-page #clubInventorySection { padding: 0; }
.shell #view .home-dashboard { display: grid; gap: 0; }
.shell #view > div > .home-dashboard { padding: 0; }
.topbar { margin: 0; padding: 0 0 14px; border-bottom-color: #e9ebe4; }
.topbar > div:first-child .muted { margin-top: 0; }
@media (max-width: 600px) {
  .main { padding: 18px 16px calc(100px + env(safe-area-inset-bottom)); gap: 10px; }
  .shell #view > .grid > .panel:first-child,
  .shell #view > div > .panel:first-child,
  .shell #view > div > .grid > .panel:first-child,
  .shell #view > div > .grid > form.panel:first-child,
  .shell #view > .club-page,
  .shell #view > div > .home-dashboard { padding: 0; border-radius: 0; }
  .shell #view .clients-list-panel { gap: 13px; }
  .shell #view .clients-list-panel > .row-main { align-items: center; }
  .shell #view .clients-list-panel .client-list > .row { padding: 15px; }
}

/* One continuous workspace surface across every authenticated screen.
   Panels organize content in the markup; only actual records remain cards. */
body:has(.shell) { --bg: #fffefa; background: #fffefa; }
.shell, .main, .mobile-header { background: #fffefa; }
.main { width: 100%; max-width: none; min-height: 100vh; padding: 28px clamp(20px, 3.2vw, 52px) 92px; gap: 12px; }
.topbar { margin: 0; padding: 0 0 14px; border: 0; border-bottom: 1px solid #e9ebe4; border-radius: 0; box-shadow: none; background: transparent; }
.topbar > div:first-child { display: grid; gap: 4px; }
.topbar > div:first-child .muted { margin-top: 0; font-size: 13px; }
.topbar p:empty { display: none; }
#pageTitle { margin: 0; font-size: clamp(25px, 2.2vw, 30px); font-weight: 650; letter-spacing: -.5px; }
.shell #view > *,
.shell #view > div,
.shell #view > div > *,
.shell #view > div > div > * { min-width: 0; }
.shell #view > div { gap: 0; }
.shell #view > .grid,
.shell #view > div > .grid { gap: 0; }
.shell #view .panel,
.shell #view .toolbar,
.shell #view .toolbar-panel,
.shell #view .panel-soft,
.shell #view > .club-page,
.shell #view > div > .home-dashboard {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.shell #view .panel + .panel { margin-top: 22px; padding-top: 22px; border-top: 1px solid #eceee8; }
.shell #view .toolbar { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #eceee8; }
.shell #view .filters { gap: 10px; padding: 14px 0; border-radius: 0; background: transparent; }
.shell #view :is(.filters, .toolbar, .toolbar-panel, .inventory-actions) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.shell #view .filters :is(input:not([type=checkbox]):not([type=radio]), select),
.shell #view .toolbar :is(input:not([type=checkbox]):not([type=radio]), select),
.shell #view .toolbar-panel :is(input:not([type=checkbox]):not([type=radio]), select),
.shell #view .search-field input {
  min-height: 48px; border: 1px solid #dfe5da; border-radius: 14px; background: #fff;
}
.shell #view .filters > input, .shell #view .filters > select { flex: 1 1 170px; min-width: min(170px, 100%); }
.shell #view :is(.filters, .toolbar, .toolbar-panel, .inventory-actions) > button { flex: 0 0 auto; }
.shell #view .search-field { display: grid; gap: 7px; flex: 1 1 260px; color: #657367; font-size: 12px; font-weight: 600; }
.shell #view :is(.filters, .toolbar, .toolbar-panel) label.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 12px; border: 1px solid #e2e7de; border-radius: 999px; background: #f5f7f2; color: #5e6d60; }
.shell #view :is(.filters, .toolbar, .toolbar-panel) label.chip input { accent-color: #71927a; }
.shell #view .filters button.chip,
.shell #view .status-row button.chip {
  min-height: 38px; padding: 7px 14px; border: 1px solid #e2e7de; border-radius: 999px;
  background: #fffefa; color: #627063; font-weight: 550; box-shadow: none; outline: 0;
}
.shell #view .filters button.chip:hover,
.shell #view .status-row button.chip:hover { border-color: #cbd9c6; background: #f3f6ef; }
.shell #view .filters button.chip.active,
.shell #view .status-row button.chip.active { color: #455f49; background: #e8efe3; border-color: #ceddc7; box-shadow: inset 0 0 0 1px #d8e3d2; }
.shell #view .clients-list-panel { display: grid; gap: 16px; align-content: start; }
.shell #view .clients-list-panel > .row-main { padding-bottom: 14px; border-bottom: 1px solid #eceee8; }
.shell #view .clients-list-panel > .search-field { max-width: none; }
.shell #view .clients-list-panel .client-list { display: grid; gap: 10px; }
.shell #view .clients-list-panel .client-list > .row,
.shell #view article.row,
.shell #view .priority-lead-card {
  border: 1px solid #e5e9e1; border-radius: 16px; background: #fff; box-shadow: none;
}
.shell #view .clients-list-panel #newClientFields { padding: 18px; border: 1px solid #e7ebe3; border-radius: 16px; background: #f8f9f5; }
.shell #view .clients-list-panel #newClientForm { display: grid; grid-template-columns: 1fr; }
.shell #view .clients-list-panel #newClientForm .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shell #view .clients-list-panel #newClientForm button { min-width: 0; width: fit-content; }
.shell #view > .club-page { display: grid; gap: 0; }
.shell #view > .club-page #clubInventorySection { padding: 0; }
.shell #view .home-dashboard { display: grid; gap: 0; }
.shell #view > div > .home-dashboard { padding: 0; }
.shell #view .share-link-list { display: grid; gap: 9px; }
.shell #view .share-link-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid #e5e9e1; border-radius: 15px; background: #fff; }
.shell #view .share-link-card > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 12px; min-width: 0; }
.shell #view .share-link-card a { color: #607963; font-size: 12px; font-weight: 600; text-decoration: none; }
.shell #view .share-link-card span { grid-column: 1 / -1; max-width: 100%; overflow: hidden; color: #7a8479; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.shell #view .status-row .badge { background: #f1f4ee; border-color: #e4e8df; color: #657367; }
.shell #view .status-row .badge:nth-child(3n + 2) { background: var(--rose-soft); border-color: var(--rose-line); color: var(--rose-ink); }
.shell #view .status-row .badge:nth-child(3n) { background: #f6f1e4; border-color: #eee6d1; color: #7f7150; }
@media (max-width: 600px) {
  .main { padding: 18px 16px calc(100px + env(safe-area-inset-bottom)); gap: 10px; }
  .shell #view .panel + .panel { margin-top: 18px; padding-top: 18px; }
  .shell #view .clients-list-panel { gap: 13px; }
  .shell #view .clients-list-panel > .row-main { align-items: center; }
  .shell #view .clients-list-panel .client-list > .row { padding: 15px; }
  .shell #view .clients-list-panel #newClientForm .form-row { grid-template-columns: minmax(0, 1fr); }
  .shell #view .filters { gap: 8px; }
  .shell #view :is(.filters, .toolbar, .toolbar-panel, .inventory-actions) > :is(input, select, button, .search-field) { flex: 1 1 100%; width: 100%; }
  .shell #view .share-link-card { align-items: stretch; }
  .shell #view .share-link-card > button { flex: 0 0 auto; }
  .shell #view .filters button.chip,
  .shell #view .status-row button.chip { min-height: 36px; }
}

/* Compact, friendly controls: keep touch targets comfortable without oversized UI. */
.shell :is(button, a.buttonlike) { min-height: 40px; padding: 8px 13px; border-radius: 11px; font-size: 13px; font-weight: 600; }
.shell :is(button, a.buttonlike).secondary { border-radius: 11px; }
.shell :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { min-height: 42px; padding: 9px 12px; border-radius: 11px; font-size: 14px; }
.shell textarea { min-height: 88px; }
.shell .panel h2 { font-size: 17px; line-height: 1.45; }
.shell .panel h3 { font-size: 15px; }
.shell .row { padding: 13px; border-radius: 14px; }
.shell .badge { padding: 4px 9px; font-size: 11px; }
.shell #view .filters { gap: 8px; padding: 10px 0; }
.shell #view .filters :is(input:not([type=checkbox]):not([type=radio]), select),
.shell #view .toolbar :is(input:not([type=checkbox]):not([type=radio]), select),
.shell #view .toolbar-panel :is(input:not([type=checkbox]):not([type=radio]), select),
.shell #view .search-field input { min-height: 42px; border-radius: 11px; font-size: 13px; }
.shell #view .filters button.chip, .shell #view .status-row button.chip { min-height: 38px; padding: 5px 11px; font-size: 12px; }
.shell #view :is(.filters, .toolbar, .toolbar-panel) label.chip { min-height: 38px; padding: 5px 10px; font-size: 12px; }
.shell #view .clients-list-panel { gap: 12px; }
.shell #view .clients-list-panel > .row-main { padding-bottom: 10px; }
.shell #view .clients-list-panel .client-list { gap: 8px; }
.shell #view .clients-list-panel .client-list > .row,
.shell #view article.row, .shell #view .priority-lead-card { border-radius: 14px; }
.shell #view .share-link-card { padding: 10px 12px; border-radius: 13px; }
.shell #view .share-link-card > button { min-height: 36px; padding: 6px 10px; font-size: 12px; }
@media (max-width: 600px) {
  .shell :is(button, a.buttonlike) { min-height: 42px; }
  .shell #view .filters :is(input:not([type=checkbox]):not([type=radio]), select) { flex-basis: calc(50% - 4px); min-width: 0; }
  .shell #view .filters > input:first-child { flex-basis: 100%; }
  .shell #view .filters label.chip { flex: 1 1 100%; }
  .shell #view .clients-list-panel .client-list > .row { padding: 12px; }
  .shell #view .share-link-card { align-items: center; }
}

/* Keep closed native dialogs hidden; only the body of the editor scrolls. */
.measurement-edit-dialog:not([open]) { display: none; }
.measurement-edit-dialog {
  width: min(660px, calc(100vw - 32px)); max-width: none;
  max-height: calc(100dvh - 32px); margin: auto; padding: 0;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--panel); color: var(--ink); overflow: hidden;
  box-shadow: 0 24px 80px #172c2533;
}
.measurement-edit-dialog::backdrop { background: #172c2573; backdrop-filter: blur(4px); }
.measurement-edit-form { margin: 0; display: flex; flex-direction: column; max-height: calc(100dvh - 34px); min-height: 0; }
.measurement-edit-header { flex-shrink: 0; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.measurement-edit-header h3 { margin: 0; font-size: 18px; }
.measurement-edit-body { padding: 20px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.measurement-edit-body .tanita-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.measurement-edit-body .tanita-field { min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; justify-items: stretch; gap: 6px; }
.measurement-edit-body .tanita-label { min-height: 0; justify-content: start; text-align: start; font-size: 14px; font-weight: 600; }
.measurement-edit-body .tanita-input input { width: 100%; min-width: 0; text-align: start; font-weight: 500; }
.measurement-edit-footer { flex-shrink: 0; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--panel); }
.measurement-edit-footer [role=status] { margin: 0; font-size: 13px; }
.measurement-edit-footer [role=status]:not(:empty) { margin-bottom: 8px; }
.measurement-edit-footer .actions { margin: 0; }
@media (max-width: 480px) {
  .measurement-edit-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
  .measurement-edit-form { max-height: calc(100dvh - 18px); }
  .measurement-edit-body { padding: 16px; }
  .measurement-edit-header, .measurement-edit-footer { padding: 12px 16px; }
  .measurement-edit-footer .actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Client workspace: neutral surfaces, readable text, one action accent. */
#clientDialog {
  --panel: #ffffff;
  --panel-soft: #f6f7f9;
  --ink: #202936;
  --muted: #596575;
  --line: #dfe3e8;
  --brand: #365f83;
  --brand-dark: #294d6d;
  --blue: #365f83;
  --shadow-soft: none;
  background: #fff;
  color: var(--ink);
}
#clientDialog .modal-panel, #clientDialog .client-detail > .panel:first-child,
#clientDialog .client-primary-actions { background: #fff; }
#clientDialog :is(h2, h3, .tanita-insight-card b) { color: var(--ink); }
#clientDialog .muted, #clientDialog .client-snapshot small { color: var(--muted); }
#clientDialog .client-snapshot > span { background: #f6f7f9; border: 1px solid var(--line); border-radius: 12px; }
#clientDialog .client-questionnaire > summary { background: #f6f7f9; border-color: var(--line); color: #344154; border-radius: 10px; }
#clientDialog .tanita-hero-insight { background: #f6f7f9; border-color: var(--line); border-radius: 12px; gap: 6px; }
#clientDialog .tanita-hero-insight h3 { font-size: 18px; font-weight: 600; }
#clientDialog .tanita-hero-insight p, #clientDialog .tanita-insight-card p { color: #4d5969; font-weight: 400; line-height: 1.65; }
.shell #view #clientDialog .metrics > div { background: #fff; border-color: var(--line); border-radius: 12px; box-shadow: none; }
.shell #view #clientDialog .metrics b { color: var(--ink); font-weight: 600; }
.shell #view #clientDialog .metrics span { color: var(--muted); font-weight: 500; }
#clientDialog .tanita-insight-card, #clientDialog .trend-card { background: #fff; border-color: var(--line); box-shadow: none; border-radius: 12px; }
#clientDialog .tanita-insight-card span { color: var(--muted); font-weight: 500; }
#clientDialog .tanita-insight-card b { font-weight: 600; }
#clientDialog .chart { background: #fafbfc; border-color: var(--line); color: var(--muted); }
#clientDialog .chart-grid-line { stroke: #e3e7ec; }
#clientDialog :is(.badge, .chart-legend span) { background: #f6f7f9; border-color: var(--line); color: #465365; font-weight: 500; }
#clientDialog .empty { background: #fafbfc; border-color: var(--line); color: var(--muted); }
#clientDialog .measurement-history-row { background: #fff; border-color: var(--line); }
#clientDialog :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { background: #fff; color: var(--ink); border-color: #cbd2da; }
#clientDialog :is(input, select, textarea):focus { border-color: var(--brand); box-shadow: 0 0 0 3px #365f831a; }
#clientDialog :is(button, a.buttonlike).secondary { background: #fff; border-color: #cbd2da; color: #344154; }
#clientDialog :focus-visible { outline-color: var(--brand); }
#clientDialog .tooltip { background: #f6f7f9; border-color: #cbd2da; color: #526174; }
#clientDialog #measurementForm .tanita-field, #clientDialog #clubTanitaFields .tanita-field { background: #f6f7f9; }
#clientDialog #measurementForm .tanita-icon { background: #e8edf3; color: #425b76; }
#clientDialog .submodal { background: #17212f66; }
#clientDialog .measurement-edit-dialog::backdrop { background: #17212f66; }

/* A compact index and disclosure rows replace the long stack of open panels. */
#clientDialog .client-section-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0 18px; }
#clientDialog .client-section-nav > span { flex-basis: 100%; color: var(--muted); font-size: 13px; }
#clientDialog .client-section-nav button { min-height: 34px; padding: 6px 12px; border-radius: 8px; font-size: 13px; }
#clientDialog .client-section { border: 0; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
#clientDialog .client-section > summary { cursor: pointer; padding: 16px 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; }
#clientDialog .client-section > summary > span { margin-inline-start: 10px; color: var(--muted); font-size: 12px; font-weight: 400; }
#clientDialog .client-section[open] > summary { border-bottom: 1px solid var(--line); }
#clientDialog .client-section-body { display: grid; gap: 16px; padding: 16px 0; }
#clientDialog .client-questionnaire[open] > form { margin-top: 0; }
#clientDialog .tanita-insight-grid { gap: 20px; }
#clientDialog .tanita-hero-insight { border: 0; background: transparent; padding: 8px 0; }
#clientDialog .tanita-hero-insight > .badge { width: fit-content; }
#clientDialog .client-snapshot > span { background: transparent; border: 0; border-inline-start: 1px solid var(--line); border-radius: 0; }
#clientDialog .client-notice:empty, #clientDialog #shareMsg:empty { display: none; }
/* Let the overview scroll away instead of covering the selected work area. */
#clientDialog .client-detail > .panel:first-child { position: static; }
#clientDialog .client-primary-actions { position: static; }

/* Solid chrome keeps text from competing with content during scrolling. */
.shell .topbar, .shell .mobile-header { background: var(--bg); backdrop-filter: none; }
#clientDialog .modal-panel > .row-main:first-child,
#clientDialog .client-detail > .panel:first-child,
#clientDialog .client-primary-actions,
#clientDialog .measurement-edit-header,
#clientDialog .measurement-edit-footer { background: #fff; backdrop-filter: none; }
#clientDialog .submodal-panel > .row-main:first-child { background: #fff; backdrop-filter: none; }
#clientDialog .client-secondary-section { border-top: 1px solid var(--line); }
#clientDialog .client-secondary-section > summary { padding: 14px 0; color: #465365; font-weight: 500; font-size: 14px; cursor: pointer; }
#clientDialog .client-secondary-section[open] > summary { margin-bottom: 8px; }
#clientDialog .client-secondary-section .measurement-history { border: 0; margin: 0; padding-top: 0; }
#clientDialog .tanita-hero-insight p { font-size: 14px; }
#clientDialog .client-section-nav button { background: #fff; border-color: var(--line); color: #465365; }
#clientDialog .client-section-nav button:hover { background: #f6f7f9; box-shadow: none; }

/* The membership card is the focal point; the surrounding UI stays flat. */
#clientDialog { border-radius: 0; }
#clientDialog .modal-panel { padding: clamp(20px, 3vw, 40px); border-radius: 0; }
#clientDialog .client-heading { gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
#clientDialog .client-heading h2 { margin: 0; font-size: 24px; }
#clientDialog .client-member-label { margin: 0 0 8px; color: #78603a; font-size: 13px; font-weight: 600; }
#clientDialog .client-overview-content { padding-block: 24px 12px; }
#clientDialog .client-overview-content.has-membership { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 390px); align-items: center; gap: 36px; }
#clientDialog .client-overview-summary { display: grid; gap: 24px; min-width: 0; }
#clientDialog .client-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
#clientDialog .client-snapshot > span { padding: 0; border: 0; }
#clientDialog .client-snapshot > :last-child { grid-column: auto; }
#clientDialog .client-snapshot small { font-size: 13px; }
#clientDialog .client-snapshot b { font-size: 16px; }
#clientDialog .client-membership-card { min-width: 0; }
#clientDialog .client-membership-card .club-card-wrap { padding: 0; }
#clientDialog .client-membership-card .club-card { filter: drop-shadow(0 12px 16px #84633026); }
#clientDialog .client-membership-card > p { margin: 16px 0 0; text-align: center; color: #64563f; font-size: 13px; }
#clientDialog .client-section-nav { gap: 8px 24px; padding: 20px 0; border-block: 1px solid var(--line); }
#clientDialog .client-section-nav button { border: 0; border-radius: 0; border-bottom: 2px solid transparent; padding: 10px 0; background: transparent; }
#clientDialog .client-section-nav button:hover { background: transparent; border-bottom-color: var(--brand); }
#clientDialog .client-section > summary { padding-block: 22px; }
@media (max-width: 700px) {
  #clientDialog .client-overview-content.has-membership { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  #clientDialog .client-membership-card { grid-row: 1; }
  #clientDialog .client-overview-content { padding-top: 24px; }
  #clientDialog .client-heading { align-items: flex-start; }
  #clientDialog .client-heading > .actions { gap: 8px; }
  #clientDialog .client-section-nav { gap: 4px 20px; }
}

/* All visit measurements have equal, compact fields once explicitly enabled. */
#clientDialog #measurementForm .tanita-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#clientDialog #measurementForm .tanita-field {
  display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 0;
  justify-items: stretch; align-content: start; gap: 8px; padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: none;
}
#clientDialog #measurementForm .tanita-label { min-height: 0; justify-content: start; text-align: start; font-size: 14px; font-weight: 500; }
#clientDialog #measurementForm .tanita-input { grid-column: auto; }
#clientDialog #measurementForm .tanita-input input { width: 100%; min-width: 0; text-align: start; font-weight: 500; }
@media (max-width: 600px) {
  #clientDialog #measurementForm .tanita-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #clientDialog #measurementForm .tanita-field { padding: 10px; }
}

/* Only the outer client popup is square and fills the viewport. */
#clientDialog.modal.detail-modal {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  inset: 0; margin: 0; border: 0; border-radius: 0;
}
#clientDialog > .modal-panel {
  height: 100%; max-height: 100dvh; border: 0; border-radius: 0;
  align-content: start; overflow-y: auto;
}
/* Preserve the measurement icons without enlarging the inputs. */
#clientDialog #measurementForm .tanita-field,
.measurement-edit-body .tanita-field { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
#clientDialog #measurementForm .tanita-icon,
.measurement-edit-body .tanita-icon {
  display: inline-grid; width: 28px; height: 28px; font-size: 9px;
  background: #e8edf3; color: #425b76; border-radius: 50%;
}
#clientDialog #measurementForm .tanita-input,
.measurement-edit-body .tanita-input { grid-column: 1 / -1; }

/* Financial overview uses the club's shared period controls. */
.finance-dashboard { display:grid; gap:24px; min-width:0; padding-block:12px; }
.finance-hero { padding:28px; border-radius:22px; background:linear-gradient(125deg,#153d38,#247c69); color:white; }
.finance-hero h2,.finance-hero p { color:inherit; }
.finance-hero>span { font-size:28px; }
.finance-totals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.finance-totals>div { background:#f0f8f4; border:1px solid #cfe5dc; border-radius:18px; padding:22px; display:grid; gap:8px; }
.finance-totals b { font-size:clamp(24px,3vw,38px); overflow-wrap:anywhere; }
.finance-sections { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.finance-sections>section { padding:18px; border:1px solid #dde6e1; border-radius:18px; min-width:0; }
.finance-bars { display:grid; gap:16px; }
.finance-bar>div { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.finance-bar meter { width:100%; height:24px; accent-color:#247c69; }
.finance-dashboard table { width:100%; border-collapse:collapse; white-space:nowrap; }
.finance-dashboard th,.finance-dashboard td { text-align:start; padding:14px; border-bottom:1px solid #dde6e1; }
.club-stock-notices summary { cursor:pointer; padding:12px; }
.discount-options .danger { color:#b42318; background:#fff0ee; border:1px solid #e9a8a2; }
.discount-options .danger.active { background:#b42318; color:white; }
@media(max-width:700px) {
 .finance-totals { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .finance-totals>div { padding:14px; }
 .finance-sections { grid-template-columns:1fr; }
 .finance-hero { padding:22px 18px; }
 .finance-dashboard { gap:18px; }
 [data-club-range] .form-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 [data-club-range] label { min-width:0; }
 [data-club-range] input,[data-club-range] select { width:100%; min-width:0; }
}
.finance-dashboard { grid-template-columns:minmax(0,1fr); width:100%; max-width:100%; }
.finance-dashboard>* { min-width:0; max-width:100%; }
.finance-dashboard .metrics>div { min-width:0; }
.finance-dashboard .metrics b,.finance-dashboard .metrics span { overflow-wrap:anywhere; }
.finance-dashboard .client-purchases-scroll { max-width:100%; }
.club-page #clubInventorySection [data-club-range] .form-row { grid-template-columns:repeat(5,minmax(0,1fr)); }
@media(max-width:900px) {
 .club-page #clubInventorySection [data-club-range] .form-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .club-page #clubInventorySection [data-club-range] input[type="month"] { font-size:14px; padding-inline:4px; }
}

/* One page per person; forms expand in the document instead of layered dialogs. */
[hidden] { display:none !important; }
.workspace-back { display:inline-flex; align-items:center; color:var(--brand-dark); font-weight:650; padding-block:12px; text-decoration:none; }
.lead-workspace-page,.client-workspace-page { width:100%; min-width:0; max-width:1200px; margin-inline:auto; }
.lead-workspace-page>#leadDetail { grid-template-columns:minmax(0,1fr); gap:24px; }
.lead-whatsapp-templates > summary { cursor:pointer; padding-block:12px; font-size:18px; font-weight:600; }
.lead-whatsapp-templates > summary:focus-visible { outline:2px solid #52704f; outline-offset:4px; border-radius:4px; }
.lead-whatsapp-templates[open] > summary { margin-bottom:12px; }
.lead-workspace-hero { display:grid; gap:12px; padding:28px; border-radius:20px; background:#eaf3ed; border:1px solid #cee0d3; }
.lead-workspace-hero h2 { margin:0; font-size:32px; }
.lead-workspace-hero p { margin:0; }
.lead-workspace-hero .workspace-back { padding:0 0 12px; }
.lead-primary-cta { justify-self:start; font-size:18px; padding:17px 30px; min-height:58px; }
#leadForm { padding:24px; border:1px solid var(--line); border-radius:18px; background:white; }
#clientDialog.client-workspace-page { position:static; inset:auto; max-height:none; overflow:visible; padding:0; border:0; background:transparent; }
.inline-workspace-editor { position:static; width:100%; min-width:0; padding:22px; margin-block:18px; border:1px solid #bed4c5; border-radius:18px; background:#f6faf7; scroll-margin-top:24px; }
.inline-workspace-editor>.submodal-panel,.inline-workspace-editor>.club-modal-panel { width:100%; max-width:100%; min-height:0; max-height:none; overflow:visible; box-shadow:none; border:0; background:transparent; padding:0; }
.inline-workspace-editor>.submodal-panel>.row-main:first-child { position:static; margin:0; padding:0 0 16px; background:transparent; backdrop-filter:none; }
.client-workspace-page #clientDetail,.client-workspace-page .client-detail { grid-template-columns:minmax(0,1fr); min-width:0; }
#clientDialog .client-measurement-cta { font-size:17px; padding:16px 24px; }
.embedded-client-workspace #clientDialog .client-heading>.actions [data-close-client-dialog],
.embedded-client-workspace #deleteClientBtn { display:none; }
.embedded-client-workspace .client-primary-actions { padding-block:12px; }
.finance-dashboard :is(section,details,.finance-stock-list,.client-purchases-scroll) { min-width:0; max-width:100%; }
.finance-hero { display:flex; justify-content:space-between; gap:20px; align-items:center; }
.finance-hero h2 { margin-block:8px; }
.finance-celebration { flex-shrink:0; font-size:30px; }
.finance-eyebrow { font-size:12px; font-weight:750; letter-spacing:.03em; }
.finance-summary-line { display:flex; flex-wrap:wrap; gap:12px 24px; padding:16px 0; color:#496456; font-weight:600; }
.finance-stock { border:1px solid #caddcf; background:#f6faf6; padding:24px; border-radius:20px; }
.finance-stock h3 { font-size:23px; margin-block:6px; }
.finance-stock-metrics { grid-template-columns:repeat(5,minmax(0,1fr)); margin-block:18px; }
.finance-stock-metrics>div { min-width:0; }
.finance-forecast-field { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-block:20px 8px; font-weight:600; }
.finance-forecast-field select { max-width:270px; }
.finance-stock-row { padding:18px 0; border-bottom:1px solid #dae4dc; }
.finance-stock-row small { display:block; margin-top:5px; color:var(--muted); }
.finance-stock-row dl { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin:14px 0 0; }
.finance-stock-row dt { font-size:12px; color:var(--muted); }
.finance-stock-row dd { margin:6px 0 0; font-weight:700; overflow-wrap:anywhere; }
.finance-period-form .form-row { grid-template-columns:repeat(5,minmax(0,1fr)); align-items:end; }
.finance-period-form :is(label,input,select) { min-width:0; width:100%; }
#homeFinanceOverview { min-width:0; margin-bottom:24px; }
@media(max-width:900px) {
 .finance-stock-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .finance-period-form .form-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .finance-period-form label:first-child { grid-column:1/-1; }
 .finance-hero { align-items:start; }
 .finance-celebration { display:none; }
 .finance-stock-row dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
 .inline-workspace-editor,#leadForm,.lead-workspace-hero,.finance-stock { padding:16px; }
 .lead-workspace-hero h2 { font-size:26px; }
 .lead-primary-cta { width:100%; }
 .lead-workspace-page .form-row { grid-template-columns:minmax(0,1fr); }
 .client-workspace-page .client-heading { flex-wrap:wrap; }
 .client-workspace-page .client-primary-actions { display:grid; grid-template-columns:minmax(0,1fr); width:100%; }
 .finance-period-form input[type="month"] { font-size:14px; padding-inline:4px; }
 .finance-period-form label:has(input[type="month"]) { grid-column:1/-1; }
 #homeFinanceOverview { padding:14px; }
}
.finance-period-form .form-row:has(select[name="period"]:only-child) { align-items:center; }
@media(max-width:600px) {
 .finance-hero p { font-size:14px; margin-block:10px; }
 .finance-hero { padding:20px 16px; }
}
.lead-tracking-section { margin-top:16px; }
.lead-tracking-section h3 { margin-block:0 6px; font-size:18px; }
.lead-tracking-section p { margin-block:6px 12px; }
.lead-tracking-section .actions { flex-wrap:wrap; }
.lead-measurements-inline { margin-top:20px; padding-top:20px; border-top:1px solid var(--line); min-width:0; }
.lead-measurements-inline .tanita-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.lead-measurements-inline .tanita-field { min-width:0; padding:12px; border-radius:12px; }
.lead-measurements-inline .tanita-input { grid-column:auto; min-width:0; }
.lead-measurements-inline .tanita-input input { min-width:0; width:100%; }
.lead-measurement-history { margin-top:18px; }
#financeOverview { min-width:0; }
@media(max-width:600px) {
 .lead-measurements-inline .tanita-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .lead-tracking-section .actions { display:grid; grid-template-columns:minmax(0,1fr); }
 .lead-tracking-section .actions button { width:100%; }
}
.club-page #clubInventorySection>.metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.club-page #clubInventorySection>.metrics b { font-size:22px; }
.public-lead-dashboard .lead-return-visit { display:grid; justify-items:center; gap:14px; padding:32px 28px; margin-bottom:24px; border:1px solid #ccdfd2; border-radius:24px; background:linear-gradient(135deg,#edf6ee,#f9fbf4); color:#24483a; text-align:center; }
.lead-return-logo { width:100px; height:100px; object-fit:contain; padding:8px; background:white; border-radius:20px; }
.lead-return-visit h1 { margin:0; font-size:clamp(27px,4vw,40px); line-height:1.25; }
.lead-return-visit p { margin:0; max-width:620px; line-height:1.75; }
.lead-return-greeting { font-weight:650; }
.lead-return-date { display:inline-block; padding:8px 14px; border-radius:30px; background:#e0eddf; font-size:14px; font-weight:650; }
.lead-return-visit[data-return-status="overdue"] .lead-return-date { background:#f4eddb; color:#68552c; }
.lead-return-visit .lead-return-cta { display:inline-flex; align-items:center; justify-content:center; min-height:54px; padding:14px 28px; border:1px solid #35634d; border-radius:14px; background:#35634d; color:white; font-size:17px; font-weight:700; text-decoration:none; }
.lead-return-visit .lead-return-cta:hover { background:#284e3c; }
.lead-return-visit small { color:#667669; }
.lead-contact-instructions { padding:14px; background:white; border-radius:12px; }
@media(max-width:600px) {
 .public-lead-dashboard .lead-return-visit { padding:24px 18px; gap:12px; }
 .lead-return-logo { width:82px; height:82px; }
 .lead-return-visit .lead-return-cta { width:100%; padding-inline:16px; }
}
/* Membership controls share one clear workspace on desktop and mobile. */
#clientDialog .membership-manager { padding:24px; background:#fff; border:1px solid #d8e3db; border-radius:20px; }
.membership-manager-header { display:flex; justify-content:space-between; align-items:start; gap:20px; padding-bottom:20px; border-bottom:1px solid #e4eae5; }
.membership-manager-header h2 { margin:6px 0; font-size:25px; }
.membership-manager-header p { margin:0; color:#647166; }
.membership-eyebrow { color:#657664; font-size:12px; font-weight:700; }
.membership-balance { display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:16px; padding:24px; margin-top:22px; background:#eff6ef; border-radius:18px; }
.membership-balance>div { display:grid; gap:6px; align-content:center; min-width:0; }
.membership-balance strong { color:#315b43; font-size:48px; line-height:1.1; }
.membership-balance b { font-size:25px; color:#3a5140; }
.membership-balance span { color:#536556; font-size:13px; }
.membership-validity { margin:12px 0 24px; color:#647166; font-size:13px; }
.membership-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
#clientDialog .membership-actions button { display:grid; gap:8px; text-align:start; padding:20px; border-radius:16px; white-space:normal; box-shadow:none; align-content:start; }
#clientDialog .membership-actions button b { font-size:17px; }
#clientDialog .membership-actions button span { font-size:13px; line-height:1.6; font-weight:400; }
#clientDialog .membership-actions button:first-child { background:#3d6952; color:#fff; border-color:#3d6952; }
#clientDialog .membership-actions button[aria-expanded="true"] { outline:2px solid #62856b; outline-offset:2px; }
.membership-action-panel { padding:22px; margin:20px 0; background:#f7faf7; border:1px solid #dbe6de; border-radius:16px; }
.membership-action-panel h3 { margin-top:0; font-size:20px; }
.membership-action-panel>button { margin-top:14px; }
.membership-history { margin-block:22px; }
.membership-history h3 { font-size:20px; }
.membership-history-row { display:flex; align-items:start; gap:14px; padding:18px 0; border-bottom:1px solid #e4eae5; }
.membership-history-icon { display:grid; place-items:center; width:34px; height:34px; flex-shrink:0; border-radius:50%; background:#edf4ed; color:#4d7155; }
.membership-history-row small { display:block; margin-top:7px; color:#647166; }
.membership-history-row p { margin:10px 0 0; white-space:pre-wrap; }
.membership-history-copy { flex:1; min-width:0; }
.membership-return-editor { margin-top:12px; }
.membership-return-editor summary { color:#42664d; font-size:14px; cursor:pointer; }
.membership-return-editor form { padding-top:12px; }
.membership-return-note { padding:12px 16px; border-radius:12px; background:#f5f1e7; color:#695d42; font-size:14px; }
.membership-secondary { padding:16px 0; border-top:1px solid #e4eae5; }
.membership-secondary summary { font-weight:600; cursor:pointer; }
.membership-secondary[open]>:not(summary) { margin-top:16px; }
.membership-secondary .club-card-wrap { max-width:440px; margin-inline:auto; }
.membership-package { display:grid; gap:6px; padding:18px; background:#eff6ef; border-radius:14px; }
.membership-package strong { font-size:26px; }
.membership-package span { font-size:13px; color:#647166; }
.membership-manager #clubMsg:not(:empty) { padding:14px; border-radius:12px; background:#edf6ef; color:#315e40; }
.order-date-editor { margin-top:8px; font-size:13px; }
.order-date-editor summary { cursor:pointer; color:#41694f; }
.order-date-editor form { width:230px; white-space:normal; padding:12px 0; }
@media(max-width:700px) {
 #clientDialog .membership-manager { padding:16px; border-radius:16px; }
 .membership-manager-header h2 { font-size:21px; }
 .membership-manager-header>button { padding:8px 12px; }
 .membership-balance { gap:10px; padding:18px 12px; grid-template-columns:1.2fr 1fr 1fr; }
 .membership-balance strong { font-size:38px; }
 .membership-balance b { font-size:24px; }
 .membership-balance span { font-size:12px; }
 .membership-actions { grid-template-columns:minmax(0,1fr); gap:10px; }
 #clientDialog .membership-actions button { padding:16px; gap:5px; }
 .membership-action-panel { padding:16px; }
 .membership-action-panel .form-row,.membership-manager #clubMembershipForm .form-row { grid-template-columns:minmax(0,1fr); }
}
.finance-calculation { font-size:14px; color:#536457; line-height:1.8; }
.membership-lifecycle-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:20px; }
.membership-lifecycle-metrics>div { display:grid; align-content:start; gap:10px; padding:16px; border:1px solid #dee8df; border-radius:14px; background:#f7faf6; }
.membership-lifecycle-metrics h4 { margin:0; font-size:14px; }
.membership-lifecycle-metrics b { font-size:28px; color:#375940; }
.membership-lifecycle-metrics span { font-size:12px; line-height:1.6; color:#68766a; }
.finance-payment-status { padding:22px; border:1px solid #e0e7e0; border-radius:18px; }
@media(max-width:700px) {
 .membership-lifecycle-metrics { grid-template-columns:minmax(0,1fr); }
 .finance-payment-status { padding:16px; }
}

/* Compact distributor journal; isolated from the shared form and card styles. */
.activities-page { display:grid; gap:22px; max-width:1100px; width:100%; margin-inline:auto; }
.shell #view .activities-page > .activity-compose { padding:18px 20px 14px; border:1px solid var(--line); border-radius:16px; background:var(--panel); box-shadow:0 3px 16px #30493304; }
.shell #view .activities-page > .activity-history { margin:0; padding:0; border:0; }
.activity-section-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.activity-eyebrow { display:block; font-size:11px; color:var(--muted); margin-bottom:2px; }
.activity-quick-tag { padding:3px 9px; background:#edf3e9; color:var(--brand); border-radius:20px; font-size:11px; white-space:nowrap; }
.activity-form { display:grid; grid-template-columns:minmax(0,1fr) minmax(210px,.7fr); gap:10px 14px; align-items:end; }
.activity-form:has(#activityQuantity:not([hidden])) { grid-template-columns:minmax(0,1fr) minmax(210px,.7fr) 100px; }
.activity-field { display:grid; grid-template-columns:auto 1fr; gap:4px 6px; align-items:baseline; min-width:0; font-size:12px; font-weight:600; color:var(--ink); }
.activity-field-hint { font-size:10px; font-weight:400; color:var(--muted); }
.activity-field :is(input,select,textarea) { grid-column:1/-1; min-width:0; }
.shell .activities-page .activity-form :is(input,select,textarea) { min-height:40px; padding:8px 10px; border-radius:9px; font-size:13px; background:#fff; }
.shell .activities-page .activity-form textarea { height:40px; min-height:40px; line-height:22px; resize:vertical; }
.activity-note-row { grid-column:1/-1; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:14px; }
.activity-submit { display:flex; justify-content:flex-end; }
.shell .activities-page .activity-submit button { min-height:40px; padding:8px 15px; border-radius:9px; font-size:13px; white-space:nowrap; }
.activity-help { margin:10px 0 0; font-size:11px; color:var(--muted); }
#activityQuantity[hidden], #activityFeedback:empty { display:none; }
#activityFeedback { grid-column:1/-1; font-size:12px; }
.activity-period { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; }
.shell .activities-page .activity-period select { width:auto; min-width:112px; min-height:34px; padding:5px 9px; border-radius:9px; font-size:12px; }
.activity-range { margin:0 0 12px; color:var(--muted); font-size:11px; }
.activity-summary { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 16px; }
.activity-stat { display:flex; align-items:center; gap:8px; padding:6px 11px; border:1px solid #e0e8db; border-radius:9px; background:#f0f4eb; font-size:12px; }
.activity-stat strong { font-size:18px; line-height:1.2; color:var(--brand); font-variant-numeric:tabular-nums; }
.activity-list { border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--panel); }
.activity-list:empty { display:none; }
.activity-entry { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:4px 18px; padding:10px 14px; border-bottom:1px solid var(--line); }
.activity-entry:last-child { border-bottom:0; }
.activity-entry:hover { background:#f5f8f0; }
.activity-entry-title { display:flex; align-items:center; flex-wrap:wrap; gap:7px; min-width:0; font-size:13px; }
.activity-entry-title b { font-weight:600; overflow-wrap:anywhere; }
.activity-entry-dot { width:6px; height:6px; border-radius:50%; background:#8da88a; flex-shrink:0; }
.activity-count { padding:1px 6px; border-radius:5px; background:#eaf0e4; color:var(--brand); font-size:11px; font-variant-numeric:tabular-nums; }
.activity-entry-meta { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:11px; white-space:nowrap; }
.activity-source { font-size:10px; padding:1px 6px; border-radius:5px; background:#f0f0eb; }
.activity-source.is-automatic { color:#6b7d69; background:#edf3e7; }
.shell .activities-page .activity-delete { display:flex; align-items:center; justify-content:center; gap:5px; min-height:32px; padding:5px 7px; background:transparent; border-color:transparent; color:#8b7777; font-size:11px; border-radius:7px; }
.shell .activities-page .activity-delete:hover { background:#fbefef; color:#a94052; box-shadow:none; }
.activity-note { grid-column:1/-1; margin:0; padding-inline-start:13px; color:var(--muted); font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.activity-pagination { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:14px; font-size:12px; color:var(--muted); }
.shell .activities-page .activity-pagination button { min-height:34px; padding:5px 12px; border-radius:8px; font-size:12px; }
.activity-empty { padding:20px; margin:0; width:100%; text-align:center; border:1px dashed #cfdcca; border-radius:12px; color:var(--muted); font-size:13px; }
@media (max-width:640px) {
  .shell #view .activities-page > .activity-compose { padding:14px; }
  .activity-form, .activity-form:has(#activityQuantity:not([hidden])) { grid-template-columns:minmax(0,1fr) 90px; }
  .activity-type-field, .activity-note-field { grid-column:1/-1; }
  .activity-date-field { grid-column:1; }
  .activity-form:not(:has(#activityQuantity:not([hidden]))) .activity-date-field { grid-column:1/-1; }
  .activity-note-row { grid-template-columns:minmax(0,1fr); gap:10px; }
  .activity-submit { grid-column:1/-1; }
  .activity-submit button { width:100%; }
  .activity-entry { grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; padding:10px 12px; }
  .activity-entry-meta { grid-column:1; grid-row:2; padding-inline-start:13px; gap:7px; }
  .activity-delete { grid-column:2; grid-row:1/3; }
  .activity-note { grid-row:3; }
  .activity-stat { padding:5px 9px; font-size:11px; }
}

