/* Fit Tide New Generation — original coral/slate identity, local assets only. */
:root {
    --ft-ink: #3b404e;
    --ft-text: #333333;
    --ft-muted: #656c78;
    --ft-coral: #e74c3c;
    --ft-action: #b93629;
    --ft-line: #e1e5eb;
    --ft-bg: #f1f3f6;
    --ft-sidebar: 244px;
    --ft-header-height: 66px;
    --ft-scroll-offset: calc(var(--ft-header-height) + 16px);
    --ft-action-gap: 12px;
    --ft-section-gap: 24px;
    --bs-body-font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --bs-body-color: var(--ft-text);
    --bs-body-bg: var(--ft-bg);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--ft-ink); }
h1 { font-size: 29px; line-height: 1.25; font-weight: 600; letter-spacing: -.6px; }
h2 { font-size: 18px; line-height: 1.4; font-weight: 600; }
h3 { font-size: 14px; line-height: 1.5; font-weight: 600; }
.icon { width: 21px; height: 21px; flex: 0 0 auto; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid #1269a6; outline-offset: 4px; border-radius: 3px; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; background: var(--ft-ink); color: white; padding: 10px 20px; border-radius: 4px; }
.skip-link:focus { top: 12px; color: white; }
.app-sidebar { width: var(--ft-sidebar); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--ft-line); padding: 30px 20px 22px; z-index: 30; overflow-y: auto; overscroll-behavior: contain; }
.brand { display: flex; justify-content: center; padding: 4px 0 34px; border-bottom: 1px solid var(--ft-line); }
.brand img { display: block; width: 176px; height: 56px; object-fit: contain; }
.nav-label { color: var(--ft-muted); font-size: 10px; letter-spacing: 1.3px; font-weight: 600; padding: 0 14px; margin: 27px 0 12px; }
.main-nav { display: flex; flex-direction: column; gap: 7px; }
.main-nav a { display: flex; gap: 13px; align-items: center; min-height: 47px; padding: 11px 14px; border-radius: 6px; color: #58606d; font-weight: 500; border: 1px solid transparent; transition: background-color .15s, color .15s; }
.main-nav a:hover { background: #f3f4f6; color: var(--ft-ink); }
.main-nav .is-active, .main-nav .is-active:hover { color: var(--ft-action); background: #fcece9; border-color: #f7dcd6; font-weight: 600; }
.main-nav .is-active::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ft-coral); margin-left: auto; }
.main-nav .icon { width: 19px; height: 19px; }
.sidebar-footer { border-top: 1px solid var(--ft-line); padding: 19px 0 0; margin-top: auto; display: flex; gap: 9px; align-items: center; }
.profile-avatar { background: #e7e9ee; display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; font-size: 11px; font-weight: 600; color: var(--ft-ink); }
.sidebar-footer strong { display: block; font-size: 11px; font-weight: 600; }
.sidebar-footer div > span { display: block; font-size: 10px; color: var(--ft-muted); }
.app-shell { margin-left: var(--ft-sidebar); min-height: 100vh; position: relative; isolation: isolate; background: linear-gradient(155deg, #eaf1f8 0, #f1f3f6 420px); }
/* Clip only the decorative layer: rotated wings must not widen Safari's scroll
   area. The content keeps its own scrolling and the header remains sticky. */
.app-watermark { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.app-watermark::before { content: ""; position: absolute; right: -8vw; top: 65px; width: min(69vw, 920px); aspect-ratio: 4955 / 2059; background: url("brand-wings.svg") center / contain no-repeat; transform: rotate(-27deg); transform-origin: center; opacity: .055; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 66px; padding: 0 34px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--ft-line); background: #fff; font-size: 12px; }
.app-shell main [id], .app-shell main :is(input, select, textarea, button, [role="alert"]) { scroll-margin-top: var(--ft-scroll-offset); }
/* Also cover rules in screen-specific stylesheets with a smaller fixed margin. */
.app-shell main :is(.compact-section-heading h2, .compact-field input, .compact-field select, .compact-field textarea, .compact-food-row, .legal-document section) { scroll-margin-top: var(--ft-scroll-offset); }
.topbar-left { display: flex; gap: 14px; align-items: center; }
.breadcrumb-label { color: var(--ft-muted); }
.breadcrumb-divider { color: #abb2be; }
.topbar-status { color: var(--ft-muted); font-size: 11px; }
.preview-banner { padding: 10px 34px; display: flex; gap: 3px 16px; flex-wrap: wrap; background: #e9eef4; color: #535e6f; font-size: 11px; border-bottom: 1px solid #dfe6ee; }
.preview-banner strong { font-weight: 600; }
main { padding: 31px 34px 24px; max-width: 1360px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-heading p { margin-top: 7px; color: var(--ft-muted); font-size: 13px; }
.button-primary { display: inline-flex; justify-content: center; align-items: center; gap: 9px; color: white; background: var(--ft-action); border: 1px solid var(--ft-action); border-radius: 5px; padding: 10px 15px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.button-primary:hover { background: #9e3025; color: white; }
/* Plan types have the same visual weight on every page. */
.button-primary.button-training, .button-secondary.button-training { background: #e8f0fb; border-color: #9cb8dc; color: #204e87; }
.button-primary.button-nutrition, .button-secondary.button-nutrition { background: #e5f3ed; border-color: #94bfa9; color: #226347; }
.button-training:hover { background: #d5e4f8 !important; color: #173e70 !important; }
.button-nutrition:hover { background: #cee9dc !important; color: #164c34 !important; }
.button-primary:focus-visible, .button-secondary:focus-visible { outline: 3px solid #456a9a; outline-offset: 3px; }
.button-primary, .button-secondary { min-height: 42px; line-height: 1.4; text-align: center; }
.surface-card + .surface-card { margin-top: var(--ft-section-gap); }
:is(.panel-body, .editor-card) > * + form { margin-top: 20px; }
.form-actions + .form-help { margin-top: 12px; }
.page-heading .form-actions { margin-top: 0; }
.credit-balances, .offer-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 16px; }
.credit-balances p { padding: 14px 16px; border-radius: 7px; margin: 0 0 12px; }
.credit-nutrition { background: #e5f3ed; color: #226347; }
.credit-training { background: #e8f0fb; color: #204e87; }
.offer-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; border: 1px solid #d7dfe8; border-radius: 8px; }
.offer-card h3, .demo-card h3 { font-size: 16px; margin: 0; }
.offer-card p { margin: 0; }
.offer-card .offer-price { font-size: 24px; font-weight: 700; }
.offer-card .button-primary { margin-top: auto; width: 100%; }
.demo-list { display: grid; gap: 16px; }
.demo-card { padding-bottom: 16px; border-bottom: 1px solid #e3e8ee; }
.demo-card .form-actions { margin-top: 12px; }
@media (max-width: 600px) { .offer-grid { grid-template-columns: 1fr; } .form-actions > a, .form-actions > input[type=submit] { white-space: normal; } }
.button-primary .icon { width: 17px; height: 17px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 26px; }
.product-card { display: flex; align-items: flex-start; gap: 18px; padding: 25px; border: 1px solid var(--ft-line); border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.product-card:hover { border-color: #e9a69e; box-shadow: 0 3px 12px #3b404e08; }
.product-icon { display: grid; place-items: center; flex-shrink: 0; width: 43px; height: 43px; border-radius: 8px; background: #fcece9; color: var(--ft-coral); }
.product-icon .icon { width: 24px; height: 24px; }
.product-card p { font-size: 12px; color: var(--ft-muted); margin-top: 6px; }
.product-link { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; color: var(--ft-action); margin-top: 19px; }
.product-link .icon { width: 16px; height: 16px; }
.surface-card { background: #fff; border: 1px solid var(--ft-line); border-radius: 8px; overflow: hidden; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 21px 25px; }
.card-heading h2 { font-size: 16px; }
.muted-label { color: var(--ft-muted); font-size: 11px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { font-size: 11px; font-weight: 600; color: var(--ft-muted); background: #f7f8fa; padding: 10px 20px; border-block: 1px solid var(--ft-line); white-space: nowrap; }
.data-table td { padding: 17px 20px; border-bottom: 1px solid #edf0f3; font-size: 12px; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { padding-left: 25px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 25px; }
.recent-plans .data-table td:last-child { text-align: right; }
.table-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ft-action); font-weight: 600; min-height: 28px; }
.table-link:hover { text-decoration: underline; }
.table-link .icon { width: 15px; height: 15px; }
.status-pill { display: inline-flex; align-items: center; font-size: 10px; font-weight: 500; border-radius: 4px; padding: 3px 8px; white-space: nowrap; }
.status-pill.neutral { color: #5c6370; background: #edf0f4; }
.status-pill.amber { color: #81580c; background: #fbf1da; }
.status-pill.green { color: #39702d; background: #edf5e8; }
.panel-footnote, .list-count { padding: 13px 25px; font-size: 11px; color: var(--ft-muted); }
.list-toolbar { display: flex; gap: 13px; padding: 0 25px 22px; }
.search-field { position: relative; flex: 1; min-width: 130px; max-width: 400px; }
.search-field .icon { position: absolute; left: 12px; top: 12px; width: 17px; height: 17px; color: var(--ft-muted); }
.search-field input { width: 100%; padding: 10px 12px 10px 38px; border: 1px solid #dce1e8; background: #f7f8fa; color: var(--ft-text); font-size: 12px; border-radius: 5px; height: 42px; }
.search-field input::placeholder { color: var(--ft-muted); }
.filter-label { flex: 0 0 165px; }
.filter-label select { height: 42px; border-radius: 5px; font-size: 12px; border-color: #dce1e8; color: var(--ft-text); background-color: #f7f8fa; }
.client-name { display: flex; align-items: center; gap: 12px; }
.client-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 500; color: #586780; background: #edf1f7; }
.client-name strong { display: block; font-size: 12px; font-weight: 600; }
.client-name small { display: block; color: var(--ft-muted); font-size: 10px; margin-top: 3px; }
.empty-state { padding: 25px; font-size: 12px; color: var(--ft-muted); }
.context-note { margin: 19px 0 0; color: var(--ft-muted); font-size: 12px; }
.plan-tabs { display: flex; border-bottom: 1px solid var(--ft-line); padding: 0 25px; gap: 28px; }
.plan-tabs button { appearance: none; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ft-muted); padding: 12px 0; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.plan-tabs button[aria-selected="true"] { color: var(--ft-action); border-bottom-color: var(--ft-coral); }
.plan-tabs button:hover { color: var(--ft-action); }
.plan-tabs .icon { width: 17px; height: 17px; }
.plan-preview [role="tabpanel"] { margin: 24px 25px; }
.preview-day { margin-bottom: 3px; }
.preview-day h3 { color: var(--ft-muted); font-size: 12px; }
.meal-row { display: flex; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid #edf0f3; }
.meal-number { font-size: 11px; color: var(--ft-muted); font-variant-numeric: tabular-nums; }
.meal-row > div { flex-grow: 1; }
.meal-row h3 { font-size: 13px; margin-bottom: 4px; }
.meal-row p { font-size: 12px; color: var(--ft-muted); }
.meal-symbol { color: var(--ft-muted); background: #f0f2f6; font-size: 9px; width: 31px; height: 31px; border-radius: 5px; display: grid; place-items: center; }
.muted-icon { color: #8690a0; width: 18px; height: 18px; }
.preview-note { display: flex; align-items: flex-start; gap: 9px; padding-top: 20px; color: var(--ft-muted); font-size: 11px; }
.preview-note .icon { width: 15px; height: 15px; margin-top: 2px; }
.workflow-details { margin: 20px 0 0; color: var(--ft-muted); font-size: 12px; }
.workflow-details summary { cursor: pointer; color: var(--ft-ink); font-weight: 600; width: fit-content; padding: 8px 0; }
.workflow-details > div { max-width: 760px; padding: 7px 0; }
.workflow-details p + p { margin-top: 8px; }
.settings-list { margin: 0; }
.settings-list > div { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2.8fr); gap: 20px; padding: 23px 25px; border-top: 1px solid var(--ft-line); }
.settings-list dt { font-size: 13px; font-weight: 600; color: var(--ft-ink); }
.settings-list dd { margin: 0; font-size: 12px; color: var(--ft-muted); }
.settings-list .status-pill { display: table; margin-top: 9px; }
.page-footer { max-width: 1360px; margin: 0 auto; padding: 15px 34px 25px; color: var(--ft-muted); font-size: 10px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--ft-line); border-radius: 5px; display: grid; place-items: center; background: #fff; color: var(--ft-ink); }
.mobile-nav-toggle, .mobile-sidebar-close, .nav-backdrop { display: none; }
@media (max-width: 1200px) {
    :root { --ft-sidebar: 224px; }
    .app-sidebar { padding-inline: 16px; }
    main { padding-inline: 26px; }
    .topbar, .preview-banner, .page-footer { padding-inline: 26px; }
    .product-card { padding: 21px; gap: 14px; }
}
@media (max-width: 1050px) {
    .app-sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 260px; padding-top: 55px; }
    .app-shell { margin-left: 0; }
    .app-watermark::before { width: 95vw; right: -16vw; top: 80px; }
    .mobile-nav-toggle, .mobile-sidebar-close { display: grid; }
    .mobile-sidebar-close { position: absolute; right: 14px; top: 12px; }
    .nav-open { overflow: hidden; }
    .nav-open .app-sidebar { transform: translateX(0); }
    .nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 29; border: 0; background: #27324666; }
    .main-nav { margin-bottom: 30px; }
}
@media (max-width: 640px) {
    :root { --ft-header-height: 62px; }
    .topbar { min-height: 62px; padding-inline: 18px; }
    .topbar-left { gap: 10px; }
    .topbar-status { display: none; }
    .preview-banner { padding: 10px 18px; font-size: 10px; }
    main { padding: 24px 18px 17px; }
    h1 { font-size: 26px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 17px; margin-bottom: 22px; }
    .page-heading p { font-size: 12px; }
    .product-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 22px; }
    .product-card { padding: 21px 19px; }
    .product-card h2 { font-size: 17px; }
    .product-link { margin-top: 13px; }
    .card-heading { padding: 19px; flex-wrap: wrap; gap: 7px 14px; }
    .data-table th, .data-table td { padding-inline: 9px; }
    .data-table td { white-space: normal; }
    .data-table th:first-child, .data-table td:first-child { padding-left: 19px; }
    .data-table th:last-child, .data-table td:last-child { padding-right: 19px; }
    .panel-footnote, .list-count { padding-inline: 19px; }
    .list-toolbar { padding: 0 19px 19px; flex-direction: column; gap: 9px; }
    .search-field { max-width: none; }
    .filter-label { flex: auto; }
    .plan-tabs { padding-inline: 19px; gap: 25px; }
    .plan-preview [role="tabpanel"] { margin: 20px 19px; }
    .meal-row { gap: 12px; padding: 18px 0; }
    .meal-symbol, .meal-row > .muted-icon { display: none; }
    .settings-list > div { grid-template-columns: 1fr; gap: 6px; padding: 19px; }
    .page-footer { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media (max-width: 360px) {
    .topbar-left .breadcrumb-label, .topbar-left .breadcrumb-divider { display: none; }
    .topbar-left > span:last-child { min-width: 0; overflow-wrap: anywhere; }
}
@media print { .app-sidebar, .topbar, .preview-banner, .page-footer, .nav-backdrop, .app-watermark { display: none !important; } .app-shell { margin: 0; background: white; } main { padding: 0; } body { background: white; } }
/* Identity and client management */
.sidebar-account { margin-top: auto; border-top: 1px solid var(--ft-line); padding: 18px 12px 0; font-size: 12px; }
.sidebar-account strong, .sidebar-account > span { display: block; }
.sidebar-account > span { font-size: 11px; color: var(--ft-muted); overflow-wrap: anywhere; margin-top: 4px; }
.logout-button, .text-button { border: 0; background: none; color: var(--ft-action); padding: 8px 0; font-size: 12px; text-decoration: underline; cursor: pointer; }
.logout-button { margin-top: 7px; }
.button-secondary { display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; font-size: 12px; color: var(--ft-ink); border: 1px solid #ccd3dd; border-radius: 5px; background: #fff; text-decoration: none; }
.button-secondary:hover { background: #f5f7fa; color: var(--ft-ink); }
.auth-body { display: grid; align-items: center; background: linear-gradient(145deg, #e5eef8, #f1f3f6 60%); min-height: 100vh; min-height: 100svh; position: relative; isolation: isolate; overflow-x: clip; }
.auth-body::before { content: ""; position: fixed; top: -20px; right: -12vw; width: min(78vw, 1040px); aspect-ratio: 4955 / 2059; background: url('brand-wings.svg') center / contain no-repeat; transform: rotate(-27deg); transform-origin: center; opacity: .055; z-index: -1; pointer-events: none; }
.auth-shell { width: 100%; max-width: 1136px; margin-inline: auto; padding: 28px 28px 22px; }
.auth-layout { display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr); border: 1px solid #dce2e9; border-radius: 12px; background: #fff; box-shadow: 0 12px 40px #3b404e0b; overflow: hidden; }
.auth-visual { position: relative; min-height: 660px; background: #3b404e; isolation: isolate; overflow: hidden; }
.auth-fitness-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; z-index: -2; }
.auth-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, #17212ded, #17212d25 36%, #17212d00 60%); z-index: -1; pointer-events: none; }
.auth-photo-caption { position: absolute; top: 28px; left: 30px; right: 28px; color: white; text-shadow: 0 2px 12px #10192670; }
.auth-photo-caption > span { display: block; color: #f4f1ee; font-size: 9px; letter-spacing: 1.5px; font-weight: 600; margin-bottom: 9px; }
.auth-photo-caption h2 { color: #fff; font-size: clamp(26px, 2.7vw, 32px); font-weight: 600; line-height: 1.2; letter-spacing: -.7px; }
.auth-card { align-self: center; width: 100%; max-width: 510px; margin: 0 auto; padding: 26px 36px; }
/* Login and registration share the space needed by the longer form. Keep the
   brand and tabs at the same position; errors and zoom can still grow the card. */
.auth-layout-entry { --auth-entry-height: 42rem; --auth-captcha-space: 0rem; }
.auth-layout-entry.auth-layout-captcha { --auth-captcha-space: 7rem; }
.auth-layout-entry .auth-card { align-self: stretch; min-height: calc(var(--auth-entry-height) + var(--auth-captcha-space)); }
.auth-brand { display: flex; width: fit-content; margin: 0 0 16px; }
.auth-brand img { display: block; width: 176px; height: auto; max-width: 100%; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 4px; margin-bottom: 18px; background: #f1f3f6; border: 1px solid #e9ecf1; border-radius: 7px; }
.auth-tabs a { display: grid; place-items: center; min-height: 36px; border-radius: 4px; color: #656c78; font-size: 13px; font-weight: 500; }
.auth-tabs a[aria-current="page"] { background: #fff; color: var(--ft-action); box-shadow: 0 1px 4px #3b404e12; font-weight: 600; }
.auth-tabs a:hover { color: var(--ft-action); }
.auth-context { margin: 0 0 25px; color: var(--ft-muted); font-size: 12px; line-height: 1.7; }
.auth-card h1 { font-size: 26px; letter-spacing: -.5px; }
.auth-card > form { margin: 0; }
.auth-card .form-intro { margin: 7px 0 16px; }
.auth-card .form-field { min-width: 0; margin-bottom: 11px; }
.auth-password-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.auth-card .auth-password-help { margin: -3px 0 13px; }
.captcha-field { min-width: 0; margin: 0 0 18px; }
.captcha-widget { max-width: 100%; min-height: 78px; }
.captcha-message { margin-top: 8px; color: #92382c; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.captcha-message:empty { display: none; }
.captcha-note { padding: 10px 12px; border: 1px solid #e1e5eb; border-radius: 5px; background: #f7f8fa; color: var(--ft-muted); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.captcha-note-unavailable { border-color: #f2c6bf; background: #fff5f2; color: #92382c; }
.captcha-field-invisible { margin-bottom: 12px; }
.captcha-field-invisible .captcha-widget { min-height: 60px; }
.captcha-field-invisible .captcha-message { margin-top: 6px; color: var(--ft-muted); font-size: 11px; }
.captcha-field-invisible .captcha-note { margin-top: 6px; padding: 0; border: 0; background: none; font-size: 10px; line-height: 1.6; }
.captcha-field-invisible .captcha-note a { text-decoration: underline; }
.captcha-retry { margin-top: 6px; padding: 5px 0; border: 0; background: none; color: var(--ft-action); font-size: 11px; text-decoration: underline; cursor: pointer; }
.form-intro { color: var(--ft-muted); font-size: 13px; margin: 9px 0 23px; overflow-wrap: anywhere; }
.form-field { margin-bottom: 18px; }
.form-field > label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; color: var(--ft-ink); }
.form-control { min-height: 43px; background: #f8f9fb; border-color: #dce1e8; border-radius: 5px; font-size: 14px; }
.form-control:focus { border-color: #337dab; box-shadow: 0 0 0 3px #337dab20; }
.form-control[disabled] { background: #edf0f4; }
.form-help { font-size: 11px; color: var(--ft-muted); margin-top: 7px; line-height: 1.7; }
.form-submit { width: 100%; margin-top: 4px; min-height: 44px; }
.auth-switch { text-align: center; font-size: 12px; margin-top: 14px; color: var(--ft-muted); }
.auth-switch a, .local-invitation-link { color: var(--ft-action); text-decoration: underline; }
.auth-footer { text-align: center; margin-top: 18px; color: var(--ft-muted); font-size: 11px; }
.form-errors { padding: 14px 17px 14px 30px; border: 1px solid #f2bdb5; border-radius: 5px; background: #fff1ee; color: #92382c; font-size: 12px; margin-bottom: 21px; }
.flash { padding: 13px 17px; border-radius: 6px; border: 1px solid #d3deeb; background: #edf3fa; font-size: 12px; color: #3d5879; margin-bottom: 20px; overflow-wrap: anywhere; }
.flash-success { background: #edf5e8; border-color: #d7e5ce; color: #3b6234; }
.flash p { margin: 5px 0; }
.editor-card { padding: 27px; max-width: 670px; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--ft-action-gap); align-items: center; }
.client-name-link { font-weight: 600; }
.client-name-link:hover { color: var(--ft-action); text-decoration: underline; }
.data-table .email-cell { white-space: normal; overflow-wrap: anywhere; }
.invitation-panel, .profile-panel { margin-top: 24px; }
.panel-body { padding: 0 25px 25px; max-width: 690px; }
.panel-body .form-intro { margin-top: 0; }
.panel-body .form-field { max-width: 450px; }
.danger-button { margin-top: 14px; }
.settings-list dd { overflow-wrap: anywhere; }
.profile-links { list-style: none; padding: 0; margin: 0; }
.profile-links li { display: flex; justify-content: space-between; gap: 16px; padding: 17px 25px; border-top: 1px solid var(--ft-line); font-size: 13px; }
.profile-links a { font-weight: 600; }
.profile-links a:hover { color: var(--ft-action); }
.profile-links span { color: var(--ft-muted); font-size: 11px; }
@media (max-width: 640px) {
    .editor-card, .panel-body { padding: 20px; }
    .panel-body { padding-top: 0; }
    .form-control { font-size: 16px; }
    .profile-links li { padding: 15px 19px; flex-wrap: wrap; gap: 4px 16px; }
}

@media (max-width: 900px) {
    .auth-shell { padding: 30px 22px 23px; }
    .auth-layout { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
    .auth-card { padding: 25px 26px; }
    .auth-layout-entry { --auth-entry-height: 44rem; }
    .auth-photo-caption { left: 24px; top: 25px; }
    .auth-photo-caption h2 { font-size: 27px; }
    .auth-photo-caption > span { font-size: 8px; letter-spacing: 1.4px; }
}
@media (max-width: 700px) {
    .auth-body { display: block; }
    .auth-body::before { top: 25px; right: -25vw; width: 115vw; }
    .auth-shell { max-width: 520px; padding: 20px 16px 23px; }
    .auth-layout { grid-template-columns: minmax(0, 1fr); border-radius: 10px; }
    .auth-visual { min-height: 185px; }
    .auth-fitness-image { object-position: 50% 0%; }
    .auth-visual::after { background: linear-gradient(115deg, #17212de8, #17212d20 75%); }
    .auth-photo-caption { left: 24px; right: 20px; top: 22px; }
    .auth-photo-caption h2 { font-size: 25px; letter-spacing: -.6px; }
    .auth-photo-caption > span { margin-bottom: 9px; font-size: 8px; }
    .auth-card { padding: 24px 25px 26px; max-width: none; }
    .auth-layout-entry { --auth-entry-height: 44rem; }
    .auth-brand { margin-bottom: 16px; }
    .auth-brand img { width: 170px; }
    .auth-tabs { margin-bottom: 18px; }
    .auth-tabs a { min-height: 41px; }
    .auth-card h1 { font-size: 24px; }
    .auth-card .form-control { font-size: 16px; }
    .auth-card .form-submit { font-size: 13px; }
    .auth-footer { font-size: 10px; }
}
@media (max-width: 420px) {
    .auth-password-fields { grid-template-columns: minmax(0, 1fr); }
    .auth-layout-entry { --auth-entry-height: 47rem; }
}
@media (max-width: 360px) {
    .auth-shell { padding-inline: 10px; }
    .auth-card { padding-inline: 18px; }
    .auth-photo-caption { left: 20px; }
}

/* Personal assessment and dated measurement history */
.assessment-current { margin-bottom: 23px; }
.assessment-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 0 25px 24px; margin: 0; }
.assessment-summary dt { font-size: 11px; font-weight: 500; color: var(--ft-muted); margin-bottom: 7px; }
.assessment-summary dd { margin: 0; color: var(--ft-ink); font-size: 21px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.assessment-summary dd small { font-size: 12px; font-weight: 400; color: var(--ft-muted); }
.assessment-summary dd.assessment-summary-author { font-size: 13px; }
.assessment-measurement { padding: 23px 25px; margin-bottom: 22px; }
.assessment-measurement h2 { margin-bottom: 10px; }
.assessment-measurement > p { font-size: 12px; color: var(--ft-muted); max-width: 900px; line-height: 1.8; }
.assessment-measurement .assessment-check { margin-top: 18px; }
.assessment-check { display: flex; gap: 10px; align-items: flex-start; }
.assessment-check input[type="checkbox"] { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 3px; accent-color: var(--ft-action); }
.assessment-check label { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; font-weight: 600; line-height: 1.8; color: var(--ft-ink); cursor: pointer; }
.assessment-form-hint { margin: 0 0 17px; color: var(--ft-muted); font-size: 12px; }
.assessment-groups { display: flex; flex-direction: column; gap: 14px; }
.assessment-group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 25px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ft-ink); }
.assessment-group > summary::-webkit-details-marker { display: none; }
.assessment-group > summary:hover { background: #fafbfc; }
.assessment-group[open] > summary { border-bottom: 1px solid var(--ft-line); }
.assessment-disclosure { display: grid; place-items: center; flex-shrink: 0; width: 23px; height: 23px; font-weight: 400; font-size: 23px; line-height: 1; color: #7e8897; }
.assessment-group[open] .assessment-disclosure { transform: rotate(45deg); }
.assessment-fields { border: 0; padding: 24px 25px 6px; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; min-width: 0; }
.assessment-field { min-width: 0; }
.assessment-field > label { display: inline-block; }
.assessment-field-wide { grid-column: 1 / -1; }
.assessment-field .form-control, .assessment-field .form-select { width: 100%; min-width: 0; max-width: 100%; }
.assessment-field .form-select { min-height: 43px; border-radius: 5px; border-color: #dce1e8; background-color: #f8f9fb; color: var(--ft-text); font-size: 13px; }
.assessment-required { font-size: 12px; font-weight: 600; color: var(--ft-action); }
.assessment-choices { border: 0; margin: 0; padding: 0; min-width: 0; }
.assessment-choices legend { float: none; font-size: 12px; font-weight: 600; color: var(--ft-ink); margin-bottom: 12px; }
.assessment-choice-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 16px; }
.assessment-choice-list br { display: none; }
.assessment-choice-list label { display: flex; align-items: flex-start; gap: 8px; color: #596371; font-size: 12px; line-height: 1.6; cursor: pointer; }
.assessment-choice-list input { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--ft-action); }
.assessment-field-error { font-size: 12px; color: #92382c; margin-top: 7px; }
.assessment-conflict { padding: 19px 23px; border: 1px solid #ecd2aa; border-radius: 7px; background: #fff8eb; color: #705327; margin-bottom: 22px; font-size: 13px; }
.assessment-conflict p { margin: 8px 0 11px; line-height: 1.8; }
.assessment-conflict a { color: #765020; text-decoration: underline; font-weight: 600; }
.assessment-save { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 23px; padding: 22px 0 0; border-top: 1px solid var(--ft-line); }
.assessment-save strong { font-size: 12px; font-weight: 600; color: var(--ft-ink); }
.assessment-save p { margin-top: 4px; font-size: 11px; color: var(--ft-muted); }
.assessment-save .button-primary { min-width: 145px; min-height: 44px; }
.assessment-history-panel { margin-top: 22px; }
.assessment-table caption { caption-side: top; padding: 0 25px 18px; color: var(--ft-muted); font-size: 12px; line-height: 1.8; max-width: 1000px; }
.assessment-table th small { display: block; margin-top: 4px; font-size: 10px; font-weight: 400; }
.assessment-table tbody th { font-weight: 500; font-size: 12px; color: var(--ft-ink); background: #fff; border: 0; border-bottom: 1px solid #edf0f3; padding: 17px 20px; }
.assessment-table tbody td { font-variant-numeric: tabular-nums; }
.assessment-empty { padding: 30px; }
.assessment-empty p { margin: 10px 0 22px; color: var(--ft-muted); font-size: 13px; }
.assessment-detail-groups { margin-top: 23px; }
.assessment-readonly dd { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 850px) {
    .assessment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 25px; }
    .assessment-choice-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .assessment-summary { padding: 0 19px 21px; gap: 20px 14px; }
    .assessment-summary dd { font-size: 19px; }
    .assessment-summary dt { font-size: 10px; }
    .assessment-measurement { padding: 21px 19px; }
    .assessment-group > summary { padding: 17px 19px; font-size: 13px; }
    .assessment-fields { grid-template-columns: minmax(0, 1fr); padding: 21px 19px 3px; }
    .assessment-field-wide { grid-column: auto; }
    .assessment-field .form-control, .assessment-field .form-select { font-size: 16px; }
    .assessment-choice-list { gap: 11px; }
    .assessment-check label { font-size: 12px; }
    .assessment-save { flex-direction: column; align-items: stretch; }
    .assessment-save .button-primary { min-height: 46px; }
    .assessment-table caption { padding-inline: 19px; }
    .assessment-table th, .assessment-table td { white-space: nowrap; }
    .assessment-table tbody th { padding: 17px 14px; }
    .assessment-empty { padding: 24px 19px; }
}
@media (max-width: 370px) { .assessment-choice-list { grid-template-columns: minmax(0, 1fr); } }
:where(body[data-plan-kind="training"]) .button-primary:not(.button-nutrition) { background: #e8f0fb; border-color: #9cb8dc; color: #204e87; }
:where(body[data-plan-kind="nutrition"]) .button-primary:not(.button-training) { background: #e5f3ed; border-color: #94bfa9; color: #226347; }
.panel-body > p + .offer-grid { margin-top: 16px; }
.context-note + .surface-card { margin-top: 16px; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ft-action-gap); }
.empty-state > a[class*="button-"] { margin-top: 12px; }
.button-training, .button-nutrition { font-weight: 600; }
/* Actions follow the content they belong to; toolbar actions stay inline. */
:where(.panel-body, .editor-card, form, main) > * + :is(.form-actions, .button-row) { margin-top: 20px; }
main > .surface-card + :is(.form-actions, .button-row),
main > :is(.form-actions, .button-row) + .surface-card { margin-top: var(--ft-section-gap); }
:where(.panel-body, .editor-card, form) > :is(p, ul, dl) + :is(.button-primary, .button-secondary) { margin-top: 16px; }
.panel-body > :is(.form-actions, .button-row):first-child { margin-top: 0; }
.page-heading > :is(.form-actions, .button-row) { margin-top: 0; flex-shrink: 0; }
.page-heading > div:first-child { min-width: 0; }
.form-actions > form { margin: 0; }
.form-actions > :is(.button-primary, .button-secondary),
.button-row > :is(.button-primary, .button-secondary) { min-height: 44px; }
.profile-plan-actions .panel-body { max-width: none; }
.profile-plan-actions .form-intro { margin-bottom: 16px; }
@media (max-width: 600px) {
    .page-heading > :is(.form-actions, .button-row) { width: 100%; }
    .form-actions > :is(.button-primary, .button-secondary),
    .button-row > :is(.button-primary, .button-secondary) {
        flex: 1 1 160px;
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .form-actions > .table-link { padding-block: 8px; }
}

/* Keep positioned table labels inside their own horizontal scroll container. */
.table-responsive { position: relative; min-width: 0; max-width: 100%; }
