/* Общие стили дашборда (дополняют Tailwind CDN) */
:root {
  --px-per-min: 2px;
}
html, body { width: 100%; height: 100%; font-family: Inter, "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", sans-serif; }
body { -webkit-tap-highlight-color: transparent; margin: 0; min-height: 100%; background: #f8fafc; font-size: 16px; }

/* ================= Каркас приложения =================
   Не зависит от Tailwind: режим определяется только шириной окна (media queries),
   поэтому переключается сразу при изменении размера окна.                       */
:root { --side-w: 220px; --shell-max: 1820px; }

.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; width: 100%; background: #f8fafc; }
.app-side {
  display: none; flex-direction: column; flex: none; width: var(--side-w);
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  background: #fff; border-right: 1px solid #e2e8f0; padding: 1rem .75rem;
}
.app-brand { display: flex; align-items: center; gap: .6rem; padding: 0 .4rem; margin-bottom: 1.5rem; }
.app-logo { width: 2.25rem; height: 2.25rem; flex: none; border-radius: .8rem; background: #4f46e5; color: #fff;
  display: grid; place-items: center; font-weight: 700; }
.app-logo-sm { width: 2rem; height: 2rem; border-radius: .6rem; font-size: .9rem; }
.app-side-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid #f1f5f9; font-size: .8rem; color: #94a3b8; }
.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-header {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  height: 3.5rem; padding: 0 1rem; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #e2e8f0;
}
.app-view { flex: 1 1 auto; min-width: 0; padding: 1rem 1rem 7rem; }
.app-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; background: #fff; border-top: 1px solid #e2e8f0; }

/* видимость элементов по режимам */
.only-mobile { display: grid !important; }
.only-mobile-block { display: block; }
.only-tablet, .not-mobile { display: none !important; }

/* Планшет: 768–1023 px — узкое меню из иконок, рабочая область на всю ширину окна */
@media (min-width: 768px) {
  .app-side { display: flex; width: 76px; padding: 1rem .6rem; }
  .app-brand { justify-content: center; padding: 0; }
  .app-brand-text, .app-side .nav-item span, .app-side-footer { display: none; }
  .app-side .nav-item { justify-content: center; padding: .75rem 0; }
  .app-header { padding: 0 1.5rem; }
  .app-view { padding: 1.25rem 1.5rem 2rem; }
  .app-bottom-nav { display: none; }
  .only-mobile, .only-mobile-block { display: none !important; }
  .only-tablet { display: inline !important; }
  .not-mobile { display: block !important; }
}

/* Компьютер: ≥ 1024 px — одна рабочая область не шире 1440 px по центру, по бокам спокойный фон */
@media (min-width: 1024px) {
  body { background: #e8ecf2; }
  .app-shell { max-width: var(--shell-max); margin: 0 auto; box-shadow: 0 0 0 1px #dde3ec, 0 10px 40px rgba(15,23,42,.06); }
  .app-side { width: var(--side-w); padding: 1.25rem .85rem; }
  .app-brand { justify-content: flex-start; padding: 0 .4rem; }
  .app-brand-text, .app-side .nav-item span { display: block; }
  .app-side-footer { display: block; }
  .app-side .nav-item { justify-content: flex-start; padding: .7rem .85rem; }
  .only-tablet { display: none !important; }
}

.input {
  width: 100%; border-radius: .75rem; border: 1px solid #e2e8f0; background: #fff;
  padding: .7rem .85rem; font-size: 1rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
textarea.input { min-height: 4.5rem; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: .75rem; padding: .65rem 1rem; font-weight: 600; font-size: .95rem;
  min-height: 44px; transition: background-color .15s, color .15s, box-shadow .15s; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: #4f46e5; color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-ghost { background: #fff; color: #334155; box-shadow: inset 0 0 0 1px #e2e8f0; }
.btn-ghost:hover { background: #f8fafc; }
.btn-sm { min-height: 34px; padding: .35rem .7rem; font-size: .85rem; border-radius: .6rem; }

.seg { display: inline-flex; background: #f1f5f9; border-radius: .8rem; padding: 3px; }
.seg button { border-radius: .6rem; padding: .45rem .8rem; font-weight: 600; font-size: .9rem; color: #475569; min-height: 38px; }
.seg button.active { background: #fff; color: #1e293b; box-shadow: 0 1px 2px rgba(15,23,42,.12); }

.lang-select {
  border-radius: .6rem; border: 1px solid #e2e8f0; background: #fff; padding: .35rem .5rem; font-size: .85rem;
}

/* ---------- Лента дня ---------- */
.tl-wrap { overflow-x: auto; }
.tl { display: grid; min-width: 100%; }
.tl-gutter { position: relative; width: 52px; flex: none; }
.tl-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: .72rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
.tl-col {
  position: relative; border-left: 1px solid #e2e8f0;
  background-image: repeating-linear-gradient(to bottom, #e2e8f0 0, #e2e8f0 1px, transparent 1px, transparent calc(var(--px-per-min) * 60)),
                    repeating-linear-gradient(to bottom, #f1f5f9 0, #f1f5f9 1px, transparent 1px, transparent calc(var(--px-per-min) * 30));
}
.tl-cell { position: absolute; left: 0; right: 0; }
.tl-cell.drop-hover { background: rgba(99,102,241,.12); box-shadow: inset 0 2px 0 #6366f1; }

.free-block {
  position: absolute; left: 4px; right: 4px; border-radius: .6rem;
  background: repeating-linear-gradient(135deg, #f8fafc 0 8px, #f1f5f9 8px 16px);
  border: 1px dashed #cbd5e1; pointer-events: none; overflow: hidden;
  display: flex; align-items: flex-start; justify-content: space-between; gap: .3rem; padding: .3rem .45rem;
}
.free-block .free-label { font-size: .72rem; color: #94a3b8; }
.free-block button { pointer-events: auto; font-size: .75rem; font-weight: 600; color: #4f46e5; background: #fff;
  border-radius: .5rem; padding: .15rem .5rem; box-shadow: inset 0 0 0 1px #c7d2fe; min-height: 26px; white-space: nowrap; }
.free-block button:hover { background: #eef2ff; }

.bk-card {
  position: absolute; left: 4px; right: 4px; border-radius: .65rem; overflow: hidden; cursor: pointer;
  padding: .3rem .5rem .3rem .65rem; font-size: .78rem; line-height: 1.25; z-index: 2;
  box-shadow: 0 1px 2px rgba(15,23,42,.08); border: 1px solid transparent; touch-action: pan-y;
}
.bk-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--staff-color, var(--stripe)); }
.bk-card .bk-time { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-card .badge, .bk-confirm-inline { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-card .bk-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-card .bk-sub { color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-card a.bk-phone { color: #4f46e5; font-weight: 500; }
.bk-drag { cursor: grab; }
.bk-card .bk-actions { display: none; }
@media (hover: hover) and (min-width: 768px) {
  .bk-card:hover .bk-actions { display: flex; }
}
.bk-actions { position: absolute; right: 4px; bottom: 4px; gap: 3px; }
.bk-actions button { background: #fff; border-radius: .45rem; font-size: .72rem; padding: .15rem .35rem; font-weight: 600;
  box-shadow: 0 0 0 1px #e2e8f0; color: #334155; }
.bk-actions button:hover { background: #f1f5f9; }
.bk-confirm-inline { font-size: .72rem; font-weight: 700; background: #f59e0b; color: #fff; border-radius: .45rem; padding: .12rem .45rem; }

.st-new       { --stripe: #f59e0b; background: #fffbeb; border-color: #fcd34d; }
.st-confirmed { --stripe: #4f46e5; background: #eef2ff; border-color: #c7d2fe; }
.st-moved     { --stripe: #8b5cf6; background: #f5f3ff; border-color: #ddd6fe; }
.st-done      { --stripe: #10b981; background: #ecfdf5; border-color: #a7f3d0; }
.st-cancelled { --stripe: #94a3b8; background: #f8fafc; border-color: #e2e8f0; opacity: .75; }
.st-cancelled .bk-name { text-decoration: line-through; }
.st-no_show   { --stripe: #f43f5e; background: #fff1f2; border-color: #fecdd3; opacity: .85; }

.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .1rem .5rem; font-size: .72rem; font-weight: 600; }
.b-new { background: #fef3c7; color: #92400e; }
.b-confirmed { background: #e0e7ff; color: #3730a3; }
.b-moved { background: #ede9fe; color: #5b21b6; }
.b-done { background: #d1fae5; color: #065f46; }
.b-cancelled { background: #f1f5f9; color: #475569; }
.b-no_show { background: #ffe4e6; color: #9f1239; }

/* Мигание новых записей из бота */
@keyframes sb-blink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.0); background: #fffbeb; }
  50% { box-shadow: 0 0 0 4px rgba(245,158,11,.45); background: #fde68a; }
}
.blink { animation: sb-blink 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .blink { animation: none; box-shadow: 0 0 0 3px rgba(245,158,11,.6); } }

.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #ef4444; z-index: 5; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }

/* Во время перетаскивания только ячейки ловят указатель */
.is-dragging .bk-card, .is-dragging .free-block button, .is-dragging .now-line { pointer-events: none; }
.sortable-ghost { visibility: hidden; }
.sortable-fallback { opacity: .9 !important; box-shadow: 0 10px 25px rgba(15,23,42,.25) !important; transform: rotate(1deg); }
.drop-label { position: fixed; z-index: 100; pointer-events: none; background: #1e293b; color: #fff; font-size: .8rem; font-weight: 600;
  padding: .2rem .5rem; border-radius: .4rem; }

/* Модальное окно: снизу на телефоне, по центру на десктопе */
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 1.25rem 1.25rem 0 0; padding: 1.25rem; }
@media (min-width: 640px) {
  .modal-back { align-items: center; }
  .modal { max-width: 32rem; border-radius: 1.25rem; }
}

.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 80; display: flex; flex-direction: column; gap: .5rem; width: calc(100% - 32px); max-width: 28rem; }
@media (min-width: 768px) { .toast-wrap { bottom: 24px; } }
.toast { border-radius: .8rem; padding: .7rem 1rem; color: #fff; font-weight: 500; font-size: .92rem; box-shadow: 0 8px 20px rgba(15,23,42,.2); }
.toast-ok { background: #0f766e; }
.toast-err { background: #be123c; }
.toast-info { background: #b45309; }

.nav-item { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border-radius: .75rem; font-weight: 500; color: #475569; }
.nav-item:hover { background: #f1f5f9; }
.nav-item.active { background: #eef2ff; color: #4338ca; }
.bnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 8px; font-size: .64rem; font-weight: 600; color: #64748b; min-width: 0; }
.bnav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.bnav-item.active { color: #4338ca; }
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

/* ---------- Крупнее текст на компьютере и планшете (основной текст не мельче 14 px) ---------- */
@media (min-width: 768px) {
  .bk-card { font-size: .875rem; line-height: 1.3; }
  .bk-confirm-inline, .bk-actions button { font-size: .8rem; }
  .badge { font-size: .78rem; }
  .tl-hour { font-size: .8rem; }
  .free-block .free-label { font-size: .8rem; }
  .free-block button { font-size: .85rem; min-height: 28px; }
  .lang-select { font-size: .9rem; padding: .4rem .55rem; }
  .btn-sm { font-size: .9rem; }
}
/* Лента: при многих сотрудниках прокручивается внутри себя, страница не расширяется */
.tl-wrap { max-width: 100%; overscroll-behavior-x: contain; }

/* ---------- Полоска отменённой / «не пришёл» записи: бледная, узкая, поверх свободного окна, дорожку не занимает ---------- */
.bk-card.bk-strip { left: auto; right: 2px; width: 12px; padding: 0; z-index: 1; opacity: .5; }
.bk-card.bk-strip > * { display: none; }
.bk-card.bk-strip:hover { opacity: .9; }
.free-block { z-index: 0; }

/* ---------- Компьютер ≥ 1024 px: окно целиком, прокручивается только лента ---------- */
@media (min-width: 1024px) {
  .app-shell { width: min(100%, var(--shell-max)); height: 100vh; height: 100dvh; min-height: 0; margin: 0 auto; }
  .app-main { height: 100%; overflow: hidden; }
  .app-view { overflow-y: auto; padding-bottom: 1.5rem; min-height: 0; }
  .app-view:has(.day-root) { overflow: hidden; display: flex; flex-direction: column; }
  .day-root { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 1rem; }
  .day-root > * { flex: none; margin: 0 !important; }
  .day-root > .tl-section { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .day-root > .tl-section > .tl-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; }
  .day-root > .tl-section ~ p { display: none; }
}

/* Отладка ?debug=1 */
#debug-box { position: fixed; left: 8px; bottom: 8px; z-index: 9999; background: rgba(15,23,42,.88); color: #fff;
  font: 12px/1.45 ui-monospace, Consolas, monospace; padding: 6px 10px; border-radius: 8px; pointer-events: none; }
.tl-wrap > div > .tl:first-child { position: sticky; top: 0; z-index: 6; background: #f8fafc; }

/* Перетаскивание карточек (pointer events) */
body.sb-dragging, body.sb-dragging * { user-select: none !important; -webkit-user-select: none !important; cursor: grabbing !important; }
.bk-drag { user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.drag-clone { box-shadow: 0 10px 25px rgba(15,23,42,.25) !important; transform: rotate(1deg); }
.drag-clone .bk-actions { display: none !important; }

/* ---- Аналитика ---- */
.an-wrap { max-width: 1100px; }
.an-cards { display: grid; grid-auto-rows: 1fr; gap: .65rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .an-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.an-card, .an-panel { background: #fff; border-radius: 1rem; box-shadow: 0 0 0 1px #e2e8f0; padding: .85rem 1rem; min-width: 0; }
.an-lbl { font-size: .78rem; color: #64748b; font-weight: 500; }
.an-val { font-size: 1.45rem; font-weight: 700; line-height: 1.2; margin-top: .1rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.an-sub { font-size: .72rem; color: #94a3b8; margin-top: .2rem; }
.an-delta { display: inline-flex; border-radius: 999px; padding: .05rem .5rem; font-size: .76rem; font-weight: 600; }
.an-up { background: #d1fae5; color: #065f46; } .an-down { background: #ffe4e6; color: #9f1239; } .an-zero { background: #f1f5f9; color: #475569; }
.an-was { font-size: .76rem; color: #94a3b8; }
.an-bot-ico { display: inline-block; vertical-align: -2px; margin-right: .3rem; color: #6366f1; }
.an-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.an-table th { text-align: left; font-size: .72rem; color: #64748b; font-weight: 600; padding: .4rem .45rem; border-bottom: 1px solid #e2e8f0; }
.an-table td { padding: .5rem .45rem; border-bottom: 1px solid #f1f5f9; }
.an-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-bar { height: 6px; background: #eef2ff; border-radius: 999px; overflow: hidden; margin-top: 3px; }
.an-bar i { display: block; height: 100%; background: #6366f1; border-radius: 999px; }
@media (max-width: 480px) {   .an-table th, .an-table td { padding: .4rem .25rem; } .an-table td .text-xs, .an-pct { display: none; } .an-panel { padding: .75rem .7rem; } }

/* Предложить сегодня: каждый клиент — отдельная карточка */
.sg-wrap { max-width: 960px; }
.sg-list { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
.sg-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1rem 1.1rem; box-shadow: 0 2px 6px rgba(15,23,42,.07); }
@media (max-width: 480px) { .sg-list { gap: 12px; } .sg-card { padding: .85rem .9rem; } }

/* Подсказка на графике выручки */
.an-col { cursor: pointer; }
.an-col.on rect:nth-child(2) { filter: brightness(1.18); }
.an-tip { position: absolute; z-index: 20; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease;
  background: #fff; border-radius: .8rem; box-shadow: 0 8px 24px rgba(15,23,42,.18), 0 0 0 1px #e2e8f0; padding: .6rem .8rem; min-width: 170px; max-width: 240px; font-size: .8rem; }
.an-tip.show { opacity: 1; transform: none; }
.an-tip-d { color: #64748b; font-size: .75rem; }
.an-tip-d::first-letter { text-transform: uppercase; }
.an-tip-v { font-size: 1.25rem; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; margin-bottom: .25rem; }
.an-tip-r { display: flex; justify-content: space-between; gap: .75rem; color: var(--c); padding-left: .5rem; border-left: 3px solid var(--c); margin-top: .2rem; }
.an-tip-r b { font-variant-numeric: tabular-nums; }

/* ---- Выходной / скрытый мастер в ленте дня ---- */
.tl-col.tl-col-off { background-color: #fffbeb; }

/* ---- «Неделя»: 7 колонок по дням (на телефоне — дни друг под другом) ---- */
.wk-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 768px) {
  .wk-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; padding-bottom: .5rem; align-items: stretch; }
}
.wk-day { background: #fff; border-radius: 1rem; box-shadow: inset 0 0 0 1px #e2e8f0; display: flex; flex-direction: column; min-width: 0; }
.wk-day.wk-today { box-shadow: inset 0 0 0 2px #818cf8; }
.wk-day.wk-off { background: #f8fafc; }
.wk-head { text-align: left; padding: .75rem; border-bottom: 1px solid #f1f5f9; width: 100%; border-radius: 1rem 1rem 0 0; cursor: pointer; }
.wk-head:hover { background: #f8fafc; }
.wk-list { display: flex; flex-direction: column; gap: .4rem; padding: .5rem; min-height: 3.5rem; flex: 1; }
.wk-none { padding: 0 .75rem .75rem; font-size: .8rem; color: #94a3b8; text-align: center; margin-top: -2.4rem; pointer-events: none; }
.wk-card { border-radius: .65rem; padding: .4rem .55rem; font-size: .8rem; line-height: 1.3; background: #f8fafc; border-left: 4px solid var(--staff-color, #94a3b8); cursor: pointer; min-width: 0; }
.wk-card.wk-drag { cursor: grab; }
.wk-card.wk-new { background: #fffbeb; }
.wk-card.wk-confirmed { background: #eef2ff; }
.wk-card.wk-moved { background: #f0f9ff; }
.wk-card.wk-done { background: #ecfdf5; }
.wk-card.wk-cancelled, .wk-card.wk-no_show { background: #f8fafc; opacity: .6; }
.wk-ghost { opacity: .4; outline: 2px dashed #6366f1; }
.wk-card .badge { font-size: .65rem; padding: .05rem .4rem; }
.wk-card b { white-space: nowrap; font-size: .75rem; }


/* ================= Команда 13 ================= */
/* ---------- Языки: кнопки-флаги ---------- */
.lang-flags { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.lang-flag { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .5rem; min-height: 34px; border-radius: .6rem;
  border: 1px solid #e2e8f0; background: #fff; font-size: .75rem; font-weight: 700; color: #475569; cursor: pointer; }
.lang-flag img { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(15,23,42,.18); flex: none; }
.lang-flag:hover { background: #f8fafc; }
.lang-flag.active { border-color: #6366f1; background: #eef2ff; color: #3730a3; box-shadow: 0 0 0 2px #c7d2fe; }

/* ---------- Неделя: статус — цветная точка, колонки одной высоты и прокручиваются внутри ---------- */
.wk-dot { width: 9px; height: 9px; border-radius: 99px; flex: none; background: #94a3b8; }
.wk-dot-new { background: #f59e0b; } .wk-dot-confirmed { background: #6366f1; } .wk-dot-moved { background: #0ea5e9; }
.wk-dot-done { background: #10b981; } .wk-dot-cancelled { background: #cbd5e1; } .wk-dot-no_show { background: #f43f5e; }
@media (min-width: 768px) {
  .wk-day { max-height: min(72vh, 680px); min-height: 22rem; }
  .wk-list { overflow-y: auto; min-height: 0; flex: 1 1 0; scrollbar-width: thin; }
}
.wk-card .font-medium, .wk-card .text-xs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Месяц ---------- */
.mo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.mo-wd { text-align: center; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #64748b; padding: .2rem 0; }
.mo-day { background: #fff; border-radius: .8rem; box-shadow: inset 0 0 0 1px #e2e8f0; padding: .45rem .5rem; min-height: 5rem; text-align: left;
  display: flex; flex-direction: column; gap: .3rem; min-width: 0; cursor: pointer; }
.mo-day:hover { background: #f8fafc; box-shadow: inset 0 0 0 1px #a5b4fc; }
.mo-day.mo-out { opacity: .45; }
.mo-day.mo-off { background: #f8fafc; }
.mo-day.mo-today { box-shadow: inset 0 0 0 2px #818cf8; }
.mo-num { font-weight: 700; font-size: .95rem; }
.mo-count { font-size: .72rem; font-weight: 700; background: #eef2ff; color: #4338ca; border-radius: 99px; padding: 0 .4rem; min-width: 1.3rem; text-align: center; }
.mo-bar { height: 6px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.mo-bar > div { height: 100%; border-radius: 99px; }
.mo-note { font-size: .68rem; color: #64748b; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .mo-day { min-height: 4rem; padding: .3rem; } .mo-note { display: none; } .mo-num { font-size: .85rem; } }

/* ---------- Клиенты: шкала цикла, чипы, теги ---------- */
.cy-bar { height: 7px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.cy-fill { height: 100%; border-radius: 99px; transition: width .2s; }
.cy-label { font-size: .75rem; color: #475569; margin-top: .2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-variant-numeric: tabular-nums; }
.cy-tag { font-size: .68rem; font-weight: 700; border-radius: 99px; padding: 0 .45rem; text-transform: lowercase; }
.sdot { width: .6rem; height: .6rem; border-radius: 99px; display: inline-block; flex: none; }
.tag-chip { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; background: #f1f5f9; color: #475569; border-radius: 99px; padding: .05rem .5rem; }
.chip { font-size: .85rem; font-weight: 600; padding: .35rem .75rem; border-radius: 99px; background: #fff; color: #475569; box-shadow: inset 0 0 0 1px #e2e8f0; min-height: 34px; }
.chip:hover { background: #f8fafc; }
.chip.chip-on { background: #4f46e5; color: #fff; box-shadow: none; }
.chip-tag { font-size: .78rem; padding: .2rem .6rem; min-height: 28px; }
.chip b { opacity: .7; font-weight: 600; margin-left: .15rem; }
.slot-chip { font-size: .8rem; font-weight: 600; background: #eef2ff; color: #4338ca; border-radius: 99px; padding: .2rem .65rem; }
.slot-chip:hover { background: #e0e7ff; }
.cl-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; cursor: pointer; }
.cl-row:hover { background: #f8fafc; }
@media (max-width: 640px) { .cl-row { flex-direction: column; gap: .35rem; } .cl-row > .text-right { text-align: left; display: flex; gap: .75rem; } }
.rm-block { background: #fff7ed; border-radius: 1.1rem; box-shadow: inset 0 0 0 1px #fed7aa; padding: 1rem; }
.rm-block .sg-card { background: #fff; }

/* ---------- Мастера и услуги ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 99px; color: #fff; font-weight: 700; background-size: cover; background-position: center; flex: none; font-size: .85rem; }
.swatch { width: 28px; height: 28px; border-radius: 99px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); outline: 2px solid transparent; outline-offset: 2px; }
.swatch.on { outline-color: #1e293b; }
.sv-cat { padding: .6rem 1rem .25rem; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; background: #f8fafc; border-top: 1px solid #f1f5f9; }
.sv-cat:first-child { border-top: 0; border-radius: 1rem 1rem 0 0; }
.tpl-preview { font-size: .82rem; color: #475569; background: #f8fafc; border-radius: .6rem; padding: .4rem .6rem; margin-top: .3rem; }

/* шкала цикла: полоска до 200 %, чёрточка «пора» на 100 % */
.cy-wrap { position: relative; padding-top: 11px; }
.cy-mark { position: absolute; left: 50%; top: -1px; transform: translateX(-50%); font-size: .6rem; font-weight: 700; color: #0f172a; line-height: 1; text-transform: lowercase; }
.cy-tick { position: absolute; left: 50%; top: 8px; width: 2px; height: 13px; margin-left: -1px; background: #0f172a; border-radius: 1px; }
.cy-arrow { position: absolute; right: -2px; top: 7px; font-size: .75rem; line-height: 1; color: #0f172a; }
/* карандаш и выбор в «Напомнить сегодня» */
.rm-text { position: relative; cursor: pointer; padding-right: 2.2rem; }
.rm-text:hover { background: #f1f5f9; }
.rm-pencil { position: absolute; right: .6rem; top: .55rem; color: #64748b; }
.rm-text.is-edited { box-shadow: inset 3px 0 0 #6366f1; }
.rm-edited-tag { display: block; font-size: .68rem; color: #4f46e5; font-weight: 600; margin-top: .15rem; }
.rm-pick { display: inline-flex; align-items: center; padding: .15rem; margin-top: .05rem; cursor: pointer; }
.rm-pick input { width: 1.1rem; height: 1.1rem; accent-color: #4f46e5; }
.rm-pick.is-full { opacity: .45; cursor: not-allowed; }
.rm-panel { position: sticky; bottom: 0; z-index: 20; margin-top: .75rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  background: #fff; border: 1px solid #c7d2fe; border-radius: 1rem; padding: .6rem .9rem; box-shadow: 0 -4px 14px rgba(15,23,42,.08); font-size: .9rem; }
/* мягкий резерв окна в ленте */
.res-block { position: absolute; left: 4px; right: 4px; border: 1px dashed #cbd5e1; background: rgba(241,245,249,.7); color: #94a3b8; border-radius: .5rem;
  padding: .1rem .4rem; font-size: .72rem; overflow: hidden; pointer-events: none; }
.res-block .res-time { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- Шкала клиента: градиент по всей ширине полоски, видна только заполненная часть ---- */
.cy-grad { background-image: linear-gradient(90deg, #10b981 0%, #fbbf24 38%, #f97316 50%, #ef4444 100%); background-repeat: no-repeat; background-position: left center; }

/* ---- «Неделя»: колонки до низа окна, шапка дня закреплена, прокрутка внутри колонки ---- */
@media (min-width: 768px) {
  .wk-day { max-height: none; min-height: 0; }
  .wk-grid { grid-template-rows: minmax(0, 1fr); height: calc(100dvh - 17rem); min-height: 24rem; }
}
@media (min-width: 1024px) {
  .app-view:has(.wk-root) { overflow: hidden; display: flex; flex-direction: column; }
  .wk-root { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 1rem; }
  .wk-root > * { flex: none; margin: 0 !important; }
  .wk-root > .wk-grid { flex: 1 1 auto; min-height: 0; height: auto; }
}

/* ---- «Месяц»: «Записей: N» — нейтральный серый, «новых +2» — плюс и число зелёные ---- */
.mo-cnt { color: #64748b; }
.mo-new { color: #64748b; }
.mo-new b { color: #059669; font-weight: 700; }

/* ---- Настройки: две колонки от 1024 px, закреплённая кнопка сохранения ---- */
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.set-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (min-width: 1024px) { .set-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.set-bar { position: sticky; bottom: 4.75rem; z-index: 30; display: flex; justify-content: flex-end; padding: .6rem 0; pointer-events: none; }
.set-bar .btn { pointer-events: auto; box-shadow: 0 6px 20px rgba(15,23,42,.18); }
.set-bar .btn:disabled { box-shadow: none; }
@media (min-width: 768px) { .set-bar { bottom: .5rem; } }

/* ---- Аналитика: «Откуда клиенты» ---- */
.an-donut-wrap { position: relative; width: 11rem; height: 11rem; flex: none; }
.an-donut { width: 100%; height: 100%; }
.an-donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.an-donut-c b { font-size: 1.6rem; line-height: 1; }
.an-donut-c span { font-size: .7rem; color: #64748b; margin-top: .15rem; max-width: 5rem; }

/* ---- «Неделя» со шкалой времени (компьютер) ---- */
.wk2-scroll { overflow: auto; border-radius: 1rem; background: #fff; box-shadow: inset 0 0 0 1px #e2e8f0; max-height: calc(100dvh - 17rem); min-height: 24rem; }
.wk2-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(110px, 1fr)); min-width: 860px; }
.wk2-corner, .wk2-head { position: sticky; top: 0; z-index: 8; background: #fff; border-bottom: 1px solid #c4ccd8; border-radius: 0; }
.wk2-head { border-left: 1px solid #f1f5f9; padding: .5rem .6rem; text-align: left; }
.wk2-head.wk-today { box-shadow: inset 0 3px 0 #818cf8; }
.wk2-gutter { position: sticky; left: 0; z-index: 4; background: #fff; }
.wk2-col { position: relative; border-left: 1px solid #f1f5f9; }
.wk2-col.wk-off { background: #f8fafc; }
.wk2-col.wk-today { background: #fafaff; }
.wk2-col > i { position: absolute; left: 0; right: 0; height: 1px; background: #f1f5f9; pointer-events: none; }
.wk2-card { position: absolute; box-sizing: border-box; overflow: hidden; border-radius: .5rem; padding: .15rem .35rem; font-size: .75rem; line-height: 1.25; background: #f8fafc; border-left: 4px solid var(--staff-color, #94a3b8); box-shadow: 0 0 0 1px #e2e8f0; cursor: pointer; z-index: 2; white-space: nowrap; }
.wk2-card.wk-drag { cursor: grab; touch-action: none; }
.wk2-card.wk-new { background: #fffbeb; } .wk2-card.wk-confirmed { background: #eef2ff; } .wk2-card.wk-moved { background: #f0f9ff; } .wk2-card.wk-done { background: #ecfdf5; }
.wk2-card.wk-cancelled, .wk2-card.wk-no_show { background: #f8fafc; opacity: .6; }
.wk2-card.wk-ghost { z-index: 7; }
.wk2-n { font-weight: 500; }
.wk2-tiny { padding-top: 0; padding-bottom: 0; display: flex; gap: .3rem; align-items: center; }
.wk2-tiny .wk2-n { overflow: hidden; text-overflow: ellipsis; }
.wk2-prev { position: absolute; left: 2px; right: 2px; z-index: 6; pointer-events: none; border: 2px dashed #4f46e5; background: rgba(79,70,229,.08); color: #4338ca; border-radius: .5rem; font-size: .75rem; font-weight: 700; padding: .1rem .3rem; }
@media (min-width: 1024px) { .wk-root > .wk2-scroll { flex: 1 1 auto; min-height: 0; max-height: none; } }

.cy-line { font-size: .72rem; color: #64748b; line-height: 1.3; }
.wk2-gutter .tl-hour:first-child { transform: none; top: 2px !important; }

/* ---------- Команда 21: контраст карточек в «Записях» (спокойные окна, насыщеннее записи) ---------- */
.free-block { background: #fbfcfe; border: 1px dashed #d3dae6; border-radius: .6rem; }          /* без полосок, светлый фон, тонкий пунктир */
.free-block .free-label { color: #a3adbd; }
.bk-card { box-shadow: 0 1px 3px rgba(15,23,42,.14), 0 1px 2px rgba(15,23,42,.08); padding-left: .85rem; }
.bk-card::before { width: 6px; }                                                                  /* полоска слева толще */
.st-new       { --stripe: #f59e0b; background: #fff4cf; border-color: #f2cf69; }
.st-confirmed { --stripe: #4f46e5; background: #dfe6ff; border-color: #a9b6f5; }                  /* «Подтверждена» чётко отличается от фона */
.st-moved     { --stripe: #8b5cf6; background: #ece3ff; border-color: #c2aef5; }                  /* «Перенесена» тоже */
.st-done      { --stripe: #10b981; background: #d9f5e8; border-color: #8fd9b8; }
.wk-card, .wk2-card { box-shadow: 0 1px 3px rgba(15,23,42,.12); border-left-width: 5px; }
.wk-card.wk-new, .wk2-card.wk-new { background: #fff4cf; }
.wk-card.wk-confirmed, .wk2-card.wk-confirmed { background: #dfe6ff; }
.wk-card.wk-moved, .wk2-card.wk-moved { background: #ece3ff; }
.wk-card.wk-done, .wk2-card.wk-done { background: #d9f5e8; }

/* ---------- Команда 21: медкарта, заметки, защита базы ---------- */
.allergy-banner { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; border-radius: .75rem; padding: .5rem .75rem; margin-bottom: .75rem; font-size: .9rem; word-break: break-word; }
.client-note { background: #f1f5f9; border-radius: .75rem; padding: .45rem .7rem; margin-bottom: .5rem; font-size: .85rem; color: #334155; word-break: break-word; }
.bk-warn { color: #dc2626; font-weight: 700; }
.leak-banner { background: #fff1f2; border: 1px solid #fda4af; color: #9f1239; border-radius: 1rem; padding: .75rem 1rem; }
.leak-chip { background: #fff; border: 1px solid #fda4af; border-radius: 999px; padding: .1rem .6rem; font-size: .8rem; color: #9f1239; margin: .1rem .1rem 0 0; }
.leak-chip:hover { background: #ffe4e6; }
.visit-feed { list-style: none; padding: 0; margin: 0; max-height: 22rem; overflow-y: auto; }
.visit-item { border-left: 3px solid #cbd5e1; padding: .35rem 0 .5rem .75rem; margin-bottom: .35rem; }
.vf-photo { display: block; width: 4.5rem; font-size: .65rem; color: #64748b; text-align: center; }
.vf-photo img { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: .5rem; display: block; }
.tc-ph-box { min-height: 5rem; background: #fff; border: 1px dashed #cbd5e1; border-radius: .6rem; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tc-ph-box img { max-width: 100%; max-height: 9rem; object-fit: cover; }

/* ---------- Команда 22: Кабинет владельца ---------- */
.boss-head { background: #fff; border-bottom: 1px solid #e2e8f0; padding: .6rem 0; position: sticky; top: 0; z-index: 20; }
.boss-wrap { max-width: 1100px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.boss-narrow { max-width: 26rem; margin: 2rem auto; }
.boss-tabs { display: flex; gap: .25rem; overflow-x: auto; background: #f1f5f9; border-radius: .8rem; padding: 3px; }
.boss-tabs button { flex: 0 0 auto; border-radius: .6rem; padding: .45rem .8rem; font-weight: 600; font-size: .9rem; color: #475569; min-height: 38px; white-space: nowrap; }
.boss-tabs button.active { background: #fff; color: #1e293b; box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.boss-tabs button.boss-tab-red { color: #be123c; }
.boss-dot { display: inline-block; min-width: 1.15rem; padding: 0 .3rem; border-radius: 999px; background: #e11d48; color: #fff; font-size: .72rem; line-height: 1.15rem; text-align: center; }
.boss-red-btn { background: #e11d48; color: #fff; border-radius: .7rem; padding: .35rem .8rem; font-weight: 600; display: inline-block; }
.boss-red-btn:hover { background: #be123c; }
.boss-red-table td, .boss-red-table th { border-bottom-color: #fecdd3; }
.leak-banner { border-width: 2px; }
.nav-badge { margin-left: auto; min-width: 1.1rem; padding: 0 .35rem; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: .7rem; font-weight: 600; line-height: 1.1rem; text-align: center; }
.bnav-item .nav-badge { position: absolute; margin: 0; transform: translate(14px, -4px); }
.bnav-item { position: relative; }
.ad-load-row { display: grid; grid-template-columns: minmax(6rem, 1fr) 2fr 3rem; align-items: center; gap: .5rem; font-size: .9rem; }
.boss-head .boss-wrap { flex-wrap: wrap; row-gap: .4rem; }
@media (max-width: 520px) { #boss-title { display: none; } }

/* ---- Команда 23: «Принёс бот», карточки при наведении на графики кабинета, дни рождения ---- */
.bv-card { background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 70%); border-radius: 1rem; box-shadow: 0 0 0 1px #e0e7ff; padding: 1rem 1.1rem; }
.bv-head { display: flex; gap: .7rem; align-items: flex-start; }
.bv-ico { flex: none; width: 2.4rem; height: 2.4rem; border-radius: .8rem; background: #e0e7ff; color: #4338ca; display: grid; place-items: center; }
.bv-main { margin-top: .6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; }
.bv-big { font-size: 2rem; line-height: 1.1; font-weight: 700; color: #1e1b4b; }
.bv-meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; color: #475569; font-size: .9rem; }
.bv-share { font-weight: 600; color: #4338ca; }
.bv-grid { display: grid; gap: .6rem; margin-top: .8rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.bv-sub { background: rgba(255,255,255,.75); border-radius: .8rem; padding: .6rem .8rem; box-shadow: 0 0 0 1px #eef2f7; }
.bv-sub-t { font-size: .78rem; color: #64748b; }
.bv-sub-v { font-weight: 600; color: #0f172a; margin-top: .1rem; }
.bv-sub-h { font-size: .75rem; color: #94a3b8; margin-top: .1rem; }
.bv-pay { margin-top: .8rem; padding: .55rem .8rem; border-radius: .8rem; background: #ecfdf5; color: #065f46; display: flex; flex-wrap: wrap; gap: .1rem .8rem; align-items: baseline; }
.bv-pay span { font-size: .78rem; color: #047857; opacity: .85; }

.mn-hit { cursor: default; }
.mn-col .mn-band { fill: transparent; }
.mn-col.on .mn-band { fill: #eef2ff; }
.mn-col.on .mn-bar { filter: brightness(.88); }
.mn-row.on, tr.mn-hit.on { background: #f5f7ff; border-radius: .5rem; }
.mn-arc.on { stroke-width: 7.2; }
.mn-tip { position: fixed; z-index: 60; left: 0; top: 0; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease;
  background: #fff; border-radius: .9rem; box-shadow: 0 12px 32px rgba(15,23,42,.2), 0 0 0 1px #e2e8f0; padding: .75rem .9rem; width: max-content; min-width: 220px; max-width: min(300px, calc(100vw - 16px)); font-size: .82rem; color: #334155; }
.mn-tip.show { opacity: 1; transform: none; }
.mn-tip-d { color: #64748b; font-size: .78rem; }
.mn-tip-d::first-letter { text-transform: uppercase; }
.mn-tip-v { font-size: 1.4rem; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; margin: .1rem 0 .3rem; }
.mn-tip-m { color: #94a3b8; margin-bottom: .2rem; }
.mn-tip-r { display: flex; justify-content: space-between; gap: .8rem; margin-top: .15rem; }
.mn-tip-r b { font-variant-numeric: tabular-nums; color: #0f172a; text-align: right; }
.mn-tip-r.mn-bot { color: #4338ca; }
.mn-tip-r.mn-bot b { color: #4338ca; }
.mn-tip i { font-style: normal; color: #94a3b8; }
.mn-tip-h { margin: .5rem 0 .15rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; }
.mn-tip-s { display: flex; justify-content: space-between; gap: .8rem; }
.mn-tip-s > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mn-tip-cmp { margin-top: .55rem; padding-top: .5rem; border-top: 1px solid #eef2f7; display: flex; flex-direction: column; gap: .15rem; }
.mn-tip-cmp > span:first-child { color: #64748b; font-size: .75rem; }


/* ---------- Команда 24: склад ---------- */
.stk-soon { background: #fefce8; border-radius: 1rem; box-shadow: 0 0 0 1px #fde68a; padding: .8rem 1rem; }
.stk-low { background: #fef3c7; color: #92400e; }
.stk-out { background: #fee2e2; color: #b91c1c; }
.stk-row { display: grid; grid-template-columns: 1fr 5.5rem 2.2rem auto; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.stk-row .input { padding-top: .45rem; padding-bottom: .45rem; }
.tc-usage { padding: .6rem; border-radius: .9rem; background: #fff; box-shadow: inset 0 0 0 1px #e2e8f0; }
.sv-norm { border-radius: .9rem; box-shadow: inset 0 0 0 1px #e2e8f0; padding: .6rem; }
.stk-pick { display: flex; flex-direction: column; max-height: 18rem; overflow-y: auto; border-radius: .8rem; box-shadow: inset 0 0 0 1px #e2e8f0; }
.stk-pick-row { display: flex; align-items: center; gap: .6rem; padding: .35rem .6rem; border-bottom: 1px solid #f1f5f9; font-size: .9rem; }
.stk-pick-row:last-child { border-bottom: 0; }
.stk-pick-row input[type="checkbox"] { width: 1.1rem; height: 1.1rem; }
.stk-pick-qty { width: 5.5rem; padding: .35rem .5rem; }
.stk-issue { padding: .6rem 0; border-top: 1px solid #f1f5f9; }
.stk-issue:first-child { border-top: 0; }
@media (max-width: 520px) { .stk-row { grid-template-columns: 1fr 4.5rem 2rem auto; } }

/* ---------- Команда 25: сетка в «Записях» (вид «День» и «Неделя») ----------
   Команда 26: клетки как в тетради — заметная серая линия на каждый час, светлее пунктир на каждые полчаса, вертикальные линии между колонками.
   Карточки лежат поверх сетки, свободные окна прозрачные (линии видны сквозь них). */
:root { --grid-hour: #c4ccd8; --grid-half: #d9dfe8; --grid-vert: #c4ccd8; }   /* Команда 26: линии заметные, но спокойные */
.tl-col {
  border-left: 1px solid var(--grid-vert);
  background-image: repeating-linear-gradient(to bottom, var(--grid-hour) 0, var(--grid-hour) 1px, transparent 1px, transparent calc(var(--px-per-min) * 60));
}
.tl-col::before, .wk2-col::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  -webkit-mask-image: repeating-linear-gradient(to right, #000 0, #000 4px, transparent 4px, transparent 8px);
  mask-image: repeating-linear-gradient(to right, #000 0, #000 4px, transparent 4px, transparent 8px);
}
.tl-col::before {
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--px-per-min) * 30), var(--grid-half) calc(var(--px-per-min) * 30),
    var(--grid-half) calc(var(--px-per-min) * 30 + 1px), transparent calc(var(--px-per-min) * 30 + 1px), transparent calc(var(--px-per-min) * 60));
}
.wk2-col { --wk-px: 1.6px; }            /* = WK_PX в app.js */
.wk2-col::before {
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--wk-px) * 30), var(--grid-half) calc(var(--wk-px) * 30),
    var(--grid-half) calc(var(--wk-px) * 30 + 1px), transparent calc(var(--wk-px) * 30 + 1px), transparent calc(var(--wk-px) * 60));
}
.wk2-col { border-left: 1px solid var(--grid-vert); }
.wk2-head { border-left: 1px solid var(--grid-vert); }
.wk2-scroll { box-shadow: inset 0 0 0 1px var(--grid-vert); }
.wk2-col > i { background: var(--grid-hour); height: 1px; }

/* ---------- Команда 25: склад — карточки выдач, «любимые бренды», поставщики ---------- */
.stk-issue-card { background: #f8fafc; border: 1px solid #cbd5e1; border-radius: .9rem; padding: .7rem .9rem; margin-bottom: .75rem; }
.stk-issue-card .stk-issue-h { font-size: 1.1rem; font-weight: 700; color: #0f172a; font-variant-numeric: tabular-nums; }
.stk-issue-card .stk-issue-sum { font-weight: 700; font-variant-numeric: tabular-nums; }
.stk-sums { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .9rem; margin: .3rem 0 .8rem; }
.stk-sums b { font-variant-numeric: tabular-nums; }
.stk-hint-brand { display: inline-block; font-size: .75rem; color: #92400e; background: #fef3c7; border-radius: 99px; padding: .05rem .5rem; margin-left: .3rem; }
.fav-brands { display: flex; flex-wrap: wrap; gap: .35rem; }
.fav-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; background: #fff; border: 1px solid #cbd5e1; border-radius: 99px; padding: .15rem .6rem; cursor: pointer; }
.fav-chip:has(input:checked) { background: #eef2ff; border-color: #818cf8; color: #3730a3; }
.fav-note { background: #f5f3ff; }
.stk-sup-group { border: 1px solid #e2e8f0; border-radius: .8rem; padding: .6rem .8rem; margin-bottom: .6rem; background: #fff; }
.stk-new-sup { border: 1px dashed #cbd5e1; border-radius: .8rem; padding: .6rem; }
.free-block { background: transparent; border-color: #b6c0ce; }          /* Команда 25: сетка просвечивает сквозь свободные окна */

/* ---------- Команда 26: приход (подсказки товара) и оформление формы записи ---------- */
.stk-sug { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 2px; background: #fff; border: 1px solid #cbd5e1; border-radius: .8rem;
  box-shadow: 0 10px 24px rgba(15,23,42,.14); max-height: 16rem; overflow: auto; }
.stk-sug-row { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: .5rem .75rem; font-size: .9rem; border-bottom: 1px solid #f1f5f9; }
.stk-sug-row:last-child { border-bottom: 0; }
.stk-sug-row:hover, .stk-sug-row:focus { background: #eef2ff; }
.stk-sug-new { color: #4338ca; font-weight: 600; }
.sv-ph { width: 3.5rem; height: 3.5rem; border-radius: .8rem; background: #f1f5f9 center / cover no-repeat; border: 1px dashed #cbd5e1; flex: none; }

.br-prev { --br: #1e6fd9; --br-on: #fff; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .35rem; min-height: 11rem;
  padding: 1.1rem 1rem 1rem; border-radius: 1rem; overflow: hidden; text-align: center; color: #fff; background: center / cover no-repeat; }
.br-prev.br-nocover { background: linear-gradient(160deg, color-mix(in srgb, var(--br) 100%, #fff 0%) 0%, color-mix(in srgb, var(--br) 70%, #000 30%) 100%); }
.br-logo { width: 4.2rem; height: 4.2rem; border-radius: 50%; background: #fff center / cover no-repeat; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 4px 14px rgba(0,0,0,.25); flex: none; }
.br-logo-empty { display: grid; place-items: center; font-weight: 700; font-size: 1.5rem; color: var(--br); }
.br-name { font-size: 1.6rem; line-height: 1.15; font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,.35); overflow-wrap: anywhere; }
.br-slogan { font-size: .9rem; opacity: .95; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.br-btn { margin-top: .4rem; background: var(--br); color: var(--br-on); font-weight: 600; font-size: .85rem; border-radius: .8rem; padding: .45rem 1.4rem; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.br-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem; }
.br-font { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left; padding: .5rem .7rem; border: 1.5px solid #cbd5e1; border-radius: .8rem; font-size: 1.15rem; background: #fff; overflow: hidden; }
.br-font small { font-family: system-ui, sans-serif; font-size: .7rem; color: #64748b; font-weight: 400; }
.br-font.on { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.br-colors { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.br-sw { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; position: relative; cursor: pointer; display: grid; place-items: center; }
.br-sw.on { box-shadow: 0 0 0 2.5px #4f46e5; }
.br-sw-custom { background: conic-gradient(#e11d48, #f59e0b, #22c55e, #06b6d4, #6366f1, #e11d48); color: #fff; font-weight: 700; overflow: hidden; }
.br-sw-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.br-sw-custom span { pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* ---------- Команда 28 ---------- */
/* Склад → «Остатки»: таблица, итог внизу, на телефоне — прокрутка по горизонтали, первый столбец закреплён */
.stk-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stk-table { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.stk-table th, .stk-table td { padding: .55rem .6rem; border-bottom: 1px solid #f1f5f9; text-align: left; vertical-align: middle; }
.stk-table thead th { font-size: .72rem; color: #64748b; font-weight: 600; background: #f8fafc; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.stk-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stk-table tbody th.stk-c-name { font-weight: 400; min-width: 12rem; background: #fff; position: sticky; left: 0; z-index: 1; }
.stk-table thead th:first-child { position: sticky; left: 0; z-index: 2; }
.stk-table tr.stk-row-low th.stk-c-name, .stk-table tr.stk-row-low td { background: #fffbeb; }
.stk-c-brand { color: #475569; white-space: nowrap; }
.stk-c-act { width: 1%; white-space: nowrap; }
.stk-total { padding: .9rem 1rem 1rem; border-top: 2px solid #e2e8f0; text-align: right; }
.stk-total-main { font-size: 1.45rem; line-height: 1.25; font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; }
.stk-total-main b { color: #4338ca; }
.stk-total-sub { font-size: .95rem; color: #475569; margin-top: .15rem; }
@media (max-width: 640px) { .stk-total { text-align: left; } .stk-total-main { font-size: 1.2rem; } }

/* Клиенты: вкладки, компактная строка, маленькая шкала */
.cl-tabs { display: flex; width: 100%; }
.cl-tabs button { flex: 1; }
.cl-tab-n { font-variant-numeric: tabular-nums; margin-left: .2rem; font-size: .8rem; background: #e2e8f0; border-radius: 99px; padding: 0 .5rem; }
.cl-tabs button.active .cl-tab-n { background: #ffedd5; color: #c2410c; }
.cl-row-s { padding: .5rem .85rem; align-items: center; }
.cl-side { display: flex; align-items: center; gap: .6rem; flex: none; }
.cy-mini-wrap { display: inline-flex; align-items: center; gap: .35rem; }
.cy-mini { display: inline-block; width: 56px; height: 5px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.cy-mini i { display: block; height: 100%; border-radius: 99px; background-repeat: no-repeat; background-position: left center; }
.cy-tag-booked { color: #475569; background: #e2e8f0; }
@media (max-width: 640px) { .cl-row-s { flex-direction: row; align-items: flex-start; } .cl-side { flex-direction: column; align-items: flex-end; gap: .3rem; } }

/* Строка скидки при оплате */
.pay-line { margin-bottom: .75rem; padding: .6rem .8rem; border-radius: .9rem; background: #f8fafc; box-shadow: inset 0 0 0 1px #e2e8f0; }
.pay-line.pay-disc { background: #ecfdf5; box-shadow: inset 0 0 0 1px #a7f3d0; }
.pay-text { font-weight: 600; font-size: .95rem; color: #0f172a; }

/* Смены мастеров: календарь крупных квадратиков */
.sh-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sh-wd { text-align: center; font-size: .72rem; color: #64748b; font-weight: 600; text-transform: lowercase; }
.sh-day { aspect-ratio: 1 / 1; min-height: 46px; border-radius: .8rem; background: #f1f5f9; color: #334155; display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.1; border: 2px solid transparent; position: relative; }
.sh-day b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.sh-day small { font-size: .6rem; margin-top: 2px; opacity: .95; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.sh-day.on { background: var(--c, #6366f1); color: #fff; }
.sh-day.legacy { background: #fff; border: 2px dashed var(--c, #6366f1); }
.sh-day.sel { border-color: #0f172a; }
.sh-day.today b { text-decoration: underline; }
.sh-day.ro { cursor: default; min-height: 52px; aspect-ratio: auto; background: #f8fafc; padding: 4px 2px; }
.sh-day .dots { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; margin-top: 3px; }
.sh-day .dots i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sh-pad { display: block; }
.sh-choose { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .75rem; padding: .5rem; border-radius: .8rem; background: #f8fafc; }

/* «Кто работает» */
.who-box { background: #fff; border-radius: 1rem; box-shadow: 0 0 0 1px #e2e8f0; padding: .8rem 1rem; }
.who-table { display: flex; flex-direction: column; }
.who-row { display: grid; grid-template-columns: 11.5rem 1fr; gap: .5rem .8rem; padding: .5rem 0; border-top: 1px solid #f1f5f9; align-items: start; }
.who-row:first-child { border-top: 0; }
.who-day { font-weight: 600; font-size: .9rem; }
.who-day.is-today { color: #4338ca; }
.who-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.who-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; border-radius: 99px; padding: .2rem .65rem; background: #f8fafc; box-shadow: inset 0 0 0 1px #e2e8f0; border-left: 3px solid var(--c, #94a3b8); }
.who-call { font-size: .75rem; font-weight: 600; color: #4338ca; background: #eef2ff; border-radius: 99px; padding: 0 .5rem; }
.who-yes { color: #047857; font-weight: 700; }
.who-no { font-size: .72rem; font-weight: 700; color: #b91c1c; background: #fee2e2; border-radius: 99px; padding: 0 .45rem; }
.who-wait { font-size: .72rem; font-weight: 600; color: #64748b; background: #e2e8f0; border-radius: 99px; padding: 0 .45rem; }
@media (max-width: 640px) { .who-row { grid-template-columns: 1fr; gap: .25rem; } }
.off-warn { background: #fef2f2; color: #991b1b; border-radius: 1rem; box-shadow: 0 0 0 1px #fecaca; padding: .7rem 1rem; }
.off-link { text-decoration: underline; }
.bk-off { color: #b91c1c; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { white-space: nowrap; }
.max-w-4xl, .max-w-5xl, .max-w-3xl { min-width: 0; }
@media (max-width: 640px) { .cl-tabs button { padding: .45rem .35rem; font-size: .82rem; } .cl-tab-n { padding: 0 .35rem; } .cl-last { display: none; } }

/* Команда 29: «Финансы» — четыре карточки сверху, значки операций, «Структура», раскрытие расходников мастера */
.fin-top4 { display: grid; gap: .65rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .fin-top4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fin-top .an-val { font-size: 1.35rem; font-weight: 800; }
.fin-t-inc .an-val { color: #059669; }
.fin-t-exp .an-val { color: #e11d48; }
.fin-t-bal .an-val { color: #0f172a; }
.fin-t-bal.fin-neg .an-val { color: #e11d48; }
.fin-acts { display: inline-flex; gap: .15rem; justify-content: flex-end; }
.fin-ico, .fin-ico-wrap { display: inline-flex; }
.fin-ico { align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: .6rem; color: #475569; background: transparent; border: 0; cursor: pointer; }
.fin-ico:hover:not(:disabled) { background: #eef2ff; color: #4338ca; }
.fin-i-del:hover:not(:disabled) { background: #fff1f2; color: #e11d48; }
.fin-ico:disabled { opacity: .3; cursor: not-allowed; }
.fin-ico:focus-visible, .ms-open:focus-visible { outline: 2px solid #6366f1; outline-offset: 1px; }
.ms-open { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.ms-caret { display: inline-block; width: 1em; color: #94a3b8; }
.mn-pct { color: #475569; font-weight: 600; }

/* ---------- Команда 30: «Кто работает» — сетка недели ---------- */
.wg-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .25rem 0 .6rem; }
.wg-range { font-weight: 600; font-size: .9rem; min-width: 8.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.wg-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.wg-grid { width: 100%; min-width: 660px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.wg-grid th, .wg-grid td { padding: 3px; vertical-align: middle; }
.wg-grid thead th { text-align: center; font-weight: 600; padding: .35rem .2rem .25rem; }
.wg-wd { display: block; font-size: .72rem; color: #64748b; text-transform: lowercase; }
.wg-dn { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.wg-grid .wg-name { position: sticky; left: 0; z-index: 2; width: 11rem; background: #fff; text-align: left; box-shadow: 1px 0 0 #e2e8f0; padding-right: .5rem; }
.wg-who { display: flex; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 600; min-width: 0; }
.wg-who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-who .sdot { flex: none; }
.wg-cell { width: 100%; height: 46px; border: 0; border-radius: .6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: .82rem; font-weight: 600; line-height: 1.15; cursor: pointer; background: #f1f5f9; color: #94a3b8; transition: filter .12s, box-shadow .12s; }
.wg-cell:hover { filter: brightness(.97); box-shadow: inset 0 0 0 2px #cbd5e1; }
.wg-cell:focus-visible { outline: 2px solid #4338ca; outline-offset: 1px; }
.wg-cell.on { color: #0f172a; background: #eef2ff; background: color-mix(in srgb, var(--c, #6366f1) 24%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #6366f1) 45%, #fff); }
.wg-cell.on:hover { box-shadow: inset 0 0 0 2px var(--c, #6366f1); }
.wg-cell small { font-size: .65rem; font-weight: 500; }
.wg-mk { font-style: normal; font-size: .62rem; font-weight: 700; border-radius: 99px; padding: 0 .35rem; line-height: 1.25; }
.wg-mk-yes { color: #047857; font-size: .8rem; padding: 0; }
.wg-mk-no { color: #b91c1c; background: #fee2e2; }
.wg-mk-wait { color: #64748b; background: #e2e8f0; }
.wg-grid .wg-today { box-shadow: inset 2px 0 0 #4338ca, inset -2px 0 0 #4338ca; }
.wg-grid thead .wg-today-h { box-shadow: inset 2px 2px 0 0 #4338ca, inset -2px 0 0 #4338ca; border-radius: .6rem .6rem 0 0; }
.wg-grid thead .wg-today-h .wg-dn { color: #4338ca; }
.wg-grid tbody tr:last-child .wg-today { box-shadow: inset 2px 0 0 #4338ca, inset -2px 0 0 #4338ca, inset 0 -2px 0 #4338ca; border-radius: 0 0 .6rem .6rem; }
.wg-calls { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: .7rem; padding-top: .6rem; border-top: 1px solid #f1f5f9; }
.wg-call-row { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; }
.who-call { display: inline-block; padding: .15rem .65rem; }
@media (max-width: 640px) { .wg-grid .wg-name { width: 6.5rem; } .wg-who { font-size: .8rem; } .wg-cell { height: 42px; font-size: .78rem; } }

/* ---------- Команда 30: таблицы и списки на всю рабочую область (до ~1600 px) ---------- */
@media (min-width: 1024px) { .app-view { max-width: 1600px; } }
.app-view .max-w-3xl, .app-view .max-w-4xl, .app-view .max-w-5xl { max-width: none; }
.an-wrap, .sg-wrap { max-width: none; }
.boss-wrap { max-width: 1600px; padding-left: 20px; padding-right: 20px; }
@media (max-width: 640px) { .boss-wrap { padding-left: 16px; padding-right: 16px; } }

/* ---- Команда 33: «Ждут подтверждения», красный счётчик у «Записей» ---- */
.nav-badge.nav-badge-red { background: #dc2626; color: #fff; box-shadow: 0 0 0 2px #fff; }
.pend-block { border-radius: 1rem; background: #fffbeb; box-shadow: inset 0 0 0 1px #fde68a; padding: .9rem 1rem; }
.pend-dot { width: .65rem; height: .65rem; border-radius: 999px; background: #dc2626; flex: none; }
.pend-count { min-width: 1.4rem; padding: 0 .45rem; border-radius: 999px; background: #dc2626; color: #fff; font-size: .8rem; line-height: 1.4rem; text-align: center; }
.pend-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: .6rem; max-height: min(46vh, 26rem); overflow-y: auto; }
.pend-card { display: flex; flex-direction: column; gap: .6rem; background: #fff; border-radius: .9rem; box-shadow: 0 0 0 1px #e2e8f0; padding: .75rem .85rem; }
.pend-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.pend-actions .btn { flex: 1 1 auto; justify-content: center; }

/* ---------- Команда 34: «Настройки» вкладками ---------- */
.set-find { position: relative; max-width: 34rem; }
.set-hits { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; margin-top: .25rem; max-height: 22rem; overflow-y: auto; background: #fff; border-radius: .9rem; box-shadow: 0 12px 32px rgba(15,23,42,.18); border: 1px solid #e2e8f0; padding: .25rem; list-style: none; }
.set-hit { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: 100%; text-align: left; padding: .5rem .7rem; border-radius: .6rem; cursor: pointer; background: transparent; border: 0; font: inherit; }
.set-hit:hover, .set-hit:focus-visible { background: #eef2ff; outline: none; }
.set-hit-t { font-weight: 600; font-size: .9rem; color: #0f172a; }
.set-hit-h { font-size: .78rem; color: #64748b; line-height: 1.3; }
.set-hit-tab { font-size: .72rem; color: #4f46e5; font-weight: 600; }
.set-hit-none { padding: .6rem .8rem; font-size: .85rem; color: #64748b; }
.set-tabs { display: flex; gap: .25rem; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid #e2e8f0; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.set-tab { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; padding: .65rem .95rem; font-size: .9rem; font-weight: 600; color: #64748b; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none; }
.set-tab:hover { color: #0f172a; }
.set-tab.on { color: #4338ca; border-bottom-color: #4f46e5; }
.set-dot { width: .5rem; height: .5rem; border-radius: 999px; background: #f59e0b; display: inline-block; }
.set-dot.hidden { display: none; }
.set-pane[hidden] { display: none; }
.set-flash { animation: set-flash 2s ease-out; border-radius: .9rem; }
@keyframes set-flash { 0%, 65% { box-shadow: 0 0 0 4px rgba(99,102,241,.55); background-color: #eef2ff; } 100% { box-shadow: 0 0 0 4px rgba(99,102,241,0); background-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .set-flash { animation-duration: 2s; } }

/* ---------- Команда 35: загрузка картинок с превью, выпадающий список шрифтов, «Подтвердить все» ---------- */
.br-thumb { flex: none; display: block; background: #f1f5f9 center / cover no-repeat; border: 1.5px solid #cbd5e1; position: relative; overflow: hidden; }
.br-thumb-logo { width: 3.5rem; height: 3.5rem; border-radius: 50%; }
.br-thumb-cover { width: 6.2rem; height: 3.5rem; border-radius: .6rem; }
.br-thumb-empty::after { content: "—"; position: absolute; inset: 0; display: grid; place-items: center; color: #94a3b8; font-size: 1.1rem; }
.br-thumb-busy { opacity: .55; }
.br-st { border-radius: .6rem; padding: .3rem .6rem; overflow-wrap: anywhere; }
.br-st-ok { background: #ecfdf5; color: #047857; }
.br-st-info { background: #eff6ff; color: #1d4ed8; }
.br-st-err { background: #fff1f2; color: #be123c; }
.fp { position: relative; max-width: 24rem; }
.fp-btn { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; text-align: left; cursor: pointer; font-size: 1.1rem; background: #fff; }
.fp-cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-arrow { flex: none; color: #64748b; font-size: .9rem; }
.fp-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + .25rem); margin: 0; padding: .25rem; list-style: none; max-height: 18rem; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border: 1.5px solid #cbd5e1; border-radius: .8rem; box-shadow: 0 12px 28px rgba(15, 23, 42, .18); }
.fp-list.hidden { display: none; }
.fp-opt { padding: .45rem .7rem; border-radius: .55rem; cursor: pointer; font-size: 1.15rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-opt.act { background: #eef2ff; }
.fp-opt.on { box-shadow: inset 3px 0 0 #4f46e5; font-weight: 600; }
.fp-grp { padding: .5rem .7rem .15rem; font: 600 .68rem system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.confirm-all { margin-left: auto; }
@media (max-width: 640px) { .confirm-all { flex: 1 1 100%; margin-left: 0; } }

/* ---------- Команда 36: карточка клиента (метки, сворачиваемые блоки), запись с несколькими услугами ---------- */
.cc-top { display: flex; flex-wrap: wrap; gap: .4rem; }
.cc-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; background: #f1f5f9; color: #334155; font-size: .85rem; font-weight: 600; }
.cc-chip-bd { background: #fef3c7; color: #92400e; box-shadow: inset 0 0 0 1.5px #fcd34d; }
.cc-chip-disc { background: #dcfce7; color: #166534; box-shadow: inset 0 0 0 1.5px #86efac; }
.cc-fold { margin-bottom: .6rem; border-radius: 1rem; background: #fff; box-shadow: inset 0 0 0 1px #e2e8f0; }
.cc-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .85rem; cursor: pointer; font-weight: 600; font-size: .9rem; list-style: none; }
.cc-fold > summary::-webkit-details-marker { display: none; }
.cc-fold > summary::after { content: "▾"; color: #94a3b8; transition: transform .15s; }
.cc-fold:not([open]) > summary::after { transform: rotate(-90deg); }
.cc-fold-dot { width: .5rem; height: .5rem; border-radius: 999px; background: #6366f1; margin-left: auto; margin-right: .3rem; }
.cc-fold-body { padding: 0 .75rem .75rem; }
.rm-name { font-weight: 600; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.rm-name:hover { color: #4f46e5; text-decoration: underline; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: .5rem; color: #64748b; cursor: pointer; background: transparent; border: 0; }
.icon-btn:hover { background: #eef2ff; color: #4f46e5; }
#nb-price[readonly] { color: #475569; cursor: default; }
.cc-fold[data-fold="gift"] .cc-fold-body > div > .font-semibold { display: none; }
.cc-fold[data-fold="gift"] .cc-fold-body > div { margin-bottom: 0; }

/* ---------- Команда 39: кнопка «Режим показа» в шапке ---------- */
.tour-btn-link { display: inline-flex; align-items: center; gap: .4rem; min-height: 34px; padding: .3rem .7rem; border-radius: .7rem; font-weight: 700; font-size: .85rem; color: #4338ca; background: #eef2ff; box-shadow: inset 0 0 0 1px #c7d2fe; text-decoration: none; white-space: nowrap; }
.tour-btn-link:hover { background: #e0e7ff; }
.tour-btn-link.hidden { display: none; }
.leads-new { display: inline-block; min-width: 1.2rem; padding: 0 .35rem; border-radius: 99px; background: #e11d48; color: #fff; font-size: .75rem; font-weight: 800; text-align: center; }

/* ---------- Команда 40: «Сообщения» карточками ---------- */
.m40-card { background: #fff; border-radius: 1rem; box-shadow: 0 0 0 1px #e2e8f0; padding: .9rem 1rem; }
.m40-card.m40-open { box-shadow: 0 0 0 2px #a5b4fc; }
.m40-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.m40-bubble { margin-top: .6rem; max-width: 34rem; background: #e7f3ff; color: #0f172a; border-radius: 1rem 1rem 1rem .25rem; padding: .6rem .85rem; font-size: .95rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: inset 0 0 0 1px #cfe5fb; }
.m40-prev-cap { margin-top: .6rem; font-size: .75rem; font-weight: 600; color: #64748b; }
.m40-prev-cap + .m40-bubble { margin-top: .25rem; }
.m40-grid { display: grid; gap: 1rem; margin-top: .75rem; }
.m40-side { order: -1; }
@media (min-width: 900px) { .m40-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } .m40-side { order: 0; position: sticky; top: 1rem; align-self: start; } }
.m40-block { border-radius: .85rem; background: #f8fafc; padding: .7rem .75rem; }
.m40-lang { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; color: #475569; margin-bottom: .45rem; }
.m40-lock { display: flex; align-items: flex-start; gap: .5rem; border-radius: .7rem; background: #e2e8f0; color: #475569; padding: .45rem .65rem; user-select: none; cursor: default; }
.m40-lock-ic { font-size: .8rem; margin-top: .15rem; }
.m40-lock-cap { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #64748b; }
.m40-lock-txt { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.m40-legacy { border-radius: .7rem; background: #fef3c7; color: #78350f; font-size: .85rem; padding: .5rem .7rem; }
.m40-more { background: none; border: 0; padding: .25rem 0; color: #4f46e5; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }

/* ---- Команда 43: колокольчик событий, красный кружок у «Скоро день рождения» ---- */
.bell43 { position: relative; display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .8rem; color: #475569; background: transparent; transform-origin: 50% 12%; }
.bell43:hover { background: #f1f5f9; }
.bell43[aria-expanded="true"] { background: #eef2ff; color: #4f46e5; }
.bell43-n { position: absolute; top: .1rem; right: .05rem; min-width: 1.1rem; padding: 0 .3rem; border-radius: 999px; background: #dc2626; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.1rem; text-align: center; box-shadow: 0 0 0 2px #fff; }
.bell43-wiggle { animation: bell43-wiggle .9s ease-in-out 1; }          /* один раз и без звука; постоянного мигания нет */
@keyframes bell43-wiggle { 0% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .bell43-wiggle { animation: none; } }
.bell43-panel { position: fixed; z-index: 70; top: 3.6rem; right: 1rem; width: 24rem; max-width: calc(100vw - 2rem); max-height: min(34rem, calc(100vh - 5rem)); overflow-y: auto; background: #fff; border-radius: 1rem; box-shadow: 0 0 0 1px #e2e8f0, 0 12px 40px rgba(15,23,42,.18); }
.bell43-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .75rem .6rem 1rem; background: #fff; border-bottom: 1px solid #f1f5f9; }
.bell43-x { width: 2rem; height: 2rem; border-radius: .6rem; color: #64748b; }
.bell43-x:hover { background: #f1f5f9; }
.bell43-list { padding: .25rem 0; }
.bell43-row { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; padding: .6rem 1rem; min-height: 3rem; }
.bell43-row:hover { background: #f8fafc; }
.bell43-row.is-seen .bell43-t { color: #64748b; font-weight: 400; }
.bell43-t { display: block; font-size: .92rem; font-weight: 600; color: #0f172a; overflow-wrap: anywhere; }
.bell43-s { display: block; font-size: .78rem; color: #64748b; margin-top: .1rem; }
.bell43-go { color: #94a3b8; font-size: 1.2rem; }
.bell43-dot { flex: none; width: .65rem; height: .65rem; border-radius: 999px; }
.bell43-dot-red { background: #dc2626; }            /* важное: день рождения, ждут подтверждения, просрочено */
.bell43-dot-gray { background: #94a3b8; }           /* остальное — серое, чтобы красный не надоедал */
.bell43-empty { padding: 2rem 1rem; text-align: center; color: #64748b; font-size: .92rem; }
.bell43-more { padding: .4rem 1rem .8rem; color: #64748b; font-size: .8rem; }
@media (max-width: 640px) {                       /* телефон: список на весь экран */
  .bell43-panel { top: 0; right: 0; left: 0; bottom: 0; width: auto; max-width: none; max-height: none; border-radius: 0; box-shadow: none; padding-bottom: env(safe-area-inset-bottom); }
  .bell43-row { min-height: 3.4rem; }
}
.chip .chip-dot { display: inline-block; min-width: 1.1rem; margin-left: .3rem; padding: 0 .3rem; border-radius: 999px; background: #dc2626; color: #fff; font-size: .7rem; font-style: normal; font-weight: 700; line-height: 1.1rem; text-align: center; vertical-align: 1px; }
.t43-flash { animation: t43-flash 2.5s ease-out 1; }
@keyframes t43-flash { 0%, 40% { box-shadow: 0 0 0 3px #818cf8; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 640px) {                       /* Команда 43: в шапке телефона нашлось место для колокольчика — флаги без подписей, название раздела читается */
  .app-header .lang-flags { flex-wrap: nowrap; gap: .15rem; }
  .app-header .lang-flag { padding: .25rem .35rem; }
  .app-header .lang-flag span { display: none; }
  .bell43 { width: 2.25rem; }
}

/* ---------- Команда 45: «Записи» — все переключатели в одной компактной строке, сетка занимает всё остальное ---------- */
.rec-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.rec-bar .seg button { padding: .3rem .65rem; min-height: 34px; font-size: .88rem; }
.rec-bar .btn { min-height: 38px; }
.rec-bar .input { min-height: 38px; padding-top: .3rem; padding-bottom: .3rem; }
.rec-add { margin-left: auto; white-space: nowrap; }
.rec-load { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; color: #64748b; }
.rec-load-bar { display: inline-block; width: 5.5rem; height: 6px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.rec-load-bar > i { display: block; height: 100%; border-radius: 99px; transition: width .3s; }
.rec-who-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; }
.rec-who-btn b { font-variant-numeric: tabular-nums; }
.rec-who:empty { display: none; }
.who-modal .who-row { grid-template-columns: 1fr; gap: .25rem; }
@media (max-width: 639px) {
  .rec-bar { gap: .35rem; }
  .rec-bar .seg button { padding: .3rem .5rem; font-size: .82rem; }
  .rec-load-lbl { display: none; }
  .rec-load-bar { width: 3.5rem; }
  .rec-bar .input[type=date] { max-width: 9.5rem; }
  .modal.who-modal { height: 100%; max-height: 100%; border-radius: 0; }
  .modal-back:has(.who-modal) { align-items: stretch; }
}
@media (min-width: 640px) { .modal.who-modal { max-width: 40rem; } }
.pend-compact { padding: .5rem .8rem; }
.pend-compact .pend-list { max-height: min(40vh, 22rem); }
.pend-compact .pend-list[hidden] { display: none; }
.day-root #new-banner > div { padding-top: .4rem; padding-bottom: .4rem; }
.day-root .off-warn, .day-root .stk-soon { padding: .4rem .8rem; }
@media (max-width: 1599px) { .rec-load-lbl { display: none; } }
.rec-bar .input[type=date] { width: 9.5rem !important; }
.day-root > :empty { display: none; }
@media (min-width: 1024px) { .day-root { gap: .6rem; } .app-view:has(.day-root) { padding-top: .75rem; } }
.pend-compact .confirm-all { margin: 0; }
@media (min-width: 1024px) { .day-root > p.not-mobile { display: none !important; } }
.tl-dense .bk-card { padding-top: .1rem; padding-bottom: .1rem; line-height: 1.15; font-size: .8rem; }
.tl-dense .bk-card .badge, .tl-dense .bk-confirm-inline { font-size: .7rem; line-height: 1.1; padding-top: 0; padding-bottom: 0; }
.tl-dense .free-block .free-label { font-size: .72rem; }
.tl-dense .free-block button { min-height: 22px; font-size: .78rem; padding-top: 0; padding-bottom: 0; }
.tl-dense .tl-hour { font-size: .72rem; }

/* ===== Команда 46: компактные плитки показателей в «Аналитике» ===== */
.an-tiles { gap: .45rem; grid-auto-rows: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.an-tile { padding: .4rem .6rem .45rem; border-radius: .75rem; display: flex; flex-direction: column; gap: .1rem; overflow: hidden; }
.an-tile .an-lbl { font-size: .68rem; line-height: 1.15; display: flex; align-items: center; gap: .25rem; white-space: nowrap; overflow: hidden; }
.an-tile .an-lbl span { overflow: hidden; text-overflow: ellipsis; }
.an-tile .an-bot-ico { width: 13px; height: 13px; flex: none; }
.an-tile .an-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .4rem; row-gap: 0; min-width: 0; }
.an-tile .an-val { font-size: 1.1rem; line-height: 1.25; margin: 0; overflow-wrap: normal; white-space: nowrap; }
.an-tile .an-delta { padding: 0 .35rem; font-size: .66rem; line-height: 1.3; white-space: nowrap; }
.an-tile .an-was { font-size: .66rem; color: #64748b; white-space: nowrap; }
.an-tile .an-sub { margin: 0; font-size: .64rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: .77rem; }
.an-tile .an-ch { display: inline-flex; gap: .4rem; margin-left: .35rem; vertical-align: middle; }
.an-tile .an-ch svg { width: 11px; height: 11px; }
@media (min-width: 640px) { .an-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1700px) { .an-tiles { grid-template-columns: repeat(9, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .an-wrap > .an-panel, .an-wrap .an-panel { padding: .6rem .85rem; } .an-wrap h2.font-semibold { font-size: .95rem; margin-bottom: .25rem; } }

/* ===== Команда 46: уплотнение первых экранов (Услуги, Мастера, Настройки, Клиенты, Задачи) ===== */
.sv46 .sv-meta { line-height: 1.3; }
@media (min-width: 1024px) {
  /* Услуги: стрелки в ряд, два столбца, строка вдвое ниже */
  .sv46 { max-width: none; }
  .sv46 ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv46 ul > li { padding: .35rem .75rem; border-top: 0 !important; border-bottom: 1px solid #f1f5f9; gap: .6rem; }
  .sv46 li > div:first-child { flex-direction: row; gap: 2px; }
  .sv46 li > div:first-child .btn { margin: 0 !important; min-height: 26px !important; padding: 0 .4rem !important; }
  .sv46 .sv-cat { padding: .3rem .85rem .2rem; }
  .sv46 li .btn-sm { min-height: 30px; padding-top: .15rem; padding-bottom: .15rem; }
  /* Мастера: сетка смен ниже */
  .wg-cell { height: 32px; }
  .wg-grid thead th { padding: .15rem .2rem; }
  .wg-dn { font-size: .95rem; line-height: 1.1; }
  .who-box { padding: .55rem .85rem; }
  .who-box > p { margin-bottom: .35rem !important; }
  .wg-nav { margin-bottom: .25rem; }
  /* Настройки: поиск и рабочее время плотнее */
  .set-page { gap: .6rem; }
  .set-page.space-y-4 > * + * { margin-top: .6rem; }
  .set-find label { display: flex; align-items: center; gap: .6rem; }
  .set-find label .input { margin-top: 0 !important; min-height: 38px; padding-top: .3rem; padding-bottom: .3rem; }
  .set-tab { padding: .45rem .8rem; }
  .hrs-row { padding-top: .1rem !important; padding-bottom: .1rem !important; }
  .hrs-row .input { min-height: 34px; padding-top: .15rem; padding-bottom: .15rem; }
}
@media (min-width: 1024px) and (max-height: 820px) {
  .set-grid { gap: .6rem; } .set-col { gap: .6rem; }
}
@media (min-width: 1024px) { .sv46 .sv-meta { flex-wrap: nowrap; white-space: nowrap; } .set-find label > span { white-space: nowrap; } }
@media (min-width: 1024px) {
  /* Клиенты: вкладки и поиск в одной строке, карточки плотнее */
  .cl46 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; max-width: none; }
  .cl46 > * { margin-top: 0 !important; }
  .cl46 #cl-tabs { width: 24rem; }
  .cl46 #cl-search { flex: 1 1 14rem; }
  .cl46 #cl-search .input { min-height: 40px; padding-top: .35rem; padding-bottom: .35rem; }
  .cl46 #cl-filters, .cl46 #cl-body { flex: 0 0 100%; }
  .cl46 .cl-tabs button { padding-top: .35rem; padding-bottom: .35rem; }
  .rm-block { padding: .6rem; }
  .rm-block > p { margin-bottom: .4rem !important; font-size: .78rem; }
  .rm-block .sg-list { display: grid; grid-template-columns: 1fr; gap: .5rem; }
  .rm-block .sg-card { padding: .55rem .75rem; }
  .rm-block .sg-card .mt-2 { margin-top: .3rem !important; } .rm-block .sg-card .mt-3 { margin-top: .4rem !important; }
  .rm-block .sg-card .w-44 { width: 15rem; max-width: 40%; }
  .rm-block .sg-card .cy-label { margin-top: .1rem; } .rm-block .sg-card .cy-wrap { padding-top: 9px; }
}
@media (min-width: 1500px) { .rm-block .sg-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  /* /boss «Деньги»: карточка «Принёс бот» — в одну полосу */
  .bv-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: .35rem 1rem; align-items: center; padding: .6rem .85rem; }
  .bv-card .bv-head { grid-column: 1; grid-row: 1; } .bv-card .bv-main { grid-column: 1; grid-row: 2; margin-top: 0; }
  .bv-card .bv-grid { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; grid-template-columns: 1fr 1fr; gap: .4rem; }
  .bv-card > .text-sm.text-slate-400 { grid-column: 1; }
  .bv-card .bv-pay { grid-column: 1 / -1; margin-top: .1rem; padding: .3rem .7rem; }
  .bv-ico { width: 1.9rem; height: 1.9rem; } .bv-ico svg { width: 18px; height: 18px; }
  .bv-head p { font-size: .72rem !important; line-height: 1.25; }
  .bv-big { font-size: 1.5rem; } .bv-meta { font-size: .8rem; }
  .bv-sub { padding: .35rem .6rem; } .bv-sub-t, .bv-sub-h { font-size: .68rem; }
  .boss-tabs { padding: 2px; } 
}
.fin-top4.an-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fin-top.an-tile .an-val { font-size: 1.15rem; }
.fin-hints { display: flex; flex-wrap: wrap; gap: 0 1.2rem; } .fin-hints p { font-size: .72rem !important; margin: 0; }
@media (min-width: 640px) { .fin-top4.an-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .ad-load-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; } .ad-load-2 > div { margin-bottom: .4rem !important; } #ad-cash .an-panel { padding: .6rem .9rem; } }
.bv-card + .an-tiles, .bv-card + section.an-tiles { margin-top: .5rem; }
.an-tiles.an-tiles3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1024px) {
  .an-panel { padding: .6rem .85rem; }
  .an-donut-wrap { width: 8rem; height: 8rem; } .an-donut-c b { font-size: 1.3rem; }
}
.sg-list { grid-template-columns: minmax(0, 1fr); } .sg-list > li { min-width: 0; }

/* ===== Команда 47: компактные карточки «Напомнить сегодня» (две строки), «?» с подсказкой, имя-ссылка, QR, перетаскивание услуг ===== */
.rm-block { position: relative; }
.rm2-q { position: absolute; top: .35rem; right: .45rem; z-index: 2; }
.h47-q { display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 99px; background: #e2e8f0; color: #475569; font-size: .7rem; font-weight: 700; line-height: 1; cursor: help; flex: none; border: 0; padding: 0; }
.h47-q:hover, .h47-q:focus-visible { background: #c7d2fe; color: #3730a3; }
.rm2 { padding: .3rem .6rem !important; border-radius: .7rem; }
.rm-block .sg-list { gap: .25rem !important; grid-template-columns: minmax(0, 1fr) !important; }
.rm2-top { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .6rem; min-height: 26px; }
.rm2-who { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; max-width: 14rem; }
.rm2-who .rm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.rm2-ed { width: 1.4rem; height: 1.4rem; } .rm2-ed svg { width: .85rem; height: .85rem; }
.rm2-svc { font-size: .8rem; color: #64748b; min-width: 0; max-width: 13rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm2-master { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: #475569; white-space: nowrap; }
.rm2-slots { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.rm2 .slot-chip { font-size: .72rem; padding: .05rem .5rem; }
.rm2-cy { margin-left: auto; min-width: 13rem; max-width: 19rem; flex: 0 1 17rem; }
.rm2-cy-bar { display: flex; align-items: center; gap: .35rem; }
.rm2-bar { position: relative; flex: 1; height: 6px; display: block; }
.rm2-tick { position: absolute; left: 50%; top: -2px; width: 2px; height: 10px; background: #0f172a; border-radius: 1px; }
.rm2-mark { font-size: .65rem; font-weight: 700; color: #0f172a; }
.rm2-cap { font-size: .66rem; color: #64748b; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm2-nopick { width: 1.4rem; }
.rm2-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .25rem; margin-top: .1rem; }
.rm2-acts .btn-sm { min-height: 26px; padding: .1rem .55rem; font-size: .78rem; border-radius: .5rem; }
.rm2-acts .rm2-show svg { width: .8rem; height: .8rem; margin-right: .25rem; }
.rm2-warn { margin-right: auto; font-size: .72rem; color: #92400e; background: #fffbeb; border-radius: .4rem; padding: .05rem .4rem; }
/* текст сообщения: карандаш — отдельная колонка справа, на буквы не наезжает */
.rm2-msg { display: flex; align-items: flex-start; gap: .5rem; margin-top: .25rem; font-size: .8rem; color: #475569; background: #f8fafc; border-radius: .6rem; padding: .35rem .5rem; cursor: pointer; }
.rm2-msg.hidden { display: none; }
.rm2-msg .rm-text-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rm2-msg .rm-pencil { position: static; flex: none; margin: 0; }
.rm2-msg .rm-edited-tag { display: none; }
.rm2-msg.is-edited { box-shadow: inset 3px 0 0 #6366f1; }
.rm-text { padding-right: .75rem; }
.rm-text .rm-pencil { position: static; }
@media (max-width: 640px) {
  .rm2-cy { margin-left: 0; flex: 1 1 100%; max-width: none; min-width: 0; }
  .rm2-svc, .rm2-who { max-width: 100%; }
  .rm2-show-t { display: none; }
  .rm-block { padding: .4rem; }
}
.nm47 { font-weight: 600; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.nm47:hover, .nm47:focus-visible { color: #4f46e5; text-decoration: underline; }
.qr47 { display: inline-block; width: 44px; height: 44px; flex: none; padding: 2px; background: #fff; border-radius: .4rem; box-shadow: inset 0 0 0 1px #e2e8f0; cursor: zoom-in; border: 0; }
.qr47 img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.qr47-lg { width: 96px; height: 96px; }
.sv-grip { cursor: grab; color: #94a3b8; font-size: 1.1rem; line-height: 1; padding: .25rem .1rem; user-select: none; touch-action: none; letter-spacing: -2px; }
.sv-grip:hover { color: #4f46e5; }
.sv-ghost { opacity: .4; background: #eef2ff; }
.pg47 { font-size: .72rem; color: #64748b; line-height: 1.2; display: flex; align-items: center; gap: .35rem; min-width: 0; }
.pg47 > span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pg47:empty { display: none; }
@media (min-width: 1024px) { .pg47 > span { -webkit-line-clamp: 1; } }
.h47-ov { position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.45); display: grid; place-items: center; padding: 16px; }
.h47-box { background: #fff; border-radius: 1rem; max-width: 28rem; width: 100%; padding: 1rem 1.1rem; box-shadow: 0 20px 50px rgba(15,23,42,.3); }
.h47-box h3 { font-weight: 700; margin-bottom: .4rem; } .h47-box p { font-size: .92rem; color: #334155; line-height: 1.45; }
.hd47 { display: flex; flex-direction: column; min-width: 0; justify-content: center; }
@media (min-width: 1024px) { .hd47 { flex-direction: row; align-items: baseline; gap: .9rem; } .hd47 h1 { flex: none; } }
.t47-ic { position: absolute; top: .4rem; right: .4rem; display: flex; gap: .1rem; }
.t47-ic .icon-btn { width: 1.7rem; height: 1.7rem; }
.t47-trash:hover, .t47-trash:focus-visible { background: #fee2e2; color: #dc2626; }
.t32-card.t47-has-ic > div:first-of-type { padding-right: 3.8rem; }
.rm2 { padding: .2rem .6rem !important; }
.rm2-top { min-height: 24px; }
.rm2-acts { margin-top: 0; min-height: 26px; }
.rm2-acts .rm2-cap { margin-right: auto; }
.rm2-cap { font-size: .68rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rm2-cy { margin-left: auto; min-width: 11rem; max-width: 15rem; flex: 0 1 14rem; }
.rm-panel.hidden { display: none; }
.rm2-acts .btn-sm { min-height: 24px; padding: .05rem .5rem; }
@media (max-width: 640px) { .rm2-acts .rm2-cap { flex: 1 1 100%; white-space: normal; } }
.rm2-q { top: -1.9rem; right: .2rem; }
.rm2-top { min-height: 22px; gap: 0 .6rem; }
.rm2-acts { min-height: 24px; }
.rm2-acts .btn-sm, .rm2-acts .btn { min-height: 0 !important; height: 24px; line-height: 1; padding: 0 .5rem; }
.rm2 .slot-chip { line-height: 1.25; }
.rm2-who .rm-name { line-height: 1.2; }
.rm-block .sg-list { gap: 3px !important; }
@media (min-width: 1024px) { .rm-block { padding: .3rem !important; } .cl46 { gap: .35rem; } .cl46 .cl-tabs button { padding-top: .25rem; padding-bottom: .25rem; } }
.an-share47 { font-size: .72rem; font-weight: 400; color: #94a3b8; white-space: nowrap; }
/* Команда 47: «Выручка по дням» + «По сотрудникам», «Откуда клиенты» + «Отзывы» — парами, одинаковой высоты */
.an47-pair { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .an47-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; } }
.an47-pair > .an-panel, .an47-box > .an-panel { height: 100%; }
.an47-box { display: flex; flex-direction: column; min-width: 0; }
.an47-box > .an-panel { flex: 1; }
.an47-staff th, .an47-staff td { white-space: nowrap; }
.an47-staff td:first-child, .an47-staff th:first-child { white-space: normal; min-width: 7rem; }
.an47-staff { width: 100%; font-size: .85rem; }

/* ===== Команда 47.1: «Услуги» — каждая услуга отдельной карточкой, сетка 2 столбца от 1024 px, без дыр ===== */
.sv46 .sv47-cat { margin-top: .9rem; }
.sv46 .sv47-cat:first-of-type { margin-top: .25rem; }
.sv46 .sv47-cat > .sv-cat { background: transparent; border: 0; border-radius: 0; padding: .1rem .25rem .2rem; font-size: .75rem; }
.sv46 ul.sv47-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; margin: .3rem 0 0; padding: 0; list-style: none; align-items: stretch; }
@media (min-width: 1024px) { .sv46 ul.sv47-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sv46 ul.sv47-grid > li.sv47-item { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .45rem .6rem; background: #f8fafc; border: 1px solid #e2e8f0 !important; border-radius: .85rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.sv46 ul.sv47-grid > li.sv47-item:hover { background: #fff; }
.sv46 ul.sv47-grid > li.sv47-hidden { background: #f1f5f9; border-style: dashed !important; }
.sv47-arrows { display: flex; flex-direction: column !important; gap: 2px !important; flex: none; }
.sv47-arrows .btn { min-height: 22px !important; height: 22px; padding: 0 .4rem !important; margin: 0 !important; line-height: 1; font-size: .7rem; }
.sv47-item > .min-w-0 { min-width: 0; flex: 1 1 0; }
.sv47-item .sv-meta { flex-wrap: nowrap !important; white-space: nowrap; overflow: hidden; }
.sv47-right { display: flex; align-items: center; gap: .6rem; flex: none; }
.sv47-price { font-weight: 600; white-space: nowrap; font-size: .9rem; }
.sv47-btns { display: flex; gap: .3rem; }
.sv47-btns .btn-sm { min-height: 28px !important; height: 28px; padding: 0 .55rem !important; font-size: .8rem; }
@media (max-width: 639px) {
  .sv46 ul.sv47-grid > li.sv47-item { flex-wrap: wrap; row-gap: .35rem; }
  .sv47-item > .min-w-0 { flex: 1 1 0; }
  .sv47-right { flex: 1 1 100%; justify-content: space-between; border-top: 1px solid #e2e8f0; padding-top: .35rem; }
}

/* ===== Дополнение 1 к 47.1: карточка задачи ниже — «Сделано» в углу рядом с карандашом и корзиной, предупреждение значком ===== */
.t32-card.t47-card { padding: .5rem .75rem; gap: .6rem; }
.t32-card.t47-has-ic > div:first-of-type { padding-right: 0; }
.t32-card.t47-has-ic .t47-title { padding-right: 3.9rem; min-height: 1.75rem; }
.t32-card.t47-has-ic.t47-wide .t47-title { padding-right: 11.8rem; }
.t47-ic { align-items: center; gap: .25rem; }
.t47-donebtn, .t47-pill { display: inline-flex; align-items: center; gap: .3rem; height: 1.75rem; min-height: 0 !important; padding: 0 .6rem !important; font-size: .78rem; border-radius: .5rem; white-space: nowrap; }
.t47-donebtn svg, .t47-pill svg { width: .9rem; height: .9rem; }
.t47-pill { background: #d1fae5; color: #047857; font-weight: 600; }
.t47-warn { display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 99px; background: #fef3c7; color: #b45309; font-size: .7rem; line-height: 1; cursor: help; }
@media (max-width: 639px) {
  .t47-donet { display: none; }
  .t47-donebtn, .t47-pill { padding: 0 .5rem !important; }
  .t32-card.t47-has-ic.t47-wide .t47-title { padding-right: 7.2rem; }
}

/* ===== Дополнение 2 к 47.1: «Напомнить сегодня» — ровные слоты, телефон без Telegram, меню «⋯», легенда ===== */
.rm2-nopick { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; flex: none; }
.rm-pick { width: 1.6rem; height: 1.6rem; justify-content: center; margin: 0; padding: 0; flex: none; }
.rm2-phone { color: #94a3b8; cursor: help; }
.rm2-phone svg { width: .95rem; height: .95rem; }
.rm2-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .9rem; font-size: .75rem; color: #64748b; padding: 0 .2rem .25rem; }
.rm2-all { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; cursor: pointer; font-weight: 600; color: #334155; }
.rm2-all input { width: 1rem; height: 1rem; accent-color: #4f46e5; }
.rm2-alln { font-weight: 600; color: #4338ca; }
.rm2-q { top: -1.9rem; }
.rm2-acts { flex-wrap: nowrap; gap: .3rem; }
.rm2-acts .rm2-cap { flex: 1 1 0; min-width: 0; margin-right: 0; }
.rm2-acts .rm2-warn { flex: 0 1 auto; margin-right: 0; }
.rm2-acts .rm2-show { flex: none; }
.rm2-main { flex: none; width: 6.4rem; display: inline-flex; justify-content: center; align-items: center; }
.rm2-main-empty { visibility: hidden; }
.rm2-snz { flex: none; width: 5.6rem; justify-content: center; }
.rm2-moreWrap { position: relative; flex: none; width: 2rem; display: inline-block; }
.rm2-more { width: 2rem; padding: 0 !important; justify-content: center; font-weight: 700; }
.rm2-menu { position: absolute; right: 0; bottom: 100%; z-index: 30; min-width: 12rem; display: flex; flex-direction: column; background: #fff; border-radius: .6rem; box-shadow: 0 6px 20px rgba(15,23,42,.18), 0 0 0 1px #e2e8f0; padding: .2rem; }
.rm2-menu.hidden { display: none; }
.rm2-menu button { text-align: left; padding: .4rem .6rem; font-size: .8rem; border-radius: .4rem; white-space: nowrap; }
.rm2-menu button:hover { background: #eef2ff; }
@media (max-width: 640px) {
  .rm2-acts { flex-wrap: wrap; }
  .rm2-acts .rm2-cap { flex: 1 1 100%; white-space: normal; }
  .rm2-main { width: auto; flex: 1 1 5.4rem; } .rm2-snz { width: auto; flex: 1 1 4.5rem; }
  .rm2-menu { bottom: auto; top: 100%; }
}
.rm2-nopick, .rm-pick { width: 1.4rem; height: 1.4rem; }
.rm2-legend { padding-bottom: .15rem; line-height: 1.1; }
.rm2-all input { width: .95rem; height: .95rem; }
@media (min-width: 1024px) {
  .rm2 { padding: .15rem .6rem !important; }
  .rm2-top { min-height: 20px; }
  .rm2-top .slot-chip, .rm2-top .rm-name { line-height: 1.15; }
  .rm2-acts { min-height: 22px; }
  .rm2-acts .btn-sm, .rm2-acts .btn { height: 22px; font-size: .76rem; }
  .rm2-nopick, .rm-pick { width: 1.3rem; height: 1.3rem; }
  .rm2-ed { width: 1.25rem; height: 1.25rem; }
}

/* Дополнение 4 к 47.1: поле Instagram с «@» внутри */
.ig47-wrap { position: relative; display: block; }
.ig47-at { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; font-weight: 500; }
.ig47-wrap .ig47-in { padding-left: 1.7rem; margin-top: 0 !important; }

/* ===== Дополнение 5 к 47.1: «Сообщения» — карточки в два столбца, пузырь на всю ширину до 3 строк ===== */
.m40-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 11px; align-items: stretch; }
@media (min-width: 1024px) { .m40-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .m40-list > .m40-open { grid-column: 1 / -1; } }
.m40-wrap.space-y-3 > .m40-list { margin-top: .75rem; }
.m40-list > .m40-card { display: flex; flex-direction: column; min-width: 0; padding: .7rem .85rem; }
.m40-list > .m40-open { display: block; }
.m40-head { align-items: center; }
.m40-when { margin: .1rem 0 0; font-size: .78rem; color: #64748b; line-height: 1.3; }
.m40-list .m40-bubble { max-width: none; width: 100%; margin-top: .45rem; box-sizing: border-box; }
.m40-bubble.m40-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.m40-full { align-self: flex-start; margin-top: .2rem; background: none; border: 0; padding: 0; color: #4f46e5; font-size: .8rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.m40-full[hidden] { display: none; }
.m40-list > .m40-card:not(.m40-open) .m40-bubble { flex: 1 1 auto; }

/* Дополнение 6 к 47.1: «Забыли пароль?» */
.rec47-link { background: none; border: 0; padding: .25rem 0; color: #4f46e5; font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rec47-form { margin-top: .6rem; display: grid; gap: .6rem; background: #fff; border-radius: 1rem; box-shadow: 0 0 0 1px #e2e8f0; padding: .9rem 1rem; }
.rec47-form[hidden] { display: none; }
.rec47-lbl, .rec47-hint { font-size: .85rem; color: #475569; margin: 0; }
.rec47-msg { margin: 0; font-size: .85rem; color: #475569; } .rec47-msg:empty { display: none; }
.rec47-ok { color: #047857; } .rec47-bad { color: #be123c; }

/* ===== Команда 47.2: «Услуги» — один столбец, цены в одной колонке ===== */
.sv46 ul.sv47-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 7px; }
.sv47-right { gap: .5rem; }
.sv47-price { width: 8.6rem; text-align: right; flex: none; overflow: hidden; text-overflow: ellipsis; }
.sv47-btns .btn-sm { justify-content: center; }
.sv47-btns [data-edit] { width: 6.3rem; }
.sv47-btns [data-toggle] { width: 5.8rem; }
@media (max-width: 639px) {
  .sv47-price { width: auto; text-align: left; }
  .sv47-btns [data-edit], .sv47-btns [data-toggle] { width: auto; }
}

/* Команда 47.2: «Запомнить это устройство» и список доверенных устройств */
.dev47-hint { margin: .2rem 0 .5rem; font-size: .8rem; color: #64748b; }
.dev47-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .4rem; }
.dev47-item { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem .6rem; border-radius: .7rem; background: #f8fafc; box-shadow: 0 0 0 1px #e2e8f0; }
.dev47-main { min-width: 0; font-size: .9rem; }
.dev47-dates { font-size: .72rem; color: #64748b; line-height: 1.3; overflow-wrap: anywhere; }
.dev47-this { display: inline-block; font-size: .68rem; font-weight: 700; color: #047857; background: #d1fae5; border-radius: 99px; padding: 0 .45rem; }
.dev47-none { font-size: .85rem; color: #94a3b8; margin: 0 0 .6rem; }
@media (max-width: 480px) { .dev47-item { flex-wrap: wrap; } }

/* ---------- Команда 50: «Доступ и сотрудники» ---------- */
.t50 { display: flex; flex-direction: column; gap: 14px; }
.t50-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .t50-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .t50-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.t50-card { background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px #e2e8f0; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.t50-owner { background: linear-gradient(180deg, #eef2ff, #fff); box-shadow: 0 0 0 1px #c7d2fe; }
.t50-off { opacity: .72; background: #f8fafc; }
.t50-empty { grid-column: 1 / -1; align-items: center; text-align: center; }
.t50-ava { width: 40px; height: 40px; border-radius: 12px; background: #e0e7ff; color: #4338ca; display: grid; place-items: center; font-weight: 700; flex: none; }
.t50-ava-owner { background: #4f46e5; color: #fff; }
.t50-badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; white-space: nowrap; }
.t50-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t50-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 999px; background: #f1f5f9; color: #334155; }
.t50-chip svg { flex: none; color: #4f46e5; }
.t50-cred { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: #f8fafc; }
.t50-pw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; word-break: break-all; }
.t50-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.t50-del { color: #be123c; }
.t50-checks { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 520px) { .t50-checks { grid-template-columns: 1fr 1fr; } }
.t50-check { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; box-shadow: 0 0 0 1px #e2e8f0; cursor: pointer; font-size: 14px; min-height: 44px; }
.t50-check input { width: 20px; height: 20px; accent-color: #4f46e5; flex: none; }
.t50-check svg { color: #4f46e5; flex: none; }
.t50-creds { display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: #eef2ff; }
.t50-big { font-size: 20px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; user-select: all; }

/* Команда 51: «Аналитика» — строка-итог, плитки, тонкие строки вместо пустых рамок */
.an51-sum { background: linear-gradient(135deg, #eef2ff, #fff); }
.an51-sum-t { font-size: 1.02rem; font-weight: 600; color: #1e293b; line-height: 1.4; }
.an51-plan { margin-top: .3rem; font-size: .85rem; color: #4f46e5; font-weight: 600; font-variant-numeric: tabular-nums; }
.an51-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .an51-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .an51-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.an51-more { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: .35rem; cursor: pointer; color: #4f46e5; font-weight: 600; font-size: .8rem; background: #f8fafc; min-height: 3rem; }
.an51-more:hover { background: #eef2ff; }
.an51-thin { display: flex; flex-wrap: wrap; gap: .25rem; padding: .45rem .8rem; border-radius: .75rem; background: #f8fafc; box-shadow: 0 0 0 1px #e2e8f0; font-size: .82rem; color: #64748b; }
.an51-thin b { color: #334155; font-weight: 600; }
.an51-gray { color: #94a3b8; font-weight: 400; font-size: .78rem; margin-left: .25rem; }
.an51-legend { display: inline-flex; align-items: center; gap: .3rem; margin-left: .5rem; font-size: .72rem; font-weight: 500; color: #64748b; }
.an51-legend i { width: 18px; border-top: 2px dashed #f59e0b; display: inline-block; }
.an51-busy { opacity: .55; transition: opacity .15s; pointer-events: none; }
.an51-row { min-width: 0; }
.an51-seg button { padding: .45rem .7rem; }
@media (max-width: 480px) { .an51-seg button { padding: .4rem .5rem; font-size: .8rem; } .an51-sum-t { font-size: .95rem; } }

/* ---------- Команда 52: «Касса», «Зарплата», «Моя зарплата» ---------- */
.c52-hero { background: #fff; border-radius: 1rem; box-shadow: 0 0 0 1px #e2e8f0; padding: 1.1rem 1.25rem; }
.c52-cap { font-size: .95rem; font-weight: 600; color: #64748b; }
.c52-cap2 { font-size: .85rem; font-weight: 600; color: #64748b; }
.c52-big { font-size: 2.6rem; line-height: 1.1; font-weight: 700; color: #0f172a; margin-top: .15rem; word-break: break-word; }
.c52-mid { font-size: 1.6rem; line-height: 1.15; font-weight: 700; color: #0f172a; margin: .1rem 0 .4rem; }
.c52-two { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .5rem; }
.c52-two > div { background: #f8fafc; border-radius: .75rem; padding: .55rem .75rem; min-width: 0; }
.c52-two span { display: block; font-size: .8rem; color: #64748b; }
.c52-two b { display: block; font-size: 1.15rem; word-break: break-word; }
.c52-eq { font-size: .85rem; color: #64748b; margin-top: .5rem; }
.c52-row { display: flex; justify-content: space-between; gap: .75rem; padding: .25rem 0; font-size: .9rem; color: #475569; }
.c52-row b { color: #1e293b; }
.c52-list { margin: 0; padding: 0; list-style: none; }
.c52-item { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid #f1f5f9; font-size: .92rem; }
.c52-item:first-child { border-top: 0; }
.c52-ic { width: 1.7rem; height: 1.7rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; background: #f1f5f9; color: #475569; }
.c52-in .c52-ic { background: #dcfce7; color: #15803d; }
.c52-salary .c52-ic, .c52-expense .c52-ic { background: #fee2e2; color: #b91c1c; }
.c52-adjust .c52-ic { background: #fef3c7; color: #b45309; }
.c52-pos { color: #15803d; }
.c52-neg { color: #b91c1c; }
.c52-x { opacity: .4; padding: 0 .25rem; } .c52-x:hover { opacity: 1; }
.c52-closed { display: inline-flex; align-items: center; min-height: 38px; padding: 0 .9rem; border-radius: .75rem; background: #dcfce7; color: #166534; font-weight: 600; font-size: .9rem; }
.c52-meth button { min-width: 6rem; }
.p52-card { cursor: pointer; } .p52-card:hover { box-shadow: 0 0 0 2px #c7d2fe; }
.p52-small { margin-top: .35rem; border-top: 1px solid #f1f5f9; padding-top: .35rem; }
.p52-chip { flex: none; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: #fef3c7; color: #92400e; white-space: nowrap; }
.c52-pm { padding: .35rem 0; }
@media (max-width: 480px) { .c52-big { font-size: 2.2rem; } .c52-hero { padding: .9rem 1rem; } }
/* Команда 52: вкладки периода (Аналитика, Касса, Зарплата) на узком экране — по три в ряд, ничего не уходит за край */
@media (max-width: 520px) {
  .an51-seg { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; overflow: visible; }
  .an51-seg button { padding: .4rem .25rem; font-size: .8rem; min-width: 0; white-space: normal; line-height: 1.15; }
}
