/* FORMA desktop — оформление «Чистый» (октябрь 2026) для кабинетов тренера и клиента.
   Подключается ПОСЛЕДНИМ стилем на страницах кабинета (trainer-*.html, trainer.html,
   builder.html, billing.html, client.html) — после app.css, app-concept.css и mobile.css.

   Что меняет: плоский серый фон, белое боковое меню во всю высоту с иконками,
   заголовки страниц без карточки-подложки, белые поверхности с тонкой линией
   вместо теней, кнопки-«таблетки», сегменты как в iOS, спокойные поля ввода.
   Цвета бренда прежние: графит #1F252B, мята #21C39A, фон #F5F6F7; текст ссылок —
   тёмная мята #0E8064 (контраст 4.9:1 на белом).

   Только внешний вид: разметку и логику страниц файл не трогает. Предыдущие слои
   (mobile.css, app-concept.css) держат свои правила через !important, поэтому и
   здесь важные свойства рамки идут с !important — иначе каскад их не пропустит.
   Узкие экраны (≤820px) остаются как были: правила рамки — только для десктопа. */

:root {
  --fc-bg: #f5f6f7;
  --fc-surface: #ffffff;
  --fc-ink: #1f252b;
  --fc-ink-2: #5b636b;
  --fc-ink-3: #6b747d;
  --fc-line: #e7e9ec;
  --fc-line-2: #eef0f2;
  --fc-btn-line: #dfe2e6;
  --fc-seg: #e8eaed;
  --fc-mint: #21c39a;
  --fc-mint-hover: #1db48e;
  --fc-mint-ink: #0e8064;
  --fc-photo-selected-ink: #0b775c;
  --fc-photo-selected-bg: #e9f8f3;
  --fc-mint-soft: #e9f8f3;
  --fc-mint-ink-soft: #0b775c;
  --fc-danger: #e5484d;
  --fc-warn: #e1a948;
}

/* ══ Рамка: фон, боковое меню, отступы ═══════════════════════════════════ */
@media (min-width: 821px) {
  body.trainer-ops-page,
  body.trainer-builder-page,
  body.client-ops-page {
    background: var(--fc-bg) !important;
  }

  body.trainer-ops-page::before,
  body.trainer-ops-page::after,
  body.client-ops-page::before,
  body.client-ops-page::after,
  body.trainer-ops-page .ops-main::before,
  body.trainer-ops-page .ops-main::after,
  body.client-ops-page .ops-main::before,
  body.client-ops-page .ops-main::after {
    content: none !important;
    display: none !important;
  }

  body.trainer-ops-page .ops-shell,
  body.trainer-builder-page .ops-shell,
  body.client-ops-page .ops-shell {
    display: grid !important;
    grid-template-columns: 264px minmax(0, 1fr) !important;
    gap: 0 !important;
    background: var(--fc-bg) !important;
  }

  body.trainer-ops-page .ops-rail,
  body.trainer-builder-page .ops-rail,
  body.client-ops-page .ops-rail {
    position: sticky !important;
    top: 0 !important;
    align-self: start !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 264px !important;
    min-width: 264px !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 28px 16px 20px !important;
    border: 0 !important;
    border-right: 1px solid var(--fc-line) !important;
    border-radius: 0 !important;
    background: var(--fc-surface) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    overflow: visible !important;
  }

  body.trainer-ops-page .ops-brand,
  body.trainer-builder-page .ops-brand,
  body.client-ops-page .ops-brand {
    display: block !important;
    flex: 0 0 auto !important;
    width: 150px !important;
    height: 30px !important;
    margin: 2px 12px 28px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: url("assets/forma-lockup-ref.png") left center / contain no-repeat !important;
    box-shadow: none !important;
    color: transparent !important;
    font-size: 0 !important;
    text-indent: -999px !important;
    overflow: hidden !important;
  }

  body.trainer-ops-page .ops-rail-nav,
  body.trainer-builder-page .ops-rail-nav,
  body.client-ops-page .ops-rail-nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    scrollbar-width: none;
  }

  body.trainer-ops-page .ops-rail-link,
  body.trainer-builder-page .ops-rail-link,
  body.client-ops-page .ops-rail-link {
    position: relative !important;
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--fc-ink) !important;
    text-decoration: none !important;
    transform: none !important;
  }

  body.trainer-ops-page .ops-rail-link:hover,
  body.trainer-ops-page .ops-rail-link:focus-visible,
  body.trainer-builder-page .ops-rail-link:hover,
  body.trainer-builder-page .ops-rail-link:focus-visible,
  body.client-ops-page .ops-rail-link:hover,
  body.client-ops-page .ops-rail-link:focus-visible {
    background: var(--fc-bg) !important;
    color: var(--fc-ink) !important;
    box-shadow: none !important;
  }

  body.trainer-ops-page .ops-rail-link.active,
  body.trainer-builder-page .ops-rail-link.active,
  body.client-ops-page .ops-rail-link.active {
    background: var(--fc-mint-soft) !important;
    color: var(--fc-ink) !important;
    box-shadow: none !important;
  }

  body.trainer-ops-page .ops-rail-icon,
  body.trainer-builder-page .ops-rail-icon,
  body.client-ops-page .ops-rail-icon {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    height: 22px !important;
    color: var(--fc-ink-2) !important;
  }

  body.trainer-ops-page .ops-rail-icon svg,
  body.trainer-builder-page .ops-rail-icon svg,
  body.client-ops-page .ops-rail-icon svg {
    width: 22px !important;
    height: 22px !important;
    stroke: currentColor;
    stroke-width: 1.7 !important;
  }

  body.trainer-ops-page .ops-rail-link.active .ops-rail-icon,
  body.trainer-builder-page .ops-rail-link.active .ops-rail-icon,
  body.client-ops-page .ops-rail-link.active .ops-rail-icon {
    color: var(--fc-mint-ink) !important;
  }

  /* Подпись пункта: у тренера — из data-label, у клиента — span.ops-rail-label. */
  body.trainer-ops-page .ops-rail-link::after,
  body.trainer-builder-page:not(.client-ops-page) .ops-rail-link::after {
    content: attr(data-label) !important;
    position: static !important;
    display: block !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
    box-shadow: none !important;
    color: currentColor !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em !important;
    line-height: 1.2 !important;
    opacity: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    transform: none !important;
  }

  body.client-ops-page .ops-rail-link::after {
    content: none !important;
    display: none !important;
  }

  body.client-ops-page .ops-rail-label {
    display: block !important;
    overflow: hidden !important;
    color: currentColor !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.trainer-ops-page .ops-rail-link.active::after,
  body.trainer-builder-page .ops-rail-link.active::after,
  body.client-ops-page .ops-rail-link.active .ops-rail-label {
    font-weight: 700 !important;
  }

  /* «Уведомления» и «Поддержка» — отдельной группой под линией. */
  body.trainer-ops-page .ops-rail-link[href="trainer-notifications.html"],
  body.trainer-builder-page .ops-rail-link[href="trainer-notifications.html"],
  body.client-ops-page .ops-rail-link[href="#support"] {
    margin-top: 17px !important;
  }

  body.trainer-ops-page .ops-rail-link[href="trainer-notifications.html"]::before,
  body.trainer-builder-page .ops-rail-link[href="trainer-notifications.html"]::before,
  body.client-ops-page .ops-rail-link[href="#support"]::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 12px;
    right: 12px;
    height: 1px;
    background: var(--fc-line-2);
    pointer-events: none;
  }

  /* «Ещё» (моё питание) — такой же пункт меню, а не отдельная кнопка. */
  body.trainer-ops-page .ops-rail-more,
  body.trainer-builder-page .ops-rail-more {
    margin: 2px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  body.trainer-ops-page .ops-more-toggle,
  body.trainer-builder-page .ops-more-toggle {
    justify-content: flex-start !important;
    gap: 12px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: var(--fc-ink) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
  }

  body.trainer-ops-page .ops-more-toggle svg,
  body.trainer-builder-page .ops-more-toggle svg {
    width: 22px !important;
    height: 22px !important;
    color: var(--fc-ink-2) !important;
  }

  body.trainer-ops-page .ops-more-toggle:hover,
  body.trainer-ops-page .ops-more-toggle[aria-expanded="true"],
  body.trainer-builder-page .ops-more-toggle:hover,
  body.trainer-builder-page .ops-more-toggle[aria-expanded="true"] {
    background: var(--fc-bg) !important;
  }

  body.trainer-ops-page .ops-more-panel,
  body.trainer-builder-page .ops-more-panel {
    border: 1px solid var(--fc-line) !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 40px rgba(31, 37, 43, 0.14) !important;
  }

  /* Аккаунт внизу меню: аватар, «Оплата и подписка», тихая «Выйти». */
  body.trainer-ops-page .ops-rail-account,
  body.trainer-builder-page .ops-rail-account,
  body.client-ops-page .ops-rail-account {
    flex: 0 0 auto !important;
    display: grid !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 12px 0 0 !important;
    padding: 14px !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: var(--fc-bg) !important;
    box-shadow: none !important;
  }

  body.trainer-ops-page .ops-rail-account-avatar,
  body.trainer-builder-page .ops-rail-account-avatar,
  body.client-ops-page .ops-rail-account-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--fc-ink) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  body.trainer-ops-page .ops-rail-account-user strong,
  body.trainer-builder-page .ops-rail-account-user strong,
  body.client-ops-page .ops-rail-account-user strong {
    color: var(--fc-ink) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
  }

  body.trainer-ops-page .ops-rail-account-user small,
  body.trainer-builder-page .ops-rail-account-user small,
  body.client-ops-page .ops-rail-account-user small {
    color: var(--fc-ink-2) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
  }

  body.trainer-ops-page .ops-rail-billing,
  body.trainer-builder-page .ops-rail-billing,
  body.client-ops-page .ops-rail-billing {
    justify-content: center !important;
    height: 40px !important;
    min-height: 40px !important;
    border: 1px solid var(--fc-btn-line) !important;
    border-radius: 999px !important;
    background: var(--fc-surface) !important;
    box-shadow: none !important;
    color: var(--fc-ink) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  body.trainer-ops-page .ops-rail-billing *,
  body.trainer-builder-page .ops-rail-billing *,
  body.client-ops-page .ops-rail-billing * {
    color: inherit !important;
  }

  body.trainer-ops-page .ops-rail-logout,
  body.trainer-builder-page .ops-rail-logout,
  body.client-ops-page .ops-rail-logout {
    justify-content: center !important;
    height: 36px !important;
    min-height: 36px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--fc-ink-2) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
  }

  body.trainer-ops-page .ops-rail-logout *,
  body.trainer-builder-page .ops-rail-logout *,
  body.client-ops-page .ops-rail-logout * {
    color: inherit !important;
  }

  body.trainer-ops-page .ops-rail-logout:hover,
  body.trainer-builder-page .ops-rail-logout:hover,
  body.client-ops-page .ops-rail-logout:hover {
    background: rgba(31, 37, 43, 0.05) !important;
    color: var(--fc-ink) !important;
  }

  body.trainer-ops-page .ops-main,
  body.trainer-builder-page .ops-main,
  body.client-ops-page .ops-main {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 40px clamp(24px, 3.4vw, 56px) 64px !important;
  }

  /* ── Заголовок страницы: без карточки, логотипа и свечения ───────────── */
  body.trainer-ops-page .ops-page-head,
  body.trainer-builder-page .ops-page-head,
  body.client-ops-page .ops-page-head {
    overflow: visible !important;
    margin: 0 0 28px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.trainer-ops-page .ops-page-head::before,
  body.trainer-ops-page .ops-page-head::after,
  body.trainer-builder-page .ops-page-head::before,
  body.trainer-builder-page .ops-page-head::after,
  body.client-ops-page .ops-page-head::before,
  body.client-ops-page .ops-page-head::after {
    content: none !important;
    display: none !important;
  }
}

/* ══ Рамка узкого окна (≤820px): нижний таббар тренера ══════════════════════
   mobile.css раскладывает пункты в 7 колонок и подписывает их по номеру
   (nth-child) — по старому порядку меню. С «Оплатами» и «Поддержкой» пунктов
   стало 8: последний уезжал на вторую строку, а подписи сдвигались
   («Трен.» под оплатами). Здесь все видимые пункты в одну строку, подпись —
   по адресу ссылки, а не по номеру. */
@media (max-width: 820px) {
  :root body.trainer-ops-page .ops-rail-nav {
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(0, 1fr) !important;
  }

  :root body.trainer-ops-page .ops-rail-link[href="trainer-dashboard.html"]::after { content: "Главная" !important; }
  :root body.trainer-ops-page .ops-rail-link[href="trainer-clients.html"]::after { content: "Клиенты" !important; }
  :root body.trainer-ops-page .ops-rail-link[href="trainer-payments.html"]::after { content: "Оплаты" !important; }
  :root body.trainer-ops-page .ops-rail-link[href="trainer.html"]::after { content: "Трен." !important; }
  :root body.trainer-ops-page .ops-rail-link[href="trainer-client.html"]::after { content: "Профиль" !important; }
  :root body.trainer-ops-page .ops-rail-link[href="trainer-library.html"]::after { content: "Видео" !important; }
  :root body.trainer-ops-page .ops-rail-link[href="trainer-notifications.html"]::after { content: "Увед." !important; }
  :root body.trainer-ops-page .ops-rail-link[href="trainer-support.html"]::after { content: "Помощь" !important; }
  :root body.trainer-ops-page .ops-rail-link[href="admin.html"]::after { content: "CRM" !important; }

  :root body.trainer-ops-page .ops-rail-link::after {
    font-size: 8px !important;
    letter-spacing: -0.01em !important;
  }
}

/* ══ Общие элементы кабинета (на всех ширинах) ═════════════════════════════ */

body.trainer-ops-page .ops-kicker,
body.trainer-builder-page .ops-kicker,
body.client-ops-page .ops-kicker {
  margin-bottom: 6px !important;
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body.trainer-ops-page .ops-page-head h1,
body.trainer-builder-page .ops-page-head h1,
body.client-ops-page .ops-page-head h1 {
  color: var(--fc-ink) !important;
  font-size: clamp(30px, 3vw, 40px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.08 !important;
}

body.trainer-ops-page .ops-page-head p:not(.ops-kicker),
body.trainer-builder-page .ops-page-head p:not(.ops-kicker),
body.client-ops-page .ops-page-head p:not(.ops-kicker) {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
}

/* Поверхности: белые, тонкая линия, без теней. */
body.trainer-ops-page .ops-surface,
body.trainer-builder-page .ops-surface,
body.client-ops-page .ops-main > .ops-surface,
body.client-ops-page .ops-main section > .ops-surface {
  border: 1px solid var(--fc-line) !important;
  border-radius: 24px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

/* Кнопки-«таблетки». Главная — графит, мятная — только «Создать тренировку». */
body.trainer-ops-page .ops-button,
body.trainer-builder-page .ops-button,
body.client-ops-page .ops-button {
  border-radius: 999px !important;
  box-shadow: none !important;
  font-weight: 700 !important;
  letter-spacing: -0.005em !important;
}

body.trainer-ops-page .ops-button.is-primary,
body.trainer-builder-page .ops-button.is-primary {
  border-color: var(--fc-ink) !important;
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

body.trainer-ops-page .ops-button.is-primary:hover,
body.trainer-builder-page .ops-button.is-primary:hover {
  background: #2b333b !important;
}

body.trainer-ops-page .ops-button.is-ghost,
body.trainer-builder-page .ops-button.is-ghost,
body.client-ops-page .ops-button.is-ghost {
  border: 1px solid var(--fc-btn-line) !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
}

body.trainer-ops-page .ops-button.is-ghost:hover,
body.trainer-builder-page .ops-button.is-ghost:hover,
body.client-ops-page .ops-button.is-ghost:hover {
  background: var(--fc-bg) !important;
}

body.trainer-ops-page .ops-button.is-create-workout,
body.trainer-ops-page .ops-button.ops-quick-create,
body.trainer-builder-page .ops-button.is-create-workout {
  border-color: transparent !important;
  background: var(--fc-mint) !important;
  color: var(--fc-ink) !important;
}

body.trainer-ops-page .ops-button.is-create-workout:hover,
body.trainer-ops-page .ops-button.ops-quick-create:hover,
body.trainer-builder-page .ops-button.is-create-workout:hover {
  background: var(--fc-mint-hover) !important;
}

/* Поля ввода и списки выбора. */
body.trainer-ops-page .ops-input,
body.trainer-ops-page .ops-select,
body.trainer-ops-page .ops-textarea,
body.trainer-builder-page .ops-input,
body.trainer-builder-page .ops-select,
body.trainer-builder-page .ops-textarea {
  border: 1px solid #e1e4e8 !important;
  border-radius: 12px !important;
  background-color: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
}

body.trainer-ops-page .ops-input:focus,
body.trainer-ops-page .ops-select:focus,
body.trainer-ops-page .ops-textarea:focus,
body.trainer-builder-page .ops-input:focus,
body.trainer-builder-page .ops-select:focus,
body.trainer-builder-page .ops-textarea:focus {
  border-color: var(--fc-mint) !important;
  box-shadow: 0 0 0 3px rgba(33, 195, 154, 0.18) !important;
  outline: none !important;
}

/* Сегменты (Неделя / Месяц, Активные / Неактивные, вкладки карточки клиента). */
body.trainer-ops-page .ops-segment,
body.trainer-ops-page .ops-tabbar,
body.trainer-builder-page .ops-segment {
  display: inline-flex !important;
  flex-wrap: wrap;
  align-items: center !important;
  justify-self: start !important;
  align-self: center !important;
  gap: 2px !important;
  width: auto !important;
  max-width: 100%;
  padding: 3px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--fc-seg) !important;
  box-shadow: none !important;
}

body.trainer-ops-page .ops-segment > button,
body.trainer-ops-page .ops-tabbar > button,
body.trainer-builder-page .ops-segment > button {
  min-height: 34px !important;
  height: auto !important;
  padding: 6px 16px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

body.trainer-ops-page .ops-segment > button:hover,
body.trainer-ops-page .ops-tabbar > button:hover,
body.trainer-builder-page .ops-segment > button:hover {
  color: var(--fc-ink) !important;
}

body.trainer-ops-page .ops-segment > button.is-active,
body.trainer-ops-page .ops-tabbar > button.is-active,
body.trainer-builder-page .ops-segment > button.is-active {
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(31, 37, 43, 0.1), 0 1px 1px rgba(31, 37, 43, 0.04) !important;
}

/* Таблицы: заголовки обычным регистром, тонкие разделители. */
body.trainer-ops-page .ops-table th {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body.trainer-ops-page .ops-table td,
body.trainer-ops-page .ops-table th {
  border-color: var(--fc-line-2) !important;
}

/* ══ Кабинет клиента (client.html) ══════════════════════════════════════════
   Селекторы с :root — у слоёв клиента правила глубже (0,3,1 и !important). */

@media (min-width: 821px) {
  /* Вкладки кабинета лежат прямо на сером фоне, без большой белой подложки. */
  :root body.client-ops-page .ops-main > .minimal-panel {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

:root body.client-ops-page .ops-page-head .ops-kicker {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.client-ops-page .ops-page-head h1 {
  color: var(--fc-ink) !important;
  font-size: clamp(30px, 3vw, 40px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.08 !important;
}

:root body.client-ops-page .client-header-person {
  border: 1px solid var(--fc-line) !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

/* Герой «Тренировка дня» — светлая карточка с мятной кнопкой, как в приложении. */
:root body.client-ops-page .client-now-hero {
  border: 1px solid var(--fc-line) !important;
  border-radius: 28px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
}

:root body.client-ops-page .client-now-hero::before,
:root body.client-ops-page .client-now-hero::after {
  content: none !important;
  display: none !important;
}

:root body.client-ops-page .client-now-hero .cth-kicker {
  color: var(--fc-mint-ink) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.client-ops-page .client-now-hero .cth-dot {
  background: currentColor !important;
  opacity: 0.6;
}

:root body.client-ops-page .client-now-hero .cth-title {
  color: var(--fc-ink) !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

:root body.client-ops-page .client-now-hero .cth-meta,
:root body.client-ops-page .client-now-hero .cth-meta span {
  color: var(--fc-ink-2) !important;
}

:root body.client-ops-page .client-now-hero .cth-meta b {
  color: var(--fc-ink) !important;
}

:root body.client-ops-page .cth-btn {
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--fc-mint) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-weight: 800 !important;
}

:root body.client-ops-page .cth-btn:hover { background: var(--fc-mint-hover) !important; }

:root body.client-ops-page .cth-btn.ghost {
  background: var(--fc-line-2) !important;
  color: var(--fc-ink) !important;
}

:root body.client-ops-page .cth-btn.ghost:hover { background: var(--fc-seg) !important; }

/* Заголовки разделов «Сегодня» — обычным регистром. */
:root body.client-ops-page .client-today-section-h h2 {
  color: var(--fc-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
}

:root body.client-ops-page .client-today-link {
  color: var(--fc-mint-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.client-ops-page .client-today-count {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

/* План на сегодня — одной группой с разделителями. */
:root body.client-ops-page .client-today-plan:has(> .client-today-plan-row) {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 24px !important;
  background: var(--fc-surface) !important;
}

:root body.client-ops-page .client-today-plan > .client-today-plan-row {
  position: relative !important;
  min-height: 68px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root body.client-ops-page .client-today-plan > .client-today-plan-row:hover {
  background: #fafbfb !important;
}

:root body.client-ops-page .client-today-plan > .client-today-plan-row + .client-today-plan-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 72px;
  right: 0;
  height: 1px;
  background: var(--fc-line-2);
}

:root body.client-ops-page .client-today-plan-row .meta {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
  text-align: left !important;
}

:root body.client-ops-page .client-today-plan-row .ttl {
  color: var(--fc-ink) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

:root body.client-ops-page .client-today-plan-row .sub {
  color: var(--fc-ink-2) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}

/* Карточки и плитки клиента: белые, тонкая линия, без теней. */
:root body.client-ops-page .content-card,
:root body.client-ops-page .client-today-tile {
  border: 1px solid var(--fc-line) !important;
  border-radius: 24px !important;
  box-shadow: none !important;
}

/* ══ Главная тренера (renderTrainerDashboardPage, классы fc-*) ═════════════ */

.fc-dash {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 1240px;
  color: var(--fc-ink);
}

.fc-dash-top { display: flex; flex-direction: column; gap: 18px; }

.fc-dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
}

.fc-dash-title { min-width: 0; }
.fc-dash-title p {
  margin: 0 0 6px;
  color: var(--fc-ink-2);
  font-size: 15px;
  font-weight: 600;
}
.fc-dash-title h1 {
  margin: 0;
  color: var(--fc-ink);
  font-size: clamp(32px, 3.2vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.fc-dash-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.fc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--fc-btn-line);
  border-radius: 999px;
  background: var(--fc-surface);
  color: var(--fc-ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease;
}
.fc-btn svg { flex: 0 0 auto; width: 18px; height: 18px; }
.fc-btn:hover { background: var(--fc-bg); color: var(--fc-ink); }
.fc-btn.is-accent { border-color: transparent; background: var(--fc-mint); }
.fc-btn.is-accent:hover { background: var(--fc-mint-hover); }
.fc-btn:focus-visible,
.fc-select select:focus-visible,
.fc-list-row:focus-visible,
.fc-dash-stat:focus-visible,
.fc-panel-head a:focus-visible {
  outline: 3px solid rgba(33, 195, 154, 0.55);
  outline-offset: 2px;
}

.fc-dash-focus { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fc-dash-focus label { color: var(--fc-ink-2); font-size: 15px; font-weight: 600; }
.fc-dash-focus em { color: var(--fc-ink-2); font-size: 14px; font-style: normal; font-weight: 500; }

.fc-select { position: relative; display: inline-flex; max-width: 100%; }
.fc-select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 17px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--fc-ink-2);
  border-bottom: 2px solid var(--fc-ink-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
/* !important: в кабинете у всех select есть общий стиль с !important (прямоугольник 12px). */
.fc-dash .fc-select select {
  max-width: 100%;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 42px 0 16px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font: inherit;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.fc-dash-stats {
  display: grid;
  /* 4 → 2 → 1 колонка: при auto-fit оставалась пустая серая ячейка (3 + 1). */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--fc-line);
  border-radius: 24px;
  background: var(--fc-line);
}

.fc-dash-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 26px 28px;
  background: var(--fc-surface);
  color: var(--fc-ink);
  text-decoration: none;
}
a.fc-dash-stat:hover { background: #fafbfb; color: var(--fc-ink); }

.fc-dash-stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--fc-ink-2);
  font-size: 15px;
  font-weight: 600;
}
.fc-dash-stat-label em {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--fc-mint-ink);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}
.fc-dash-stat-label em svg { width: 14px; height: 14px; }

.fc-dash-stat strong {
  margin-top: 8px;
  color: var(--fc-ink);
  font-size: clamp(36px, 3.4vw, 48px);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}
.fc-dash-stat.is-empty strong {
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: normal;
}
.fc-dash-stat small { color: var(--fc-ink-2); font-size: 14px; font-weight: 500; line-height: 1.4; }

.fc-dash-stat-bar {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fc-line-2);
}
.fc-dash-stat-bar i {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--fc-mint);
}
.fc-dash-stat .fc-dash-stat-bar { margin-top: 10px; }

.fc-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  align-items: start;
  gap: 24px;
}

.fc-panel {
  padding: 6px 0 8px;
  border: 1px solid var(--fc-line);
  border-radius: 24px;
  background: var(--fc-surface);
}

.fc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px 8px;
}
.fc-panel-head h2 {
  margin: 0;
  color: var(--fc-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.fc-panel-head a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--fc-mint-ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.fc-panel-head a:hover { color: #0b6b53; }
.fc-panel-head a svg { width: 16px; height: 16px; }

.fc-list { display: flex; flex-direction: column; }
.fc-list-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 10px 18px 10px 24px;
  color: var(--fc-ink);
  text-decoration: none;
}
.fc-list-row:hover { background: #fafbfb; color: var(--fc-ink); }
.fc-list-row + .fc-list-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 82px;
  right: 0;
  height: 1px;
  background: var(--fc-line-2);
}
.fc-list-row:not(:has(> .fc-avatar)) + .fc-list-row:not(:has(> .fc-avatar))::before { left: 24px; }
.fc-list-row > svg { flex: 0 0 auto; width: 16px; height: 16px; color: #a3aab1; }
.fc-list-row > em {
  flex: 0 0 auto;
  color: var(--fc-ink-3);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.fc-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fc-line-2);
  color: var(--fc-ink);
  font-size: 15px;
  font-weight: 700;
}

.fc-list-main { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.fc-list-main strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc-list-main small {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--fc-ink-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.fc-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7ccd1;
  transform: translateY(-1px);
}
.fc-dot.is-good { background: var(--fc-mint); }
.fc-dot.is-missed { background: var(--fc-danger); }
.fc-dot.is-warn { background: var(--fc-warn); }

.fc-goal-list { display: flex; flex-direction: column; gap: 24px; padding: 10px 24px 22px; }
.fc-goal > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.fc-goal span { font-size: 16px; font-weight: 700; }
.fc-goal strong { font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 800; }
.fc-goal .fc-dash-stat-bar { height: 8px; }

@media (max-width: 1240px) {
  .fc-dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .fc-dash-stats { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .fc-dash { gap: 24px; }
  .fc-dash-actions { width: 100%; }
  .fc-btn { flex: 1 1 auto; justify-content: center; }
  .fc-dash-stat { padding: 20px; }
  .fc-panel-head { padding: 16px 18px 6px; }
  .fc-list-row { padding-left: 18px; }
  .fc-list-row + .fc-list-row::before { left: 76px; }
  .fc-goal-list { padding: 8px 18px 18px; }
}

/* «Питание» клиента: шапка вкладки по ширине рациона, а не узкой колонкой
   720px по центру — иначе заголовок съезжал вправо от сегментов и «Дня». */
:root body.client-ops-page #ai-calories > .ops-page-head {
  align-self: stretch !important;
  width: auto !important;
  max-width: none !important;
}

/* ══ Конструктор тренировки (builder.html, renderTrainerBuilderOpsPage) ═════
   Редактор дня читается как документ: шапка и карточки — белые листы с линией
   1px без теней, подписи обычным регистром, поля белые с мятным фокусом.
   Одна мятная кнопка на экран — «Опубликовать»; остальные — графит или белые
   «таблетки». Старые слои (builder-editor.css, app.css) держат свойства через
   !important и переменные --tc-*: переменные переводим на токены «Чистого»,
   а свойства перекрываем тоже с !important и префиксом :root. */

:root body.trainer-builder-page {
  --tc-card: var(--fc-surface);
  --tc-ink: var(--fc-ink);
  --tc-label: var(--fc-ink-2);
  --tc-placeholder: var(--fc-ink-3);
  --tc-value: var(--fc-ink);
  --tc-muted: var(--fc-ink-3);
  --tc-line: var(--fc-line);
  --tc-field: var(--fc-surface);
  --tc-pill: var(--fc-line-2);
  --tc-pill-ink: var(--fc-ink-2);
}

/* ── Колонки: редактор и история без лишних внутренних отступов ─────────── */
@media (min-width: 821px) {
  :root body.trainer-builder-page .ops-builder-shell {
    gap: 16px !important;
    padding: 0 0 32px !important;
  }

  :root body.trainer-builder-page .ops-builder-frame.has-history {
    gap: 24px !important;
  }
}

@media (min-width: 1360px) {
  :root body.trainer-builder-page .ops-builder-history {
    top: 24px !important;
    margin-top: 0 !important;
    max-height: calc(100vh - 48px) !important;
  }
}

/* ── Шапка: клиент, дата, дни, история, статус, меню ────────────────────── */
:root body.trainer-builder-page .ops-builder-bar {
  gap: 10px !important;
  padding: 12px 14px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 20px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

:root body.trainer-builder-page .ops-builder-bar-back,
:root body.trainer-builder-page .ops-builder-bar-pager-btn,
:root body.trainer-builder-page .ops-builder-bar-menu > .ops-chip-action {
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

:root body.trainer-builder-page .ops-builder-bar-back {
  width: 40px !important;
  height: 40px !important;
  font-size: 18px !important;
}

:root body.trainer-builder-page .ops-builder-bar-pager {
  gap: 6px !important;
}

:root body.trainer-builder-page .ops-builder-bar-pager-btn {
  width: 36px !important;
  height: 36px !important;
  font-size: 18px !important;
}

:root body.trainer-builder-page .ops-builder-bar-menu > .ops-chip-action {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .ops-builder-bar-back:hover,
:root body.trainer-builder-page .ops-builder-bar-pager-btn:hover,
:root body.trainer-builder-page .ops-builder-bar-menu > .ops-chip-action:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-builder-page .ops-builder-bar-id {
  gap: 2px;
}

:root body.trainer-builder-page .ops-builder-bar-id strong {
  color: var(--fc-ink) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
}

:root body.trainer-builder-page .ops-builder-bar-id span {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

:root body.trainer-builder-page .ops-builder-bar-history,
:root body.trainer-builder-page .ops-builder-bar-status {
  height: 36px !important;
  padding: 0 14px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .ops-builder-bar-history:hover,
:root body.trainer-builder-page .ops-builder-bar-status:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-builder-page .ops-builder-bar-history.is-active {
  border-color: var(--fc-ink) !important;
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

:root body.trainer-builder-page .ops-builder-bar-status--draft {
  border-color: transparent !important;
  background: var(--fc-seg) !important;
  color: var(--fc-ink-2) !important;
}

:root body.trainer-builder-page .ops-builder-bar-status--published {
  border-color: transparent !important;
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
}

/* Меню «⋮» и всплывающие панели шаблонов. */
:root body.trainer-builder-page .ops-builder-menu-pop {
  top: 46px !important;
  min-width: 240px !important;
  padding: 6px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 40px rgba(31, 37, 43, 0.14) !important;
}

:root body.trainer-builder-page .ops-builder-menu-item {
  min-height: 40px;
  align-items: center;
  padding: 0 12px !important;
  border-radius: 10px !important;
  color: var(--fc-ink) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

:root body.trainer-builder-page .ops-builder-menu-item:hover,
:root body.trainer-builder-page .ops-builder-menu-item:focus-visible {
  background: var(--fc-bg) !important;
}

:root body.trainer-builder-page .ops-builder-menu-item.is-danger {
  color: var(--fc-danger) !important;
}

:root body.trainer-builder-page .ops-builder-popover {
  gap: 14px !important;
  padding: 20px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 24px !important;
  box-shadow: none !important;
}

:root body.trainer-builder-page .ops-builder-popover header strong,
:root body.trainer-builder-page .ops-my-templates-title {
  color: var(--fc-ink) !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}

:root body.trainer-builder-page .ops-builder-popover .ops-template-save-row {
  padding: 0 !important;
}

:root body.trainer-builder-page .ops-builder-popover header .ops-chip-action {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  justify-content: center !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-size: 16px !important;
}

:root body.trainer-builder-page .ops-my-templates {
  border-top-color: var(--fc-line-2) !important;
}

:root body.trainer-builder-page .ops-my-templates-row.is-active {
  background: var(--fc-mint-soft) !important;
}

:root body.trainer-builder-page .ops-my-templates-hint {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

/* ── Подписи полей и заголовки: обычный регистр ─────────────────────────── */
:root body.trainer-builder-page .ops-builder-title-label,
:root body.trainer-builder-page .ops-builder-ai-label > span:first-child,
:root body.trainer-builder-page .ops-builder-rest-field > span,
:root body.trainer-builder-page .ops-builder-extra-field > span,
:root body.trainer-builder-page .ops-builder-ai-card .ops-builder-title-field > span,
:root body.trainer-builder-page .ops-superset-rounds > span {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-builder-page .ops-builder-title-field {
  gap: 8px !important;
}

:root body.trainer-builder-page .ops-builder-title-label {
  padding-left: 2px;
}

:root body.trainer-builder-page .ops-builder-title-compact {
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 16px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}

:root body.trainer-builder-page .ops-builder-list {
  gap: 12px !important;
  margin-top: 8px;
}

:root body.trainer-builder-page .ops-builder-list-head {
  align-items: baseline !important;
  padding: 0 2px !important;
}

:root body.trainer-builder-page .ops-builder-list-head h2 {
  color: var(--fc-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
}

:root body.trainer-builder-page .ops-builder-list-count {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

:root body.trainer-builder-page .builder-sets-hint {
  margin: 0 2px !important;
  color: var(--fc-ink-3) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

/* ── Свёрнутые блоки: разбор ИИ, заметки, поля дня отдыха ───────────────── */
:root body.trainer-builder-page .ops-builder-ai-card,
:root body.trainer-builder-page .ops-builder-extras {
  border: 1px solid var(--fc-line) !important;
  border-radius: 20px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-builder-page .ops-builder-ai-card.is-collapsible,
:root body.trainer-builder-page .ops-builder-extras {
  padding: 8px 20px !important;
}

:root body.trainer-builder-page .ops-builder-ai-card.is-collapsible[open],
:root body.trainer-builder-page .ops-builder-extras[open] {
  padding-bottom: 20px !important;
}

:root body.trainer-builder-page .ops-builder-ai-card:not(.is-collapsible) {
  gap: 10px !important;
  padding: 20px !important;
}

:root body.trainer-builder-page .ops-builder-ai-summary,
:root body.trainer-builder-page .ops-builder-extras > summary {
  min-height: 40px;
  padding: 4px 0 !important;
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .ops-builder-ai-summary-title {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .ops-builder-ai-hint {
  color: var(--fc-ink-3) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

:root body.trainer-builder-page .ops-builder-ai-summary::after,
:root body.trainer-builder-page .ops-builder-extras > summary::after {
  color: var(--fc-ink-3) !important;
  font-size: 14px;
}

:root body.trainer-builder-page .ops-builder-ai-text {
  border-radius: 12px !important;
}

/* «Структурировать с ИИ» — графитовая главная, мята остаётся у «Опубликовать». */
:root body.trainer-builder-page .ops-builder-ai-cta {
  min-height: 48px !important;
  border-color: var(--fc-ink) !important;
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

:root body.trainer-builder-page .ops-builder-ai-cta:hover {
  background: #2b333b !important;
}

:root body.trainer-builder-page .ops-builder-extra-field {
  gap: 8px !important;
  margin-top: 14px !important;
}

:root body.trainer-builder-page .ops-builder-rest-field {
  margin-top: 8px !important;
}

/* ── Пустой день ────────────────────────────────────────────────────────── */
:root body.trainer-builder-page .ops-builder-empty-flow {
  gap: 8px !important;
  padding: 24px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 24px !important;
  background: var(--fc-surface) !important;
}

:root body.trainer-builder-page .ops-builder-empty-flow strong {
  color: var(--fc-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

:root body.trainer-builder-page .ops-builder-empty-flow p {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
}

:root body.trainer-builder-page .ops-builder-empty-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px !important;
  max-width: none !important;
  margin-top: 8px;
}

:root body.trainer-builder-page .ops-builder-empty-actions .ops-button {
  width: auto !important;
  min-height: 44px !important;
  padding: 0 20px !important;
}

/* ── Карточка упражнения ────────────────────────────────────────────────── */
:root body.trainer-builder-page .ops-builder-blocks {
  gap: 16px !important;
  padding: 0 !important;
}

:root body.trainer-builder-page .ops-workout-card {
  gap: 18px !important;
  padding: 22px 24px 24px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 24px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-builder-page .ops-workout-card label {
  gap: 0 !important;
}

:root body.trainer-builder-page .ops-workout-title > span,
:root body.trainer-builder-page .ops-workout-metrics label > span,
:root body.trainer-builder-page .ops-workout-notes label > span:not(.ops-workout-format-bar) {
  margin: 0 0 8px 2px !important;
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-builder-page .ops-workout-card input.ops-input,
:root body.trainer-builder-page .ops-workout-card .ops-rest-select,
:root body.trainer-builder-page .ops-workout-card textarea {
  border: 1px solid #e1e4e8 !important;
  background-color: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-builder-page .ops-workout-card input::placeholder,
:root body.trainer-builder-page .ops-workout-card textarea::placeholder,
:root body.trainer-builder-page .ops-builder-shell input::placeholder,
:root body.trainer-builder-page .ops-builder-shell textarea::placeholder {
  color: var(--fc-ink-3) !important;
  -webkit-text-fill-color: var(--fc-ink-3) !important;
  font-weight: 500 !important;
}

:root body.trainer-builder-page .ops-workout-card input.ops-input:focus,
:root body.trainer-builder-page .ops-workout-card .ops-rest-select:focus,
:root body.trainer-builder-page .ops-workout-card textarea:focus {
  border-color: var(--fc-mint) !important;
  background-color: var(--fc-surface) !important;
  box-shadow: 0 0 0 3px rgba(33, 195, 154, 0.18) !important;
  outline: none !important;
}

/* Значение, посчитанное по строкам подходов, — тихая серая подложка. */
:root body.trainer-builder-page .ops-workout-metrics input.is-derived {
  border-color: transparent !important;
  background-color: var(--fc-bg) !important;
  color: var(--fc-ink-2) !important;
}

/* Действия карточки: ↑ ↓ × — круглые кнопки одним рядом по центру поля. */
:root body.trainer-builder-page .ops-builder-row-menu {
  grid-template-columns: repeat(3, 40px) !important;
  grid-template-rows: 40px !important;
  gap: 6px !important;
  align-self: end !important;
  margin: 0 0 6px !important;
}

:root body.trainer-builder-page .ops-builder-row-menu .ops-chip-action[data-action="move-up"],
:root body.trainer-builder-page .ops-builder-row-menu .ops-chip-action[data-action="move-down"],
:root body.trainer-builder-page .ops-builder-row-menu .ops-chip-action.is-danger {
  grid-row: 1 !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink-2) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .ops-builder-row-menu .ops-chip-action[data-action="move-up"] { grid-column: 1 !important; }
:root body.trainer-builder-page .ops-builder-row-menu .ops-chip-action[data-action="move-down"] { grid-column: 2 !important; }
:root body.trainer-builder-page .ops-builder-row-menu .ops-chip-action.is-danger { grid-column: 3 !important; }

:root body.trainer-builder-page .ops-builder-row-menu .ops-chip-action[data-action^="move-"]:hover:not(:disabled) {
  background: var(--fc-bg) !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-builder-page .ops-builder-row-menu .ops-chip-action.is-danger:hover {
  border-color: rgba(229, 72, 77, 0.35) !important;
  background: rgba(229, 72, 77, 0.08) !important;
  color: var(--fc-danger) !important;
}

/* Разбивка по подходам: ссылка-действие на тихой подложке, без пунктира. */
:root body.trainer-builder-page .builder-sets-split {
  padding: 12px 16px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--fc-bg) !important;
  color: var(--fc-mint-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .builder-sets-split small {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

:root body.trainer-builder-page .builder-sets-split:hover {
  background: var(--fc-seg) !important;
}

:root body.trainer-builder-page .builder-sets-panel {
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--fc-bg) !important;
  box-shadow: none !important;
}

:root body.trainer-builder-page .builder-sets-panel-head > span {
  color: var(--fc-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-builder-page .builder-set-row {
  border: 1px solid var(--fc-line) !important;
  border-radius: 12px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-builder-page .builder-set-index {
  color: var(--fc-ink-2) !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .builder-set-row--working .builder-set-kind-select {
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
}

:root body.trainer-builder-page .builder-set-row--amrap .builder-set-kind-select,
:root body.trainer-builder-page .builder-set-row--drop .builder-set-kind-select,
:root body.trainer-builder-page .builder-set-row--rest_pause .builder-set-kind-select {
  background: rgba(225, 169, 72, 0.16) !important;
  color: #8a5a10 !important;
}

:root body.trainer-builder-page .builder-sets-add {
  border-color: var(--fc-ink) !important;
  background: var(--fc-ink) !important;
  color: #ffffff !important;
  font-size: 13px !important;
}

:root body.trainer-builder-page .builder-sets-link {
  color: var(--fc-mint-ink) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* «Как выполнять» и «Заметка клиенту»: обычный текст вместо жирного. */
:root body.trainer-builder-page .ops-workout-notes textarea {
  min-height: 88px !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
}

:root body.trainer-builder-page .ops-workout-notes label > span.ops-workout-format-bar {
  gap: 6px !important;
  margin: 0 0 8px 2px !important;
  color: var(--fc-ink-3) !important;
  font-size: 12px !important;
}

:root body.trainer-builder-page .builder-format-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0 !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 8px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-builder-page .builder-format-btn:hover {
  background: var(--fc-bg) !important;
}

/* Видео техники: белый блок с линией, внутри — серая полоса миниатюр. */
:root body.trainer-builder-page .ops-workout-video-details {
  padding: 0 16px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
  background: var(--fc-surface) !important;
}

:root body.trainer-builder-page .ops-workout-video-details[open] {
  padding-bottom: 16px !important;
}

:root body.trainer-builder-page .ops-workout-video-details > summary {
  height: 48px !important;
  padding: 0 !important;
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-builder-page .ops-workout-video-summary-count {
  margin: 0 12px 0 auto;
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

:root body.trainer-builder-page .ops-workout-video {
  padding: 12px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--fc-bg) !important;
}

:root body.trainer-builder-page .ops-vid-add {
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 10px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink-2) !important;
}

:root body.trainer-builder-page .ops-vid-add:hover {
  border-color: var(--fc-mint) !important;
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
}

:root body.trainer-builder-page [data-video-match],
:root body.trainer-builder-page [data-video-match] .builder-sets-hint {
  color: var(--fc-ink-3) !important;
}

/* «Связать со следующим» и «Добавить группу мышц» — белые «таблетки» по контенту. */
:root body.trainer-builder-page .ops-link-next {
  justify-self: start !important;
  align-self: flex-start !important;
  width: auto !important;
  min-height: 40px !important;
  height: 40px !important;
  margin-top: 0 !important;
  padding: 0 18px !important;
  border: 1px solid var(--fc-btn-line) !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .ops-link-next:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-builder-page .builder-muscle-section button {
  min-height: 32px !important;
  padding: 0 14px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

:root body.trainer-builder-page .builder-muscle-section button:hover {
  background: var(--fc-bg) !important;
  color: var(--fc-ink) !important;
}

/* ── Связка: мятная подложка вокруг карточек, шапка с кругами ───────────── */
:root body.trainer-builder-page .ops-superset {
  gap: 12px !important;
  padding: 14px !important;
  border: 1px solid rgba(33, 195, 154, 0.35) !important;
  border-radius: 28px !important;
  background: var(--fc-mint-soft) !important;
}

:root body.trainer-builder-page .ops-superset .ops-workout-card {
  border-color: var(--fc-line) !important;
}

:root body.trainer-builder-page .ops-superset-head {
  gap: 10px 12px !important;
  padding: 2px 4px;
}

:root body.trainer-builder-page .ops-superset-num {
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

:root body.trainer-builder-page .ops-superset-badge {
  padding: 0 !important;
  background: transparent !important;
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}

:root body.trainer-builder-page .ops-superset-rounds .ops-input {
  width: 64px !important;
  min-height: 40px !important;
  border-radius: 12px !important;
}

:root body.trainer-builder-page .ops-superset-hint {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

:root body.trainer-builder-page .ops-superset-head > .ops-chip-action {
  min-height: 36px !important;
  padding: 0 14px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

/* ── Добавление упражнения под списком ──────────────────────────────────── */
:root body.trainer-builder-page .ops-builder-add-row {
  gap: 10px !important;
  justify-content: flex-start !important;
}

:root body.trainer-builder-page .ops-builder-add-row .ops-builder-add-bottom {
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .ops-builder-add-row .ops-builder-add-bottom:hover {
  background: var(--fc-bg) !important;
}

/* Действия в потоке колонки: без подложки и перекрытия карточек/клавиатуры. */
:root body.trainer-builder-page .ops-builder-stickbar {
  position: static !important;
  z-index: auto !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 10px !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-inline: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

:root body.trainer-builder-page .ops-builder-stickbar .ops-button {
  flex: 0 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 48px !important;
  height: auto !important;
  padding: 10px 16px !important;
  white-space: normal !important;
  font-size: 15px !important;
}

:root body.trainer-builder-page .ops-builder-stickbar [data-action="publish"] {
  border-color: transparent !important;
  background: var(--fc-mint) !important;
  color: var(--fc-ink) !important;
  font-weight: 800 !important;
}

:root body.trainer-builder-page .ops-builder-stickbar [data-action="publish"]:hover {
  background: var(--fc-mint-hover) !important;
}

:root body.trainer-builder-page .ops-builder-stickbar .ops-button:focus-visible {
  outline: 3px solid rgba(33, 195, 154, 0.55) !important;
  outline-offset: 2px !important;
}

:root body.trainer-builder-page .ops-builder-toast {
  border-radius: 12px !important;
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
  font-size: 14px !important;
}

/* ── История клиента ────────────────────────────────────────────────────── */
:root body.trainer-builder-page .ops-builder-history {
  gap: 16px !important;
  padding: 20px !important;
  border: 1px solid var(--fc-line) !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
}

@media (min-width: 1360px) {
  :root body.trainer-builder-page .ops-builder-history {
    border-radius: 24px !important;
    box-shadow: none !important;
  }
}

@media (max-width: 1359px) {
  :root body.trainer-builder-page .ops-builder-history {
    border-radius: 24px 0 0 24px !important;
    box-shadow: -16px 0 40px rgba(31, 37, 43, 0.14) !important;
  }

  :root body.trainer-builder-page .ops-history-backdrop {
    background: rgba(31, 37, 43, 0.28) !important;
  }
}

:root body.trainer-builder-page .ops-history-head strong {
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

:root body.trainer-builder-page .ops-history-month span {
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .ops-history-head .ops-chip-action,
:root body.trainer-builder-page .ops-history-month .ops-chip-action,
:root body.trainer-builder-page .ops-history-copy {
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-builder-page .ops-history-head .ops-chip-action:hover,
:root body.trainer-builder-page .ops-history-month .ops-chip-action:hover,
:root body.trainer-builder-page .ops-history-copy:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-builder-page .ops-history-weekday {
  color: var(--fc-ink-3) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

:root body.trainer-builder-page .ops-history-cell {
  border: 0 !important;
  border-radius: 12px !important;
  color: var(--fc-ink) !important;
  font-size: 14px !important;
}

:root body.trainer-builder-page .ops-history-cell:not(.is-empty):not(.is-selected):hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-builder-page .ops-history-cell.is-current {
  box-shadow: inset 0 0 0 2px var(--fc-mint) !important;
}

:root body.trainer-builder-page .ops-history-cell.is-selected {
  background: var(--fc-ink) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .ops-history-cell.is-selected.is-current {
  box-shadow: inset 0 0 0 2px var(--fc-mint), inset 0 0 0 4px var(--fc-ink) !important;
}

:root body.trainer-builder-page .ops-history-cell.is-today span {
  color: inherit;
  text-decoration-color: var(--fc-mint) !important;
  text-decoration-thickness: 2px !important;
}

:root body.trainer-builder-page .is-done > i { background: var(--fc-mint) !important; }
:root body.trainer-builder-page .is-partial > i { background: var(--fc-warn) !important; }
:root body.trainer-builder-page .is-missed > i { background: var(--fc-danger) !important; }

:root body.trainer-builder-page .ops-history-legend {
  gap: 6px 12px !important;
  color: var(--fc-ink-2) !important;
  font-size: 12px !important;
}

:root body.trainer-builder-page .ops-history-day {
  gap: 12px !important;
  padding-top: 16px !important;
  border-top: 1px solid var(--fc-line-2) !important;
}

:root body.trainer-builder-page .ops-history-date {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

:root body.trainer-builder-page .ops-history-day-head strong {
  font-size: 17px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}

:root body.trainer-builder-page .ops-history-status {
  padding: 3px 10px !important;
  background: var(--fc-seg) !important;
  color: var(--fc-ink-2) !important;
  font-size: 12px !important;
}

:root body.trainer-builder-page .ops-history-status.is-done {
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
}

:root body.trainer-builder-page .ops-history-status.is-partial {
  background: rgba(225, 169, 72, 0.16) !important;
  color: #8a5a10 !important;
}

:root body.trainer-builder-page .ops-history-status.is-missed {
  background: rgba(229, 72, 77, 0.1) !important;
  color: #b4262b !important;
}

/* Упражнения выбранного дня — одной группой с разделителями. */
:root body.trainer-builder-page .ops-history-exercises {
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
}

:root body.trainer-builder-page .ops-history-exercise {
  padding: 12px 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--fc-surface) !important;
}

:root body.trainer-builder-page .ops-history-exercise + .ops-history-exercise {
  border-top: 1px solid var(--fc-line-2) !important;
}

:root body.trainer-builder-page .ops-history-exercise.is-superset {
  box-shadow: inset 3px 0 0 var(--fc-mint) !important;
}

:root body.trainer-builder-page .ops-history-exercise strong {
  font-size: 14px !important;
}

:root body.trainer-builder-page .ops-history-exercise small,
:root body.trainer-builder-page .ops-history-note {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

:root body.trainer-builder-page .ops-history-mark.is-done { color: var(--fc-mint-ink) !important; }
:root body.trainer-builder-page .ops-history-mark.is-skipped { color: #b4262b !important; }

/* Compact history: both loads stay visible; each set compares on one row. */
:root body.trainer-builder-page .ops-history-exercise-text,
:root body.trainer-builder-page .ops-history-comparison {
  min-width: 0;
  overflow-wrap: anywhere;
}

:root body.trainer-builder-page .ops-history-details {
  grid-column: 1 / -1;
  min-width: 0;
  color: var(--fc-ink-2);
  font-size: 12px;
  line-height: 1.45;
}

:root body.trainer-builder-page .ops-history-details summary {
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--fc-line);
  border-radius: 999px;
  color: var(--fc-ink);
  cursor: pointer;
  overflow-wrap: anywhere;
}

:root body.trainer-builder-page .ops-history-details summary:focus-visible {
  outline: 2px solid var(--fc-mint-ink);
  outline-offset: 2px;
}

:root body.trainer-builder-page .ops-history-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 12px;
}

:root body.trainer-builder-page .ops-history-table th,
:root body.trainer-builder-page .ops-history-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--fc-line-2);
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

:root body.trainer-builder-page .ops-history-table th:first-child { width: 24px; }
:root body.trainer-builder-page .ops-history-table thead { color: var(--fc-ink); }

/* ── Окно «Мои упражнения» (оверлей на этой странице) ───────────────────── */
:root body.trainer-builder-page .ops-vidpick-modal {
  gap: 14px !important;
}

:root body.trainer-builder-page .ops-vidpick-modal .ops-modal-head h2 {
  color: var(--fc-ink) !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

:root body.trainer-builder-page .ops-vidpick-modal .ops-modal-head p {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
}

:root body.trainer-builder-page .ops-vidpick-search:focus {
  border-color: var(--fc-mint) !important;
  box-shadow: 0 0 0 3px rgba(33, 195, 154, 0.18) !important;
}

/* Список — одной белой группой с разделителями. */
:root body.trainer-builder-page .ops-vidpick-grid {
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid var(--fc-line);
  border-radius: 16px;
}

:root body.trainer-builder-page .ops-vidpick-item {
  position: relative;
  align-items: center !important;
  gap: 0 !important;
  padding-right: 10px;
  background: var(--fc-surface);
}

:root body.trainer-builder-page .ops-vidpick-item + .ops-vidpick-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 64px;
  right: 0;
  height: 1px;
  background: var(--fc-line-2);
}

:root body.trainer-builder-page .ops-vidpick-hit {
  min-height: 64px;
  padding: 10px 12px 10px 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

:root body.trainer-builder-page .ops-vidpick-item:hover {
  background: #fafbfb;
}

:root body.trainer-builder-page .ops-vidpick-item.is-on {
  background: var(--fc-mint-soft);
}

:root body.trainer-builder-page .ops-vidpick-ico {
  width: 36px !important;
  height: 36px !important;
  background: var(--fc-bg) !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-builder-page .ops-vidpick-item.is-on .ops-vidpick-ico {
  background: var(--fc-mint) !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-builder-page .ops-vidpick-meta strong {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-builder-page .ops-vidpick-meta small {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

:root body.trainer-builder-page .ops-vidpick-state {
  color: var(--fc-mint-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-builder-page .ops-vidpick-state::first-letter {
  text-transform: uppercase;
}

:root body.trainer-builder-page .ops-vidpick-eye {
  width: 40px !important;
  height: 40px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
}

:root body.trainer-builder-page .ops-vidpick-eye:hover {
  border-color: var(--fc-btn-line) !important;
  background: var(--fc-bg) !important;
}

/* «Посмотреть видео»: вместо эмодзи глаза — линейная иконка в цвет текста. */
:root body.trainer-builder-page .ops-vidpick-eye[data-prev] {
  display: grid !important;
  place-items: center !important;
  color: var(--fc-ink-2);
  font-size: 0 !important;
  line-height: 0 !important;
}

:root body.trainer-builder-page .ops-vidpick-eye[data-prev]::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12s3.5-6.5 9.5-6.5S21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12s3.5-6.5 9.5-6.5S21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

:root body.trainer-builder-page .ops-vidpick-eye[data-prev]:hover {
  color: var(--fc-ink);
}

/* ── Узкое окно (≤820px, без пальцевого ввода — телефон уходит в m/) ────── */
@media (max-width: 820px) {
  :root body.trainer-builder-page .ops-builder-shell {
    gap: 14px !important;
    padding: 12px 0 96px !important;
  }

  :root body.trainer-builder-page .ops-workout-card {
    gap: 16px !important;
    padding: 16px !important;
    border-radius: 20px !important;
  }

  :root body.trainer-builder-page .ops-builder-row-menu {
    margin: 0 !important;
  }

  :root body.trainer-builder-page .ops-superset {
    padding: 10px !important;
    border-radius: 24px !important;
  }
}

/* До 720px «История» — только значок (подпись скрыта в builder-editor.css). */
@media (max-width: 720px) {
  :root body.trainer-builder-page .ops-builder-bar-history {
    width: 36px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
}

/* Шапка в две строки: назад, клиент и меню сверху; дни, история и статус снизу. */
@media (max-width: 560px) {
  :root body.trainer-builder-page .ops-builder-bar {
    grid-template-columns: 40px minmax(0, 1fr) auto auto !important;
    grid-template-areas:
      "back id id menu"
      "pager pager history status" !important;
    row-gap: 10px !important;
  }

  :root body.trainer-builder-page .ops-builder-bar-back { grid-area: back; }
  :root body.trainer-builder-page .ops-builder-bar-id { grid-area: id; }
  :root body.trainer-builder-page .ops-builder-bar-pager { grid-area: pager; }
  :root body.trainer-builder-page .ops-builder-bar-history { grid-area: history; }
  :root body.trainer-builder-page .ops-builder-bar-status { grid-area: status; }
  :root body.trainer-builder-page .ops-builder-bar-menu { grid-area: menu; justify-self: end; }
}

/* ══ Календарь тренера (trainer.html, renderTrainerHomeOpsPage) ══════════════
   Колонки недели и ячейки месяца — белые карточки прямо на сером фоне, без
   общей подложки. Мятная кнопка одна — «+ Новая тренировка» в шапке; кнопки
   внутри дней тихие белые «таблетки», «Создать тренировку» отличается только
   тёмно-мятным текстом. Повтор «Пустой день / На день пока ничего не стоит»
   в пустых ячейках месяца скрыт: пустоту и так видно. */

/* ── Шапка: уведомления и новая тренировка ──────────────────────────────── */
:root body.trainer-home-page .ops-notification-link {
  height: 44px !important;
  min-height: 44px !important;
  gap: 8px !important;
  padding: 0 16px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-home-page .ops-notification-link:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-home-page .ops-notification-link strong {
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  background: var(--fc-mint) !important;
  color: var(--fc-ink) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

:root body.trainer-home-page .ops-quick-create {
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 20px !important;
  font-size: 15px !important;
}

/* ── Панель: клиент, «Сегодня», месяц, Неделя / Месяц ───────────────────── */
:root body.trainer-home-page .ops-home-toolbar-surface {
  padding: 12px 14px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 20px !important;
  box-shadow: none !important;
}

/* Wrap actual groups, rather than reserving columns for retired controls. */
:root body.trainer-home-page .ops-trainer-dashboard .ops-toolbar-home {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 12px 16px !important;
  min-width: 0 !important;
}

:root body.trainer-home-page .ops-toolbar-home .ops-home-toolbar-nav {
  display: flex !important;
  flex: 1 1 320px;
  flex-wrap: wrap !important;
  width: auto !important;
  min-width: 0 !important;
  gap: 10px !important;
}

:root body.trainer-home-page .ops-toolbar-home #ops-home-target-select {
  flex: 1 1 200px;
  width: 200px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

:root body.trainer-home-page .ops-toolbar-home .ops-home-toolbar-nav .ops-button {
  flex: 0 0 auto;
  width: auto !important;
}

:root body.trainer-home-page .ops-toolbar-home .ops-period-nav {
  flex: 0 1 auto;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100%;
  gap: 10px !important;
}

:root body.trainer-home-page .ops-toolbar-home .ops-period-nav .ops-toolbar-label {
  min-width: 0 !important;
  white-space: normal;
}

:root body.trainer-home-page .ops-toolbar-home .ops-period-nav .ops-icon-button {
  flex: 0 0 40px;
}

:root body.trainer-home-page .ops-toolbar-home .ops-home-toolbar-controls {
  display: flex !important;
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0 !important;
  margin-left: auto;
}

:root body.trainer-home-page .ops-toolbar-home .ops-home-toolbar-controls .ops-segment {
  width: auto !important;
}

:root body.trainer-home-page #ops-home-target-select {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 40px 0 16px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-home-page .ops-home-toolbar-nav .ops-button {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 18px !important;
  font-size: 15px !important;
}

:root body.trainer-home-page .ops-period-nav .ops-icon-button,
:root body.trainer-home-page .ops-week-nav {
  display: grid !important;
  place-items: center !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

:root body.trainer-home-page .ops-period-nav .ops-icon-button:hover,
:root body.trainer-home-page .ops-week-nav:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-home-page .ops-toolbar-label {
  color: var(--fc-ink) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

/* ── Сводка недели ──────────────────────────────────────────────────────── */
:root body.trainer-home-page .ops-dashboard-metrics {
  border: 1px solid var(--fc-line) !important;
  border-radius: 24px !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-dashboard-metrics article {
  gap: 6px !important;
  padding: 22px 24px !important;
}

:root body.trainer-home-page .ops-dashboard-metrics span {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-home-page .ops-dashboard-metrics strong {
  margin-top: 4px;
  color: var(--fc-ink) !important;
  font-size: 32px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.05 !important;
}

:root body.trainer-home-page .ops-dashboard-metrics small {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

/* ── Неделя: колонки дней на сером фоне ─────────────────────────────────── */
:root body.trainer-home-page .ops-week-shell {
  grid-template-columns: 40px minmax(0, 1fr) 40px !important;
  align-items: start !important;
  gap: 10px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-week-nav {
  align-self: center !important;
}

:root body.trainer-home-page .ops-week-grid {
  gap: 8px !important;
}

:root body.trainer-home-page .ops-day-column {
  gap: 10px !important;
  padding: 12px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 20px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-day-column.is-selected {
  border-color: var(--fc-ink) !important;
  background: var(--fc-surface) !important;
  box-shadow: inset 0 0 0 1px var(--fc-ink) !important;
}

/* Наведение: без подъёма и тени (подъём упирался в край прокрутки сетки). */
:root body.trainer-home-page .ops-day-column,
:root body.trainer-home-page .ops-month-cell {
  transform: none !important;
  transition: border-color 120ms ease !important;
}

:root body.trainer-home-page .ops-day-column:not(.is-selected):not(.is-picked):hover,
:root body.trainer-home-page .ops-month-cell:not(.is-selected):not(.is-picked):hover {
  border-color: #d3d8dd !important;
}

:root body.trainer-home-page .ops-day-column.is-picked,
:root body.trainer-home-page .ops-month-cell.is-picked {
  border-color: var(--fc-mint) !important;
  box-shadow: inset 0 0 0 1px var(--fc-mint) !important;
}

:root body.trainer-home-page .ops-day-column.is-selected.is-picked,
:root body.trainer-home-page .ops-month-cell.is-selected.is-picked {
  border-color: var(--fc-ink) !important;
  box-shadow: inset 0 0 0 1px var(--fc-ink) !important;
}

/* Плавающая панель выбранных дней не закрывает кнопки нижних дней. */
:root body.trainer-home-page .ops-trainer-dashboard:has(.ops-bulk-bar) {
  padding-bottom: 88px !important;
}

:root body.trainer-home-page .ops-day-column.is-outside-month {
  background: #fafbfb !important;
}

:root body.trainer-home-page .ops-day-head span {
  color: var(--fc-ink-3) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
}

:root body.trainer-home-page .ops-day-head strong {
  color: var(--fc-ink) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

:root body.trainer-home-page .ops-day-menu-toggle {
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  color: var(--fc-ink-2) !important;
}

:root body.trainer-home-page .ops-day-menu-toggle:hover {
  background: var(--fc-bg) !important;
  color: var(--fc-ink) !important;
}

/* Плашки статуса дня (неделя и месяц). */
:root body.trainer-home-page .ops-day-column .ops-chip {
  min-height: 24px !important;
  padding: 3px 10px !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

@media (min-width: 821px) {
  :root body.trainer-home-page .ops-month-cell .ops-chip {
    min-height: 24px !important;
    padding: 3px 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }
}

:root body.trainer-home-page .ops-day-column .ops-chip.is-muted {
  background: var(--fc-bg) !important;
  color: var(--fc-ink-2) !important;
}

@media (min-width: 821px) {
  :root body.trainer-home-page .ops-month-cell .ops-chip.is-muted {
    background: var(--fc-bg) !important;
    color: var(--fc-ink-2) !important;
  }
}

:root body.trainer-home-page .ops-day-column .ops-chip.is-published {
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
}

@media (min-width: 821px) {
  :root body.trainer-home-page .ops-month-cell .ops-chip.is-published {
    background: var(--fc-mint-soft) !important;
    color: var(--fc-mint-ink-soft) !important;
  }
}

:root body.trainer-home-page .ops-day-column .ops-chip.is-draft {
  background: rgba(225, 169, 72, 0.16) !important;
  color: #8a5a10 !important;
}

@media (min-width: 821px) {
  :root body.trainer-home-page .ops-month-cell .ops-chip.is-draft {
    background: rgba(225, 169, 72, 0.16) !important;
    color: #8a5a10 !important;
  }
}

:root body.trainer-home-page .ops-day-column .ops-chip.is-recovery {
  background: var(--fc-seg) !important;
  color: var(--fc-ink-2) !important;
}

@media (min-width: 821px) {
  :root body.trainer-home-page .ops-month-cell .ops-chip.is-recovery {
    background: var(--fc-seg) !important;
    color: var(--fc-ink-2) !important;
  }
}

:root body.trainer-home-page .ops-day-pick input {
  width: 16px;
  height: 16px;
  accent-color: var(--fc-ink);
  cursor: pointer;
}

/* Пустой день: тихая строка вместо пунктирной рамки. */
:root body.trainer-home-page .ops-day-empty {
  padding: 2px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

:root body.trainer-home-page .ops-day-empty-text {
  color: var(--fc-ink-3) !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

:root body.trainer-home-page .ops-day-summary strong {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  line-height: 1.25 !important;
}

:root body.trainer-home-page .ops-day-summary p {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

/* Упражнения дня — строки с тонкими разделителями, без карточек. */
:root body.trainer-home-page .ops-day-list {
  gap: 0 !important;
}

:root body.trainer-home-page .ops-day-list li {
  padding: 7px 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--fc-line-2) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-day-list li:first-child {
  border-top: 0 !important;
}

:root body.trainer-home-page .ops-day-list li.is-superset {
  padding-left: 8px !important;
  box-shadow: inset 2px 0 0 var(--fc-mint) !important;
}

:root body.trainer-home-page .ops-day-list li strong {
  color: var(--fc-ink) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

:root body.trainer-home-page .ops-day-progress-inline i,
:root body.trainer-home-page .ops-workout-completion-card > i {
  background: linear-gradient(90deg, var(--fc-mint) 0 var(--value), var(--fc-line-2) var(--value) 100%) !important;
}

/* Кнопки внутри дня — тихие «таблетки»; мята остаётся у шапки. */
:root body.trainer-home-page .ops-day-actions,
:root body.trainer-home-page .ops-month-actions {
  gap: 6px !important;
}

:root body.trainer-home-page .ops-day-actions .ops-button,
:root body.trainer-home-page .ops-month-actions .ops-button {
  width: 100% !important;
  height: auto !important;
  min-height: 34px !important;
  padding: 6px 10px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

:root body.trainer-home-page .ops-day-actions .ops-button:hover,
:root body.trainer-home-page .ops-month-actions .ops-button:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-home-page .ops-day-actions .ops-button.is-create-workout,
:root body.trainer-home-page .ops-month-actions .ops-button.is-create-workout {
  color: var(--fc-mint-ink) !important;
}

:root body.trainer-home-page .ops-day-actions [data-action="quick-rest-day"],
:root body.trainer-home-page .ops-month-actions [data-action="quick-rest-day"] {
  color: var(--fc-ink-2) !important;
}

/* ── Месяц: ячейки на сером фоне (только компьютер: на узком окне mobile.css
   сворачивает ячейку в число и цветную точку) ─────────────────────────── */
@media (min-width: 821px) {
:root body.trainer-home-page .ops-month-shell {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-month-weekdays span {
  color: var(--fc-ink-3) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
}

:root body.trainer-home-page .ops-month-grid {
  gap: 8px !important;
}

:root body.trainer-home-page .ops-month-empty {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-month-cell {
  gap: 8px !important;
  padding: 10px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-month-cell.is-selected {
  border-color: var(--fc-ink) !important;
  box-shadow: inset 0 0 0 1px var(--fc-ink) !important;
}

:root body.trainer-home-page .ops-month-number {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}

:root body.trainer-home-page .ops-month-cell.is-today .ops-month-number {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--fc-mint);
  color: var(--fc-ink) !important;
}

:root body.trainer-home-page .ops-month-copy strong {
  color: var(--fc-ink) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

:root body.trainer-home-page .ops-month-copy p {
  color: var(--fc-ink-2) !important;
  font-size: 12px !important;
}

/* Пустой день месяца: без повторов «Пустой день», только число и действия. */
:root body.trainer-home-page .ops-month-cell:has([data-create-workout]) > .ops-chip,
:root body.trainer-home-page .ops-month-cell:has([data-create-workout]) > .ops-month-copy {
  display: none !important;
}

:root body.trainer-home-page .ops-month-cell:has([data-create-workout]) .ops-month-actions {
  margin-top: auto !important;
}

/* С мышью действия пустого дня видны по наведению и фокусу: месяц читается как
   обзор, а не как 60 одинаковых кнопок. Выбор дня открывает те же действия
   в панели ниже; с клавиатуры кнопки появляются по фокусу. */
@media (hover: hover) and (pointer: fine) and (min-width: 821px) {
  :root body.trainer-home-page .ops-month-cell:has([data-create-workout]) .ops-month-actions {
    opacity: 0;
    transition: opacity 120ms ease;
  }

  :root body.trainer-home-page .ops-month-cell:has([data-create-workout]):hover .ops-month-actions,
  :root body.trainer-home-page .ops-month-cell:has([data-create-workout]):focus-within .ops-month-actions,
  :root body.trainer-home-page .ops-month-cell.is-selected:has([data-create-workout]) .ops-month-actions {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root body.trainer-home-page .ops-month-actions { transition: none !important; }
}
}

/* ── Выбранный день ─────────────────────────────────────────────────────── */
:root body.trainer-home-page .ops-dashboard-day-detail {
  gap: 14px !important;
  padding: 24px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 24px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-detail-head span {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

:root body.trainer-home-page .ops-detail-head em {
  padding: 4px 12px !important;
  background: var(--fc-seg) !important;
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-home-page .ops-dashboard-day-detail > h2 {
  color: var(--fc-ink) !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

:root body.trainer-home-page .ops-dashboard-day-detail > p {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
}

:root body.trainer-home-page .ops-detail-type {
  padding: 4px 12px !important;
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-home-page .ops-workout-completion-card {
  padding: 18px 20px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--fc-bg) !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-workout-completion-card span {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-home-page .ops-workout-completion-card strong {
  color: var(--fc-ink) !important;
  font-size: 28px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

:root body.trainer-home-page .ops-workout-completion-card p {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
}

/* Упражнения выбранного дня — одной белой группой с разделителями. */
:root body.trainer-home-page .ops-detail-exercises {
  gap: 0 !important;
}

:root body.trainer-home-page .ops-detail-exercises > span {
  margin: 4px 0 10px !important;
  color: var(--fc-ink) !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}

:root body.trainer-home-page .ops-detail-exercise {
  margin-top: -1px !important;
  padding: 14px 16px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 0 !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-detail-exercises > span + .ops-detail-exercise {
  margin-top: 0 !important;
  border-top-left-radius: 16px !important;
  border-top-right-radius: 16px !important;
}

:root body.trainer-home-page .ops-detail-exercise:not(:has(+ .ops-detail-exercise)) {
  border-bottom-left-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
}

:root body.trainer-home-page .ops-detail-exercise.is-superset {
  box-shadow: inset 3px 0 0 var(--fc-mint) !important;
}

:root body.trainer-home-page .ops-detail-exercise > span {
  width: 26px !important;
  height: 26px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--fc-bg) !important;
  color: var(--fc-ink-2) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

:root body.trainer-home-page .ops-detail-exercise strong {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-home-page .ops-detail-exercise small {
  color: var(--fc-ink-2) !important;
}

:root body.trainer-home-page .ops-detail-exercise > b {
  padding: 4px 10px !important;
  background: var(--fc-bg) !important;
  color: var(--fc-ink-2) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-home-page .ops-detail-exercise.status-done > b {
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
}

:root body.trainer-home-page .ops-detail-exercise.status-partial > b {
  background: rgba(225, 169, 72, 0.16) !important;
  color: #8a5a10 !important;
}

:root body.trainer-home-page .ops-detail-exercise.status-skipped > b {
  background: rgba(229, 72, 77, 0.1) !important;
  color: #b4262b !important;
}

:root body.trainer-home-page .ops-detail-exercise.status-unmarked > b {
  background: rgba(225, 169, 72, 0.16) !important;
  color: #8a5a10 !important;
}

/* Номер упражнения повторяет статус, как раньше, но в тонах «Чистого». */
:root body.trainer-home-page .ops-detail-exercise.status-done > span {
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
}

:root body.trainer-home-page .ops-detail-exercise.status-partial > span {
  background: rgba(225, 169, 72, 0.16) !important;
  color: #8a5a10 !important;
}

:root body.trainer-home-page .ops-detail-exercise.status-skipped > span {
  background: rgba(229, 72, 77, 0.1) !important;
  color: #b4262b !important;
}

:root body.trainer-home-page .ops-detail-exercise.status-unmarked > span {
  border: 1px dashed #b3bcc4 !important;
  background: transparent !important;
  color: var(--fc-ink-2) !important;
}

:root body.trainer-home-page .ops-detail-feedback {
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--fc-bg) !important;
}

:root body.trainer-home-page .ops-detail-more {
  justify-self: start !important;
  margin-top: 10px !important;
}

/* Действия дня — в одну строку по содержимому. */
:root body.trainer-home-page .ops-detail-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

:root body.trainer-home-page .ops-detail-actions .ops-button {
  width: auto !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 20px !important;
  font-size: 15px !important;
}

:root body.trainer-home-page .ops-detail-actions .ops-button.is-create-workout {
  border-color: var(--fc-ink) !important;
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

/* ── Меню дня «⋮» (вынесено в body) и выбор нескольких дней ─────────────── */
:root body.trainer-home-page .ops-day-menu-pop {
  padding: 6px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
  background: var(--fc-surface) !important;
  box-shadow: 0 16px 40px rgba(31, 37, 43, 0.14) !important;
}

:root body.trainer-home-page .ops-day-menu-item {
  min-height: 40px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  color: var(--fc-ink) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

:root body.trainer-home-page .ops-day-menu-item:hover,
:root body.trainer-home-page .ops-day-menu-item:focus-visible {
  background: var(--fc-bg) !important;
}

:root body.trainer-home-page .ops-bulk-bar {
  gap: 10px !important;
  padding: 8px 8px 8px 16px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: 0 12px 32px rgba(31, 37, 43, 0.14) !important;
}

:root body.trainer-home-page .ops-bulk-count {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

:root body.trainer-home-page .ops-bulk-bar .ops-button {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  font-size: 14px !important;
}

:root body.trainer-home-page .ops-bulk-clear {
  width: 40px !important;
  height: 40px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-home-page .ops-home-flash {
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--fc-mint-soft) !important;
  box-shadow: none !important;
  color: var(--fc-mint-ink-soft) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* Узкое окно: уведомления — обычной «таблеткой», а не высоким блоком. */
@media (max-width: 820px) {
  :root body.trainer-home-page .ops-notification-link {
    height: 44px !important;
    min-height: 44px !important;
    flex: 0 0 auto !important;
  }

  :root body.trainer-home-page .ops-dashboard-day-detail {
    padding: 18px !important;
  }
}

/* ══ Карточка клиента (trainer-client.html?clientId=…) ══════════════════════
   Строки «Информации» и оплат — одной белой группой с разделителями, как
   в настройках iPhone; у полей тренера подпись обычным регистром слева.
   Вкладки — сегменты; на узком окне они в одну строку с прокруткой. */

:root body.trainer-client-page #ops-profile-client-select {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 40px 0 16px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-client-page #trainer-client-profile-app > .ops-surface {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px !important;
}

:root body.trainer-client-page .ops-profile-hero {
  gap: 14px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

:root body.trainer-client-page .ops-profile-hero .ops-avatar.is-large {
  width: 56px !important;
  height: 56px !important;
  border-radius: 999px !important;
  background: var(--fc-seg) !important;
  color: var(--fc-ink) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
}

:root body.trainer-client-page .ops-profile-hero strong {
  color: var(--fc-ink) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}

/* Группа строк: «Серия», поля клиента, оплаты. */
:root body.trainer-client-page .ops-detail-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
  background: var(--fc-surface) !important;
}

:root body.trainer-client-page .ops-detail-row {
  min-height: 52px;
  margin: 0 !important;
  padding: 12px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root body.trainer-client-page .ops-detail-row + .ops-detail-row {
  border-top: 1px solid var(--fc-line-2) !important;
}

:root body.trainer-client-page .ops-detail-row > span,
:root body.trainer-client-page .ops-detail-row.is-list > div > span {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
}

:root body.trainer-client-page .ops-detail-row > strong:not(.ops-pay-balance),
:root body.trainer-client-page .ops-detail-row.is-list > div > strong {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

/* Поля тренера: подпись сверху слева, белое поле во всю ширину. */
:root body.trainer-client-page .ops-detail-row.is-editable {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  padding: 14px 16px !important;
}

:root body.trainer-client-page .ops-detail-row.is-editable > span {
  font-size: 13px !important;
  font-weight: 600 !important;
}

:root body.trainer-client-page .ops-edit-field {
  width: 100% !important;
  min-height: 44px !important;
  padding: 10px 14px !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 12px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
}

:root body.trainer-client-page .ops-edit-field:focus {
  border-color: var(--fc-mint) !important;
  box-shadow: 0 0 0 3px rgba(33, 195, 154, 0.18) !important;
  outline: none !important;
}

:root body.trainer-client-page .ops-edit-status:empty {
  display: none !important;
}

:root body.trainer-client-page .ops-edit-status {
  color: var(--fc-mint-ink) !important;
  font-size: 12px !important;
}

:root body.trainer-client-page .ops-edit-status.is-error {
  color: #b4262b !important;
}

:root body.trainer-client-page .ops-edit-status.is-pending {
  color: var(--fc-ink-2) !important;
}

/* Календарь посещений. */
:root body.trainer-client-page .ops-att-card {
  gap: 10px !important;
  padding: 16px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-client-page .ops-att-head strong,
:root body.trainer-client-page .ops-att-head span {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-client-page .ops-att-nav {
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-client-page .ops-att-dow span {
  color: var(--fc-ink-3) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
}

:root body.trainer-client-page .ops-att-cell {
  display: grid !important;
  place-items: center !important;
  justify-self: center !important;
  width: 36px !important;
  height: 36px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--fc-ink) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

:root body.trainer-client-page .ops-att-cell.is-done {
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
}

:root body.trainer-client-page .ops-att-cell.is-missed {
  background: rgba(229, 72, 77, 0.1) !important;
  color: #b4262b !important;
}

:root body.trainer-client-page .ops-att-cell.is-planned {
  box-shadow: inset 0 0 0 1.5px var(--fc-btn-line) !important;
}

:root body.trainer-client-page .ops-att-cell.is-rest {
  background: var(--fc-bg) !important;
  color: var(--fc-ink-2) !important;
}

:root body.trainer-client-page .ops-att-cell.is-today {
  box-shadow: inset 0 0 0 2px var(--fc-ink) !important;
}

:root body.trainer-client-page .ops-att-caption {
  color: var(--fc-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

:root body.trainer-client-page .ops-att-legend {
  color: var(--fc-ink-2) !important;
  font-size: 12px !important;
}

/* Рекорды, замеры: панель поиска и строки. */
:root body.trainer-client-page .ops-table-toolbar {
  gap: 10px !important;
}

:root body.trainer-client-page #ops-profile-search {
  height: 44px !important;
  border-radius: 12px !important;
}

:root body.trainer-client-page .ops-table-toolbar .ops-button {
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 20px !important;
  font-size: 15px !important;
}

:root body.trainer-client-page .ops-detail-row.is-list > small {
  color: var(--fc-ink-3) !important;
  font-size: 13px !important;
}

:root body.trainer-client-page .ops-progress-actions .ops-icon-btn {
  width: 32px !important;
  height: 32px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink-2) !important;
}

:root body.trainer-client-page .ops-progress-actions .ops-icon-btn.is-danger:hover {
  border-color: rgba(229, 72, 77, 0.35) !important;
  background: rgba(229, 72, 77, 0.08) !important;
  color: var(--fc-danger) !important;
}

:root body.trainer-client-page .ops-measure-wrap {
  overflow-x: auto;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-client-page .ops-measure-table th {
  background: transparent !important;
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-client-page .ops-measure-table th,
:root body.trainer-client-page .ops-measure-table td {
  padding: 12px 16px !important;
  border-color: var(--fc-line-2) !important;
}

:root body.trainer-client-page .ops-measure-name {
  color: var(--fc-ink) !important;
  font-weight: 700 !important;
}

:root body.trainer-client-page .ops-measure-value {
  color: var(--fc-ink) !important;
  font-variant-numeric: tabular-nums;
  font-weight: 600 !important;
}

:root body.trainer-client-page .ops-measure-history-bar {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

/* Оплаты клиента. */
:root body.trainer-client-page .ops-billing-block,
:root body.trainer-client-page .ops-billing-recent {
  gap: 12px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root body.trainer-client-page .ops-billing-recent > strong,
:root body.trainer-client-page .ops-billing-recent > h3 {
  color: var(--fc-ink) !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

:root body.trainer-client-page .ops-billing-note {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
}

:root body.trainer-client-page .ops-billing-actions .ops-button {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 18px !important;
  font-size: 14px !important;
}

:root body.trainer-client-page .ops-payment-row {
  border-color: var(--fc-line-2) !important;
  background: transparent !important;
}

/* Питание клиента: цель КБЖУ и подвкладки. */
:root body.trainer-client-page .ops-nutri-target {
  padding: 18px 20px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--fc-bg) !important;
  box-shadow: none !important;
}

:root body.trainer-client-page .ops-nutri-target-kicker {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-client-page .ops-nutri-target-info strong {
  color: var(--fc-ink) !important;
  font-size: 28px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

:root body.trainer-client-page .ops-nutri-target-info small,
:root body.trainer-client-page .ops-nutri-target-note {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
}

:root body.trainer-client-page .ops-surface .ops-empty {
  padding: 18px 20px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink-2) !important;
}

/* Узкое окно: вкладки в одну строку с прокруткой, без столбика. */
@media (max-width: 820px) {
  :root body.trainer-client-page #trainer-client-profile-app > .ops-surface {
    padding: 16px !important;
  }

  :root body.trainer-client-page .ops-tabbar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-self: stretch !important;
    width: auto !important;
    max-width: 100% !important;
  }

  :root body.trainer-client-page .ops-tabbar > button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 36px !important;
    padding: 6px 14px !important;
  }

  :root body.trainer-client-page .ops-detail-row:not(.is-editable) {
    flex-wrap: wrap;
    gap: 2px 12px;
  }
}

/* ══ Окна кабинета (.ops-modal): «Добавить клиента», «Записать оплату» и др. ══
   Подписи полей обычным регистром вместо серого капса, поля и кнопки — как
   на страницах, крестик — круглая кнопка. */
:root body.trainer-ops-page .ops-modal,
:root body.client-ops-page .ops-modal {
  border: 0 !important;
  box-shadow: 0 24px 64px rgba(31, 37, 43, 0.22) !important;
}

@media (min-width: 821px) {
  :root body.trainer-ops-page .ops-modal:not(.cm-modal),
  :root body.client-ops-page .ops-modal:not(.cm-modal) {
    padding: 28px !important;
    border-radius: 28px !important;
  }
}

:root body.trainer-ops-page .ops-modal-close,
:root body.client-ops-page .ops-modal-close {
  display: grid !important;
  place-items: center !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-size: 18px !important;
}

:root body.trainer-ops-page .ops-modal-close:hover,
:root body.client-ops-page .ops-modal-close:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-ops-page .ops-modal-head h2,
:root body.client-ops-page .ops-modal-head h2 {
  color: var(--fc-ink) !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.15 !important;
}

:root body.trainer-ops-page .ops-modal-head p,
:root body.client-ops-page .ops-modal-head p {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
}

:root body.trainer-ops-page .ops-field > span,
:root body.client-ops-page .ops-field > span {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-ops-page .ops-modal .ops-input,
:root body.trainer-ops-page .ops-modal .ops-select,
:root body.trainer-ops-page .ops-modal .ops-textarea,
:root body.client-ops-page .ops-modal .ops-input,
:root body.client-ops-page .ops-modal .ops-select,
:root body.client-ops-page .ops-modal .ops-textarea {
  min-height: 46px;
  border: 1px solid #e1e4e8 !important;
  border-radius: 12px !important;
  background-color: var(--fc-surface) !important;
  box-shadow: none !important;
  font-size: 15px !important;
}

:root body.trainer-ops-page .ops-modal .ops-input:focus,
:root body.trainer-ops-page .ops-modal .ops-select:focus,
:root body.trainer-ops-page .ops-modal .ops-textarea:focus,
:root body.client-ops-page .ops-modal .ops-input:focus,
:root body.client-ops-page .ops-modal .ops-select:focus,
:root body.client-ops-page .ops-modal .ops-textarea:focus {
  border-color: var(--fc-mint) !important;
  box-shadow: 0 0 0 3px rgba(33, 195, 154, 0.18) !important;
  outline: none !important;
}

:root body.trainer-ops-page .ops-modal-form > .ops-inline-actions .ops-button,
:root body.trainer-ops-page .ops-modal-actions .ops-button,
:root body.client-ops-page .ops-modal-form > .ops-inline-actions .ops-button,
:root body.client-ops-page .ops-modal-actions .ops-button {
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 20px !important;
  font-size: 15px !important;
}

:root body.trainer-ops-page .ops-modal-error,
:root body.client-ops-page .ops-modal-error {
  color: #b4262b !important;
  font-size: 14px !important;
}

/* ══ Клиенты (trainer-clients.html) ══════════════════════════════════════════ */

:root body.trainer-clients-page .ops-invite-card-title span {
  color: var(--fc-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

:root body.trainer-clients-page .ops-invite-status-dot {
  box-shadow: none !important;
}

:root body.trainer-clients-page .ops-chip.is-static {
  min-height: 26px !important;
  padding: 3px 10px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--fc-seg) !important;
  color: var(--fc-ink-2) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

:root body.trainer-clients-page .ops-invite-empty {
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--fc-bg) !important;
}

:root body.trainer-clients-page .ops-invite-empty > span {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

:root body.trainer-clients-page .ops-invite-url-row.is-hint {
  border-color: var(--fc-line-2) !important;
}

:root body.trainer-clients-page .ops-invite-hint-text {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

:root body.trainer-clients-page .ops-surface .ops-button,
:root body.trainer-payments-page .ops-surface .ops-button,
:root body.trainer-payments-page .ops-head-actions .ops-button {
  min-height: 40px !important;
  font-size: 14px !important;
}

:root body.trainer-clients-page .ops-table-toolbar .ops-input {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 999px !important;
  padding: 0 16px !important;
}

/* Строки таблиц клиентов и оплат. */
:root body.trainer-clients-page .ops-table td,
:root body.trainer-payments-page .ops-table td {
  vertical-align: middle !important;
  border-color: var(--fc-line-2) !important;
}

:root body.trainer-clients-page .ops-client-row:hover td,
:root body.trainer-payments-page .ops-client-row:hover td {
  background: #fafbfb !important;
}

:root body.trainer-clients-page .ops-table-user .ops-avatar,
:root body.trainer-payments-page .ops-table-user .ops-avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 999px !important;
  background: var(--fc-seg) !important;
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-clients-page .ops-table-user strong,
:root body.trainer-payments-page .ops-table-user strong {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-clients-page .ops-table-user small,
:root body.trainer-clients-page .ops-table-user span,
:root body.trainer-payments-page .ops-table-user small,
:root body.trainer-payments-page .ops-table-user span {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

:root body.trainer-clients-page .ops-rhythm {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

:root body.trainer-clients-page .ops-client-row .ops-inline-actions {
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

:root body.trainer-clients-page .ops-client-row .ops-chip.is-static {
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
}

:root body.trainer-clients-page .ops-client-row .ops-chip-link,
:root body.trainer-clients-page .ops-client-row .ops-button.is-small {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

:root body.trainer-clients-page .ops-client-row .ops-chip-link:hover,
:root body.trainer-clients-page .ops-client-row .ops-button.is-small:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-clients-page .ops-client-row .ops-button.is-small.is-primary {
  border-color: var(--fc-ink) !important;
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

:root body.trainer-clients-page .ops-client-row .ops-button.is-danger {
  color: #b4262b !important;
}

/* Узкое окно: строка клиента — карточка, кнопки строкой ниже. */
@media (max-width: 820px) {
  :root body.trainer-clients-page .ops-table thead {
    display: none !important;
  }

  :root body.trainer-clients-page .ops-table,
  :root body.trainer-clients-page .ops-table tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  :root body.trainer-clients-page .ops-table tbody > tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px 12px !important;
    padding: 14px 0 !important;
    border-top: 1px solid var(--fc-line-2) !important;
  }

  :root body.trainer-clients-page .ops-table tbody > tr > td {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    height: auto !important;
  }

  :root body.trainer-clients-page .ops-table tbody > tr > td:nth-child(1) { grid-column: 1; grid-row: 1; }
  :root body.trainer-clients-page .ops-table tbody > tr > td:nth-child(2) { grid-column: 2; grid-row: 1; align-self: center; color: var(--fc-ink-3); font-size: 13px; }
  :root body.trainer-clients-page .ops-table tbody > tr > td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; padding-left: 52px !important; }
  :root body.trainer-clients-page .ops-table tbody > tr > td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; padding-left: 52px !important; }

  :root body.trainer-clients-page .ops-table tbody > tr .ops-inline-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  :root body.trainer-clients-page .ops-table tbody > tr .ops-inline-actions > * {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  :root body.trainer-clients-page .ops-table-wrap {
    overflow: visible !important;
  }

  :root body.trainer-clients-page .ops-table tbody > tr > td:nth-child(2):not(:empty)::before {
    content: "Добавлен ";
  }

  :root body.trainer-clients-page .ops-table tbody > tr[data-paused-client] > td {
    padding-left: 0 !important;
  }
}

/* ══ Оплаты (trainer-payments.html) ══════════════════════════════════════════ */

/* Сводка — одной полосой с разделителями, как на главной. */
:root body.trainer-payments-page .ops-payments-stats {
  gap: 1px !important;
  overflow: hidden;
  border: 1px solid var(--fc-line) !important;
  border-radius: 24px !important;
  background: var(--fc-line) !important;
}

:root body.trainer-payments-page .ops-payments-stats > article {
  gap: 6px !important;
  padding: 22px 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-payments-page .ops-payments-stats > article > span {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-payments-page .ops-payments-stats > article > strong {
  color: var(--fc-ink) !important;
  font-size: 32px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.05 !important;
}

:root body.trainer-payments-page .ops-payments-stats > article > small {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
}

:root body.trainer-payments-page .ops-surface-head h2 {
  color: var(--fc-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

:root body.trainer-payments-page .ops-surface-head p {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
}

:root body.trainer-payments-page .ops-payments-table td {
  color: var(--fc-ink) !important;
  font-size: 14px !important;
}

:root body.trainer-payments-page .ops-client-row .ops-button.is-small {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
}

:root body.trainer-payments-page .ops-pay-balance.is-debt {
  color: #b4262b !important;
}

:root body.trainer-payments-page .ops-month-switch {
  gap: 6px !important;
  padding: 3px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-payments-page .ops-month-switch button {
  width: 32px !important;
  height: 32px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
}

:root body.trainer-payments-page .ops-month-switch button:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-payments-page .ops-payments-journal .ops-select {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 999px !important;
  padding-left: 16px !important;
}

:root body.trainer-payments-page .ops-surface .ops-empty {
  padding: 18px 20px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--fc-bg) !important;
  color: var(--fc-ink-2) !important;
}

:root body.trainer-payments-page .ops-payment-row {
  border-color: var(--fc-line-2) !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Узкое окно: сводка в столбик, таблица клиентов — карточками. */
@media (max-width: 820px) {
  :root body.trainer-payments-page .ops-payments-stats {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  :root body.trainer-payments-page .ops-payments-table thead {
    display: none !important;
  }

  :root body.trainer-payments-page .ops-payments-table,
  :root body.trainer-payments-page .ops-payments-table tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  :root body.trainer-payments-page .ops-payments-table .ops-client-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 4px 12px !important;
    padding: 14px 0 !important;
    border-top: 1px solid var(--fc-line-2) !important;
  }

  :root body.trainer-payments-page .ops-payments-table .ops-client-row > td {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
  }

  :root body.trainer-payments-page .ops-payments-table .ops-client-row > td:first-child { grid-column: 1 / -1; }
  :root body.trainer-payments-page .ops-payments-table .ops-client-row > td:not(:first-child):not(:last-child) {
    padding-left: 52px !important;
    color: var(--fc-ink-2) !important;
    font-size: 13px !important;
  }
  :root body.trainer-payments-page .ops-payments-table .ops-client-row > td:not(:first-child):not(:last-child) { grid-column: 1; }
  :root body.trainer-payments-page .ops-payments-table .ops-client-row > td:last-child {
    grid-column: 2;
    grid-row: 2 / span 3;
    align-self: center;
  }

  :root body.trainer-payments-page .ops-payments-table .ops-client-row > td:last-child .ops-button {
    width: auto !important;
  }

  :root body.trainer-payments-page .ops-table-wrap {
    overflow: visible !important;
  }

  :root body.trainer-payments-page .ops-payments-table .ops-client-row > td:nth-child(2)::before { content: "Тариф: "; }
  :root body.trainer-payments-page .ops-payments-table .ops-client-row > td:nth-child(3)::before { content: "Баланс: "; }
  :root body.trainer-payments-page .ops-payments-table .ops-client-row > td:nth-child(4)::before { content: "Последняя оплата: "; }
}

/* ══ Библиотека видео и рецепты тренера (trainer-library.html) ══════════════ */

:root body.trainer-library-page .ops-library-switch {
  margin-bottom: 18px !important;
}

/* Три источника видео — серые плитки без рамок, подписи обычным регистром. */
:root body.trainer-library-page .ops-video-hub-grid {
  gap: 12px !important;
}

:root body.trainer-library-page .ops-video-hub-card {
  gap: 14px !important;
  padding: 20px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--fc-bg) !important;
  box-shadow: none !important;
}

:root body.trainer-library-page .ops-video-hub-card > div > span {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-library-page .ops-video-hub-card > div > strong {
  color: var(--fc-ink) !important;
  font-size: 36px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

:root body.trainer-library-page .ops-video-hub-card > div > p {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

:root body.trainer-library-page .ops-video-hub-card .ops-button {
  min-height: 40px !important;
  font-size: 14px !important;
}



:root body.trainer-library-page .ops-button.is-disabled {
  border: 1px solid var(--fc-btn-line) !important;
  background: transparent !important;
  color: var(--fc-ink-3) !important;
}

/* Поиск, сортировка, «Только мои». */
:root body.trainer-library-page .ops-library-toolbar {
  gap: 10px !important;
}

:root body.trainer-library-page .ops-library-toolbar .ops-input,
:root body.trainer-library-page .ops-library-toolbar .ops-select {
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
}

:root body.trainer-library-page .ops-switch,
:root body.trainer-library-page .ops-switch span {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-library-page .ops-switch input {
  accent-color: var(--fc-ink);
}

/* Фильтры по группам мышц: белые «таблетки», выбранный — графит. */
:root body.trainer-library-page .ops-library-filters {
  gap: 6px !important;
}

:root body.trainer-library-page .ops-library-filters .ops-chip {
  min-height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-library-page .ops-library-filters .ops-chip:hover {
  background: var(--fc-bg) !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-library-page .ops-library-filters .ops-chip.is-active {
  border-color: var(--fc-ink) !important;
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

/* Список видео — одной группой с разделителями. */
:root body.trainer-library-page .ops-library-list {
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid var(--fc-line) !important;
  border-radius: 20px !important;
  background: var(--fc-surface) !important;
}

:root body.trainer-library-page .ops-library-row {
  gap: 16px !important;
  padding: 14px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root body.trainer-library-page .ops-library-row + .ops-library-row {
  border-top: 1px solid var(--fc-line-2) !important;
}

:root body.trainer-library-page .ops-library-row:hover {
  background: #fafbfb !important;
}

:root body.trainer-library-page .ops-library-badge {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 0 !important;
  width: 56px !important;
  min-width: 56px !important;
  height: 56px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--fc-bg) !important;
  box-shadow: none !important;
}

:root body.trainer-library-page .ops-library-badge strong,
:root body.trainer-library-page .ops-library-badge b {
  color: var(--fc-ink) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

:root body.trainer-library-page .ops-library-badge span,
:root body.trainer-library-page .ops-library-badge small {
  color: var(--fc-ink-2) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-library-page .ops-library-copy strong {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-library-page .ops-library-copy small,
:root body.trainer-library-page .ops-library-copy p {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

:root body.trainer-library-page .ops-library-copy .ops-chip-row {
  gap: 4px !important;
}

:root body.trainer-library-page .ops-library-copy .ops-chip.is-static {
  min-height: 24px !important;
  padding: 2px 10px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--fc-bg) !important;
  color: var(--fc-ink-2) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

:root body.trainer-library-page .ops-library-row .ops-inline-actions {
  gap: 6px !important;
}

:root body.trainer-library-page .ops-library-row .ops-chip-link {
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

:root body.trainer-library-page .ops-library-row .ops-chip-link:hover {
  background: var(--fc-bg) !important;
}

:root body.trainer-library-page .ops-library-row .ops-chip-link.is-danger {
  color: #b4262b !important;
}

/* Рецепты: пустой список на серой подложке. */
:root body.trainer-library-page .ops-recipe-empty {
  padding: 20px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--fc-bg) !important;
  color: var(--fc-ink-2) !important;
}

:root body.trainer-library-page .ops-recipe-empty-actions {
  gap: 8px !important;
}

:root body.trainer-library-page .ops-recipe-empty-actions .ops-button {
  min-height: 40px !important;
  font-size: 14px !important;
}

:root body.trainer-library-page .ops-recipe-empty-actions .ops-button:not(.is-primary) {
  border: 1px solid var(--fc-btn-line) !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
}

/* Узкое окно: строка видео — значок и текст сверху, кнопки строкой ниже. */
@media (max-width: 820px) {
  :root body.trainer-library-page .ops-video-hub-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  :root body.trainer-library-page .ops-library-row {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) !important;
    align-items: start !important;
  }

  :root body.trainer-library-page .ops-library-row .ops-inline-actions {
    grid-column: 2 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }

  :root body.trainer-library-page .ops-library-row .ops-inline-actions > * {
    flex: 0 0 auto !important;
    width: auto !important;
  }


}

/* ══ Профиль тренера, уведомления, поддержка, оплата и подписка ═══════════ */

/* Профиль тренера (trainer-client.html без клиента). */
:root body.trainer-client-page .ops-trainer-avatar-frame {
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--fc-seg) !important;
  box-shadow: none !important;
}

:root body.trainer-client-page .ops-trainer-avatar-frame::before,
:root body.trainer-client-page .ops-trainer-avatar-frame::after {
  content: none !important;
  display: none !important;
}

:root body.trainer-client-page .ops-trainer-avatar-frame span,
:root body.trainer-client-page .ops-trainer-avatar-frame strong {
  color: var(--fc-ink) !important;
}

:root body.trainer-client-page .ops-trainer-profile-nameplate > span {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-client-page .ops-trainer-profile-nameplate > strong {
  color: var(--fc-ink) !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

:root body.trainer-client-page .ops-trainer-profile-nameplate > small,
:root body.trainer-client-page .ops-trainer-profile-hint {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
}

:root body.trainer-client-page .ops-trainer-profile-field > span {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-client-page .ops-trainer-profile-status {
  border-radius: 999px !important;
  background: var(--fc-seg) !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-client-page .ops-trainer-profile-section-head h2,
:root body.trainer-client-page .ops-trainer-profile-section-head strong {
  color: var(--fc-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

:root body.trainer-client-page .ops-trainer-profile-savebar .ops-button {
  min-height: 44px !important;
  padding: 0 20px !important;
  font-size: 15px !important;
}

:root body.trainer-client-page .ops-profile-danger summary,
:root body.trainer-client-page .ops-profile-danger > strong {
  color: #b4262b !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

/* Уведомления — одной группой с разделителями, прочитанные тише. */
:root body.trainer-notifications-page .ops-notification-list {
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
}

:root body.trainer-notifications-page .ops-notification-row {
  padding: 14px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-notifications-page .ops-notification-row + .ops-notification-row {
  border-top: 1px solid var(--fc-line-2) !important;
}

:root body.trainer-notifications-page .ops-notification-row strong {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.trainer-notifications-page .ops-notification-row p {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
}

:root body.trainer-notifications-page .ops-notification-row a {
  color: var(--fc-mint-ink) !important;
  font-weight: 700 !important;
}

:root body.trainer-notifications-page .ops-notification-row small {
  color: var(--fc-ink-3) !important;
  font-size: 13px !important;
  white-space: nowrap;
}

:root body.trainer-notifications-page .ops-notification-row:not(.is-read) strong::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--fc-mint);
  vertical-align: 1px;
}

:root body.trainer-notifications-page .ops-notification-row.is-read strong,
:root body.trainer-notifications-page .ops-notification-row.is-read p {
  color: var(--fc-ink-3) !important;
}

:root body.trainer-notifications-page .ops-filter-panel .ops-surface-head h2,
:root body.trainer-notifications-page .ops-filter-panel .ops-surface-head strong {
  color: var(--fc-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

:root body.trainer-notifications-page .ops-filter-panel .ops-select {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 999px !important;
  padding-left: 16px !important;
}

:root body.trainer-notifications-page .ops-check {
  color: var(--fc-ink) !important;
  font-size: 14px !important;
}

:root body.trainer-notifications-page .ops-check input {
  accent-color: var(--fc-ink);
}

/* Поддержка: вопросы — одной группой, заголовки обычным регистром. */
:root body.trainer-ops-page .ops-support-faq > h2,
:root body.trainer-ops-page .ops-support-tickets-head > h2,
:root body.client-ops-page .ops-support-faq > h2,
:root body.client-ops-page .ops-support-tickets-head > h2 {
  color: var(--fc-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
}

:root body.trainer-ops-page .ops-support-faq,
:root body.client-ops-page .ops-support-faq {
  gap: 0 !important;
}

:root body.trainer-ops-page .ops-support-faq > h2,
:root body.client-ops-page .ops-support-faq > h2 {
  margin-bottom: 12px !important;
}

:root body.trainer-ops-page .ops-support-faq-item,
:root body.client-ops-page .ops-support-faq-item {
  margin: -1px 0 0 !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 0 !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-ops-page .ops-support-faq > h2 + .ops-support-faq-item,
:root body.client-ops-page .ops-support-faq > h2 + .ops-support-faq-item {
  margin-top: 0 !important;
  border-top-left-radius: 16px !important;
  border-top-right-radius: 16px !important;
}

:root body.trainer-ops-page .ops-support-faq-item:not(:has(+ .ops-support-faq-item)),
:root body.client-ops-page .ops-support-faq-item:not(:has(+ .ops-support-faq-item)) {
  border-bottom-left-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
}

:root body.trainer-ops-page .ops-support-faq-item > summary,
:root body.client-ops-page .ops-support-faq-item > summary {
  min-height: 52px;
  padding: 14px 16px !important;
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

:root body.trainer-ops-page .ops-support-faq-item > div,
:root body.client-ops-page .ops-support-faq-item > div {
  padding: 0 16px 16px !important;
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

:root body.trainer-ops-page .ops-support-tickets,
:root body.client-ops-page .ops-support-tickets {
  margin-top: 12px;
}

:root body.trainer-ops-page .ops-support-tickets-head .ops-button,
:root body.client-ops-page .ops-support-tickets-head .ops-button {
  min-height: 40px !important;
  padding: 0 18px !important;
  font-size: 14px !important;
}

:root body.trainer-ops-page .ops-support-empty,
:root body.client-ops-page .ops-support-empty {
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--fc-bg) !important;
  color: var(--fc-ink-2) !important;
}

/* Оплата и подписка (billing.html). */
:root body.trainer-billing-page .ops-billing-summary {
  gap: 1px !important;
  overflow: hidden;
  border: 1px solid var(--fc-line) !important;
  border-radius: 20px !important;
  background: var(--fc-line) !important;
}

:root body.trainer-billing-page .ops-billing-summary > article {
  gap: 6px !important;
  padding: 18px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.trainer-billing-page .ops-billing-summary > article > span {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-billing-page .ops-billing-summary > article > strong {
  color: var(--fc-ink) !important;
  font-size: 22px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

:root body.trainer-billing-page .ops-billing-action-row {
  border-color: var(--fc-line-2) !important;
}

:root body.trainer-billing-page .ops-chip.is-static {
  min-height: 26px !important;
  padding: 3px 10px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--fc-seg) !important;
  color: var(--fc-ink-2) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

:root body.trainer-billing-page .ops-chip.is-static.is-positive {
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
}

:root body.trainer-billing-page .ops-surface-head span {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.trainer-billing-page .ops-surface-head h2,
:root body.trainer-billing-page .ops-surface-head strong {
  color: var(--fc-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

:root body.trainer-billing-page .ops-billing-link-row {
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--fc-bg) !important;
}

:root body.trainer-billing-page .ops-billing-tools details > summary {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

/* Поток покупки: поля, кнопки и плашки на токенах «Чистого». */
:root body.trainer-billing-page .forma-billing-flow {
  padding: 4px 0 !important;
}

:root body.trainer-billing-page .forma-billing-flow h2,
:root body.trainer-billing-page .forma-billing-flow h3 {
  color: var(--fc-ink) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

:root body.trainer-billing-page .forma-billing-flow dt {
  color: var(--fc-ink-2) !important;
  opacity: 1 !important;
}

:root body.trainer-billing-page .forma-billing-flow select,
:root body.trainer-billing-page .forma-billing-flow [data-payer] input {
  min-height: 46px !important;
  padding: 0 14px !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 12px !important;
  background-color: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-size: 15px !important;
}

:root body.trainer-billing-page .forma-billing-flow select:focus,
:root body.trainer-billing-page .forma-billing-flow [data-payer] input:focus {
  border-color: var(--fc-mint) !important;
  box-shadow: 0 0 0 3px rgba(33, 195, 154, 0.18) !important;
  outline: none !important;
}

:root body.trainer-billing-page .forma-billing-flow button,
:root body.trainer-billing-page .forma-billing-flow .billing-bank {
  min-height: 44px !important;
  padding: 0 20px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-weight: 700 !important;
}

:root body.trainer-billing-page .forma-billing-flow [data-confirm],
:root body.trainer-billing-page .forma-billing-flow .billing-bank {
  border-color: var(--fc-ink) !important;
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

:root body.trainer-billing-page .forma-billing-flow .billing-notice,
:root body.trainer-billing-page .forma-billing-flow [data-payer] {
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--fc-bg) !important;
}

:root body.trainer-billing-page .forma-billing-flow a {
  color: var(--fc-mint-ink) !important;
  font-weight: 700;
}

:root body.trainer-billing-page .forma-billing-flow :focus-visible {
  outline-color: rgba(33, 195, 154, 0.55) !important;
}

:root body.trainer-billing-page .ops-billing-empty {
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--fc-bg) !important;
  color: var(--fc-ink-2) !important;
}


/* ══ Кабинет клиента на компьютере: Сегодня, Тренировки, Прогресс, Профиль ═══
   Бежевые подложки старого слоя → серые или белые с линией, мелкий капс
   плиток → обычный регистр, списки — одной группой с разделителями. */

/* Сегодня: БЖУ, «Пока без деталей», тренд недели. */
:root body.client-ops-page .client-macro-grid > article {
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--fc-bg) !important;
  box-shadow: none !important;
}

:root body.client-ops-page .client-macro-grid > article > span {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.client-ops-page .client-macro-grid > article > strong {
  color: var(--fc-ink) !important;
  font-size: 22px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 800 !important;
}

:root body.client-ops-page .client-macro-grid > article > small {
  color: var(--fc-ink-3) !important;
}

:root body.client-ops-page .client-nutrition-note {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
}

:root body.client-ops-page .client-support-item.is-empty,
:root body.client-ops-page .message-note:not(#client-ai-daily-summary) {
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--fc-bg) !important;
  box-shadow: none !important;
}

:root body.client-ops-page .client-today-tile .tile-h span {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.client-ops-page .client-today-tile .tile-val {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

:root body.client-ops-page .client-today-tile .tile-sub {
  color: var(--fc-ink-2) !important;
}

/* Тренировки: сегменты, неделя одной группой, месяц. */
:root body.client-ops-page .client-wk-seg {
  padding: 3px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--fc-seg) !important;
}

:root body.client-ops-page .client-wk-seg > button {
  border-radius: 9px !important;
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

:root body.client-ops-page .client-wk-seg > button.is-active {
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(31, 37, 43, 0.1), 0 1px 1px rgba(31, 37, 43, 0.04) !important;
}

:root body.client-ops-page .client-wk-navbtn {
  width: 36px !important;
  height: 36px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
}

:root body.client-ops-page .client-wk-periodnav strong,
:root body.client-ops-page .client-wk-periodnav span {
  color: var(--fc-ink) !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

:root body.client-ops-page .client-wk-week {
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid var(--fc-line) !important;
  border-radius: 20px !important;
  background: var(--fc-surface) !important;
}

:root body.client-ops-page .client-wk-day {
  min-height: 68px;
  padding: 10px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

:root body.client-ops-page .client-wk-day + .client-wk-day {
  border-top: 1px solid var(--fc-line-2) !important;
}

:root body.client-ops-page .client-wk-day:hover {
  background: #fafbfb !important;
}

:root body.client-ops-page .client-wk-day.is-selected {
  background: var(--fc-mint-soft) !important;
}

:root body.client-ops-page .wk-daythumb {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  background: var(--fc-bg) !important;
  color: var(--fc-ink) !important;
}

:root body.client-ops-page .wk-daythumb i {
  color: var(--fc-ink-2) !important;
  font-style: normal !important;
}

:root body.client-ops-page .wk-daythumb.is-today {
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

:root body.client-ops-page .wk-daythumb.is-today i {
  color: rgba(255, 255, 255, 0.7) !important;
}

:root body.client-ops-page .wk-dayname {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.client-ops-page .client-wk-day.is-rest .wk-dayname {
  color: var(--fc-ink-2) !important;
  font-weight: 600 !important;
}

:root body.client-ops-page .wk-daysub {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

:root body.client-ops-page .wk-daychev {
  color: #a3aab1 !important;
}

:root body.client-ops-page .client-wk-emptynote,
:root body.client-ops-page .client-wk-legend {
  color: var(--fc-ink-3) !important;
  font-size: 13px !important;
}

:root body.client-ops-page .client-wk-monthgrid .wk-wd {
  color: var(--fc-ink-3) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

:root body.client-ops-page .client-wk-monthgrid .wk-cell {
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Прогресс: заголовки карточек, посещения, рекорды. */
:root body.client-ops-page .content-card-head h2 {
  color: var(--fc-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

:root body.client-ops-page .content-card-head p {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
}

:root body.client-ops-page .ops-att-card {
  gap: 10px !important;
  padding: 16px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 16px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.client-ops-page .ops-att-nav {
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
}

:root body.client-ops-page .ops-att-dow span {
  color: var(--fc-ink-3) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
}

:root body.client-ops-page .ops-att-cell {
  display: grid !important;
  place-items: center !important;
  justify-self: center !important;
  width: 36px !important;
  height: 36px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

:root body.client-ops-page .ops-att-cell.is-done { background: var(--fc-mint-soft) !important; color: var(--fc-mint-ink-soft) !important; }
:root body.client-ops-page .ops-att-cell.is-missed { background: rgba(229, 72, 77, 0.1) !important; color: #b4262b !important; }
:root body.client-ops-page .ops-att-cell.is-planned { box-shadow: inset 0 0 0 1.5px var(--fc-btn-line) !important; }
:root body.client-ops-page .ops-att-cell.is-rest { background: var(--fc-bg) !important; color: var(--fc-ink-2) !important; }
:root body.client-ops-page .ops-att-cell.is-today { box-shadow: inset 0 0 0 2px var(--fc-ink) !important; }

:root body.client-ops-page .ops-att-caption {
  color: var(--fc-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

:root body.client-ops-page .ops-att-legend {
  color: var(--fc-ink-2) !important;
  font-size: 12px !important;
}

:root body.client-ops-page .subtle-tabs:not(.client-ai-mode-tabs) {
  padding: 3px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--fc-seg) !important;
}

:root body.client-ops-page .subtle-tabs:not(.client-ai-mode-tabs) .subtle-tab {
  border-radius: 9px !important;
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

:root body.client-ops-page .subtle-tabs:not(.client-ai-mode-tabs) .subtle-tab.active {
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(31, 37, 43, 0.1), 0 1px 1px rgba(31, 37, 43, 0.04) !important;
}

:root body.client-ops-page .plain-input {
  height: 44px !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 12px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.client-ops-page .plain-input:focus {
  border-color: var(--fc-mint) !important;
  box-shadow: 0 0 0 3px rgba(33, 195, 154, 0.18) !important;
  outline: none !important;
}

:root body.client-ops-page .filter-pills > * {
  min-height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.client-ops-page .filter-pills > .active,
:root body.client-ops-page .filter-pills > .is-active {
  border-color: var(--fc-ink) !important;
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

:root body.client-ops-page .progress-item {
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
}

:root body.client-ops-page .notification-card,
:root body.client-ops-page .client-progress-entry {
  border: 1px solid var(--fc-line) !important;
  border-radius: 14px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
}

:root body.client-ops-page .client-progress-entry-value {
  border: 0 !important;
  background: var(--fc-mint-soft) !important;
  color: var(--fc-mint-ink-soft) !important;
  font-weight: 700 !important;
}

/* Профиль клиента. */
:root body.client-ops-page .profile-card .profile-row {
  min-height: 48px;
  padding: 12px 0 !important;
  border: 0 !important;
}

:root body.client-ops-page .profile-card .profile-row + .profile-row {
  border-top: 1px solid var(--fc-line-2) !important;
}

:root body.client-ops-page .profile-row > span:first-child {
  color: var(--fc-ink-2) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.client-ops-page .profile-row > :last-child {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

:root body.client-ops-page .profile-trainer-row .ops-input {
  height: 44px !important;
  border-radius: 12px !important;
}

:root body.client-ops-page .profile-trainer-row .ops-button,
:root body.client-ops-page .profile-logout-button {
  min-height: 44px !important;
  padding: 0 20px !important;
}

:root body.client-ops-page .client-reminders-row {
  border-color: var(--fc-line-2) !important;
}

:root body.client-ops-page .client-reminders-toggle {
  border: 0 !important;
}

:root body.client-ops-page .profile-logout-avatar {
  border-radius: 999px !important;
  background: var(--fc-seg) !important;
  color: var(--fc-ink) !important;
}

/* «Посещения» клиента: у карточки не было внутренних отступов — заголовок
   упирался в скругление. Календарь внутри без второй рамки. */
:root body.client-ops-page #client-attendance-card {
  padding: 20px 24px 24px !important;
}

:root body.client-ops-page #client-attendance-card .content-card-head {
  padding: 0 0 12px !important;
}

:root body.client-ops-page #client-attendance-card .ops-att-card {
  padding: 0 !important;
  border: 0 !important;
}

/* ══ Питание клиента на компьютере (client-meal-*.css, классы cm-*, cma-*) ═══
   Слои питания построены на переменных --client-* с зеленоватым фоном —
   переводим их на токены «Чистого», а прямые цвета, капс и тени правим
   точечно. Старое ИИ-питание (foodai) не трогаем: на него действуют только
   общие токены. */
:root body.client-ops-page {
  --client-bg: var(--fc-bg);
  --client-surface: var(--fc-surface);
  --client-soft: var(--fc-bg);
  --client-ink: var(--fc-ink);
  --client-muted: var(--fc-ink-2);
  --client-faint: var(--fc-ink-3);
  --client-line: var(--fc-line);
  --client-line-strong: var(--fc-btn-line);
  --client-green: var(--fc-mint);
  --client-green-deep: var(--fc-mint-ink);
  --client-dark: var(--fc-ink);
}

/* Подписи капсом → обычный регистр. */
:root body.client-ops-page .cma-photo-details { margin-top: 4px; font-weight: 400; line-height: 1.45; }
:root body.client-ops-page .cma-rows:has(.cma-photo-row) .cma-help { color: var(--client-muted); }

/* Ассистент и его редактор поддерживают системную тёмную тему. */
@media (prefers-color-scheme: dark) {
  :root body.client-ops-page :is(.cma, .cma-row-modal, .fb-overlay) {
    --fc-bg: #171b1f;
    --fc-surface: #20262b;
    --fc-ink: #edf0f2;
    --fc-ink-2: #bdc5cc;
    --fc-ink-3: #a0aab3;
    --fc-line: #374149;
    --fc-line-2: #303940;
    --fc-btn-line: #46525c;
    --fc-mint-ink: #5fe3bd;
    --fc-photo-selected-ink: #5fe3bd;
    --fc-photo-selected-bg: #193d34;
    --client-bg: var(--fc-bg);
    --client-surface: var(--fc-surface);
    --client-soft: var(--fc-bg);
    --client-ink: var(--fc-ink);
    --client-muted: var(--fc-ink-2);
    --client-faint: var(--fc-ink-3);
    --client-line: var(--fc-line);
    --client-line-strong: var(--fc-btn-line);
    --client-green-deep: var(--fc-mint-ink);
    --client-dark: var(--fc-ink);
    color-scheme: dark;
  }
  :root body.client-ops-page .cma .cma-send { color: var(--client-bg); }
  :root body.client-ops-page :is(.cma, .cma-row-modal),
  :root body.client-ops-page .cma :is(.cma-card, .cma-bubble, .cma-input-row, .cma-hint),
  :root body.client-ops-page .cma-row-modal :is(input, textarea) {
    background: var(--client-surface) !important;
    color: var(--client-ink);
  }
  :root body.client-ops-page .cma .cma-msg.is-user .cma-bubble {
    background: var(--client-soft) !important;
    color: var(--client-ink);
  }
  :root body.client-ops-page .cma .cma-chip {
    background: var(--client-surface) !important;
    color: var(--client-ink) !important;
  }
  :root body.client-ops-page :is(.cma, .cma-row-modal) .ops-button.is-primary {
    background: var(--fc-ink) !important;
    color: var(--fc-bg) !important;
  }
}

:root body.client-ops-page .cm-menu-rowhead,
:root body.client-ops-page .cm-shop-section-title,
:root body.client-ops-page .cm-shop-cook-label,
:root body.client-ops-page .cma-daymark {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.client-ops-page .cm-shop-section-title {
  color: var(--fc-ink) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}

/* Бежевые пометки — тёплая плашка предупреждения из системы. */
:root body.client-ops-page .cm-menu-notice,
:root body.client-ops-page .cm-rec-note[data-rec-note="warning"],
:root body.client-ops-page .cm-prod-atwater {
  border: 0 !important;
  border-radius: 14px !important;
  background: rgba(225, 169, 72, 0.12) !important;
  color: #6f4a10 !important;
}

/* Сегменты «День / Меню / Рецепты / Покупки / Моя еда». */
:root body.client-ops-page .cm-seg {
  border-radius: 9px !important;
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

:root body.client-ops-page .cm-seg.is-active,
:root body.client-ops-page .cm-seg[aria-selected="true"] {
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(31, 37, 43, 0.1), 0 1px 1px rgba(31, 37, 43, 0.04) !important;
}

:root body.client-ops-page .cm-seg:has(~ .cm-seg),
:root body.client-ops-page .cm-seg ~ .cm-seg {
  border: 0 !important;
}

:root body.client-ops-page .cm-badge {
  background: var(--fc-ink) !important;
  color: #ffffff !important;
}

/* Поля ввода и фокус. */
:root body.client-ops-page .cma-row-field:focus-within,
:root body.client-ops-page .cma-input-row:focus-within {
  border-color: var(--fc-mint) !important;
  box-shadow: 0 0 0 3px rgba(33, 195, 154, 0.18) !important;
}

:root body.client-ops-page .cm-segs {
  gap: 2px !important;
  padding: 3px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--fc-seg) !important;
  box-shadow: none !important;
}

:root body.client-ops-page .cm-goal-title {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Узкое окно: «Сегодня» уходит во вторую строку — дням недели хватает места.
   Нижняя вкладка питания подписана «Питание», как в меню на компьютере
   (mobile.css писал старое «AI»). */
@media (max-width: 820px) {
  :root body.client-ops-page .cm-day-week {
    flex-wrap: wrap !important;
    row-gap: 8px !important;
  }

  :root body.client-ops-page .cm-day-days {
    flex: 1 1 calc(100% - 80px) !important;
    min-width: 0 !important;
  }

  :root body.client-ops-page .cm-day-today {
    order: 9 !important;
    margin-left: auto !important;
  }

  :root body.client-ops-page .ops-rail-link[href="#ai-calories"] .ops-rail-label::after {
    content: "Питание" !important;
  }
}

/* ══ Вход и регистрация на компьютере (auth.html, client-auth.html,
   trainer-register.html, client-signup.html, client-register.html) ══════════
   Ровный серый фон без свечения, белая карточка с линией, вкладки и выбор
   роли — сегменты системы (выбранный белый, а не мятный с белым текстом),
   подписи полей обычным регистром. Логика форм не меняется. */

:root body.auth-page,
:root body.client-register-page {
  background: var(--fc-bg) !important;
}

:root body.auth-page::before,
:root body.auth-page::after,
:root body.auth-page .auth-shell::before,
:root body.auth-page .auth-shell::after,
:root body.client-register-page::before,
:root body.client-register-page::after,
:root body.client-register-page .register-shell::before,
:root body.client-register-page .register-shell::after {
  content: none !important;
  display: none !important;
}

:root body.auth-page .auth-shell,
:root body.client-register-page .register-shell {
  background: transparent !important;
}

:root body.auth-page .auth-panel,
:root body.client-register-page .register-page-card {
  border: 1px solid var(--fc-line) !important;
  border-radius: 28px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* Вкладки «Войти / Регистрация» и выбор роли — сегменты. */
:root body.auth-page .auth-mode-switch,
:root body.auth-page .auth-role-choice {
  gap: 2px !important;
  padding: 3px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--fc-seg) !important;
  box-shadow: none !important;
}

:root body.auth-page .auth-mode-tab,
:root body.auth-page .auth-role-tab {
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--fc-ink-2) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

:root body.auth-page .auth-mode-tab.is-active,
:root body.auth-page .auth-role-tab.is-active {
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(31, 37, 43, 0.1), 0 1px 1px rgba(31, 37, 43, 0.04) !important;
}

:root body.auth-page .auth-panel-head h1,
:root body.auth-page .auth-panel-head h2 {
  color: var(--fc-ink) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

:root body.auth-page .auth-panel-head p {
  color: var(--fc-ink-2) !important;
}

/* Поля. */
:root body.auth-page .auth-form-field > span {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.auth-page .auth-input {
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 16px !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 14px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-size: 15px !important;
}

:root body.auth-page .auth-input:focus {
  border-color: var(--fc-mint) !important;
  box-shadow: 0 0 0 3px rgba(33, 195, 154, 0.18) !important;
  outline: none !important;
}

:root body.auth-page .auth-input::placeholder {
  color: var(--fc-ink-3) !important;
}

/* Главная кнопка — графит, без градиента и тени. */
:root body.auth-page .auth-submit {
  height: 50px !important;
  min-height: 50px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--fc-ink) !important;
  box-shadow: none !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

:root body.auth-page .auth-submit::before,
:root body.auth-page .auth-submit::after {
  content: none !important;
  display: none !important;
}

:root body.auth-page .auth-submit:hover {
  background: #2b333b !important;
}

:root body.auth-page .auth-submit:disabled {
  background: var(--fc-seg) !important;
  color: var(--fc-ink-3) !important;
}

/* Ссылки, разделитель, вход через VK и Яндекс. */
:root body.auth-page .auth-text-button,
:root body.auth-page .auth-secondary-link,
:root body.auth-page .auth-link-button {
  color: var(--fc-mint-ink) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

:root body.auth-page .auth-divider,
:root body.auth-page .auth-divider span {
  color: var(--fc-ink-3) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.auth-page .auth-divider::before,
:root body.auth-page .auth-divider::after {
  background: var(--fc-line-2) !important;
}

:root body.auth-page .auth-role-hint {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

:root body.auth-page .auth-social-button {
  height: 48px !important;
  min-height: 48px !important;
  border: 1px solid var(--fc-btn-line) !important;
  border-radius: 999px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
  font-weight: 700 !important;
}

:root body.auth-page .auth-social-button:hover {
  background: var(--fc-bg) !important;
}

:root body.auth-page .auth-consent,
:root body.auth-page .auth-consent label {
  color: var(--fc-ink-2) !important;
  font-size: 13px !important;
}

:root body.auth-page .auth-consent input {
  accent-color: var(--fc-ink);
}

:root body.auth-page .auth-consent a {
  color: var(--fc-mint-ink) !important;
}

/* Приглашение клиента: светлая карточка вместо тёмной со свечением. */
:root body.client-register-page .register-shell-copy {
  border: 1px solid var(--fc-line) !important;
  border-radius: 28px !important;
  background: var(--fc-surface) !important;
  box-shadow: none !important;
  color: var(--fc-ink) !important;
}

:root body.client-register-page .register-shell-copy::before,
:root body.client-register-page .register-shell-copy::after {
  content: none !important;
  display: none !important;
}

:root body.client-register-page .register-shell-copy h1,
:root body.client-register-page .register-shell-copy h2,
:root body.client-register-page .register-shell-copy strong {
  color: var(--fc-ink) !important;
}

:root body.client-register-page .register-shell-copy p:not(.ops-kicker) {
  color: var(--fc-ink-2) !important;
}

:root body.client-register-page .ops-kicker {
  color: var(--fc-mint-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

:root body.client-register-page .register-shell-copy .ops-brand {
  filter: none !important;
}

:root body.client-register-page .register-page-card h1,
:root body.client-register-page .register-page-card h2 {
  color: var(--fc-ink) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

:root body.client-register-page .register-page-card .ops-button {
  min-height: 44px !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

/* ══ Поправки после независимого ревью (17.10) ══════════════════════════════ */

/* «Продолжить в банке» — ссылка-кнопка: текст по центру, как у <button>. */
:root body.trainer-billing-page .forma-billing-flow .billing-bank {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Видимый фокус: графитовая рамка 2px (мятная полупрозрачная читалась ~1.7:1). */
:root body.trainer-builder-page .ops-builder-stickbar .ops-button:focus-visible,
:root body.trainer-billing-page .forma-billing-flow :focus-visible {
  outline: 2px solid var(--fc-ink) !important;
  outline-offset: 2px !important;
}

/* В группах со скруглением и overflow:hidden рамка фокуса — внутрь, чтобы не срезалась. */
:root body.client-ops-page .client-wk-day:focus-visible,
:root body.trainer-builder-page .ops-vidpick-hit:focus-visible {
  outline: 2px solid var(--fc-ink) !important;
  outline-offset: -2px !important;
}

/* Ссылки на страницах входа подчёркиваются при наведении и фокусе. */
:root body.auth-page .auth-text-button:hover,
:root body.auth-page .auth-text-button:focus-visible,
:root body.auth-page .auth-secondary-link:hover,
:root body.auth-page .auth-secondary-link:focus-visible,
:root body.auth-page .auth-link-button:hover,
:root body.auth-page .auth-link-button:focus-visible {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* История в конструкторе: «Запланировано» синим, как точка в легенде. */
:root body.trainer-builder-page .ops-history-status.is-planned {
  background: rgba(79, 120, 196, 0.12) !important;
  color: #34589c !important;
}

/* Графитовая «Создать тренировку» в выбранном дне реагирует на наведение. */
:root body.trainer-home-page .ops-detail-actions .ops-button.is-create-workout:hover {
  background: #2b333b !important;
}

/* Подсказки автодополнения: --client-soft теперь равен фону — выбранный пункт мятный. */
:root body.client-ops-page .ops-ac-item.is-active,
:root body.client-ops-page .ops-ac-item:hover {
  background: var(--fc-mint-soft) !important;
}

/* ══ Поправки после обхода стенда (17.10) ══════════════════════════════════ */

/* Окна: закреплённая полоса кнопок рассчитана на отступ окна — подстраиваем под 28px,
   иначе под ней просвечивают поля. */
@media (min-width: 821px) {
  :root body.trainer-ops-page .ops-modal:not(.cm-modal) .ops-modal-form > .ops-inline-actions,
  :root body.client-ops-page .ops-modal:not(.cm-modal) .ops-modal-form > .ops-inline-actions {
    bottom: -28px !important;
    margin-bottom: -28px !important;
    padding-bottom: 28px !important;
    background: var(--fc-surface) !important;
  }
}

/* Карточка клиента: вкладки всегда слева (в колонке flex они уезжали в центр). */
:root body.trainer-client-page .ops-tabbar {
  align-self: flex-start !important;
}

@media (max-width: 820px) {
  :root body.trainer-client-page .ops-tabbar > button {
    padding: 6px 10px !important;
  }
}

/* Клиенты и оплаты: аватар не сжимается — имена начинаются с одной линии. */
:root body.trainer-clients-page .ops-table-user .ops-avatar,
:root body.trainer-payments-page .ops-table-user .ops-avatar {
  flex: 0 0 40px !important;
  min-width: 40px !important;
}

/* Неделя: плашки статуса не переносятся, названия упражнений без переносов по слогам. */
:root body.trainer-home-page .ops-day-column .ops-chip {
  white-space: nowrap !important;
}

:root body.trainer-home-page .ops-day-column,
:root body.trainer-home-page .ops-day-column * {
  -webkit-hyphens: manual !important;
  hyphens: manual !important;
}

/* Контраст: «Нет аккаунта?», стрелки в тренировках клиента, подсказка «выдели текст». */
:root body.auth-page .auth-form-switch {
  color: var(--fc-ink-2) !important;
}

:root body.client-ops-page .wk-daychev {
  color: var(--fc-ink-3) !important;
}

:root body.trainer-builder-page .builder-format-hint,
:root body.trainer-library-page .builder-format-hint {
  color: var(--fc-ink-3) !important;
}

/* Серая полоса сверху у старых карточек (уведомления, записи прогресса клиента). */
:root body.client-ops-page .notification-card::before {
  content: none !important;
  display: none !important;
}

/* Подписка: свои списки выбора со стрелкой, карточки инструментов по высоте содержимого. */
:root body.trainer-billing-page .forma-billing-flow select {
  -webkit-appearance: none !important;
  appearance: none !important;
  padding-right: 42px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b636b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 18px !important;
  text-overflow: ellipsis;
}

:root body.trainer-billing-page .ops-billing-tools {
  align-items: start !important;
}

/* Выбор групп мышц (окно видео и конструктор) — на токенах «Чистого». */
:root body.trainer-ops-page .forma-muscle-panel {
  border-color: var(--fc-line) !important;
  border-radius: 16px !important;
  background: var(--fc-surface) !important;
}

:root body.trainer-ops-page .forma-muscle-picker button {
  border-color: var(--fc-btn-line) !important;
  border-radius: 12px !important;
  background: var(--fc-surface) !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-ops-page .forma-muscle-panel > input {
  border-color: #e1e4e8 !important;
  border-radius: 12px !important;
  color: var(--fc-ink) !important;
}

:root body.trainer-ops-page .forma-muscle-panel > input::placeholder {
  color: var(--fc-ink-3) !important;
}

:root body.trainer-ops-page .forma-muscle-options > label {
  color: var(--fc-ink) !important;
}

:root body.trainer-ops-page .forma-muscle-options input[type="checkbox"] {
  accent-color: var(--fc-ink) !important;
}

/* Питание клиента: «+ Добавить блюдо» читаемой тёмной мятой. */
:root body.client-ops-page .client-nutri-addmeal {
  color: var(--fc-mint-ink) !important;
}

/* «Моя еда»: панель во всю ширину колонки, белая карточка с линией. */
:root body.client-ops-page .cm-screen > .fl-library {
  width: 100% !important;
  max-width: 780px !important;
  margin: 0 !important;
  padding: 22px 24px !important;
  border: 1px solid var(--fc-line) !important;
  border-radius: 24px !important;
  box-sizing: border-box;
}

:root body.client-ops-page .fl-library button,
:root body.client-ops-page .fl-library a {
  word-break: normal !important;
  overflow-wrap: normal !important;
  -webkit-hyphens: manual !important;
  hyphens: manual !important;
}

/* Посещения: у дня отдыха видно число на серой подложке, без точки вместо него. */
:root body.trainer-client-page .ops-att-cell.is-rest b,
:root body.client-ops-page .ops-att-cell.is-rest b {
  opacity: 1 !important;
}

:root body.trainer-client-page .ops-att-cell.is-rest i,
:root body.client-ops-page .ops-att-cell.is-rest i {
  display: none !important;
}

/* Узкое окно: меню «Ещё» открывается над полосой, а не за правым краем;
   подвал с юридическими ссылками не прячется под нижней панелью; шрифт — Manrope. */
@media (max-width: 820px) {
  :root body.trainer-ops-page .ops-more-panel {
    left: auto !important;
    right: 0 !important;
    bottom: calc(100% + 8px) !important;
    max-width: calc(100vw - 16px) !important;
  }

  :root body.trainer-billing-page {
    padding-bottom: 150px !important;
  }

  :root body.trainer-ops-page,
  :root body.client-ops-page {
    font-family: "Manrope", "Avenir Next", system-ui, sans-serif !important;
  }

  :root body.client-ops-page .ops-rail-link[href="#ai-calories"] .ops-rail-label::after {
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
  }
}

:root body.trainer-client-page .ops-surface .ops-segment {
  align-self: flex-start !important;
}

.meal-photo-editor { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.meal-photo-editor [data-photo-facts] { flex-basis: 100%; color: var(--fc-ink-2); line-height: 1.5; }
:root body.client-ops-page .meal-photo-editor button[aria-pressed="true"] { background: var(--fc-photo-selected-bg) !important; color: var(--fc-photo-selected-ink) !important; border-color: var(--fc-photo-selected-ink) !important; }
.meal-photo-editor button[hidden] { display: none !important; }
.meal-photo-editor .meal-photo-group { min-width: 0; width: 100%; box-sizing: border-box; margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--fc-line); }
.meal-photo-editor .meal-photo-group legend { padding: 0 8px 0 0; font-size: 14px; font-weight: 800; color: var(--fc-ink); }
.meal-photo-editor .meal-photo-group > button { margin: 4px 4px 4px 0; max-width: 100%; white-space: normal; min-height: 44px; }
.meal-photo-editor .meal-photo-group > label { display: block; margin-top: 8px; }
.meal-photo-editor .meal-photo-group[data-photo-missing] { border-color: var(--fc-mint-ink); }
.cma-photo-row:has(.meal-photo-inline) { flex-wrap: wrap; }
.cma-photo-row .meal-photo-inline { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; order: 2; }
:root body.client-ops-page .meal-photo-inline > button { white-space: normal; min-height: 44px; max-width: 100%; color: var(--fc-ink) !important; background: var(--fc-surface) !important; border: 1px solid var(--fc-line) !important; }
.meal-photo-editor button:focus-visible { outline: 2px solid var(--fc-mint-ink); outline-offset: 2px; }
.meal-photo-editor-compact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.meal-photo-editor-compact .meal-photo-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.meal-photo-editor-compact [data-photo-group="variant"] .meal-photo-options { grid-template-columns: minmax(0, 1fr); }
.meal-photo-editor-compact [data-photo-group="amount"] .meal-photo-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.meal-photo-editor-compact [data-photo-group="amount"] .meal-photo-options-single { grid-template-columns: minmax(0, 1fr); }
.meal-photo-editor-compact [data-photo-group="amount"] > .meal-photo-options + * { margin-top: 12px; }
:root body.client-ops-page .meal-photo-editor-compact .meal-photo-options > button { display: flex !important; flex-direction: column; justify-content: center; align-items: center; gap: 4px !important; width: 100%; min-width: 0; min-height: 56px !important; max-height: none !important; height: 100% !important; margin: 0; padding: 10px 6px !important; border-radius: 16px !important; font-size: 14px !important; line-height: 1.3 !important; white-space: normal !important; overflow-wrap: anywhere; transform: none !important; }
.meal-photo-editor-compact .meal-photo-options > button > span { display: block; font-size: 12px; font-weight: 500; }
:root body.client-ops-page .meal-photo-editor-compact .meal-photo-options > button[hidden] { display: none !important; }
.meal-photo-editor-compact [data-photo-facts] { overflow-wrap: anywhere; }
.meal-photo-editor-compact [data-row-preview] { margin-top: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.meal-photo-editor-compact [data-photo-missing] [data-row-preview] { color: var(--fc-mint-ink); }
/* Barcode pilot: compact shared editor, only exposed after server admission. */
.fb-overlay { position: fixed; inset: 0; z-index: 15000; display: grid; place-items: center; background: #0006; padding: 12px; }
:root body.client-ops-page .fb-overlay { --surface: var(--fc-surface); --ink: var(--fc-ink); --line: var(--fc-line); --ink-soft: var(--fc-ink-2); }
.fb-panel { box-sizing: border-box; width: min(100%, 540px); max-height: 92dvh; overflow: auto; padding: 20px; border: 1px solid var(--line, var(--fc-line)); border-radius: 24px; background: var(--surface, var(--fc-surface, white)); color: var(--ink, var(--fc-ink)); font-family: Manrope, sans-serif; }
.fb-panel label { display: block; margin-block: 10px; }
.fb-panel .fl-input { display: block; width: 100%; min-width: 0; box-sizing: border-box; }
.fb-panel video { width: 100%; max-height: 200px; object-fit: cover; border-radius: 12px; }
.fb-panel pre { font: inherit; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.fb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.fb-panel .fb-primary { width: 100%; background: var(--ink, var(--fc-ink)); color: var(--surface, var(--fc-surface)); margin-top: 12px; }
.fb-panel [hidden] { display: none !important; }
.fb-panel details { margin-block: 8px; }
.fb-panel summary { cursor: pointer; padding-block: 12px; min-height: 44px; box-sizing: border-box; }
.fb-panel h3 { margin-block: 12px 6px; font-size: 18px; overflow-wrap: anywhere; }
.fb-panel .fb-primary { position: sticky; bottom: 0; min-height: 44px; }
.fb-overlay { padding-bottom: max(12px, env(safe-area-inset-bottom)); padding-top: max(12px, env(safe-area-inset-top)); }
.fb-panel .fb-confirm { display: flex; align-items: start; gap: 10px; }
.fb-status.is-busy::before { content: ''; display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line, var(--fc-line)); border-top-color: var(--ink, var(--fc-ink)); border-radius: 50%; animation: fb-spin 0.8s linear infinite; margin-right: 8px; }
@keyframes fb-spin { to { transform: rotate(360deg); } }
@media (max-width: 360px) { .fb-overlay { padding: 6px; } .fb-panel { padding: 12px; } }
.fb-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (min-width: 600px) { .fb-panel .fb-nutrients { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fa-attachment-overlay { display: block; pointer-events: none; background: transparent; padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
.fa-attachment-menu { position: fixed; pointer-events: auto; width: 248px; max-width: none; display: flex; flex-direction: column; gap: 0; padding: 6px; border-radius: 16px; overscroll-behavior: contain; }
.fa-attachment-menu > .fl-button { flex-shrink: 0; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: left; font: inherit; font-size: 14px; }
.fa-attachment-menu > .fl-button:hover { background: var(--line, var(--fc-line)); }
.fa-attachment-menu button:focus-visible { outline: 2px solid var(--ink, var(--fc-ink)); outline-offset: -2px; }
.fa-attachment-menu .fb-header { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-left: 12px; }
.fa-attachment-menu .fb-header button { width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font-size: 22px; }
.fa-attachment-menu [hidden] { display: none !important; }
.fa-attachment-menu h2 { font-size: 14px; margin: 0; }
.fa-attachment-menu .fl-muted { flex-shrink: 0; margin: 6px 12px; font-size: 12px; }
.fa-attachment-menu .fl-muted:empty { display: none; }
.fb-panel .fl-button { min-height: 44px; }
.fb-feed-card { box-sizing: border-box; width: 100%; max-width: 500px; min-width: 0; padding: 16px; border: 1px solid var(--fc-line); border-radius: 24px; background: var(--fc-surface); color: var(--fc-ink); font-family: Manrope, sans-serif; overflow-wrap: anywhere; }
.fb-feed-card h3 { margin: 10px 0; font-size: 18px; }
.fb-feed-card label { display: block; margin: 10px 0; }
.fb-feed-card .fl-input { display: block; box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; }
.fb-feed-card .fl-button, .fb-feed-card summary { min-height: 44px; }
.fb-feed-card .fb-primary { width: 100%; background: var(--fc-ink); color: var(--fc-surface); }
.fb-feed-card summary { cursor: pointer; padding: 10px 0; box-sizing: border-box; }
.fb-feed-card { display: grid; gap: 6px; padding: 12px; font-size: 14px; line-height: 1.4; }
.fb-feed-card h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.fb-feed-card p, .fb-feed-card label { margin: 0; }
.fb-feed-card .fl-muted { font-size: 12px; }
.fb-feed-card .fb-nutrients { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.fb-feed-card .fb-nutrients span, .fb-feed-card .fb-nutrients strong { display: block; }
.fb-feed-card .fb-nutrients span { font-size: 12px; }
.fb-feed-card .fb-nutrients strong { font-size: 14px; font-weight: 700; }
.fb-feed-card .fb-source { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fb-feed-card .fb-source > span { min-width: 0; }
.fb-feed-card .fl-button { box-sizing: border-box; margin: 0; border-radius: 999px; }
.fb-feed-card .fb-link { flex: none; border: 0; background: transparent; padding: 10px 8px; text-decoration: underline; }
.fb-feed-card .fb-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fb-feed-card .fb-presets:empty, .fb-feed-card .fb-status:empty { display: none; }
.fb-feed-card .fb-presets button { width: 100%; min-width: 0; padding: 6px; font-size: 12px; line-height: 1.3; }
.fb-feed-card .fb-portion { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.fb-feed-card .fb-portion .fl-input { margin-top: 3px; font: inherit; font-size: 16px; }
.fb-feed-card .fb-preview { padding-top: 18px; font-size: 13px; }
.fb-feed-card summary { display: list-item; min-height: 44px; padding: 12px 0; font-size: 13px; }
.fb-feed-card details > label { margin-bottom: 6px; }
.fb-feed-card .fb-receipt { font-weight: 700; }
.fb-feed-card .fb-link { color: var(--fc-mint-ink); }
.fb-scanner { position: relative; display: grid; gap: 12px; margin-block: 12px; }
.fb-scanner video { display: block; height: 200px; object-fit: cover; }
.fb-scanner:has(video[hidden]) .fb-scan-guides { display: none; }
.fb-scan-guides { position: absolute; left: 10%; right: 10%; top: 40px; height: 120px; border: 2px solid var(--ink, var(--fc-ink)); border-radius: 12px; pointer-events: none; overflow: hidden; }
.fb-scan-guides::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink, var(--fc-ink)); animation: fb-scan-line 2s ease-in-out infinite alternate; }
.fb-scan-caption { margin: 0; text-align: center; color: var(--ink-soft, var(--fc-ink-2)); }
@keyframes fb-scan-line { from { top: 8%; } to { top: 90%; } }
@media (prefers-reduced-motion: reduce) { .fb-scan-guides::after { animation: none; top: 50%; } .fb-status.is-busy::before { animation: none; } }
/* FatSecret confirmation uses the same disclosure as the nutrition assistant. */
:root body.client-ops-page .client-fs-import [hidden] { display: none !important; }
.client-fs-import [data-fs-consent] { display: grid; gap: 12px; margin-top: 16px; }
.client-fs-import [data-fs-consent] p,
.client-fs-import [data-fs-selection],
.client-fs-import [data-fs-status] { overflow-wrap: anywhere; }
.client-fs-import [data-fs-consent] a { color: var(--fc-mint-ink); }
.client-fs-import [data-fs-confirm] { justify-self: start; }
/* #244: CRM incident list. Narrow layout applies only to this open tab. */
.meal-diagnostics { color: var(--fc-ink, #1f252b); min-width: 0; }
.meal-diagnostics h2 { font-size: 20px; margin: 0 0 12px; }
.meal-diagnostics p { color: var(--fc-ink-2, #5b636b); line-height: 1.5; }
.meal-diagnostics-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 20px 0; }
.meal-diagnostics-filters label { display: grid; gap: 6px; font-size: 13px; min-width: 0; }
.meal-diagnostics-filters select { max-width: 100%; padding: 10px 12px; border: 1px solid var(--fc-line, #e7e9ec); border-radius: 12px; background: var(--fc-surface, #fff); color: inherit; font: inherit; }
.meal-diagnostics-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--fc-line, #e7e9ec); }
.meal-diagnostics-list li { display: grid; grid-template-columns: 1fr 1.2fr 1.6fr 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--fc-line, #e7e9ec); line-height: 1.5; }
.meal-diagnostics-list li > div { min-width: 0; overflow-wrap: anywhere; }
.meal-diagnostics-list code { display: block; font-size: 12px; }
.meal-diagnostics-list small, .meal-diagnostics-list time { color: var(--fc-ink-2, #5b636b); }
@media (max-width: 820px) {
  :root body.meal-diagnostics-open { min-width: 0 !important; }
  :root body.meal-diagnostics-open .ops-shell { display: block !important; min-width: 0 !important; padding: 12px !important; }
  :root body.meal-diagnostics-open .ops-rail { display: none !important; }
  :root body.meal-diagnostics-open .ops-main { margin: 0 !important; padding: 0 !important; min-width: 0 !important; }
  :root body.meal-diagnostics-open .ops-surface { padding: 12px !important; min-width: 0 !important; }
  body.meal-diagnostics-open .ops-admin-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  body.meal-diagnostics-open .ops-admin-tab { flex-shrink: 0; }
  .meal-diagnostics-list li { grid-template-columns: 1fr; gap: 10px; }
  .meal-diagnostics-filters { display: grid; grid-template-columns: 1fr; }
  .meal-diagnostics .ops-admin-pager { flex-wrap: wrap; }
}
