/* =========================================================
   Окошко — стили каркаса и экранов.
   Базовые токены и компоненты — в tokens.css (копия design/tokens.css, не править).
   ========================================================= */

.icon { flex-shrink: 0; display: block; }
@media (min-width: 768px) { .mobile-only { display: none !important; } }
body.is-modal-open { overflow: hidden; }

/* ---------- Кнопки: дополнения ---------- */
.btn--brand { background: var(--brand); color: var(--ink); border: 0; }
.btn--brand:hover { background: var(--accent); color: var(--ink); }
.btn--close { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink); }
.btn--close:hover { background: var(--segmented-bg); color: var(--ink); }
.btn--on-dark { background: transparent; border-color: var(--on-ink-border); color: var(--on-ink); font-weight: 600; }
.btn--on-dark:hover { background: var(--sidebar-hover); color: var(--on-ink); }
/* мелкие кнопки (36px) получают зону нажатия 44px на тач-экранах */
@media (pointer: coarse) {
  .btn--sm, .btn--close { min-height: var(--control-h); }
  .btn--close { min-width: var(--control-h); }
}

.chip { min-height: var(--control-h); }
.segmented__item { min-height: 36px; }
.dot--nail { background: var(--nail); }
.dot--brow { background: var(--brow); }
.dot--pedi { background: var(--pedi); }
.dot--other { background: var(--other); }
.tag--other { background: var(--other-bg); color: var(--other-ink); }
.tag--neutral { background: var(--surface-3); color: var(--ink); }

.toggle-wrap { display: inline-flex; }
/* визуально 46×28, зона нажатия 44px по высоте */
.toggle { outline-offset: 4px; }
.toggle::before { content: ""; position: absolute; inset: -8px -2px; }

/* ---------- Каркас приложения ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.app__sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.app__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app__content { flex: 1; min-width: 0; padding: 20px 24px; display: flex; flex-direction: column; gap: var(--s-4); }

.page-header { min-height: 56px; display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.page-header__titles { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: var(--s-1); }
.page-header__sub { font-size: 13px; color: var(--ink-3); }
.page-header__actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }

/* ---------- Сайдбар: дополнения ---------- */
.sidebar__logo:hover { color: inherit; }
.sidebar__link { min-height: var(--control-h); }
.sidebar__link:focus-visible, .sidebar__switcher:focus-visible, .sidebar__logo:focus-visible { outline-color: var(--sidebar-fg); }
.sidebar__switcher {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--control-h);
  background: var(--sidebar-hover); border: 1px solid var(--sidebar-border); color: var(--sidebar-fg);
  border-radius: var(--r-md); padding: 10px 12px; font-size: 13px; text-align: left;
}
.sidebar__switcher-mark { display: none; }
.sidebar__switcher-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar__switcher-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__switcher-meta { color: var(--sidebar-muted); font-size: 12px; }
.sidebar__box-label { color: var(--sidebar-muted); }
.sidebar__box-url { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Правая панель ---------- */
.side-panel {
  display: none; flex-direction: column; gap: 20px;
  width: var(--panel-w); flex-shrink: 0; padding: var(--s-6);
  background: var(--surface); border-left: 1px solid var(--border); overflow-y: auto;
}
.side-panel[data-open] { display: flex; }
.side-panel__head { display: flex; justify-content: space-between; align-items: center; }
.side-panel__body { display: flex; flex-direction: column; gap: 20px; flex: 1; }
@media (min-width: 1200px) {
  .side-panel { position: sticky; top: 0; height: 100vh; height: 100dvh; }
}

/* ---------- Нижняя таб-панель (телефон) ---------- */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding: 10px 8px var(--safe-bottom);
  background: var(--surface); border-top: 1px solid var(--border);
  align-items: flex-start; justify-content: space-around;
}
.tabbar__link {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 56px; min-height: 48px; font-size: 11px; font-weight: 600; color: var(--ink-4);
}
.tabbar__link[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tabbar__fab {
  display: grid; place-items: center; width: 52px; height: 52px; margin-top: -24px;
  border-radius: var(--r-xl); background: var(--accent); color: var(--surface);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}
.tabbar__fab:hover { color: var(--surface); background: var(--accent-ink); }

/* ---------- Модалка и тосты: дополнения ---------- */
.modal:focus { outline: none; }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.modal__body { display: flex; flex-direction: column; gap: var(--s-4); }
.modal__foot { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-2); }

.toasts {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  width: max-content; max-width: calc(100% - 32px); pointer-events: none;
}
.toasts .toast { position: static; transform: none; pointer-events: auto; box-shadow: var(--shadow-md); }
.toast--success { background: var(--success); }
.toast--error { background: var(--accent-ink); }

/* ---------- Календарь: дополнения (сетка «День») ---------- */
.cal__head-col { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-left: 1px solid var(--grid-line); }
.cal__head-text { display: flex; flex-direction: column; min-width: 0; }
.cal__head-name { font-size: 14px; font-weight: 700; }
.cal__head-meta { font-size: 12px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal__body { display: flex; padding: 10px 0 8px; }
.cal__gutter, .cal__col { height: calc(var(--rows, 11) * var(--hour-h)); }
.cal__hour { top: var(--top); color: var(--hour-label); }
.cal__col { border-left-color: var(--grid-line); background-image: repeating-linear-gradient(to bottom, var(--grid-line) 0, var(--grid-line) 1px, transparent 1px, transparent var(--hour-h)); }
.cal__now { top: var(--top); }
.cal__now-label { top: var(--top); }
.appt { top: var(--top); height: var(--h); cursor: pointer; }
.appt--break, .appt--free { cursor: default; }
.appt--free { cursor: pointer; }
.appt__service, .appt__client { display: block; }
.appt__badge--plain { background: none; padding: 0; }
.appt__note { margin-top: 6px; display: inline-block; }
.appt--no-show .appt__badge { background: none; padding: 0; color: var(--accent-ink); font-weight: 700; }
.cal-scroll { overflow-x: auto; }
.cal-scroll > .cal { min-width: 560px; }

/* ---------- Публичные страницы (онлайн-запись) ---------- */
.page-public { background: var(--bg); }
.public { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); }
.public__header { padding: 24px 20px 20px; background: var(--ink); color: var(--on-ink); border-radius: 0 0 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.public__brand { display: flex; align-items: center; gap: var(--s-3); }
.public__mark { width: 52px; height: 52px; border-radius: 16px; background: var(--brand); color: var(--ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 18px; flex-shrink: 0; }
.public__brand-text { display: flex; flex-direction: column; gap: 2px; }
.public__name { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.public__meta { font-size: 13px; color: var(--on-ink-2); }
.public__content { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.public__footer { padding: 16px 20px calc(24px + var(--safe-bottom)); background: var(--surface); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--s-2); }
.public__made { text-align: center; font-size: 11px; color: var(--ink-4); }
.public__made a { color: var(--accent-ink); }

/* ---------- Адаптив ---------- */
/* 768–1199: сайдбар из иконок, панель выезжает поверх */
@media (max-width: 1199px) {
  .side-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
    width: min(380px, 100%); box-shadow: var(--shadow-lg);
    animation: panel-in .18s ease-out;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .sidebar { width: var(--sidebar-w-compact); padding: 24px 12px; align-items: center; }
  .sidebar__logo { padding: 0; }
  .sidebar__logo-text, .sidebar__label, .sidebar__box, .sidebar__count, .sidebar__user-name,
  .sidebar__switcher-text, .sidebar__switcher > .icon { display: none; }
  .sidebar__switcher { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .sidebar__switcher-mark { display: block; font-weight: 700; font-size: 15px; }
  .sidebar__nav { align-items: center; }
  .sidebar__link { width: 48px; height: 48px; padding: 0; justify-content: center; }
}
/* < 768: нижняя таб-панель вместо сайдбара */
@media (max-width: 767px) {
  .app__sidebar { display: none; }
  .tabbar { display: flex; }
  .app__content { padding: 20px 20px calc(var(--tabbar-h) + 20px + var(--safe-bottom)); }
  .toasts { bottom: calc(var(--tabbar-h) + 12px + var(--safe-bottom)); }
  .side-panel { width: 100%; border-left: 0; }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot > .btn { width: 100%; }
  .page-header__actions { width: 100%; }
}
@keyframes panel-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .side-panel { animation: none; } }

/* ---------- Формы: дополнения ---------- */
[x-cloak] { display: none !important; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--control-h); font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.alert { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 16px; font-size: 14px; font-weight: 600; }
.alert--error { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); }
.form-narrow { max-width: 440px; }

/* Выбор радиокнопкой, оформленный как чип или карточка */
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.chip.choice:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.choice-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.team-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.team-card { min-height: 64px; padding: 10px 16px; display: flex; flex-direction: column; justify-content: center; gap: 2px; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--r-lg); }
.team-card:has(input:checked) { border-color: var(--ink); }
.team-card__title { font-size: 14px; font-weight: 700; }
.team-card__sub { font-size: 12px; color: var(--ink-3); }

/* ---------- Вход и регистрация (Auth.dc.html) ---------- */
.auth { display: flex; min-height: 100vh; min-height: 100dvh; }
.auth__main { flex: 0 0 min(720px, 100%); padding: 40px 64px; display: flex; flex-direction: column; }
.auth__logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.auth__logo:hover { color: inherit; }
.auth__card { margin: auto 0; width: min(440px, 100%); padding: 32px 0; display: flex; flex-direction: column; gap: 20px; }
.auth__tabs { display: flex; border-radius: var(--r-lg); }
.auth__tabs .segmented__item { flex: 1; min-height: var(--control-h); display: grid; place-items: center; font-size: 14px; font-weight: 700; border-radius: 11px; }
.auth__intro { display: flex; flex-direction: column; gap: var(--s-2); }
.auth__title { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.auth__lead { font-size: 15px; color: var(--ink-3); line-height: 1.5; }
.auth__form { display: flex; flex-direction: column; gap: var(--s-4); }
.auth__form .input { height: 50px; font-size: 15px; }
.auth__actions { display: flex; flex-direction: column; gap: var(--s-2); }
.auth__link, .auth__legal a, .auth__lead a { color: var(--accent-ink); font-weight: 700; }
.auth__link { align-self: center; min-height: var(--control-h); display: inline-flex; align-items: center; }
.auth__legal { font-size: 12px; color: var(--ink-4); line-height: 1.5; }
.auth__hr { border: 0; border-top: 1px solid var(--border-strong); margin: 0; }
.auth__promo {
  flex: 1; margin: 16px; border-radius: 28px; background: var(--ink); color: var(--on-ink);
  padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 28px;
  position: relative; overflow: hidden;
}
.auth__promo-circle { position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: var(--sidebar-hover); }
.auth__promo-title { position: relative; font-family: var(--font-display); font-weight: 500; font-size: 34px; line-height: 1.2; letter-spacing: -0.02em; max-width: 520px; }
.auth__promo-list { position: relative; display: flex; flex-direction: column; gap: 12px; width: min(420px, 100%); }
.auth__note { background: var(--sidebar-hover); border-radius: var(--r-xl); padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.auth__note--light { background: var(--bg); color: var(--ink); }
.auth__note--shift { margin-left: 40px; }
.auth__note-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--r-md); background: var(--sidebar-border); color: var(--brand); display: grid; place-items: center; font-weight: 700; }
.auth__note-icon--success { background: var(--success-soft); color: var(--success); }
.auth__note-text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--on-ink-2); }
.auth__note--light .auth__note-text { color: var(--ink-3); }
.auth__note-text b { font-size: 14px; color: inherit; }
.auth__note--light .auth__note-text b { color: var(--ink); }
.auth__note:not(.auth__note--light) .auth__note-text b { color: var(--on-ink); }
@media (max-width: 1023px) {
  .auth__promo { display: none; }
  .auth__card { margin: 0; padding-top: 24px; }
  .auth__main { flex: 1; padding: 24px 20px; align-items: center; }
  .auth__logo { align-self: flex-start; }
  .auth__title { font-size: 24px; }
}

/* ---------- Сайдбар: пользователь ---------- */
.sidebar__user { display: flex; align-items: center; gap: var(--s-2); padding: 0 4px 0 8px; margin-top: -12px; }
.sidebar__box + .sidebar__user { margin-top: -12px; }
.sidebar__nav + .sidebar__user { margin-top: auto; }
.sidebar__user-name { flex: 1; min-width: 0; font-size: 13px; color: var(--sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__logout { width: var(--control-h); height: var(--control-h); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--sidebar-text); display: grid; place-items: center; }
.sidebar__logout:hover { background: var(--sidebar-hover); color: var(--sidebar-fg); }
.sidebar__logout:focus-visible { outline-color: var(--sidebar-fg); }
a.sidebar__switcher:hover { color: var(--sidebar-fg); border-color: var(--sidebar-muted); }

/* ---------- Стартовая страница и выбор workspace ---------- */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s-4); align-items: start; }
.home-link { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: var(--s-2); font-size: 14px; font-weight: 600; }
.steps a { color: var(--accent-ink); }
.ws-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ws-list__item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); min-height: 60px; padding: var(--s-2) 0; border-bottom: 1px solid var(--divider); }
.ws-list__item:last-child { border-bottom: 0; }
.ws-list__text { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; }
.ws-list__actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.ws-list__name { font-weight: 700; }

/* ---------- Общие блоки экранов ---------- */
.empty { text-align: center; display: flex; flex-direction: column; gap: var(--s-2); padding: 40px 24px; color: var(--ink-3); }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.section-head__actions { display: flex; gap: var(--s-1); flex-wrap: wrap; }
.link-accent { color: var(--accent-ink); font-weight: 700; }
.settings-box { background: var(--surface-2); border-radius: var(--r-lg); padding: 6px 16px; display: flex; flex-direction: column; }
.settings-list { display: flex; flex-direction: column; font-size: 14px; }
.settings-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); min-height: 56px; border-bottom: 1px solid var(--divider); font-size: 14px; }
.settings-row:last-child { border-bottom: 0; }
.settings-row__control { flex-shrink: 0; min-width: 150px; }
.settings-row__control .select { height: 40px; }
.toggle:disabled { opacity: .5; cursor: not-allowed; }
.segmented--radio { background: var(--surface-3); border-radius: var(--r-sm); padding: 3px; }
.segmented--radio .segmented__item { display: grid; place-items: center; min-height: 38px; padding: 6px 12px; border-radius: 8px; }
.segmented--radio .segmented__item:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.note-success { background: var(--success-soft); color: var(--success-ink); border-radius: var(--r-lg); padding: 14px 16px; font-size: 13px; line-height: 1.5; }
.link-card { background: var(--ink); color: var(--on-ink); border-radius: var(--r-lg); padding: 14px 16px; display: flex; align-items: center; gap: var(--s-3); }
.link-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.link-card__label { font-size: 12px; color: var(--on-ink-2); }
.link-card__url { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- Услуги (Services.dc.html) ---------- */
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); align-content: start; }
.service-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 8px 18px 8px 8px; display: flex; align-items: center; gap: 14px; }
.service-card--selected { border-color: var(--ink); }
.service-card__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: var(--r-md); min-height: var(--control-h); }
.service-card__main:hover { background: var(--surface-2); }
.service-card__name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.service-card__meta { font-size: 13px; color: var(--ink-3); }
.service-card__price { font-size: 16px; font-weight: 700; white-space: nowrap; }
.panel-form { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.panel-form__actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--s-2); }
/* в панели 340 px две крупные кнопки не помещались в строку — 48 px и узкие отступы (как в Main.dc.html),
   а если всё равно тесно — перенос, а не горизонтальная прокрутка */
.panel-form__actions > .btn { flex: 1 1 auto; padding-left: 16px; padding-right: 16px; }
.panel-form__actions > .btn--lg { height: 48px; font-size: 14px; border-radius: var(--r-md); }
.side-panel__body { min-width: 0; }
.ui-kv__row > * { min-width: 0; }
.side-panel__body > .panel-form { min-height: 100%; }
.category-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) 150px auto auto; gap: var(--s-2); align-items: center; }
.category-row__error { grid-column: 2 / -1; }
.category-new { padding-top: var(--s-2); border-top: 1px solid var(--divider); }

/* ---------- Расписание (Schedule.dc.html) ---------- */
.staff-tabs { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.staff-tab { height: 52px; border-radius: var(--r-lg); border: 1px solid var(--border-strong); background: var(--surface); padding: 0 16px 0 8px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.staff-tab--active { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.staff-tab--off { opacity: .6; }
.staff-tab--add { border-style: dashed; border-color: var(--dashed); background: transparent; color: var(--ink-3); padding: 0 16px; }
.schedule-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 20px; align-items: start; }
.hours { display: flex; flex-direction: column; }
.hours-row { display: flex; align-items: center; gap: var(--s-4); min-height: 62px; padding: 8px 0; border-bottom: 1px solid var(--divider); flex-wrap: wrap; }
.hours-row__day { width: 120px; font-size: 15px; font-weight: 700; }
.hours-row__times { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font-size: 14px; }
.hours-row__break { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hours-row__error { flex-basis: 100%; margin: 0; }
.input--time { width: auto; height: 40px; border-radius: var(--r-sm); padding: 0 10px; font-weight: 600; }
.tag--button { border: 0; min-height: 32px; color: var(--ink-3); padding: 6px 12px; font-size: 13px; }
.tag--button:hover { background: var(--segmented-bg); }
.time-off { margin-top: 14px; padding: 16px; gap: var(--s-3); }
.time-off__head { display: flex; align-items: center; gap: 14px; }
.time-off__icon { color: var(--success); }
.time-off__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.time-off__title { font-size: 14px; font-weight: 700; }
.time-off__list { list-style: none; margin: 0; padding: 0 0 0 34px; display: flex; flex-direction: column; font-size: 14px; }
.time-off__item { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); }
@media (max-width: 1199px) {
  .schedule-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .service-grid { grid-template-columns: minmax(0, 1fr); }
  .hours-row { gap: var(--s-3); }
  .hours-row__day { width: auto; flex: 1; }
  .hours-row__times { flex-basis: 100%; }
  .category-row { grid-template-columns: 10px minmax(0, 1fr) auto auto; }
  .category-row .select { grid-column: 2 / -1; grid-row: 2; }
  .settings-row { flex-wrap: wrap; padding: 8px 0; }
}

/* ---------- Доступ сотрудника и приглашение ---------- */
.access { padding: 14px 16px; gap: var(--s-3); }
.access__title { font-size: 14px; font-weight: 700; }
.access__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.access__text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.invite-email { font-size: 15px; font-weight: 700; }

/* ---------- Клиенты: список (Clients.dc.html) ---------- */
.clients-search .search { max-width: 420px; }
.card--flush { padding: 0; overflow: visible; }
.clients { border-radius: var(--r-xl); }
.clients__head, .clients__row {
  display: grid; grid-template-columns: 2.2fr 1.4fr 1.3fr .8fr 1.1fr 1.5fr 44px;
  gap: 12px; align-items: center; padding: 0 20px;
}
.clients__head { min-height: 46px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--ink-4); text-transform: uppercase; letter-spacing: .04em; }
.clients__sort { color: inherit; min-height: 44px; display: inline-flex; align-items: center; }
.clients__sort--active { color: var(--ink); }
.clients__row { min-height: 60px; border-bottom: 1px solid var(--divider); font-size: 14px; }
.clients__name { display: flex; align-items: center; gap: 12px; font-weight: 600; min-height: 44px; min-width: 0; }
.clients__cell { color: var(--ink-2); }
.clients__num { font-weight: 600; color: var(--ink); }
.clients__label { display: none; }
.clients__tags { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.clients__menu { position: relative; justify-self: end; }
.clients__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 14px 20px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 6px; display: flex; flex-direction: column; }
.menu__item { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); border: 0; background: none; font-size: 14px; font-weight: 600; text-align: left; }
.menu__item:hover { background: var(--surface-2); }
.menu__item--danger { color: var(--accent-ink); }
.menu--start { left: 0; right: auto; }
.menu__item--two-line { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 8px 12px; }
.pager { display: flex; gap: 6px; align-items: center; }
.pager__item { min-width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; font-weight: 600; color: var(--ink); padding: 0 10px; }
.pager__item--active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 700; }
.pager__gap { color: var(--ink-4); }
@media (pointer: coarse) { .pager__item { min-width: var(--control-h); height: var(--control-h); } }

/* ---------- Клиенты: карточка (Client.dc.html) ---------- */
.breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-4); flex-wrap: wrap; }
.breadcrumbs a { font-weight: 600; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }
.client-head { display: flex; gap: var(--s-6); align-items: flex-start; padding: 28px; }
.client-head__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.client-head__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.write-menu { position: relative; }
.client-contact { display: flex; flex-direction: column; gap: 10px; }
.client-contact--edit { gap: var(--s-3); max-width: 640px; }
.client-contact__title { display: flex; align-items: center; gap: var(--s-2); }
.client-contact__line { display: flex; gap: 8px 20px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.client-contact__line a { color: inherit; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.client-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag--removable { gap: 4px; padding-right: 4px; }
.tag__remove { border: 0; background: none; width: 22px; height: 22px; border-radius: 50%; color: inherit; font-size: 15px; line-height: 1; display: grid; place-items: center; opacity: .7; }
.tag__remove:hover { opacity: 1; background: rgba(28, 27, 25, .08); }
@media (pointer: coarse) { .tag__remove { width: 32px; height: 32px; } }
.tag-form { display: flex; gap: 6px; align-items: center; }
.input--small { height: 36px; width: 180px; border-radius: var(--r-sm); }
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.kpi-row .card { padding: 18px 20px; border-radius: var(--r-lg); }
.kpi__delta--warn { color: var(--accent-ink); }
.client-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.segmented--small .segmented__item { padding: 6px 12px; font-size: 12px; min-height: 32px; }
.history { display: flex; flex-direction: column; }
.history__row { display: flex; align-items: center; gap: var(--s-4); padding: 14px 16px; border-bottom: 1px solid var(--grid-line); }
.history__row--upcoming { background: var(--surface-2); border-radius: var(--r-lg); border-bottom: 0; }
.history__row--muted { opacity: .65; }
.history__date { width: 56px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.history__day { font-size: 20px; font-weight: 700; }
.history__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.history__service { font-size: 15px; font-weight: 600; color: var(--ink); }
.history__sum { width: 90px; text-align: right; font-weight: 700; white-space: nowrap; }
.birthday { display: flex; flex-direction: column; gap: 10px; }
.birthday__eyebrow { color: var(--success-soft); }
.birthday__date { font-size: 17px; font-weight: 700; line-height: 1.35; }
.notes { font-size: 14px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.fav { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.fav__row { display: flex; justify-content: space-between; gap: var(--s-2); }
.bar { height: 6px; border-radius: 3px; background: var(--surface-3); }
.bar__fill { display: block; height: 6px; border-radius: 3px; width: var(--w); }

/* ---------- Импорт ---------- */
.import-grid { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 20px; align-items: start; }
.import-hint { padding: 14px 16px; gap: 6px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.table-scroll { overflow-x: auto; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview-table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-4); text-transform: uppercase; letter-spacing: .04em; padding: 8px; border-bottom: 1px solid var(--border); }
.preview-table td:nth-child(3), .preview-table td:nth-child(5) { white-space: nowrap; }
.preview-table td { padding: 8px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.preview-table__skip td { color: var(--ink-4); }
.preview-table__warn { display: block; margin-top: 4px; }
.import-log { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }

@media (max-width: 1199px) {
  .client-grid, .import-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .clients__head { display: none; }
  .clients__row {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
    grid-template-areas: "name name menu" "phone last last" "visits spent spent" "tags tags tags";
    gap: 0 12px; padding: 8px 12px 10px 16px; font-size: 13px;
  }
  .clients__name { grid-area: name; font-size: 14px; }
  .clients__menu { grid-area: menu; }
  .clients__phone { grid-area: phone; padding-left: 48px; }
  .clients__last { grid-area: last; }
  .clients__visits { grid-area: visits; padding-left: 48px; font-weight: 500; }
  .clients__spent { grid-area: spent; font-weight: 500; }
  .clients__tags { grid-area: tags; padding-left: 48px; }
  .clients__tags:empty { display: none; }
  .clients__label { display: inline; color: var(--ink-4); font-weight: 500; }
  .client-head { flex-direction: column; padding: 20px; gap: var(--s-4); }
  .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .history__row { padding: 12px 8px; gap: var(--s-3); flex-wrap: wrap; }
  .history__sum { width: auto; }
}

/* ---------- Календарь (Main.dc.html) ---------- */
.calendar { display: flex; flex-direction: column; gap: var(--s-4); }
.text-success { color: var(--success); font-weight: 700; }
.segmented a.segmented__item { display: grid; place-items: center; min-height: 36px; }
.cal__head-col--today .cal__head-name { color: var(--accent-ink); }
.cal__head-text { color: inherit; }
.cal__col { cursor: cell; }
.cal__col--off { background-color: var(--surface-2); cursor: not-allowed; }
.cal__closed { position: absolute; left: 0; right: 0; top: var(--top); height: var(--h); background: var(--surface-2); cursor: not-allowed; }
.cal__off-label { position: absolute; top: 12px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-4); pointer-events: none; }
.appt { cursor: pointer; display: flex; flex-direction: column; align-items: stretch; }
.appt--compact { padding-top: 4px; padding-bottom: 4px; }
.appt--compact .appt__time { font-weight: 600; }
.appt__time > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt__client, .appt__service { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt__mark { flex-shrink: 0; font-weight: 700; }
.appt__time > .appt__badge { flex-shrink: 0; }
.appt__paid { margin-top: auto; font-size: 11px; font-weight: 700; opacity: .75; }
.appt--break, .appt--off { cursor: default; flex-direction: row; }
.appt--off { color: var(--accent-ink); }
.appt:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 2; }
.cal__now { z-index: 3; }
.cancelled-list { padding: 14px 20px; }
.cancelled-list summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.cancelled-list ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.link-button { border: 0; background: none; padding: 6px 0; text-align: left; font-size: 14px; color: var(--ink-2); min-height: 36px; }
.link-button:hover { color: var(--accent-ink); }

/* список дня (телефон, «Сегодня») — Mobile.dc.html */
.cal-list { display: none; flex-direction: column; gap: var(--s-3); }
.cal-list__day, .today__list { display: flex; flex-direction: column; gap: var(--s-2); }
.list-row { display: flex; align-items: center; gap: var(--s-3); width: 100%; background: var(--surface); border: 0; border-radius: 16px; padding: 12px 14px; text-align: left; min-height: 60px; }
.list-row:hover { background: var(--surface-2); }
.list-row--muted, .list-row--done { opacity: .6; }
.list-row__time { width: 48px; flex-shrink: 0; font-size: 14px; font-weight: 700; }
.list-row__bar { width: 4px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }
.list-row__bar--free { background: var(--border-strong); }
.list-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.list-row__name { font-size: 14px; font-weight: 600; }
.list-row__status { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ink-3); }
.list-row__status--now { color: var(--accent-ink); }
.list-row__status--ok { color: var(--success); }
.list-row--break { background: transparent; min-height: 44px; }
.cal-list__empty { padding: 12px 4px; }

/* правая панель записи */
.appt-panel { display: flex; flex-direction: column; gap: 20px; flex: 1; }
.appt-panel__client { display: flex; gap: 14px; align-items: center; }
.appt-panel__who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.appt-panel__who a[href^="tel"] { color: inherit; }
.appt-panel__paid { align-self: center; padding: 10px 14px; }
.btn--light { background: var(--bg); color: var(--ink); }
.btn--light:hover { background: var(--surface); color: var(--ink); }

/* модалка новой записи: выбор клиента */
.picked { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: var(--control-h); padding: 0 6px 0 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); }
.picked__name { font-weight: 700; }
.picker { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--border); border-radius: var(--r-md); display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; }
.picker__item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; border-radius: var(--r-sm); padding: 6px 8px; text-align: left; min-height: 48px; }
.picker__item:hover, .picker__item:focus-visible { background: var(--surface-2); }
.picker__text { display: flex; flex-direction: column; }

/* «Сегодня» */
.today { display: flex; flex-direction: column; gap: var(--s-4); max-width: 640px; }
.today__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); }
.today__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.today__kpi { background: var(--surface); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.today__kpi b { font-size: 18px; }
.today__next { border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.today__next-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); }
.today__eyebrow { color: var(--brand); }
.today__online { background: var(--sidebar-hover); }
.today__next-title { font-family: var(--font-display); font-size: 22px; font-weight: 500; }
.today__next-meta { font-size: 14px; color: var(--sidebar-text); }
.today__next-note { font-size: 13px; color: var(--on-ink-2); }

@media (max-width: 767px) {
  .cal-desktop { display: none; }
  .cal-list { display: flex; }
  .calendar .page-header__actions { gap: 6px; }
  .calendar .page-header__actions .btn--primary { flex: 1; }
}

/* ---------- Онлайн-заявка в календаре ---------- */
.appt--pending { outline: 1.5px dashed var(--ink-3); outline-offset: -3px; opacity: .92; }
.appt--pending.appt--selected { outline: 2px solid var(--ink); outline-offset: 1px; }
.alert--pending { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Публичная онлайн-запись (Booking.dc.html) ---------- */
.public__about { font-size: 13px; color: var(--on-ink-2); line-height: 1.5; }
.pub-service { background: var(--sidebar-hover); border-radius: 16px; padding: 14px; display: flex; align-items: center; gap: var(--s-3); }
.pub-service__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pub-service__label { font-size: 12px; color: var(--on-ink-2); }
.pub-service__name { font-size: 15px; font-weight: 700; }
.pub-service__meta { font-size: 13px; color: var(--sidebar-text); }
.pub-h { font-size: 14px; font-weight: 700; }
.picker-steps { display: flex; flex-direction: column; gap: 20px; }
.pub-chip { flex: 1 1 auto; justify-content: center; min-height: 48px; border-radius: var(--r-lg); font-size: 14px; }
.day-strip { display: flex; gap: var(--s-2); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-strip .day { flex: 0 0 52px; scroll-snap-align: start; color: var(--ink); }
a.day:hover { border-color: var(--ink); color: var(--ink); }
.day[aria-pressed="true"]:hover { color: #FFFFFF; }
.slot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.pub-note { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.45; color: var(--ink-3); }
.pub-note .icon { color: var(--success); margin-top: 1px; }
.pub-cta { position: sticky; bottom: 0; margin: 0 -20px; padding: 16px 20px calc(16px + var(--safe-bottom)); background: var(--surface); border-top: 1px solid var(--border); z-index: 5; }
.pub-cta .btn:disabled { background: var(--ink-disabled); opacity: 1; }
.svc-row { display: flex; align-items: center; gap: var(--s-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; color: var(--ink); min-height: 64px; }
.svc-row:hover { border-color: var(--ink); color: var(--ink); }
.svc-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.svc-row__name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.svc-row__price { font-weight: 700; white-space: nowrap; }
.pub-summary { background: var(--surface); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.pub-summary__when { font-size: 16px; font-weight: 700; }
.pub-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-2); padding: 12px 0; }
.pub-done__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; }
.check--top { align-items: flex-start; font-weight: 500; font-size: 13px; line-height: 1.45; }
.check--top input { margin-top: 1px; flex-shrink: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Напоминания и Telegram ---------- */
.reminder-row { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.reminder-row__dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-4); }
.reminder-row__dot--sent { background: var(--success-soft); color: var(--success); }
.reminder-row__dot--failed { background: var(--accent-soft); }
.btn--telegram { background: var(--ink); color: var(--on-ink); }
.btn--telegram:hover { color: var(--on-ink); background: var(--sidebar-hover); }
.tg-connect { display: flex; align-items: center; gap: var(--s-3); color: var(--ink); }
.tg-connect .icon { color: var(--success); }
.tg-connect__text { display: flex; flex-direction: column; gap: 2px; }

/* ---------- Витрина /dev/ui/ (только DEBUG) ---------- */
.ui-section { display: flex; flex-direction: column; gap: var(--s-4); }
.ui-section + .ui-section { margin-top: var(--s-4); }
.ui-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.ui-stack { display: flex; flex-direction: column; gap: var(--s-3); }
.ui-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-4); }
.ui-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s-3); }
.ui-swatch { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.ui-swatch__chip { height: 48px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--swatch); }
.ui-swatch__name { font-weight: 700; }
.ui-label-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: var(--control-h); }
.ui-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); max-width: 420px; }
.ui-days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-2); max-width: 420px; }
.ui-kv { background: var(--surface-2); border-radius: var(--r-lg); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); font-size: 14px; }
.ui-kv__row { display: flex; justify-content: space-between; gap: var(--s-3); }
.ui-kv__key { color: var(--ink-4); }
.ui-kv__val { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.ui-stack--tight { gap: 3px; }
.ui-grow { flex: 1; }
.ui-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
/* кнопки в две колонки (статусы в панели записи): колонка ~140 px — узкие отступы, а длинный
   текст («Снять подтверждение») переносится внутри кнопки, а не вылезает за её рамку */
.ui-grid-2 > .btn {
  padding: 8px 12px; height: auto; min-height: var(--control-h);
  white-space: normal; line-height: 1.2; text-align: center;
}

/* ---------- Отчёты ---------- */
.reports { display: flex; flex-direction: column; gap: 20px; }
.reports-kpis .kpi__value { font-size: 28px; }
.kpi__delta--muted { color: var(--ink-4); }
.card--dark .kpi__delta--warn { color: var(--brand); }
.card--dark .kpi__delta--muted { color: var(--on-ink-2); }
.reports-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.reports-grid--single { grid-template-columns: minmax(0, 1fr); }
.reports-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.legend__item { display: flex; align-items: center; gap: 6px; }
.legend__dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* столбики: высота стопки — --p (% от самого высокого), части стопки — flex-grow --f */
.chart {
  list-style: none; margin: 20px 0 0; padding: 0 8px; height: 280px;
  display: flex; align-items: stretch; gap: 28px;
  border-bottom: 1px solid var(--border);
  background-image: repeating-linear-gradient(to top, var(--grid-line) 0, var(--grid-line) 1px, transparent 1px, transparent 70px);
}
.chart--week { gap: 16px; }
.chart--year { gap: 10px; }
.chart__col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; position: relative; }
.chart__total { font-size: 13px; font-weight: 700; white-space: nowrap; }
.chart--year .chart__total { font-size: 11px; }
.chart__stack {
  width: 100%; max-width: 88px; height: calc((100% - 30px) * var(--p) / 100); min-height: 2px;
  display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 6px 6px 0 0; overflow: hidden;
  background: var(--grid-line);
}
.chart__seg { flex: var(--f) 1 0; min-height: 2px; }
.chart__label { position: absolute; bottom: -26px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-4); white-space: nowrap; }
.reports-chart { padding-bottom: 44px; }

.reports-lost { display: flex; flex-direction: column; gap: 14px; }
.lost-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lost-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grid-line); }
.lost-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.lost-row__name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.winback { background: var(--accent-soft); border-radius: var(--r-lg); padding: var(--s-4); display: flex; flex-direction: column; gap: 10px; }
.winback__text { font-size: 13px; line-height: 1.5; color: var(--accent-ink); overflow-wrap: anywhere; }
.reports-locked { align-items: center; max-width: 560px; }
.reports-locked__icon { width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--surface-3); color: var(--ink-3); display: grid; place-items: center; }

@media (max-width: 1199px) {
  .reports-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  /* выручка и неявки — во всю ширину, «Записей» и «Средний чек» — рядом */
  .reports-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .reports-kpis .card { padding: 14px 16px; }
  .reports-kpis__main, .reports-kpis .card:last-child { grid-column: 1 / -1; }
  .reports-kpis .kpi__value { font-size: 22px; }
  .reports-kpis__main .kpi__value { font-size: 28px; }
  .reports-kpis .kpi__delta { font-size: 12px; }
  .reports__export { flex-basis: 100%; }
  /* график на телефоне — горизонтальные полосы: подпись · полоса · сумма */
  .chart { height: auto; margin-top: 16px; padding: 0; flex-direction: column; gap: 10px; border: 0; background: none; }
  .chart__col { flex-direction: row; justify-content: flex-start; padding: 0; gap: 10px; position: static; }
  .chart__label { position: static; order: -1; width: 44px; flex-shrink: 0; text-align: left; }
  .chart__label-month { display: none; }
  .chart__stack { order: 0; max-width: none; height: 14px; width: calc((100% - 150px) * var(--p) / 100); flex-direction: row; border-radius: 0 4px 4px 0; }
  .chart__seg { min-height: 0; min-width: 2px; }
  .chart__total, .chart--year .chart__total { order: 1; font-size: 12px; }
  .reports-chart { padding-bottom: var(--s-6); }
}

/* ---------- Лендинг (Landing.dc.html) ---------- */
.landing { max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; min-height: 100vh; }
.landing__header { min-height: 84px; padding: 0 80px; display: flex; align-items: center; gap: 40px; }
.landing__logo { display: flex; align-items: center; gap: 10px; flex: 1; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.landing__logo:hover { color: var(--ink); }
.landing__nav { display: flex; gap: 32px; font-size: 15px; font-weight: 600; }
.landing__nav a { min-height: var(--control-h); display: inline-flex; align-items: center; }
.landing__nav a[aria-current="page"] { color: var(--accent-ink); }
.landing__short { display: none; }
.landing__header-actions { display: flex; gap: 10px; }
.landing-pill { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 7px 14px; font-size: 13px; font-weight: 700; }
.landing-pill--lg { padding: 10px 18px; font-size: 15px; font-weight: 600; }

.landing-hero { padding: 56px 80px 64px; display: flex; gap: 56px; align-items: center; }
.landing-hero__text { width: 560px; flex-shrink: 0; display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.landing-hero__lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.landing-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.landing-hero__note { font-size: 14px; color: var(--ink-3); }
.landing-hero__visual { flex: 1; min-width: 0; position: relative; padding: 0 0 40px 0; }
.hero-cal { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-height: 460px; }
.hero-cal__head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.hero-cal__date { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.hero-cal__free { font-size: 12px; font-weight: 700; color: var(--success); }
.hero-cal__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hero-cal__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hero-cal__name { font-size: 12px; font-weight: 700; color: var(--ink-4); }
.hero-cal__gap { height: 30px; }
.hero-cal__item { height: 46px; border-radius: var(--r-sm); padding: 8px 10px; font-size: 12px; font-weight: 600; overflow: hidden; }
.hero-cal__item--m { height: 70px; }
.hero-cal__item--l { height: 96px; }
.hero-cal__item--nail { background: var(--nail-bg); color: var(--nail-ink); }
.hero-cal__item--brow { background: var(--brow-bg); color: var(--brow-ink); }
.hero-cal__item--pedi { background: var(--pedi-bg); color: var(--pedi-ink); }
.hero-cal__item--free { border: 1.5px dashed var(--dashed); color: var(--ink-3); }
.hero-cal__item--break { color: var(--ink-4); background-image: repeating-linear-gradient(45deg, var(--muted-block) 0, var(--muted-block) 6px, var(--surface-2) 6px, var(--surface-2) 12px); }
.hero-booking { position: absolute; left: -40px; bottom: 0; width: 290px; background: var(--ink); color: var(--on-ink); border-radius: var(--r-2xl); padding: 18px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 10px; }
.hero-booking__eyebrow { font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }
.hero-booking__service { font-size: 16px; font-weight: 700; }
.hero-booking__slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; font-size: 13px; font-weight: 700; }
.hero-booking__slots span { height: 34px; border-radius: 9px; background: var(--sidebar-hover); display: grid; place-items: center; }
.hero-booking__slots .hero-booking__slot--active { background: var(--on-ink); color: var(--ink); }

.landing-spheres { padding: 0 80px 72px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.landing-spheres__title { font-size: 14px; font-weight: 700; color: var(--ink-3); }
.landing-spheres__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.landing-section { padding: 40px 80px 88px; display: flex; flex-direction: column; gap: 40px; }
.landing-section--center { align-items: center; padding-top: 96px; }
.landing-section__title { max-width: 760px; }
.landing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: 100%; }
.landing-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl); padding: 28px; display: flex; flex-direction: column; gap: 14px; min-height: 220px; }
.landing-card__num { width: 48px; height: 48px; border-radius: var(--r-lg); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.landing-card__title { font-size: 20px; font-weight: 700; }
.landing-card__text { font-size: 15px; line-height: 1.55; color: var(--ink-2); }

.landing-steps { margin: 0 32px; background: var(--ink); color: var(--on-ink); border-radius: 32px; padding: 72px 48px; display: flex; flex-direction: column; gap: 40px; }
.landing-steps__list { list-style: none; margin: 0; padding: 0; }
.landing-step { background: var(--sidebar-hover); border-radius: var(--r-2xl); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.landing-step__num { font-family: var(--font-display); font-size: 40px; color: var(--brand); line-height: 1; }
.landing-step__title { font-size: 20px; font-weight: 700; }
.landing-step__text { font-size: 15px; color: var(--on-ink-2); line-height: 1.55; }

.plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.plan--featured { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.plan__badge { position: absolute; top: 28px; right: 28px; font-size: 12px; font-weight: 700; background: var(--brand); color: var(--ink); border-radius: var(--r-pill); padding: 5px 12px; }
.plan__name { font-size: 18px; font-weight: 700; }
.plan__price { font-family: var(--font-display); font-size: 40px; font-weight: 500; }
.plan__per { font-family: var(--font-body); font-size: 16px; color: var(--ink-4); }
.plan--featured .plan__per, .plan--featured .plan__lead { color: var(--on-ink-2); }
.plan__lead { font-size: 14px; color: var(--ink-3); }
.plan__items { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.plan__item { display: flex; gap: 8px; align-items: flex-start; }
.plan__item .icon { flex-shrink: 0; margin-top: 3px; color: var(--success); }
.plan--featured .plan__item .icon { color: var(--brand); }
.plan__item--soon { color: var(--ink-4); }
.plan__soon { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-3); border-radius: var(--r-pill); padding: 2px 8px; margin-left: 4px; white-space: nowrap; }
.plan__cta { margin-top: auto; }

.landing-faq { flex-direction: row; gap: 56px; padding-top: 0; padding-bottom: 80px; }
.landing-faq__title { width: 400px; flex-shrink: 0; }
.landing-faq__list { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.faq { border-bottom: 1px solid var(--border-strong); padding: 22px 0; }
.faq__q { font-size: 18px; font-weight: 700; cursor: pointer; min-height: var(--control-h); display: flex; align-items: center; }
.faq__a { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

.landing-cta { margin: 0 32px; background: var(--accent); color: #FFFFFF; border-radius: 32px; padding: 64px; display: flex; align-items: center; gap: 40px; }
.landing-cta__title { flex: 1; font-family: var(--font-display); font-weight: 600; font-size: 38px; line-height: 1.15; letter-spacing: -0.02em; }
.landing-cta .btn { flex-shrink: 0; }

.landing__footer { margin-top: auto; padding: 32px 80px; display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }
.landing__footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.landing__footer-links a { min-height: var(--control-h); display: inline-flex; align-items: center; }

@media (max-width: 1199px) {
  .landing__header, .landing-hero, .landing-spheres, .landing-section, .landing__footer { padding-left: 32px; padding-right: 32px; }
  .landing-hero { flex-direction: column; align-items: stretch; }
  .landing-hero__text { width: auto; }
  .hero-booking { left: 16px; }
  .landing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .landing-faq { flex-direction: column; gap: 24px; }
  .landing-faq__title { width: auto; }
}
@media (max-width: 767px) {
  .landing__header { padding: 12px 16px; gap: 12px; min-height: 64px; }
  .landing__try, .landing__nav a:not(.landing__nav-catalog) { display: none; }
  .landing__long { display: none; }
  .landing__short { display: inline; }
  .landing-hero { padding: 24px 16px 40px; gap: 32px; }
  .landing-hero__text { gap: 18px; }
  .landing-hero__title { font-size: 34px; }
  .landing-hero__lead { font-size: 16px; }
  .landing-hero__actions, .landing-hero__actions .btn { width: 100%; }
  .hero-cal { padding: 14px; min-height: 0; }
  .hero-cal__cols { gap: 6px; }
  .hero-cal__item { padding: 6px; font-size: 11px; }
  .hero-booking { position: relative; left: auto; width: auto; margin: -24px 12px 0; }
  .landing-hero__visual { padding-bottom: 0; }
  .landing-spheres { padding: 0 16px 48px; }
  .landing-section { padding: 24px 16px 56px; gap: 24px; }
  .landing-section--center { padding-top: 56px; align-items: stretch; }
  .landing-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .landing-card { min-height: 0; padding: 22px; }
  .landing-steps { margin: 0 8px; padding: 40px 16px; border-radius: 24px; gap: 24px; }
  .plan { padding: 24px; }
  .landing-cta { margin: 0 8px; padding: 40px 20px; flex-direction: column; align-items: stretch; border-radius: 24px; gap: 24px; }
  .landing-cta__title { font-size: 26px; }
  .landing__footer { padding: 24px 16px; flex-direction: column; }
}

/* ---------- Каталог мастеров и студий ---------- */
.catalog { padding: 16px 80px 64px; display: flex; flex-direction: column; gap: 24px; }
.catalog__intro { display: flex; flex-direction: column; gap: var(--s-2); }
.catalog__lead { font-size: 16px; color: var(--ink-2); }
.catalog-filter { display: grid; grid-template-columns: 220px 220px minmax(0, 1fr) auto; gap: var(--s-3); align-items: end; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s-4); }
.catalog-results { display: flex; flex-direction: column; gap: var(--s-3); }
.catalog-results__count { font-size: 14px; font-weight: 700; color: var(--ink-3); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--s-4); }
.catalog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.catalog-card__head { display: flex; gap: var(--s-3); align-items: center; }
.catalog-card__mark { width: 52px; height: 52px; border-radius: 16px; background: var(--brand); color: var(--ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 18px; flex-shrink: 0; }
.catalog-card__title { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.catalog-card__name { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.catalog-card__name a { color: var(--ink); }
.catalog-card__name a:hover { color: var(--accent-ink); }
.catalog-card__meta { font-size: 13px; color: var(--ink-3); }
.catalog-card__about { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.catalog-card__services { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.catalog-card__service { display: flex; justify-content: space-between; gap: var(--s-3); padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.catalog-card__service-name { min-width: 0; overflow-wrap: anywhere; }
.catalog-card__price { font-weight: 700; white-space: nowrap; }
.catalog-card__more { padding-top: 8px; font-size: 13px; color: var(--ink-3); }
.catalog-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.catalog-card__staff { display: flex; align-items: center; gap: var(--s-2); min-width: 0; font-size: 13px; color: var(--ink-2); }
.catalog-card__avatars { display: flex; }
.catalog-card__avatars .avatar { width: 30px; height: 30px; font-size: 11px; border: 2px solid var(--surface); }
.catalog-card__avatars .avatar + .avatar { margin-left: -8px; }
.catalog-more { grid-column: 1 / -1; display: flex; justify-content: center; }
.catalog-join { display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 1199px) {
  .catalog { padding: 16px 32px 48px; }
  .catalog-filter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .catalog { padding: 8px 16px 40px; gap: 20px; }
  .catalog-filter { grid-template-columns: minmax(0, 1fr); }
  .catalog-card { padding: 16px; }
  .catalog-card__cta { width: 100%; }
}

/* ---------- Условия и политика ---------- */
.legal { padding: 16px 80px 64px; }
.legal__doc { max-width: 760px; display: flex; flex-direction: column; gap: 20px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.legal__doc h1 { color: var(--ink); }
.legal__doc h2 { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.legal__doc section { display: flex; flex-direction: column; gap: 10px; }
.legal__doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal__requisites { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-4); }
.legal__requisites dt { font-weight: 700; color: var(--ink); }
.legal__requisites dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 1199px) { .legal { padding: 16px 32px 48px; } }
@media (max-width: 767px) {
  .legal { padding: 8px 16px 40px; }
  .legal__requisites { grid-template-columns: minmax(0, 1fr); }
  .legal__requisites dd { margin-bottom: 6px; }
}

/* ---------- Страницы ошибок ---------- */
.error-page { min-height: 100vh; max-width: 520px; margin: 0 auto; padding: 40px 16px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.error-page .landing__logo { flex: 0; margin-bottom: 24px; }
.error-page__code { font-family: var(--font-display); font-size: 64px; font-weight: 600; color: var(--brand); line-height: 1; }

/* ---------- Тариф и оплата ---------- */
.billing-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 20px; align-items: start; }
.billing-now { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.billing-now__plan { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.billing-change { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; background: var(--surface-2); border-radius: var(--r-md); padding: 10px 14px; font-size: 14px; }
.billing-period { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.billing-plans { display: flex; flex-direction: column; gap: var(--s-2); }
.billing-plan { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--r-lg); min-height: 64px; }
.billing-plan:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.billing-plan__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.billing-plan__name { font-size: 16px; font-weight: 700; }
.billing-plan__price { font-weight: 700; white-space: nowrap; }
.billing-inn summary { cursor: pointer; min-height: var(--control-h); display: flex; align-items: center; }
.billing-inn[open] summary { margin-bottom: var(--s-2); }
.billing-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.billing-history__row { display: flex; align-items: center; gap: var(--s-3); padding: 12px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.billing-history__row:last-child { border-bottom: 0; }
.billing-history__what { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.billing-history__hint { white-space: nowrap; }
.billing-status { max-width: 560px; align-items: flex-start; }
.billing-status__icon { width: 56px; height: 56px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.billing-status__icon--ok { background: var(--success-soft); color: var(--success); }
@media (max-width: 1199px) {
  .billing-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .billing-history__row { flex-wrap: wrap; }
  .billing-history__what { flex-basis: 100%; }
}
.landing-period .segmented__item { min-height: var(--control-h); padding: 8px 16px; font-size: 14px; }
