/* CRM — общий стиль клиентской базы, ленты и задач. Цвета и шрифты — из ../theme.css (профиль салона, scripts/render.py). */
:root {
  --paper: var(--bg);
  --red: var(--accent);
  --red-soft: var(--accent-soft);
  --ok: #2f7d4f;
  --ok-soft: #e8f3ec;
  --bad: #c8322f;         /* отмены и неявки — всегда красные, независимо от цвета темы */
  --bad-soft: #fbe9e8;
  --info: #3d5a80;
  --info-soft: #ebf0f6;
  --black: var(--dark);
  --tg: #2a8ac4;
  --wa: #2a9257;
  --r: 12px;
  --r-sm: 8px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.num, td.n, .t { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- шапка ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--black); color: #fff; }
.bar-in { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 22px; padding: 0 20px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand b { font-weight: 600; letter-spacing: var(--brand-tracking); text-transform: var(--brand-case); font-size: 16px; }
.brand small { color: rgba(255,255,255,.55); font-size: 13px; letter-spacing: 0; }
.nav { display: flex; gap: 2px; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: flex; align-items: center; padding: 0 11px; white-space: nowrap; text-decoration: none; color: rgba(255,255,255,.66); border-bottom: 2px solid transparent; font-weight: 500; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--red); }
.bar .grow { flex: 1; }
.bar .ext { color: rgba(255,255,255,.66); text-decoration: none; font-size: 14px; white-space: nowrap; }
.bar .ext:hover { color: #fff; }
.bar-book { flex: none; border: 0; border-radius: var(--r-sm); background: var(--red); color: #fff; font-weight: 500; padding: 7px 14px; white-space: nowrap; }
.bar-book:hover { filter: brightness(1.1); }
.bar-book span { font-size: 17px; line-height: 1; }
.clock { color: rgba(255,255,255,.55); font-size: 13px; white-space: nowrap; }
.clock b { color: #fff; font-weight: 500; }
@media (max-width: 1500px) { .clock { display: none; } }  /* семь разделов в меню: часы уступают место */

.demo-note { background: color-mix(in srgb, var(--dark) 88%, #fff); color: rgba(255,255,255,.8); font-size: 13.5px; text-align: center; padding: 7px 16px; }
.page { max-width: 1440px; margin: 0 auto; padding: 22px 20px 60px; }
h1 { font-size: 26px; font-weight: 500; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 600; margin: 0; }
.sub { color: var(--muted); font-size: 14px; }

/* ---------- элементы ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 5px 12px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .c { color: var(--muted); margin-left: 4px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .c { color: rgba(255,255,255,.6); }
.field { border: 1px solid var(--line-2); background: var(--card); border-radius: var(--r-sm); padding: 8px 11px; min-width: 0; }
.field:focus { border-color: var(--ink); outline: none; }
select.field { padding-right: 28px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 520px; }
.search input { width: 100%; padding-left: 36px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.btn { border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: var(--r-sm); padding: 8px 14px; font-weight: 500; }
.btn:hover { background: color-mix(in srgb, var(--dark) 88%, #fff); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.sm { padding: 4px 10px; font-size: 13.5px; }
.btn:disabled { opacity: .45; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.link:hover { color: var(--ink); text-decoration-color: var(--ink); }

.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; padding: 1px 7px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }
.tag.red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tag.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag.done { background: transparent; color: var(--muted); }
.tag.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

/* значки каналов — по форме и цвету, чтобы различать в ленте без подписи */
.ch { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none; color: #fff; background: var(--ink-2); }
.ch svg { width: 12px; height: 12px; }
.ch.telegram { background: var(--tg); }
.ch.whatsapp { background: var(--wa); }
.ch.call { background: var(--ink); }
.ch.online { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.ch.crm, .ch.max { background: var(--muted); }
.ch.missed { background: var(--red); }

.empty { padding: 40px 0; text-align: center; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 80; font-size: 14px; }

/* ---------- таблица клиентов ---------- */
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 12px; }
.tools .sp { flex: 1; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 14px; }
.stat b { display: block; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat span { color: var(--muted); font-size: 13px; }
.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; }
table.base { width: 100%; border-collapse: collapse; font-size: 14px; }
table.base th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--card); z-index: 1; }
table.base th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
table.base th button:hover, table.base th[aria-sort] button { color: var(--ink); }
table.base th[aria-sort="descending"] button::after { content: '↓'; }
table.base th[aria-sort="ascending"] button::after { content: '↑'; }
table.base td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.base tr:last-child td { border-bottom: 0; }
table.base tbody tr { cursor: pointer; }
table.base tbody tr:hover td { background: color-mix(in srgb, var(--bg) 40%, var(--card)); }
table.base td.n { text-align: right; white-space: nowrap; }
table.base th.n { text-align: right; }
.who b { font-weight: 500; display: block; }
table.base .who b { white-space: nowrap; }
.who small, td small { display: block; color: var(--muted); font-size: 12.5px; }
.chans { display: flex; gap: 8px; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.chans span { display: inline-flex; align-items: center; gap: 4px; }
.chans .ch { width: 16px; height: 16px; }
.chans .ch svg { width: 9px; height: 9px; }
.more { display: flex; justify-content: center; padding: 14px; }

.found { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; }
.found h3 { margin: 0; font-size: 14px; font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.found ul { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; }
.found li button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 200px 90px 1fr; gap: 12px; width: 100%; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.found li:last-child button { border-bottom: 0; }
.found li button:hover { background: color-mix(in srgb, var(--bg) 40%, var(--card)); }
.found mark { background: #f9e3a8; color: inherit; border-radius: 2px; }
.found .d { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- лента ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 24px; align-items: start; }
.feed { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.feed-day { padding: 12px 16px 6px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 40%, var(--card)); position: sticky; top: 56px; z-index: 2; }
.row { display: grid; grid-template-columns: 58px 26px minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: start; }
.row:hover { background: color-mix(in srgb, var(--bg) 40%, var(--card)); }
.row .t { font-size: 19px; font-weight: 500; letter-spacing: -.01em; line-height: 1.1; }
.row .who { min-width: 0; }
.row .who b { display: inline; }
.row .who .ph { color: var(--muted); font-size: 13px; margin-left: 6px; }
.row p { margin: 3px 0 0; color: var(--ink-2); font-size: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row.waiting .t { color: var(--red); }
.row.dim { opacity: .55; }

.side-panel { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.box h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.box h2 small { font-weight: 400; color: var(--muted); font-size: 13px; }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.counters div b { display: block; font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.1; }
.counters div span { font-size: 12.5px; color: var(--muted); }
.counters .alert b { color: var(--bad); }

/* лента дня: мастера × часы */
.ribbon { margin-top: 14px; display: grid; grid-template-columns: 112px 1fr; row-gap: 6px; font-size: 12.5px; }
.ribbon .hours { grid-column: 2; position: relative; height: 16px; color: var(--muted); }
.ribbon .hours span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.ribbon .m { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 8px; line-height: 22px; }
.ribbon .m em { font-style: normal; color: var(--muted); }
.ribbon .lane { position: relative; height: 22px; background: repeating-linear-gradient(90deg, var(--paper) 0 calc(100% / 12 - 1px), var(--line) calc(100% / 12 - 1px) calc(100% / 12)); border-radius: 4px; }
.ribbon .lane.off { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 6px); }
.ribbon .bk { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; background: var(--ok); border: 0; padding: 0; min-width: 4px; }
.ribbon .bk:hover { outline: 2px solid var(--red); outline-offset: 1px; z-index: 2; }
.ribbon .bk.new, .ribbon .bk.confirmed { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ribbon .bk.confirmed { background: var(--line); }
.ribbon .bk.cancelled { background: repeating-linear-gradient(135deg, var(--bad-soft) 0 3px, #fff 3px 6px); box-shadow: inset 0 0 0 1px var(--bad); opacity: .8; }
.ribbon .bk.no_show { background: var(--bad); }
.ribbon .now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--red); z-index: 3; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend .done { background: var(--ok); }
.legend .up { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); }
.legend .cn { background: repeating-linear-gradient(135deg, var(--bad-soft) 0 3px, #fff 3px 6px); box-shadow: inset 0 0 0 1px var(--bad); }
.legend .ns { background: var(--bad); }
.daylist { margin: 12px 0 0; padding: 0; list-style: none; max-height: 340px; overflow: auto; }
.daylist li button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; width: 100%; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.daylist li button:hover { color: var(--red); }
.daylist small { display: block; color: var(--muted); }

/* ---------- задачи на сегодня ---------- */
.tasks-lead { max-width: 760px; margin: 6px 0 0; }
.tasks-note { max-width: 820px; margin: 8px 0 10px; font-size: 19px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.stat.alert b { color: var(--red); }
.tgroup { margin-top: 26px; }
.tgroup h2 { font-size: 19px; font-weight: 500; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tgroup h2 small { font-size: 13.5px; color: var(--muted); font-weight: 400; }
.tg-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.tg-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.tg-toggle .chev { width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); margin: -4px 4px 0 2px; transition: transform .15s; }
.tgroup.collapsed .tg-toggle .chev { transform: rotate(-45deg); margin-top: 0; }
.tgroup.collapsed { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.tlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 12px; margin-top: 12px; }
.task { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.task.closed { background: transparent; border-style: dashed; opacity: .7; padding: 10px 16px; }
.task-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.task-title { all: unset; cursor: pointer; font-weight: 500; font-size: 15.5px; }
.task-title:hover { color: var(--red); }
.pot { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ok); font-weight: 500; font-size: 14px; white-space: nowrap; }
.task p { margin: 0; font-size: 14px; }
.task .why { color: var(--ink-2); }
.task .say { background: var(--paper); border-left: 3px solid var(--ink); padding: 7px 10px; border-radius: 0 8px 8px 0; color: var(--ink); }
.task .hint { color: var(--info); font-weight: 500; }
.task .actions { align-items: center; margin-top: 2px; }
.task .actions .sp { flex: 1; }
.task .actions a.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.task .actions .ch { width: 16px; height: 16px; }
.task .actions .ch svg { width: 9px; height: 9px; }

/* ---------- карточка клиента: окно по центру на всех страницах, на телефоне — на весь экран ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-bg { position: absolute; inset: 0; background: rgba(18, 18, 18, .45); }
.drawer-panel { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(860px, calc(100% - 48px));
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); background: var(--paper); overflow: auto; border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0,0,0,.28); animation: pop .18s ease-out; }
@keyframes pop { from { transform: translate(-50%, -48%) scale(.98); opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
@media (max-width: 640px) {
  .drawer-panel { inset: 0; transform: none; width: 100%; max-height: none; border-radius: 0; animation: slide .2s ease-out; }
}
.dh { position: sticky; top: 0; z-index: 3; background: var(--card); border-bottom: 1px solid var(--line); padding: 16px 20px 14px; }
.dh-top { display: flex; align-items: flex-start; gap: 12px; }
.dh h2 { font-size: 22px; font-weight: 500; }
.dh .close { margin-left: auto; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); padding: 0 4px; }
.dh .close:hover { color: var(--ink); }
.dh .contacts { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 6px; font-size: 14px; color: var(--ink-2); align-items: center; }
.dh .contacts a { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.dh .contacts a:hover { color: var(--red); }
.dh .contacts > span { display: inline-flex; gap: 6px; align-items: center; }
.facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.facts div b { display: block; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts div span { font-size: 12px; color: var(--muted); }
.db { padding: 16px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.sect { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.sect > h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.note-input { width: 100%; min-height: 64px; resize: vertical; }
.profile { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 14px; align-items: start; font-size: 14px; }
.profile label, .profile > div { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.profile b { font-weight: 500; color: var(--ink); font-size: 14px; }
.tgrow { display: flex; gap: 6px; }
.tgrow input { flex: 1; min-width: 0; padding: 5px 9px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.next { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.next .when { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.blist { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.blist li { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); align-items: baseline; }
.blist li:first-child { border-top: 0; }
.blist .d { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.blist small { color: var(--muted); display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.form-grid .wide { grid-column: 1 / -1; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slots button { border: 1px solid var(--line-2); background: var(--card); border-radius: 6px; padding: 4px 9px; font-variant-numeric: tabular-nums; font-size: 14px; }
.slots button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.err { color: var(--red); font-size: 14px; }

/* история по дням */
.day { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.day:first-child { border-top: 0; padding-top: 2px; }
.day-h { display: flex; align-items: center; gap: 8px; }
.day-h b { font-weight: 600; font-size: 14px; }
.day-h .chs { display: flex; gap: 3px; }
.day-h .chs .ch { width: 18px; height: 18px; }
.day-h .chs .ch svg { width: 10px; height: 10px; }
.day-h .toggle { margin-left: auto; font-size: 13px; }
.summary { margin: 6px 0 4px; font-size: 14.5px; color: var(--ink); }
.summary small { color: var(--muted); font-size: 12px; margin-left: 6px; }
.events { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 6px; }
.msg { max-width: 82%; padding: 7px 11px 6px; border-radius: 12px; font-size: 14px; white-space: pre-line; background: var(--paper); border: 1px solid var(--line); }
.msg.out { align-self: flex-end; background: var(--line); border-color: transparent; }
.msg .meta { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.msg .meta .ch { width: 14px; height: 14px; }
.msg .meta .ch svg { width: 8px; height: 8px; }
.sys { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; padding: 2px 0; }
.sys .t { color: var(--muted); font-size: 12px; width: 38px; flex: none; }
.sys.bad { color: var(--red); }
.sys.note { background: #fff8e6; border-radius: 8px; padding: 6px 10px; color: var(--ink); }
.callev { border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: 14px; }
.callev.missed { border-color: var(--red); color: var(--red); }
.callev-h { display: flex; align-items: center; gap: 8px; }
.callev-h .t { color: var(--muted); font-size: 12px; }
.callev-h button { margin-left: auto; }
.tr { margin: 8px 0 2px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.tr div { display: grid; grid-template-columns: 26px 1fr; gap: 6px; }
.tr div b { color: var(--muted); font-weight: 500; font-size: 12px; padding-top: 1px; }
.tr div.admin b { color: var(--ink); }
.tr div[data-seek] { cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: 0 -4px; transition: background .15s; }
.tr div[data-seek]:hover { background: var(--paper); }
.tr div.on { background: #f3e6c9; }
.player { display: block; width: 100%; height: 36px; margin-top: 8px; }
.row .player { width: min(340px, 100%); height: 32px; margin-top: 6px; }
/* «Развернуть все» на «Ленте»: переписка дня прямо в строке */
.row .events { margin: 8px 0 2px; cursor: default; }
.row .events .msg { max-width: 88%; }
.reply { display: flex; gap: 8px; margin-top: 10px; }
.reply textarea { flex: 1; min-height: 40px; resize: vertical; }

@media (max-width: 1180px) {
  .dash { grid-template-columns: 1fr; }
  .side-panel { position: static; order: -1; }
}
@media (max-width: 720px) {
  .bar-in { gap: 12px; padding: 0 12px; }
  .brand small, .bar .ext, .clock { display: none; }
  .nav a { padding: 0 10px; }
  .nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }  /* четыре раздела не влезают в 390 px — меню листается */
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .page { padding: 16px 12px 40px; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row { grid-template-columns: 48px 24px minmax(0, 1fr); }
  .row .side { grid-column: 3; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .counters { grid-template-columns: repeat(2, 1fr); }
  .ribbon { grid-template-columns: 84px 1fr; }
  .ribbon .m em { display: none; }
  .found li button { grid-template-columns: 1fr; gap: 2px; }
  .form-grid { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
  .tlist { grid-template-columns: 1fr; }
  .dh, .db { padding-left: 14px; padding-right: 14px; }
  .dh { position: static; }
}

/* «Сегодня в салоне» — день салона на весь экран (today.html) */
body.wide .bar-in, body.wide .page { max-width: none; }
.td-head { align-items: center; }
.td-nav { display: flex; align-items: center; gap: 6px; }
.td-arrow { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); font-size: 18px; line-height: 1; }
.td-arrow:hover { border-color: var(--ink); }
.td-date { font-weight: 500; min-width: 150px; text-align: center; }
.td-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 4px 0 16px; }
.td-stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.td-stats b { display: block; font-size: 26px; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-stats span { font-size: 13px; color: var(--muted); }
.td-stats .warn b { color: #b7791f; }
.td-stats .alert b { color: var(--bad); }
.td-card { margin-bottom: 16px; }
.td-scroll { overflow-x: auto; }
.td-grid { position: relative; display: grid; grid-template-columns: 170px minmax(860px, 1fr); row-gap: 6px; }
.td-hours { position: relative; height: 22px; font-size: 12.5px; color: var(--muted); }
.td-hours span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.td-hours span:last-child { transform: translateX(-100%); }
.td-m { display: flex; flex-direction: column; justify-content: center; padding-right: 12px; min-height: 58px; }
.td-m b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-m small { color: var(--muted); font-size: 12.5px; }
.td-lane { position: relative; height: 58px; border-radius: 8px; background: var(--card);
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--hw, 8.33%) - 1px), var(--line) calc(var(--hw, 8.33%) - 1px) var(--hw, 8.33%));
  box-shadow: inset 0 0 0 1px var(--line); }
.td-off { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--paper) 0 5px, var(--line) 5px 6px); }
.td-free { position: absolute; top: 6px; bottom: 6px; margin-left: 1px; border: 1.5px dashed var(--line-2); border-radius: 6px; color: var(--muted);
  font-size: 12px; display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden; }
.td-bk { position: absolute; top: 4px; bottom: 4px; margin-left: 1px; border: 0; border-radius: 6px; padding: 4px 8px; text-align: left; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; background: var(--ok); color: #fff; min-width: 6px; }
.td-bk b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-bk small { font-size: 11.5px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-bk:hover { outline: 2px solid var(--red); outline-offset: 1px; z-index: 2; }
.td-bk.new { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.td-bk.confirmed { background: color-mix(in srgb, var(--paper) 70%, var(--ink) 12%); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.td-bk.now { background: var(--red); color: #fff; box-shadow: none; }
.td-bk.no_show { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.td-bk.cancelled { background: repeating-linear-gradient(135deg, var(--bad-soft) 0 4px, var(--card) 4px 8px); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); opacity: .8; }
.td-bk.cancelled b { text-decoration: line-through; }
.td-nowwrap { position: absolute; left: 170px; right: 0; top: 0; bottom: 0; pointer-events: none; }
.td-now { position: absolute; top: 18px; bottom: 0; width: 2px; background: var(--red); z-index: 3; }
.td-now span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: 11.5px; font-style: normal;
  border-radius: 4px; padding: 0 5px; font-variant-numeric: tabular-nums; }
.td-card .legend .cf { background: color-mix(in srgb, var(--paper) 70%, var(--ink) 12%); box-shadow: inset 0 0 0 1.5px var(--ink); }
.td-card .legend .up { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); }
.td-card .legend .nw { background: var(--red); }
.td-card .legend .ns { background: var(--bad-soft); box-shadow: inset 0 0 0 1.5px var(--bad); }
.td-card .legend .cn { background: repeating-linear-gradient(135deg, var(--bad-soft) 0 3px, #fff 3px 6px); box-shadow: inset 0 0 0 1px var(--bad); }
.td-card .legend .fr { border: 1.5px dashed var(--line-2); }
.td-agenda { list-style: none; margin: 10px 0 0; padding: 0; columns: 2; column-gap: 28px; }
.td-agenda li { break-inside: avoid; border-top: 1px solid var(--line); }
.td-agenda button { width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; background: none; border: 0; padding: 9px 2px; text-align: left; }
.td-agenda button:hover { background: var(--paper); }
.td-agenda .t { font-variant-numeric: tabular-nums; font-weight: 500; }
.td-agenda b { font-weight: 500; display: block; }
.td-agenda small, .td-who { color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) { .td-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .td-agenda { columns: 1; } }
@media (max-width: 560px) {
  .td-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-grid { grid-template-columns: 120px minmax(760px, 1fr); }
  .td-nowwrap { left: 120px; }
  .td-agenda button { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .td-who { display: none; }
}

/* ---------- «График работы»: мастера × дни, меню дня как в YCLIENTS (schedule.js) ---------- */
.sc-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 12px; }
.sc-scroll { overflow-x: auto; padding-bottom: 4px; }
.sc-grid { display: grid; grid-template-columns: 230px repeat(var(--days), minmax(46px, 1fr)); gap: 3px; min-width: max-content; user-select: none; }
.sc-corner { align-self: end; color: var(--muted); font-size: 12.5px; padding: 0 0 6px 4px; }
.sc-dh { text-align: center; padding: 2px 0 6px; border-radius: 8px; line-height: 1.15; }
.sc-dh small { display: block; color: var(--muted); font-size: 11.5px; }
.sc-dh b { font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; }
.sc-dh.we small, .sc-dh.we b { color: var(--bad); }
.sc-dh.is-today { background: var(--ink); }
.sc-dh.is-today small, .sc-dh.is-today b { color: #fff; }
.sc-m { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 4px 6px 4px 2px; min-height: 52px; }
.sc-m img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; grid-column: 1; }
.sc-m div { grid-column: 2; min-width: 0; }
.sc-m b { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-m small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-gear { grid-column: 3; border: 1px solid var(--line-2); background: var(--card); border-radius: 999px; font-size: 12px; padding: 3px 9px; color: var(--ink-2); }
.sc-gear:hover { border-color: var(--ink); color: var(--ink); }
.sc-c { position: relative; min-height: 52px; border: 0; border-radius: 8px; padding: 4px 2px; font-size: 12.5px; font-variant-numeric: tabular-nums;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--paper); color: var(--muted); }
.sc-c.on { background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.sc-c.off.we { background: color-mix(in srgb, var(--paper) 80%, var(--bad-soft)); }
.sc-c.exc { box-shadow: inset 0 0 0 1.5px var(--ok); }
.sc-c.off.exc { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.sc-c.vac { background: repeating-linear-gradient(135deg, var(--paper) 0 5px, var(--line) 5px 6px); color: var(--muted); font-weight: 400; }
.sc-c.past { opacity: .5; cursor: default; }
.sc-c:not(.past):not(.vac):hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.sc-c.sel { outline: 2px solid var(--red) !important; outline-offset: -1px; background: color-mix(in srgb, var(--red-soft) 70%, var(--card)); }
.sc-o { font-style: normal; font-size: 10.5px; font-weight: 400; line-height: 1.1; color: var(--info); background: var(--info-soft); border-radius: 4px; padding: 1px 3px; text-align: center; }
.sc-o.x { color: var(--bad); background: var(--bad-soft); }
.sc-n { position: absolute; top: 3px; right: 4px; font-style: normal; font-size: 10.5px; font-weight: 500; color: var(--ink-2); }
.sc-card .legend i.w { background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok); }
.sc-card .legend i.x { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ok); }
.sc-card .legend i.o { background: var(--info-soft); box-shadow: inset 0 0 0 1px var(--info); }
.sc-card .legend i.v { background: repeating-linear-gradient(135deg, var(--paper) 0 3px, var(--line-2) 3px 4px); }
.sc-card .legend i.n { width: auto; height: auto; background: none; font-style: normal; font-weight: 500; color: var(--ink-2); }
.sc-menu { position: absolute; z-index: 60; min-width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 40px -12px rgba(18, 18, 18, .35); display: grid; }
.sc-menu p { margin: 0; padding: 6px 10px 8px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sc-menu p b { display: block; color: var(--ink); font-weight: 500; font-size: 14px; }
.sc-menu button { all: unset; cursor: pointer; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.sc-menu button:hover, .sc-menu button:focus-visible { background: var(--paper); }
.sc-panel { width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border-radius: 16px; padding: 22px 24px 20px; }
.sc-panel h2 { margin: 0 0 12px; font-size: 20px; font-weight: 500; }
.sc-panel h3 { margin: 16px 0 6px; font-size: 14px; font-weight: 500; }
.sc-body p { margin: 0 0 10px; }
.sc-time { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 10px; }
.sc-time label, .sc-shift label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.sc-time input[type=time] { width: 110px; }
.sc-shift { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 10px 0; }
.sc-shift input[type=number] { width: 64px; }
.sc-radio { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; font-size: 14.5px; }
.sc-seg { display: inline-flex; gap: 4px; background: var(--paper); border-radius: 999px; padding: 4px; }
.sc-seg label { padding: 5px 12px; border-radius: 999px; font-size: 14px; cursor: pointer; }
.sc-seg label:has(input:checked) { background: var(--card); box-shadow: 0 1px 3px rgba(21, 20, 19, .14); }
.sc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.sc-week { display: flex; gap: 6px; margin: 12px 0 4px; }
.sc-week label { position: relative; }
.sc-week input { position: absolute; opacity: 0; }
.sc-week span { display: grid; place-items: center; width: 40px; height: 36px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 14px; cursor: pointer; }
.sc-week input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.sc-week input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.sc-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.sc-err { color: var(--bad); font-size: 14px; }
.sc-list { margin: 0 0 4px; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 760px) { .sc-grid { grid-template-columns: 170px repeat(var(--days), 46px); } .sc-gear { display: none; } }
.sc-salon { grid-column: 1 / -1; font-weight: 500; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 10px 4px 2px; }

/* ---------- «Другие функции» (more.html): меню слева, экраны справа ---------- */
.mo { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.mo-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 1px; font-size: 14.5px; }
.mo-sg { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 4px; }
.mo-sl { text-decoration: none; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); }
.mo-sl:hover { background: var(--card); color: var(--ink); }
.mo-sl.on { background: var(--ink); color: #fff; }
.mo-main { min-width: 0; }
.mo-head { margin-bottom: 14px; }
.mo-head .sub { max-width: 860px; margin: 6px 0 0; }
.mo-gh { margin: 22px 0 10px; font-size: 16px; }
.mo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mo-cards-tc { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.mo-card { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; }
.mo-card:hover { border-color: var(--ink-2); }
.mo-card b { font-weight: 600; }
.mo-card span { color: var(--muted); font-size: 13.5px; }
.mo-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.mo-kpis div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.box .mo-kpis div { background: var(--paper); border: 0; }
.mo-kpis b { display: block; font-size: 20px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-kpis span { font-size: 12.5px; color: var(--muted); }
.mo-kpis .warn b { color: #b7791f; }
.mo-kpis .alert b { color: var(--bad); }
.mo-tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; width: fit-content; max-width: 100%; margin: 4px 0 16px; }
.mo-tabs button { border: 0; background: none; border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--ink-2); }
.mo-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.mo-period { margin-bottom: 4px; }
.mo-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.mo-split { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
.mo-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); max-height: calc(100vh - 140px); overflow: auto; position: sticky; top: 76px; }
.mo-li { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mo-li:last-child { border-bottom: 0; }
.mo-li:hover { background: color-mix(in srgb, var(--bg) 40%, var(--card)); }
.mo-li[aria-current="true"] { background: var(--red-soft); }
.mo-li .t { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.mo-li b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-li small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.mo-dot.on { background: var(--ok); }
.mo-visit h3 { font-size: 14px; font-weight: 600; margin: 18px 0 6px; }
.mo-vh { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.mo-vh h2 .link { font-size: 20px; font-weight: 500; color: var(--ink); }
.mo-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--paper); border-radius: 999px; padding: 4px; }
.mo-seg button { border: 0; background: none; border-radius: 999px; padding: 5px 12px; font-size: 13.5px; }
.mo-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.mo-lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.mo-lines .num, .mo-lines > div > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mo-add { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: flex-start !important; border-bottom: 0 !important; }
.mo-add select { max-width: 100%; }
.mo-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 12px 0 0; }
.mo-row label { display: inline-flex; gap: 8px; align-items: center; }
.mo-tech { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.mo-tech li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); align-items: center; }
.mo-tech li:last-child { border-bottom: 0; }
.mo-tech li.tot { font-weight: 500; }
.mo-tech .num { text-align: right; min-width: 70px; }
.mo-src li { grid-template-columns: 170px minmax(0, 1fr) auto; }
.mo-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; color: var(--ink-2); font-size: 14px; }
.mo-sum b { margin-left: auto; font-size: 18px; font-weight: 600; color: var(--ink); }
.mo-pays { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.mo-pays label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.mo-pays .link { font-size: 12.5px; align-self: flex-start; }
.mo-flow { margin-top: 16px; background: var(--ok-soft); border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px; }
.mo-flow ul { margin: 6px 0 0; padding-left: 18px; }
.mo-rules { margin: 10px 0 14px; }
.mo-sw { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 10px; align-items: center; margin: 10px 0; cursor: pointer; font-size: 14.5px; }
.mo-sw input { position: absolute; opacity: 0; pointer-events: none; }
.mo-sw span { grid-row: span 2; width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; }
.mo-sw span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.mo-sw input:checked + span { background: var(--ok); }
.mo-sw input:checked + span::after { transform: translateX(16px); }
.mo-sw input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.mo-sw b { font-weight: 500; }
.mo-sw small { color: var(--muted); font-size: 12.5px; }
.mo-bars { display: flex; align-items: flex-end; gap: 2px; height: calc(var(--h) + 18px); margin-top: 10px; }
.mo-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.mo-bar i { display: block; width: 100%; max-width: 26px; background: var(--red); border-radius: 3px 3px 0 0; opacity: .85; }
.mo-bar.we i { opacity: .55; }
.mo-bar:hover i { opacity: 1; }
.mo-bar span { font-size: 10.5px; color: var(--muted); height: 16px; line-height: 16px; font-variant-numeric: tabular-nums; }
.mo-hbar { display: inline-block; width: 100%; min-width: 60px; height: 8px; background: var(--paper); border-radius: 999px; overflow: hidden; vertical-align: middle; }
.mo-hbar i { display: block; height: 100%; background: var(--red); border-radius: 999px; }
table.mo-t tbody tr { cursor: default; }
table.mo-t tbody tr[data-paym] { cursor: pointer; }
table.mo-t td.pos { color: var(--ok); }
table.mo-t td.neg { color: var(--bad); }
table.mo-t tr.mo-sub td { background: color-mix(in srgb, var(--bg) 50%, var(--card)); }
table.mo-t .mo-ind { padding-left: 16px; color: var(--ink-2); }
table.mo-t th.c, table.mo-t td.c { text-align: center; }
.mo-perm td:first-child { white-space: nowrap; }
.mo-in { width: 90px; text-align: right; padding: 4px 8px; }
.mo-filters .field { max-width: 220px; }
.mo-tpl { width: 100%; min-height: 90px; resize: vertical; }
.mo-bubble { margin-top: 10px; background: var(--paper); border-radius: 12px; padding: 10px 12px; font-size: 14px; max-width: 520px; }
.mo-bubble small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.mo-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.mo-reviews p { margin: 8px 0 0; font-size: 14.5px; }
.mo-stars { color: #d69e2e; letter-spacing: 1px; }
.mo-int { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mo-int p { margin: 0; flex: 1; }
.mo-res { display: grid; grid-template-columns: 190px minmax(640px, 1fr); row-gap: 5px; overflow-x: auto; }
.mo-hours { position: relative; height: 18px; font-size: 12px; color: var(--muted); }
.mo-hours span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.mo-rn { font-size: 13.5px; padding-right: 10px; align-self: center; }
.mo-lane { position: relative; height: 30px; background: var(--paper); border-radius: 6px; }
.mo-rb { position: absolute; top: 3px; bottom: 3px; background: var(--red-soft); color: var(--ink); border-radius: 5px; font-size: 11.5px; padding: 3px 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent); }
.mo-rb.clash { background: var(--bad-soft); box-shadow: inset 0 0 0 1.5px var(--bad); }
.mo-receipt .mo-lines > div { font-size: 14px; }
@media print { body > *:not(.drawer) { display: none !important; } .drawer-bg, .mo-receipt .sc-acts { display: none !important; } .mo-receipt { position: static !important; transform: none !important; } }
@media (max-width: 1000px) {
  .mo { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mo-side { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px; margin: 0 -20px; padding: 0 20px; }
  .mo-side::-webkit-scrollbar { display: none; }
  .mo-sg { display: none; }
  .mo-sl { white-space: nowrap; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); padding: 5px 12px; font-size: 14px; }
  .mo-split { grid-template-columns: minmax(0, 1fr); }
  .mo-list { position: static; max-height: 300px; }
}
@media (max-width: 720px) {
  .mo-side { margin: 0 -12px; padding: 0 12px; }
  .mo-grid2, .mo-reviews, .mo-cards-tc { grid-template-columns: minmax(0, 1fr); }
  .mo-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-src li { grid-template-columns: 120px minmax(0, 1fr) auto; }
  .mo-res { grid-template-columns: 120px minmax(560px, 1fr); }
}
.mo-add > span:last-child { white-space: normal !important; }
.mo-main .tools .tag { white-space: normal; }

/* «Новая запись» — кнопка «Записать» в шапке и тап по свободному месту в «Сегодня» */
.drawer.nb { z-index: 60; }
.nb-panel { width: min(640px, calc(100% - 48px)); }
.nb-panel .form-grid > * { min-width: 0; }  /* длинные названия услуг не распирают форму на телефоне */
.nb-search { display: flex; gap: 8px; }
.nb-search .field { flex: 1; min-width: 0; }
.nb-found { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.nb-found button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 8px 12px;
  border: 0; border-top: 1px solid var(--line); background: var(--card); color: var(--ink); }
.nb-found li:first-child button { border-top: 0; }
.nb-found button:hover { background: var(--paper); }
.nb-found b { font-weight: 500; }
.nb-found small, .nb-client small { display: block; color: var(--muted); font-size: 12.5px; }
.nb-found button > small { white-space: nowrap; }
.nb-client { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.nb-client b { font-weight: 500; }
.nb-client .link { margin-left: auto; }
.td-lane.can-book { cursor: pointer; }
.td-hint { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 1; pointer-events: none; background: var(--ink); color: #fff;
  font-size: 12px; font-variant-numeric: tabular-nums; border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
@media (max-width: 720px) {
  .bar-book { padding: 6px 10px; }
  .nb-panel { width: 100%; }
}
@media (hover: none) { .td-hint { display: none; } }
