/* IDOT · мини-приложение онлайн-записи
   Один адаптивный клиент для Telegram и MAX. 25.10.2026. */

:root {
  --bg: #0e1014;
  --bg-soft: #151922;
  --surface: #191e28;
  --surface-2: #202634;
  --surface-3: #2a3142;
  --text: #f2f4f8;
  --text-2: #aab3c5;
  --text-3: #7f8a9f;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --accent: #7c6cff;
  --accent-2: #a594ff;
  --accent-soft: rgba(124, 108, 255, .16);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, .14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, .14);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, .14);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, .14);
  --shadow: 0 18px 50px rgba(0, 0, 0, .34);
  --radius: 18px;
  --radius-s: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* 06.11.2026: мостик к общему слою броней (booking-ui.css) */
  --bui-line: var(--line-strong);
  --bui-radius: var(--radius-s);
  --bui-surface: var(--surface);
  --bui-hover: rgba(255, 255, 255, .04);
  --bui-badge-bg: var(--surface-3);
  --bui-accent: var(--accent-2);
  --bui-text-2: var(--text-2);
  --bui-bar-bg: var(--surface-3);
  --bui-green: var(--green); --bui-green-soft: var(--green-soft);
  --bui-amber: var(--amber); --bui-amber-soft: var(--amber-soft);
  --bui-red: var(--red); --bui-red-soft: var(--red-soft);
  --bui-blue: var(--blue); --bui-blue-soft: var(--blue-soft);
}

/* theme:light (15.11.2026) */
html[data-theme="light"] {
    --bg: #f5f6fa;
    --bg-soft: #eef0f6;
    --surface: #ffffff;
    --surface-2: #f4f5fa;
    --surface-3: #e9ebf3;
    --text: #151824;
    --text-2: #5c6477;
    --text-3: #8a92a5;
    --line: rgba(20, 24, 36, .09);
    --line-strong: rgba(20, 24, 36, .16);
    --accent: #5b4bdb;
    --accent-2: #7a6af0;
    --accent-soft: rgba(91, 75, 219, .10);
    --green: #0f9f6e;
    --green-soft: rgba(15, 159, 110, .10);
    --amber: #b77900;
    --amber-soft: rgba(183, 121, 0, .12);
    --red: #d83b56;
    --red-soft: rgba(216, 59, 86, .10);
    --blue: #2563eb;
    --blue-soft: rgba(37, 99, 235, .10);
    --shadow: 0 18px 50px rgba(30, 35, 50, .12);
  }


* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: var(--accent-2); text-decoration: none; }
img { max-width: 100%; display: block; }

.app {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(104px + var(--safe-bottom));
  position: relative;
}

/* ── загрузка ─────────────────────────────────────────────── */
.boot {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-2);
  padding: 24px;
  text-align: center;
}
.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  transition: width .25s ease, opacity .25s ease;
  opacity: 0;
}
body.is-loading .progress { width: 72%; opacity: 1; }
body.is-loading .progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
  animation: shimmer 1.1s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ── шапка ────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-btn {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;
}
.brand-btn:active { opacity: .72; }
.brand-chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--text-3);
}
.brand-chevron svg { width: 18px; height: 18px; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-2);
  flex: 0 0 auto;
}
.avatar-fallback {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-weight: 700;
  flex: 0 0 auto;
}
.brand-text { min-width: 0; }
.card-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-sub {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  background: var(--surface-2);
  flex: 0 0 auto;
}
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 20px; height: 20px; }

/* 02.11.2026: точки — отдельные кабинеты. Вкладки, а не «фильтр»:
   активная подчёркнута и залита. Справа в этой же строке — «Обновить». */
.points-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  border-bottom: 1px solid var(--line);
}
.points-bar.is-single { border-bottom: none; }
.point-select {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.point-select::-webkit-scrollbar { display: none; }
.point-refresh { display: none; flex: 0 0 auto; }
.point-chip {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  top: 1px;
}
.point-chip.is-active {
  background: var(--surface);
  border-color: var(--line);
  border-bottom-color: var(--surface);
  color: var(--text);
  box-shadow: inset 0 2px 0 0 var(--accent);
}
.hero-point {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

/* ── экран ────────────────────────────────────────────────── */
.screen { padding: 16px; }
.section { margin-bottom: 22px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 10px;
}
.section-title { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--text-2); text-transform: uppercase; }
.section-count {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }

.hero { margin: 4px 2px 16px; }
.hero-date { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: capitalize; }
.hero-title { font-size: 25px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.hero-title span { color: var(--accent-2); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.stat {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 12px 10px;
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.stat:active { transform: scale(.985); }
.stat b { display: block; font-size: 22px; line-height: 1; letter-spacing: -.02em; }
.stat span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 6px; }
.stat.is-pending b { color: var(--amber); }
.stat.is-today b { color: var(--green); }
.stat.is-upcoming b { color: var(--blue); }
.stat-arrow {
  position: absolute;
  top: 8px;
  right: 7px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  opacity: .6;
}
.stat-arrow svg { width: 15px; height: 15px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px 0;
  padding: 5px 8px 5px 2px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.back-link:active { opacity: .65; }
.back-link svg { width: 18px; height: 18px; }
.list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 12px;
}
.list-title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.list-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* ── карточка записи ──────────────────────────────────────── */
.booking-list { display: flex; flex-direction: column; gap: 8px; }
.booking-card {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 12px;
  text-align: left;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform .12s ease, border-color .12s ease;
}
.booking-card:active { transform: scale(.988); }
.booking-card.status-pending { border-color: color-mix(in srgb, var(--amber) 34%, var(--line)); }
.booking-card.status-confirmed { border-color: color-mix(in srgb, var(--green) 26%, var(--line)); }
.time-badge {
  width: 54px;
  flex: 0 0 54px;
  border-radius: 13px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  min-height: 64px;
}
.time-badge b { font-size: 19px; line-height: 1; letter-spacing: -.03em; }
.time-badge span { font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.time-badge i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-2);
  margin-top: 5px;
  white-space: nowrap;
}
.booking-main { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.booking-context {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.booking-title { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking-sub { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 13.11.2026: отель забора — иконка + ссылка на карту. */
.booking-sub.booking-pickup { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; align-self: flex-start; }
.booking-pickup svg { width: 14px; height: 14px; flex: 0 0 auto; opacity: .75; }
.booking-pickup-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-pickup.is-link { cursor: pointer; }
.booking-pickup.is-link:hover .booking-pickup-txt { text-decoration: underline; }
.booking-pickup.is-link:hover svg { opacity: 1; }
.booking-meta { font-size: 11px; color: var(--text-3); }
.booking-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; flex: 0 0 auto; }
.price { font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.pending { background: var(--amber-soft); color: var(--amber); }
.pill.confirmed { background: var(--green-soft); color: var(--green); }
.pill.proposed { background: var(--blue-soft); color: var(--blue); }
.pill.completed { background: var(--surface-3); color: var(--text-2); }
.pill.cancelled { background: var(--red-soft); color: var(--red); }
.pill.no_show { background: var(--red-soft); color: var(--red); }
.pill.expired { background: var(--surface-3); color: var(--text-3); }

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.empty b { display: block; color: var(--text-2); font-size: 13.5px; margin-bottom: 4px; }

/* ── фильтры ──────────────────────────────────────────────── */
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.scope-chips { padding-bottom: 5px; }
.scope-chips .chip { font-size: 11.5px; padding: 6px 10px; }
.scope-chips .chip.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--accent-2);
}
.chip {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.today-chips { padding-bottom: 10px; }
.chip-count {
  margin-left: 5px;
  font-size: 10.5px;
  font-weight: 700;
  opacity: .55;
}
.chip.is-active .chip-count { opacity: .75; }

.client-loyalty {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 12px;
  line-height: 1.5;
}
.client-loyalty b { display: block; color: var(--text); font-size: 12.5px; margin-bottom: 2px; }
.client-loyalty .muted { color: var(--text-3); }

/* компактные фильтры «Заявок» */
.filter-bar {
  display: flex;
  gap: 8px;
  margin: 0 2px 12px;
}
.select-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.select-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 30px 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.select-wrap select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.date-group { margin-bottom: 14px; }
.date-group:last-child { margin-bottom: 0; }
/* 13.11.2026: прошедшие дни — свёрнутый архив внизу, а не сверху списка. */
.date-archive { margin-top: 14px; }
.date-archive > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-3);
  list-style: none;
}
.date-archive > summary::-webkit-details-marker { display: none; }
.date-archive > summary::before { content: '▸'; font-size: 10px; }
.date-archive[open] > summary::before { content: '▾'; }
.date-archive > summary span {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-3);
}
.date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 2px 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--text-3);
  text-transform: capitalize;
}
.date-head b {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 700;
}

/* ── календарь ────────────────────────────────────────────── */
.cal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 10px; }
.cal-title { font-weight: 700; font-size: 14px; text-transform: capitalize; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-2);
}
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-week div { text-align: center; font-size: 10px; color: var(--text-3); padding: 4px 0 6px; font-weight: 600; }
.cal-day {
  position: relative;
  height: 42px;
  min-height: 42px;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}
.cal-day.is-empty { pointer-events: none; }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-2); }
.cal-day.is-selected { background: var(--accent); color: #fff; }
.cal-day.is-selected .cal-dot { background: #fff; }
.cal-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.cal-dot.pending { background: var(--amber); }
.cal-dot.proposed { background: var(--blue); }
.cal-day .cal-dots { display: flex; gap: 2px; height: 4px; }
.cal-day .cal-num { line-height: 1; }

/* ── клиенты ──────────────────────────────────────────────── */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 42px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.search svg { width: 17px; height: 17px; color: var(--text-3); flex: 0 0 auto; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 14px; }
.search input::placeholder { color: var(--text-3); }

.client-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 11px 12px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 7px;
}
.client-ava {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-weight: 800;
  font-size: 14px;
  flex: 0 0 auto;
}
.client-main { min-width: 0; flex: 1; }
.client-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.client-side { text-align: right; flex: 0 0 auto; }
.client-side b { display: block; font-size: 12px; }
.client-side span { font-size: 10px; color: var(--text-3); }

/* ── ещё / настройки ─────────────────────────────────────── */
.menu-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.menu-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.menu-row:last-child { border-bottom: 0; }
.menu-row:active { background: var(--surface-2); }
.menu-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--accent-2);
  flex: 0 0 auto;
}
.menu-ico svg { width: 18px; height: 18px; }
.menu-ico.is-photo { padding: 0; overflow: hidden; background: var(--surface-2); }
.menu-ico.is-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-edit { display: flex; align-items: center; gap: 12px; }
.img-edit img { width: 62px; height: 62px; border-radius: 16px; object-fit: cover; background: var(--surface-2); }
.menu-main { flex: 1; min-width: 0; }
.menu-title { font-size: 13.5px; font-weight: 600; }
.menu-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-arrow { color: var(--text-3); flex: 0 0 auto; }
.menu-arrow svg { width: 18px; height: 18px; }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; font-size: 12.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }

/* ── кнопки ───────────────────────────────────────────────── */
.btn {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid transparent;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-row .btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-success { background: var(--green); color: #04150f; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.btn-block { width: 100%; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-row.three { grid-template-columns: 1fr 1fr 1fr; }
.btn-sm { min-height: 34px; padding: 7px 10px; font-size: 12px; border-radius: 10px; }

/* ── низ ──────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  z-index: 40;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 760px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(8px + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.nav-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 2px;
  color: var(--text-3);
  font-size: 9.5px;
  font-weight: 600;
}
.nav-btn svg { width: 21px; height: 21px; }
.nav-btn.is-active { color: var(--accent-2); }
.nav-add {
  justify-self: center;
  align-self: center;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  transform: translateY(-14px);
  box-shadow: 0 7px 18px rgba(124, 108, 255, .34), 0 2px 6px rgba(0, 0, 0, .22);
  transition: transform .15s, box-shadow .15s;
}
.nav-add svg { width: 22px; height: 22px; }
.nav-add:active { transform: translateY(-14px) scale(.95); box-shadow: 0 4px 12px rgba(124, 108, 255, .28); }
.nav-badge {
  position: absolute;
  top: 1px;
  right: calc(50% - 18px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--amber);
  color: #241800;
  font-size: 9px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* ── bottom sheet ─────────────────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, .48);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  max-width: 760px;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  background: var(--bg-soft);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow);
  padding-bottom: calc(16px + var(--safe-bottom));
  animation: sheetUp .2s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.sheet-grip { width: 38px; height: 4px; border-radius: 999px; background: var(--line-strong); margin: 9px auto 4px; }
.sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 18px 12px;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg-soft) 94%, transparent);
  backdrop-filter: blur(12px);
  z-index: 2;
  border-bottom: 1px solid var(--line);
}
.sheet-title { font-size: 17px; font-weight: 800; line-height: 1.2; flex: 1; }
.sheet-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-2);
  flex: 0 0 auto;
}
.sheet-body { padding: 14px 18px 4px; }
.sheet-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 10px 18px calc(12px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: color-mix(in srgb, var(--bg-soft) 96%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.sheet-section { margin: 14px 0; }
.sheet-section:first-child { margin-top: 2px; }
.sheet-label { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.sheet-value { font-size: 14px; font-weight: 600; }
/* 06.11.2026: текст в шапке карточки не должен выпихивать плашку статуса
   за край панели (длинные имена/даты) — см. «наезжает» на десктопе. */
.detail-hero { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.detail-hero > div:last-child { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.detail-hero h2 { margin: 0; overflow-wrap: anywhere; }
.detail-hero p { margin: 0; overflow-wrap: anywhere; }
.detail-hero .pill { max-width: 100%; margin-top: 2px; }
/* Панель деталей: шапка непрозрачная — контент не просвечивает при скролле. */
.sheet.is-detail .sheet-head { background: var(--bg-soft); backdrop-filter: none; }
.sheet.is-detail .sheet-body { padding-top: 12px; }
.detail-hero .time-badge { width: 62px; flex-basis: 62px; min-height: 72px; }
.detail-hero h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.detail-hero p { margin: 4px 0 0; color: var(--text-2); font-size: 12.5px; }
.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-row { display: flex; gap: 10px; align-items: flex-start; }
.info-ico { width: 18px; color: var(--text-3); flex: 0 0 auto; margin-top: 1px; }
.info-ico svg { width: 17px; height: 17px; }
.info-main { min-width: 0; flex: 1; }
.info-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.info-value { font-size: 13.5px; margin-top: 1px; word-break: break-word; }
.info-value a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); }
.history { display: flex; flex-direction: column; gap: 6px; }
.history-row { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--text-2); padding: 5px 0; border-bottom: 1px dashed var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-row span:last-child { color: var(--text-3); white-space: nowrap; }

/* ── формы ────────────────────────────────────────────────── */
.field { margin-bottom: 12px; }
.form-section {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.form-section-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 2px 8px;
}
.cover-edit { display: flex; align-items: flex-start; gap: 12px; }
.cover-edit img {
  width: 148px;
  height: 84px;
  flex: 0 0 148px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--surface-2);
}
.cover-edit-actions { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 380px) {
  .cover-edit img { width: 112px; flex-basis: 112px; height: 64px; }
}
.field label { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); margin: 0 2px 5px; }
.input, .textarea, .select {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 12px;
  outline: 0;
  font-size: 15px;
}
.textarea { min-height: 82px; resize: vertical; line-height: 1.4; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-title { font-size: 13.5px; font-weight: 600; }
.switch-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.switch { position: relative; width: 46px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: .18s; }
.switch i::after { content: ""; position: absolute; width: 22px; height: 22px; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }

.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.slot-btn {
  min-height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}
.slot-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot-empty { color: var(--text-3); font-size: 12px; padding: 8px 0; }

/* Полоса дней для «Предложить время»: не зависит от нативного date-пикера,
   который в webview MAX может не открываться. */
.day-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  margin: 0 -2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 58px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 5px;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.day-chip em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .02em; }
.day-chip b { font-size: 16px; line-height: 1.1; }
.day-chip i { font-style: normal; font-size: 10px; color: var(--text-3); }
.day-chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.day-chip.is-active em, .day-chip.is-active i { color: rgba(255, 255, 255, .86); }
.day-other { margin-top: 8px; }

/* ── уведомления ──────────────────────────────────────────── */
#toast-root {
  position: fixed;
  z-index: 120;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(96px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}
.toast {
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: toastIn .18s ease;
}
.toast.error { background: var(--red); color: #fff; }
.toast.success { background: var(--green); color: #04150f; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── ошибка / пусто ───────────────────────────────────────── */
/* 06.11.2026: экран приглашения/ошибки — карточка по центру, а не узкий
   блок в левой колонке сайдбара (на десктопе он прилипал к левому краю). */
/* 06.11.2026: переключатель языка интерфейса в шапке. */
.lang-btn {
  width: auto;
  min-width: 40px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--text-2);
}
.lang-btn:hover { color: var(--text); }

.error-screen {
  padding: 40px 22px;
  text-align: center;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.error-screen > * { flex: 0 0 auto; }
.error-screen .btn { align-self: center; }
.error-ico {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-2);
}
.error-ico svg { width: 28px; height: 28px; }
.error-screen h2 { margin: 0 0 6px; font-size: 19px; }
.error-screen p { margin: 0 auto 18px; color: var(--text-2); font-size: 13px; max-width: 340px; }
.error-screen .btn { margin: 0 auto; }

@media (max-width: 380px) {
  .screen { padding: 13px; }
  .stats { gap: 6px; }
  .stat { padding: 10px 8px; }
  .stat b { font-size: 20px; }
  .slot-grid { grid-template-columns: repeat(3, 1fr); }
  .btn-row.three { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  .screen { padding: 20px 22px; }
  .bottom-nav { border-radius: 18px 18px 0 0; }
  .sheet { border-radius: 24px; margin-bottom: 20px; max-height: calc(100dvh - 40px); }
  .sheet-backdrop { align-items: center; padding: 20px; }
}

/* ── 28.10.2026: незавершённые записи (время прошло, статус «Подтверждена») ──
   Тот же смысл, что в веб-редакторе: тёплый янтарный акцент, не красный. */
.booking-card { position: relative; }
.booking-card.is-overdue {
  border-color: color-mix(in srgb, var(--amber) 44%, var(--line));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--amber) 88%, transparent);
  padding-left: 15px;
}
.booking-overdue {
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  margin-top: 3px;
}
.section-alert > .section {
  border: 1px solid color-mix(in srgb, var(--amber) 34%, var(--line));
  background: var(--amber-soft);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 18px;
}
.section-alert .section-title { color: var(--amber); }
.overdue-hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
  margin: -2px 0 10px;
}
.stat.is-overdue { border-color: color-mix(in srgb, var(--amber) 40%, var(--line)); }
.stat.is-overdue b { color: var(--amber); }

/* 02.11.2026: «Клиент ждёт ответа» — входящие сообщения без ответа салона */
.wait-list { display: flex; flex-direction: column; gap: 8px; }
.wait-row { display: flex; align-items: stretch; gap: 8px; }
.wait-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer;
}
.wait-name { font-size: 14px; font-weight: 700; }
.wait-text { font-size: 13px; color: var(--text-1); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wait-meta { font-size: 11.5px; color: var(--text-2); }
.wait-dismiss {
  flex: 0 0 40px; width: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: transparent; color: var(--text-2); font-size: 15px; line-height: 1; cursor: pointer; font-family: inherit;
}
.wait-dismiss:active { background: var(--surface-3); }
.unread-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}


/* 4 счётчика на телефоне — 2×2, а не 3+1 */
@media (max-width: 480px) {
  .stats:has(> .stat:nth-child(4)) { grid-template-columns: repeat(2, 1fr); }
}

/* ── экраны входа и доступы (C4, 28.10.2026) ──────────────── */
.auth-screen { padding: 34px 22px 28px; }
.auth-screen h2 { margin: 0 0 6px; font-size: 19px; text-align: center; }
.auth-screen > .error-ico { margin: 0 auto 14px; }
.auth-screen > p.muted { text-align: center; margin: 0 auto 18px; max-width: 320px; font-size: 13px; line-height: 1.5; }
.auth-screen .field { text-align: left; }
.auth-screen .field label { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); margin: 0 2px 5px; }
.check { display: flex; align-items: center; gap: 9px; padding: 9px 2px; font-size: 13.5px; color: var(--text-2); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.access-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.access-row:last-child { border-bottom: 0; }
.access-main { flex: 1; min-width: 0; }
.access-title { font-size: 13.5px; font-weight: 600; word-break: break-word; }
.access-role { display: inline-block; margin-left: 7px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 6px; vertical-align: 1px; }
.access-role.is-off { color: var(--red); background: var(--red-soft); }
.access-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.access-channels, .access-flags { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 5px; }
.access-muted { color: var(--text-3); font-size: 11.5px; }
.chip-mini { display: inline-block; font-size: 10.5px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.access-actions { display: flex; flex-direction: column; gap: 6px; }
.access-owner { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.access-row.is-blocked .access-title { color: var(--text-3); }

/* Персональная ссылка входа: бизнес на экране логина (28.10.2026) */
.login-card {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 auto 12px; font-size: 15px; font-weight: 600; color: var(--text);
  text-align: center; flex-wrap: wrap;
}

/* Ошибка на экране входа — не только тостом (28.10.2026) */
.auth-err {
  margin: 12px auto 0; max-width: 340px; font-size: 13px; line-height: 1.45;
  color: var(--red, #e5484d); text-align: center; min-height: 0;
}
.auth-err:empty { display: none; }

/* ── полноэкранный вход по PIN (29.10.2026) ───────────────── */
.pin-screen {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; padding: 54px 20px 32px;
}
.pin-logo { display: block; margin: 0 auto 20px; text-decoration: none; }
.pin-logo img { width: 96px; height: auto; object-fit: contain; display: block; }
.pin-logo img.pin-logo-light { display: none; }
/* theme:light (15.11.2026) */
html[data-theme="light"] .pin-logo img.pin-logo-dark { display: none; }html[data-theme="light"] .pin-logo img.pin-logo-light { display: block; }

.pin-title {
  margin: 0 0 10px; text-align: center; font: 700 27px/1.2 var(--font); letter-spacing: -.01em;
}
.pin-sub {
  margin: 0 0 30px; text-align: center; font-size: 14.5px; color: var(--text-3); max-width: 340px;
}
.pin-dots { display: flex; gap: 18px; margin: 0 0 34px; }
.pin-dots i {
  width: 13px; height: 13px; border-radius: 50%;
  background: transparent; border: 2px solid var(--text-3);
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.pin-dots i.is-on { background: #5b8cff; border-color: #5b8cff; transform: scale(1.04); }
.pin-pad {
  display: grid; grid-template-columns: repeat(3, 84px); gap: 18px;
  justify-content: center; margin: 0 auto 22px;
}
.pin-key {
  width: 84px; height: 84px; border-radius: 50%; border: none;
  background: #2b2f35; color: var(--text);
  font: 500 27px/1 var(--font); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s ease, transform .08s ease;
}
.pin-key:active { background: #363b42; transform: scale(.96); }
.pin-key-empty { background: transparent; pointer-events: none; }
.pin-key-del { background: #2b2f35; color: #d5d8de; }
.pin-key-del svg { width: 30px; height: 30px; }
.pin-link {
  display: block; margin: 10px auto 0; padding: 4px 8px;
  background: none; border: none; cursor: pointer;
  color: #6ea6ff; font: 500 14.5px/1.2 var(--font);
}
.pin-link:hover { text-decoration: underline; }

/* ── профиль мастера (29.10.2026) ─────────────────────────── */
.profile-photo { display: flex; justify-content: center; margin: 4px 0 16px; }
.profile-photo img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  background: var(--surface-2); border: 1px solid var(--line-strong);
}
.profile-photo img[src=""] { display: none; }

/* ── аватарки доступов в переключателе (29.10.2026) ───────── */
.member-ava-wrap { position: relative; width: 40px; height: 40px; flex: 0 0 auto; }
.member-ava {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  background: var(--surface-3); border: 1px solid var(--line-strong); display: block;
}
.member-ava-letter {
  display: flex; align-items: center; justify-content: center;
  font: 700 16px/1 var(--font); color: var(--text-2);
}
.member-ava-wrap.is-active .member-ava { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.member-ava-check {
  position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.member-ava-check svg { width: 9px; height: 9px; }

/* ── планшет 900–1199: сайдбар в иконках (30.10.2026) ──────
   Ничего из мобильной ветки не меняем: правила включаются только
   в этом диапазоне ширины, мини-приложение MAX/TG всегда ≤ 899. */
@media (min-width: 900px) and (max-width: 1199.98px) {
  .app:has(> .auth-screen), .app:has(> .boot), .app:has(> .error-screen), .app:has(> .join-screen) { display: block; }
  .auth-screen:not(.pin-screen) {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 60px;
  }

  .app {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    max-width: none;
    min-height: 100dvh;
    padding-bottom: 0;
  }

  .desk-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: start;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 14px 8px;
    background: var(--bg-soft);
    border-right: 1px solid var(--line);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .desk-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 4px;
    background: transparent;
    border: 0;
    border-radius: 14px;
  }
  .desk-brand .brand-text, .desk-brand .brand-chevron { display: none; }
  .desk-brand .avatar, .desk-brand .avatar-fallback { margin: 0 auto; flex: none; }

  .desk-new {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
  }
  .desk-new svg { width: 20px; height: 20px; }
  .desk-new span { display: none; }

  .desk-links, .desk-sec { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; }
  .desk-sec { margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--line); }
  .desk-sec-title { display: none; }

  .desk-link, .desk-nav .nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
  }
  .desk-link svg, .desk-nav .nav-btn svg { width: 21px; height: 21px; }
  .desk-link span, .desk-nav .nav-btn span { display: none; }
  .desk-link:hover, .desk-nav .nav-btn:hover { background: var(--surface); color: var(--text); }
  .desk-nav .nav-btn.is-active { background: var(--accent-soft); color: var(--text); }
  .desk-nav .nav-btn.is-active svg { color: var(--accent-2); }
  .desk-nav .nav-badge { position: absolute; top: 2px; right: 2px; margin: 0; }

  .desk-foot {
    width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0 2px;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
  }
  .desk-user { display: none; }
  .desk-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    color: var(--text-2);
  }
  .desk-logout svg { width: 19px; height: 19px; }
  .desk-logout span { display: none; }

  /* 02.11.2026: на десктопе верхняя полоса не нужна — «Обновить» переехала
     в строку вкладок точек, поэтому полоса скрыта, а экран поднялся выше. */
  .app:not(.is-client) .topbar { display: none; }
  .points-bar { grid-column: 2; grid-row: 1; margin: 0; padding: 12px 22px 0; }
  .point-refresh { display: inline-flex; }
  .screen {
    grid-column: 2;
    grid-row: 3;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 22px 40px;
  }
  .app:not(.is-client) .screen { grid-row: 2 / -1; }
  .bottom-nav { display: none; }
}

/* ── десктоп: боковое меню и панель деталей (29.10.2026) ──── */
.desk-nav { display: none; }

@media (min-width: 1200px) {
  /* вход и PIN — отдельный полноэкранный слой, без сайдбара */
  .app:has(> .auth-screen), .app:has(> .boot), .app:has(> .error-screen), .app:has(> .join-screen) { display: block; }
  .auth-screen:not(.pin-screen) {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 60px;
  }
  .auth-screen.pin-screen { max-width: 460px; margin: 0 auto; }

  .app {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    max-width: none;
    min-height: 100dvh;
    padding-bottom: 0;
  }

  .desk-nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: start;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 18px 14px;
    background: var(--bg-soft);
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }

  .desk-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    text-align: left;
  }
  .desk-brand .brand-text { min-width: 0; flex: 1; }
  .desk-brand .card-name { font-size: 14px; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
  .desk-brand .card-sub { font-size: 11.5px; }
  .desk-brand .brand-chevron { margin-left: auto; color: var(--text-3); }

  .desk-new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
  }
  .desk-new svg { width: 18px; height: 18px; }
  .desk-new:hover { background: var(--accent-2); }

  .desk-links { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }

  .desk-sec { display: flex; flex-direction: column; gap: 2px; }
  .desk-sec-title {
    padding: 4px 12px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-3);
  }
  .desk-link {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-2);
    text-align: left;
  }
  .desk-link svg { width: 19px; height: 19px; flex: none; }
  .desk-link span { flex: 1; }
  .desk-link:hover { background: var(--surface); color: var(--text); }
  .desk-link .nav-badge { position: static; margin-left: 2px; }

  .desk-nav .nav-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    text-align: left;
  }
  .desk-nav .nav-btn svg { width: 20px; height: 20px; }
  .desk-nav .nav-btn span { flex: 1; }
  .desk-nav .nav-btn:hover { background: var(--surface); color: var(--text); }
  .desk-nav .nav-btn.is-active { background: var(--accent-soft); color: var(--text); }
  .desk-nav .nav-btn.is-active svg { color: var(--accent-2); }
  .desk-nav .nav-badge { position: static; margin-left: 2px; }

  /* 17.11.2026: блок «e-mail / Выйти» больше не прилипает к низу —
     он идёт последним в колонке и докручивается вместе с меню. */
  .desk-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0 2px;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
  }
  .desk-user {
    padding: 0 8px;
    font-size: 11.5px;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .desk-logout {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
  }
  .desk-logout:hover { background: var(--surface); color: var(--text); }
  .desk-logout svg { width: 18px; height: 18px; }

  .topbar {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 0;
    padding: 14px 32px;
    border-bottom: 1px solid var(--line);
  }
  .topbar .brand { display: none; }
  /* кабинет клиента: шапка с названием точки, как на телефоне */
  .app.is-client .topbar .brand { display: flex; }
  .topbar .icon-btn { margin-left: auto; }

  .app:not(.is-client) .topbar { display: none; }
  .points-bar {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 14px 32px 0;
    max-width: 1180px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .point-refresh { display: inline-flex; }

  /* 01.11.2026 (v31): переключатель точек клиента — под шапкой, в колонке контента. */
  .cl-points {
    grid-column: 2;
    grid-row: 2;
    padding: 10px 32px 16px;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
  }

  .screen {
    grid-column: 2;
    grid-row: 2 / -1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 32px 48px;
  }
  .app.is-client .screen { grid-row: 3; }

  .bottom-nav { display: none; }

  .stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
  /* 01.11.2026: на десктопе — один столбик и вид «таблицы»: время в строку,
     услуга и клиент слева, статус и сумма справа. Двухколоночная плитка читалась
     хуже: приходилось прыгать глазами по диагонали. */
  .booking-list { display: flex; flex-direction: column; gap: 6px; }
  .booking-card { padding: 10px 14px; align-items: center; }
  /* 06.11.2026: строчный бейдж — только для карточек в списке. В панели деталей
     бейдж остаётся колонкой «12 / НОЯ / 09:00», иначе он наезжает на имя и дату
     (это и было «наезжает» на скриншотах). */
  .booking-card .time-badge {
    flex-direction: row; align-items: center; justify-content: flex-start;
    width: auto; flex: 0 0 118px; min-height: 0; padding: 8px 10px; gap: 7px;
  }
  .booking-card .time-badge b { font-size: 15px; letter-spacing: -.01em; }
  .booking-card .time-badge span { margin-top: 0; font-size: 10px; }
  .booking-card .time-badge i { margin-top: 0; font-size: 12.5px; }
  .detail-hero .time-badge {
    flex-direction: column; align-items: center; justify-content: center;
    width: 62px; flex: 0 0 62px; min-height: 72px; padding: 6px 4px; gap: 0;
  }
  .detail-hero .time-badge b { font-size: 19px; letter-spacing: -.03em; }
  .detail-hero .time-badge span { margin-top: 2px; font-size: 9.5px; }
  .detail-hero .time-badge i { margin-top: 5px; font-size: 10.5px; }
  .booking-side { flex-direction: row; align-items: center; gap: 12px; }
  .booking-meta { font-size: 11.5px; }
  .hero-title { font-size: 28px; }
  .section { margin-bottom: 26px; }

  /* карточка записи — панель деталей справа: контент уезжает, ничего не перекрывается */
  .app { transition: padding-right .18s ease; }
  body.has-detail .app { padding-right: 440px; }
  body.has-detail .booking-list,
  body.has-detail .cal-wrap { grid-template-columns: minmax(0, 1fr); }

  .sheet-backdrop.is-detail {
    align-items: stretch;
    justify-content: flex-end;
    background: transparent;
    padding: 0;
    pointer-events: none;
  }
  .sheet.is-detail {
    width: 440px;
    max-width: none;
    max-height: none;
    height: 100dvh;
    margin: 0;
    border-radius: 18px 0 0 18px;
    padding-bottom: 20px;
    pointer-events: auto;
    box-shadow: -24px 0 60px rgba(0, 0, 0, .38);
    animation: deskDrawer .18s ease;
  }

  /* остальные диалоги — по центру, как обычное модальное окно */
  .sheet-backdrop:not(.is-detail) {
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .48);
  }
  .sheet:not(.is-detail) {
    width: min(680px, 90vw);
    max-width: none;
    height: auto;
    max-height: 86dvh;
    border-radius: 20px;
    padding-bottom: 0;
  }
  /* кнопки диалога всегда видны, даже если содержимое прокручивается */
  .sheet:not(.is-detail) .sheet-actions {
    position: sticky;
    bottom: 0;
    margin-top: 0;
    padding: 12px 18px 16px;
    background: color-mix(in srgb, var(--bg-soft) 96%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }

  @keyframes deskDrawer {
    from { transform: translateX(28px); opacity: .5; }
    to { transform: none; opacity: 1; }
  }
  .sheet-grip { display: none; }

  /* фильтры заявок — компактные, не на пол-экрана */
  .filter-bar { display: flex; gap: 10px; }
  .filter-bar .select-wrap { max-width: 300px; flex: 1 1 0; }

  .menu-card { max-width: none; }
  .more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
    max-width: 980px;
  }
  .more-grid > .small { grid-column: 1 / -1; }
  .more-grid .menu-card { margin: 0; }

  .cal-card { max-width: 760px; }
  .cal-day { height: 58px; min-height: 58px; font-size: 13px; }
  .cal-week div { font-size: 11px; }
  .cal-wrap { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .cal-wrap .cal-card { max-width: none; }
  .cal-wrap .cal-day-block { margin-top: 0; }
  .cal-wrap .cal-day-block .booking-list:has(> :nth-child(2)) { grid-template-columns: minmax(0, 1fr); }
}

/* ── 29.10.2026: цвет и графики в кабинете ─────────────────── */
.svc-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  margin-right: 7px;
  vertical-align: 1px;
  flex: 0 0 auto;
}

.booking-card { border-left-width: 3px; }
.booking-card.status-pending { border-left-color: var(--amber); }
.booking-card.status-confirmed { border-left-color: var(--green); }
.booking-card.status-completed { border-left-color: var(--blue); }
.booking-card.status-cancelled { border-left-color: var(--red); }
.booking-card.status-proposed { border-left-color: var(--blue); }
.booking-card.status-expired { border-left-color: var(--line-strong); }

.stat.is-money b { color: var(--accent-2); }

.chart-total { font-size: 14px; font-weight: 800; }
.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 152px;
  max-width: 720px;
  margin: 0 auto;
  padding: 6px 2px 0;
  border-bottom: 1px solid var(--line);
}

.chart-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.chart-val { font-size: 10px; color: var(--text-3); height: 12px; white-space: nowrap; }
.chart-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-track i {
  width: 100%;
  max-width: 48px;
  min-height: 3px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--accent-2), color-mix(in srgb, var(--accent) 72%, #000));
  transition: height .3s ease;
}
.chart-day { font-size: 10.5px; color: var(--text-3); text-align: center; line-height: 1.25; }
.chart-day b { display: block; font-size: 12px; color: var(--text-2); }
.chart-col.is-today .chart-track i { background: linear-gradient(180deg, var(--green), color-mix(in srgb, var(--green) 72%, #000)); }
.chart-col.is-today .chart-day, .chart-col.is-today .chart-day b { color: var(--green); }

.client-card { position: relative; overflow: hidden; padding-bottom: 13px; transition: border-color .15s ease, transform .15s ease; }
.client-ava {
  background: color-mix(in srgb, var(--c, var(--accent)) 20%, transparent);
  color: var(--c, var(--accent-2));
}
.client-bar { position: absolute; left: 12px; right: 12px; bottom: 5px; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--line) 70%, transparent); }
.client-bar i { display: block; height: 100%; background: var(--c, var(--accent)); opacity: .55; border-radius: 3px; transition: width .3s ease; }

@media (min-width: 1200px) {
  .booking-card:hover, .client-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-1px);
  }
  .chart { height: 176px; }
  .chart-val { font-size: 11px; }
}

/* ── 29.10.2026: разделы «Управление» — встроенные страницы, не шторки ── */
.page { max-width: 980px; }
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 2px 2px 16px;
}
.page-title { font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.page-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.page-actions-top { margin-left: auto; flex: 0 0 auto; }
.page-body { }

.panel { max-width: 760px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin: 2px 2px 14px; }
.panel-head .icon-btn { flex: 0 0 auto; }
.panel-body { }
.panel-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

@media (min-width: 1200px) {
  .page { max-width: 1080px; }
  .page-title { font-size: 26px; }
  .page-head { margin-bottom: 22px; }
  .panel { max-width: 820px; }
  .panel-actions { flex-direction: row; flex-wrap: wrap; }
  .panel-actions .btn { width: auto; min-width: 180px; }
  .page-actions-top .btn { width: auto; }
}

.desk-nav .desk-link.is-active {
  background: var(--accent-soft);
  color: var(--text);
}
.desk-nav .desk-link.is-active svg { color: var(--accent-2); }

/* переключатели внутри .field (услуги специалиста) не должны выглядеть как подписи */
.field label.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  font-size: 13.5px;
  font-weight: 400;
  color: inherit;
}

.parallel-hint {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-3);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-2);
}
.parallel-hint:empty { display: none; }

/* ── 29.10.2026: встроенная справка ─────────────────────────── */
.help { max-width: 920px; }
.help-search { margin: 0 2px 12px; }
.help-search .input { min-height: 44px; }
.help-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chip-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.chip-btn:active { background: var(--surface-3); }
.help-sec {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 10px;
  overflow: hidden;
}
.help-sec > summary {
  cursor: pointer;
  padding: 13px 15px;
  font-weight: 700;
  font-size: 14.5px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.help-sec > summary::-webkit-details-marker { display: none; }
.help-sec > summary::after { content: '+'; color: var(--text-3); font-weight: 400; font-size: 19px; line-height: 1; }
.help-sec[open] > summary::after { content: '−'; }
.help-body { padding: 0 15px 15px; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.help-body p { margin: 0 0 10px; }
.help-body ul, .help-body ol { margin: 0 0 10px 18px; padding: 0; }
.help-body li { margin-bottom: 6px; }
.help-body b { color: var(--text); font-weight: 600; }
.help-body code { background: var(--surface-3); border-radius: 6px; padding: 1px 5px; font-size: 12.5px; }
.help-fig { margin: 0 0 12px; }
.help-fig img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-3); }
.help-fig figcaption { font-size: 11.5px; color: var(--text-3); margin-top: 6px; line-height: 1.45; }
.help-table { width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: 13px; }
.help-table td { border-bottom: 1px solid var(--line); padding: 7px 0; vertical-align: top; }
.help-table tr:last-child td { border-bottom: 0; }
.help-table td:first-child { font-weight: 600; width: 40%; padding-right: 10px; color: var(--text); }
.help-tip { background: var(--surface-3); border-radius: 10px; padding: 9px 11px; font-size: 12.5px; margin: 0; }
.help-steps-title { margin-bottom: 4px; font-weight: 600; color: var(--text); }
.help-foot { text-align: center; font-size: 12px; color: var(--text-3); padding: 8px 0 26px; }
@media (min-width: 1200px) {
  .help { max-width: 1000px; }
  .help-body { font-size: 14px; }
  .help-fig img { border-radius: 14px; }
}

/* справка: подсказка по роли и мобильные иллюстрации */
.help-note {
  background: rgba(255, 196, 0, .10);
  border: 1px solid rgba(255, 196, 0, .28);
  color: var(--text-2);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 2px 12px;
}
.help-fig picture { display: block; }

/* справка: подзаголовки и вводный абзац */
.help-body h4.help-h {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-3);
  margin: 16px 0 6px;
}
.help-body h4.help-h:first-child { margin-top: 0; }
.help-lead {
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface-3);
  border-radius: 10px;
  padding: 10px 12px;
}
@media (min-width: 860px) {
  .help-body h4.help-h { font-size: 12px; }
  .help-lead { font-size: 14px; }
}

/* ── таблицы «Клиенты» и «Доступы» на десктопе (30.10.2026) ──────────────
   Мобильная и планшетная вёрстка не меняется: таблицы рендерятся только
   при ширине ≥ 1200 (isWide() в app.js), ниже остаются карточки. */
@media (min-width: 1200px) {
  .dt { border-top: 1px solid var(--line); }

  .dt-head,
  .dt-row {
    display: grid;
    align-items: center;
    gap: 14px;
    padding: 0 12px;
  }

  .dt-head {
    padding-top: 10px;
    padding-bottom: 9px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--line);
  }

  .dt-row {
    min-height: 52px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: inherit;
    font: inherit;
  }
  .dt-row:hover { background: var(--surface); }
  .dt-row:last-child { border-bottom: 0; }
  .dt-row.is-blocked { opacity: .62; }

  .dt-clients .dt-head, .dt-clients .dt-row {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 150px 84px 112px;
  }
  .dt-access .dt-head, .dt-access .dt-row {
    grid-template-columns: minmax(0, 1.6fr) 120px minmax(0, .8fr) minmax(0, 1.5fr) auto;
  }

  .dt-num { text-align: right; font-variant-numeric: tabular-nums; }
  .dt-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .dt-who .client-ava { width: 34px; height: 34px; font-size: 13px; }
  .dt-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dt-sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dt-col { display: flex; flex-direction: column; min-width: 0; }
  .dt-col b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dt-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
  .dt-act { display: flex; justify-content: flex-end; gap: 6px; }
  .dt-act .btn { width: auto; }
  .dt-empty { padding: 18px 12px; }
}

/* 31.10.2026 (v26). Переписка с клиентом в карточке (мини-приложение). */
.chat-thread{max-height:38vh;overflow-y:auto;display:flex;flex-direction:column;gap:8px;margin:0 0 12px;padding:2px}
.contact-chips{padding:0 0 10px}
.contact-chips .chip{font-size:12.5px;padding:6px 12px}
.chat-msg .tiny{opacity:.75}
.chat-msg{max-width:88%;padding:9px 12px;border-radius:14px;font-size:15px;line-height:1.45;word-break:break-word}
.chat-msg.is-in{align-self:flex-start;background:rgba(127,127,127,.14);border-bottom-left-radius:5px}
.chat-msg.is-out{align-self:flex-end;background:rgba(255,91,117,.14);border-bottom-right-radius:5px}
.chat-msg .tiny{display:block;margin-top:3px}

/* ── кабинет клиента «Мои записи» (v27, 01.11.2026) ───────────── */

/* 01.11.2026 (v31): переключатель точек клиента — как аккаунты. */
.cl-points {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  /* 06.11.2026: снизу был 2px — приветствие липло к ленте точек. */
  padding: 8px 16px 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.cl-points::-webkit-scrollbar { display: none; }
/* 06.11.2026: подсказка, что ленту точек можно листать (затухание у правого края). */
.cl-points.is-more {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
}
.cl-point {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 700;
  white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.cl-point.is-active {
  background: var(--accent-soft); color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.cl-point:active { transform: scale(.97); }

.cl-hero {
  margin: -16px -16px 16px;
  padding: calc(20px + var(--safe-top)) 18px 18px;
  background: linear-gradient(135deg, rgba(124, 108, 255, .22), rgba(124, 108, 255, .04));
  border-bottom: 1px solid var(--line);
}
.cl-hero.has-cover {
  background-size: cover;
  background-position: center 30%;
  color: #fff;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cl-hero-name { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.cl-hero-sub { margin-top: 4px; font-size: 13px; opacity: .78; }

.cl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.cl-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cl-when { font-size: 13px; color: var(--text-2); font-weight: 600; }
.cl-time { font-size: 32px; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; white-space: nowrap; }
.cl-time span { font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: 0; margin-left: 3px; }
.cl-service { margin-top: 14px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.cl-meta { margin-top: 4px; font-size: 13px; color: var(--text-2); }

.cl-master {
  display: flex; align-items: center; gap: 11px;
  margin-top: 14px; padding: 10px; border-radius: var(--radius-s);
  background: var(--surface-2);
}
.cl-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.cl-ava-fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-2); font-weight: 800;
}
.cl-master-text { flex: 1; min-width: 0; }
.cl-master-name { font-size: 14px; font-weight: 700; }
.cl-master-role { font-size: 12px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cl-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13.5px; color: var(--text-2); }
.cl-row-ico { flex: 0 0 auto; }
.cl-row-text { flex: 1; min-width: 0; }

.cl-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.cl-actions .btn { min-height: 44px; }
.cl-actions .btn:nth-child(odd):last-child { grid-column: 1 / -1; }
.cl-actions .btn:only-child { grid-column: 1 / -1; }

.cl-note { margin: 12px 2px 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }

.cl-proposal {
  margin-top: 14px; padding: 12px 13px; border-radius: var(--radius-s);
  background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
}
.cl-proposal-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--blue); }
.cl-proposal-when { margin-top: 5px; font-size: 15px; }
.cl-proposal-note { margin-top: 6px; font-size: 12.5px; color: var(--text-2); }

.cl-list { display: flex; flex-direction: column; gap: 8px; }
.cl-rowbtn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 13px; border-radius: var(--radius-s); text-align: left;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  cursor: pointer;
}
.cl-rowbtn:active { transform: scale(.99); }
.cl-rowbtn svg { width: 16px; height: 16px; color: var(--text-3); flex: 0 0 auto; }
.cl-rowbtn-date { flex: 0 0 74px; }
.cl-rowbtn-date b { display: block; font-size: 13px; }
.cl-rowbtn-date span { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.cl-rowbtn-main { flex: 1; min-width: 0; font-size: 13.5px; }
.cl-rowbtn-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.cl-rowbtn-side { flex: 0 0 auto; font-size: 12.5px; color: var(--text-2); }
/* 06.11.2026: убрать лишнюю точку из переключателя в кабинете клиента. */
.point-chip { position: relative; }
.cl-point { position: relative; }
.cl-point-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; margin-left: 6px; border-radius: 50%;
  font-size: 10px; line-height: 1; opacity: .45; background: rgba(127,127,127,.18);
}
.cl-point-x:hover { opacity: 1; background: rgba(229,72,77,.25); }
.point-chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 6px; border-radius: 50%;
  font-size: 10px; line-height: 1; opacity: .45;
  background: rgba(127,127,127,.18);
}
.point-chip-x:hover { opacity: 1; background: rgba(229,72,77,.25); }
/* 06.11.2026: убрать старую запись из «Моих записей» (у салона она остаётся). */
.cl-rowbtn-del {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: transparent; color: var(--text-3);
  font: inherit; font-size: 15px; line-height: 1; cursor: pointer; padding: 0;
}
.cl-rowbtn-del:hover { border-color: var(--danger, #e5484d); color: var(--danger, #e5484d); }
.cl-hide-past {
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  border-radius: 10px; padding: 5px 10px; font: inherit; font-size: 12px;
  cursor: pointer;
}
.cl-hide-past:hover { color: var(--text); border-color: var(--text-3); }

.cl-bonus {
  margin-top: 4px; padding: 22px 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--line); text-align: center;
}
.cl-bonus-pct { font-size: 40px; font-weight: 800; letter-spacing: -.03em; color: var(--accent-2); }
.cl-bonus-label { margin-top: 2px; font-size: 13px; color: var(--text-2); }
.cl-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 2px; font-size: 13.5px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.cl-kv:last-child { border-bottom: none; }
.cl-kv b { color: var(--text); font-size: 14px; }
.cl-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 10px 2px 0; }
.cl-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.cl-chat { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 4px 2px 10px; }
.cl-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.cl-msg.is-theirs { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.cl-msg.is-mine { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.cl-msg-text { white-space: pre-wrap; word-break: break-word; }
.cl-msg-time { margin-top: 3px; font-size: 10.5px; opacity: .62; text-align: right; }
.cl-send { display: flex; gap: 8px; }
.cl-input {
  flex: 1; min-width: 0; min-height: 44px; padding: 11px 13px;
  border-radius: var(--radius-s); border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); font-size: 16px;
}
.cl-send .btn { min-height: 44px; }

.cl-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; margin-top: 4px; }
.cl-slot {
  min-height: 42px; border-radius: 11px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.cl-slot.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── 01.11.2026: плашка «требуется решение» и запрос переноса от клиента ── */
.attention-banner {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; margin: 0 0 12px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text); text-align: left; font: inherit; cursor: pointer;
}
.attention-banner .ab-ico {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px;
}
.attention-banner .ab-ico svg { width: 19px; height: 19px; }
.attention-banner .ab-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attention-banner .ab-main b { font-size: 14.5px; line-height: 1.25; }
.attention-banner .ab-main span { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-banner .ab-arrow { display: flex; align-items: center; color: var(--text-3); }
.attention-banner .ab-arrow svg { width: 16px; height: 16px; }
.attention-banner.is-urgent {
  border-color: rgba(251, 113, 133, .55);
  background: linear-gradient(135deg, rgba(251, 113, 133, .18), rgba(251, 113, 133, .06));
  box-shadow: 0 0 0 1px rgba(251, 113, 133, .18) inset;
  animation: ab-pulse 2.4s ease-in-out infinite;
}
.attention-banner.is-urgent .ab-ico { background: var(--red-soft); color: var(--red); }
.attention-banner.is-urgent .ab-main b { color: var(--red); }
.attention-banner.is-wait { border-color: rgba(251, 191, 36, .45); background: var(--amber-soft); }
.attention-banner.is-wait .ab-ico { background: rgba(251, 191, 36, .2); color: var(--amber); }
.attention-banner.is-wait .ab-main b { color: var(--amber); }
.attention-banner.is-ok { cursor: default; border-color: rgba(52, 211, 153, .35); background: var(--green-soft); }
.attention-banner.is-ok .ab-ico { background: rgba(52, 211, 153, .2); color: var(--green); }
.attention-banner.is-ok .ab-main b { color: var(--green); font-size: 13.5px; }
@keyframes ab-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 113, 133, .0), 0 0 0 1px rgba(251, 113, 133, .18) inset; }
  50% { box-shadow: 0 0 0 3px rgba(251, 113, 133, .12), 0 0 0 1px rgba(251, 113, 133, .28) inset; }
}
@media (prefers-reduced-motion: reduce) {
  .attention-banner.is-urgent { animation: none; }
}

.booking-card.is-client-ask { border-color: rgba(251, 113, 133, .45); }
.booking-alert {
  margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--red);
  background: var(--red-soft); border-radius: 8px; padding: 4px 8px; display: inline-block;
}

.sheet-section.sheet-alert {
  border: 1px solid rgba(251, 113, 133, .45);
  background: linear-gradient(135deg, rgba(251, 113, 133, .16), rgba(251, 113, 133, .05));
  border-radius: var(--radius-s); padding: 12px;
}
.sheet-section.sheet-alert .sheet-label { color: var(--red); }
.sheet-hint { margin-top: 6px; font-size: 12px; color: var(--text-2); }

/* ── 01.11.2026 (v30): мастера — свой цвет, чипы в заявках, назначение ── */
.mchip{display:inline-flex;align-items:center;gap:6px;max-width:100%;border:1px solid color-mix(in srgb,var(--mc,#8e8e93) 34%,transparent);border-radius:999px;padding:3px 9px 3px 7px;font-size:12px;font-weight:700;line-height:1.25;background:color-mix(in srgb,var(--mc,#8e8e93) 14%,transparent);color:var(--mc,#8e8e93);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.mchip span{overflow:hidden;text-overflow:ellipsis}
.mchip i{width:8px;height:8px;border-radius:50%;background:var(--mc,#8e8e93);flex:0 0 auto}
.mchip.is-empty{border-style:dashed;border-color:rgba(217,119,6,.55);background:rgba(217,119,6,.10);color:#b45309}
.booking-masters{display:flex;gap:6px;margin-top:6px;flex-wrap:wrap}
.booking-alert.is-assign{color:#b45309;background:rgba(217,119,6,.13)}
.booking-alert.is-pay{color:#6d5bd0;background:rgba(124,108,255,.13)}
.pk-stop-note{grid-column:1/-1;font-size:11.5px;line-height:1.4;color:var(--text-2);background:rgba(124,108,255,.10);border-radius:7px;padding:5px 8px;margin-top:2px}
.pk-stop-note.is-staff{background:rgba(217,119,6,.10)}
.pk-stop-bulk{display:flex;gap:6px;padding:2px 12px 6px;flex-wrap:wrap}
.pk-stop-all{border:1px dashed var(--line-strong);background:transparent;color:var(--text-2);font:inherit;font-size:12px;padding:5px 10px;border-radius:999px;cursor:pointer}
.pk-stop-all:hover{color:var(--text);border-color:var(--text-2)}
.pk-stop-all.is-no{color:#b45309;border-color:rgba(217,119,6,.45)}
.assign-row{display:flex;align-items:center;gap:10px;justify-content:space-between;border:1px solid var(--line);border-radius:var(--radius-s);padding:10px 12px;margin-bottom:8px}
.assign-main{flex:1;min-width:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.assign-busy{font-size:11.5px;color:var(--amber)}
.color-row{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.color-sw{width:28px;height:28px;border-radius:50%;border:2px solid transparent;box-shadow:0 0 0 1px var(--line-strong) inset;cursor:pointer;padding:0;background:transparent}
.color-sw.is-active{border-color:var(--text);box-shadow:0 0 0 2px var(--surface) inset}
.color-auto{width:auto;padding:0 10px;height:28px;border-radius:999px;font-size:11.5px;font-weight:600;color:var(--text-2);border:1px solid var(--line)}
.color-auto.is-active{color:var(--text);border-color:var(--text)}
.master-dot{display:block;width:12px;height:12px;border-radius:50%}

/* 01.11.2026: кнопка «написать клиенту» в строке заявки */
.card-chat{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;border:1px solid var(--line);background:var(--surface);font-size:13px;line-height:1;cursor:pointer;margin-top:6px}
.card-chat:hover{border-color:var(--accent);background:var(--surface-2)}

/* 02.11.2026: раздел «Уведомления» — подзаголовки и блок почты */
.form-sub {
  margin: 16px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.form-sub:first-of-type { margin-top: 4px; }
.mail-check { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); margin-bottom: 6px; font-size: 12.5px; }
.mail-check.is-ok b { color: #17864a; }
.mail-check.is-no b { color: #b3261e; }
.mail-recs { display: flex; flex-direction: column; gap: 6px; }
.mail-rec { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.mail-rec-type { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: var(--accent-2); }
.mail-rec-name { font-size: 12px; font-weight: 600; word-break: break-all; }
.mail-rec-val { font-size: 11.5px; color: var(--text-2); word-break: break-all; margin-top: 2px; }

/* 02.11.2026 (v35): лист ожидания */
.wl-row { display: flex; gap: 12px; justify-content: space-between; padding: 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--surface); }
.wl-main { min-width: 0; }
.wl-name { font-weight: 600; font-size: 14px; }
.wl-sub { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.wl-note { font-size: 12.5px; margin-top: 4px; color: var(--text-2); }
.wl-offer { font-size: 12.5px; margin-top: 6px; color: var(--green); }
.wl-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.wl-status { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.wl-status.is-offered { background: var(--amber-soft); color: var(--amber); }
.wl-status.is-booked { background: var(--green-soft); color: var(--green); }
.wl-status.is-cancelled, .wl-status.is-expired { background: var(--surface-2); color: var(--text-3); }

/* ── 06.11.2026: клиентский кабинет на десктопе ──────────────
   В медиа-запросах 900+ и 1200+ нижняя навигация была скрыта (она нужна
   только салону — там есть боковое меню). Клиент же оставался без единой
   навигации: из «Чата» (кнопка «Написать» на карточке записи) вернуться
   было некуда. Показываем клиентскую полосу всегда. */
.app.is-client .bottom-nav { display: grid; }

/* Кнопка «← Мои записи» на внутренних экранах клиента (Визиты, Бонусы, Чат). */
.cl-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
  font: 600 13px/1 var(--font);
  cursor: pointer;
}
.cl-back:hover { color: var(--text); border-color: var(--line-strong); }

/* ── 06.11.2026 (v45): цвет услуги ─────────────────────────── */
.svc-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.svc-color {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer; padding: 0;
  transition: transform .1s ease;
}
.svc-color:hover { transform: scale(1.12); }
.svc-color.is-active { border-color: var(--text); box-shadow: 0 0 0 2px var(--line-strong); }
.svc-color-pick {
  width: 34px; height: 30px; padding: 0; border: 1px solid var(--line-strong);
  border-radius: 8px; background: none; cursor: pointer;
}

/* ── 06.11.2026: календарь визитов в кабинете клиента ───────── */
.cl-cal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 12px 10px;
  margin: 0 0 16px;
}
.cl-cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; gap: 8px; }
.cl-cal-title { font: 700 14px/1.25 var(--font); color: var(--text); text-align: center; flex: 1; }
.cl-cal-nav {
  width: 32px; height: 32px; flex: 0 0 auto;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font: 700 17px/1 var(--font); cursor: pointer; padding: 0 0 2px;
}
.cl-cal-nav:hover { color: var(--text); border-color: var(--line-strong); }
.cl-cal-week, .cl-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cl-cal-week { margin-bottom: 4px; }
.cl-cal-wd { text-align: center; font: 600 10.5px/1.6 var(--font); color: var(--text-3); }
.cl-cal-day {
  position: relative; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--text-3);
  font: 600 13px/1 var(--font); padding: 0; cursor: default;
}
.cl-cal-day.empty { visibility: hidden; }
.cl-cal-day.has { background: var(--surface-2); color: var(--text); cursor: pointer; }
.cl-cal-day.has:hover { border-color: var(--line-strong); }
.cl-cal-day.is-today { border-color: var(--line-strong); }
.cl-cal-day.is-active { background: var(--accent); color: #fff; }
.cl-cal-dot {
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
}
.cl-cal-day.is-active .cl-cal-dot { background: #fff !important; }
.cl-cal-count {
  position: absolute; top: 3px; right: 4px;
  font: 700 9px/1 var(--font); color: var(--text-3);
}
.cl-cal-day.is-active .cl-cal-count { color: rgba(255,255,255,.85); }
@media (min-width: 900px) {
  /* Календарь визитов не растягиваем на всю ширину десктопа. */
  .cl-cal { max-width: 430px; }
}

/* 06.11.2026 (v46): комментарий клиента — только чтение. */
.ed-readonly {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  color: var(--text-2);
  font: 400 13.5px/1.45 var(--font);
  white-space: pre-wrap;
}

/* 06.11.2026 (v46): сообщение бизнеса в карточке записи клиента. */
.cl-biz-label {
  display: block;
  margin-bottom: 3px;
  font: 700 10px/1.2 var(--font);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-2, var(--accent));
}
.cl-row-business .cl-row-text { color: var(--text); }

.ed-radio{display:flex;gap:8px;align-items:flex-start;font-size:13.5px;line-height:1.35;margin:7px 0}
.ed-radio input{margin-top:2px;flex:0 0 auto}

.cl-route{margin:10px 0 4px;padding:0 0 2px}
.cl-route-cap{font-size:11px;letter-spacing:.06em;text-transform:uppercase;font-weight:700;opacity:.6;margin:0 0 8px}
.cl-route-row{display:flex;gap:10px;position:relative;padding:0 0 12px}
.cl-route-row:last-of-type{padding-bottom:0}
.cl-route-row::before{content:"";position:absolute;left:10px;top:22px;bottom:0;width:2px;background:rgba(127,127,127,.25)}
.cl-route-row:last-of-type::before{display:none}
.cl-route-num{flex:0 0 21px;width:21px;height:21px;border-radius:50%;background:#e11d48;color:#fff;font-size:11.5px;font-weight:700;display:flex;align-items:center;justify-content:center;position:relative;z-index:1}
.cl-route-label{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;font-weight:700;opacity:.6}
.cl-route-addr{font-size:13.5px;line-height:1.35}

/* 06.11.2026: бейдж непрочитанных сообщений салона на вкладке «Чат» */
.nav-badge {
  position: absolute; top: -2px; left: 50%; margin-left: 4px;
  min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px;
  box-shadow: 0 0 0 2px var(--surface, #121218);
}
/* 06.11.2026: пометка «отправлено всем в группе» в чате клиента */
.cl-msg-group { margin-bottom: 4px; font-size: 10.5px; font-weight: 700; opacity: .8; letter-spacing: .02em; }
.cl-msg.is-mine .cl-msg-group { opacity: .9; }

/* 06.11.2026: бейдж языка клиента в группе броней */
.bui-lang {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* 06.11.2026: «подключить Telegram» — клиент пришёл по e-mail и может привязать чат */
.cl-bind {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 0 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(41, 171, 226, .16), rgba(41, 171, 226, .06));
  border: 1px solid rgba(41, 171, 226, .32);
  color: var(--text);
  text-decoration: none;
}
.cl-bind:active { transform: scale(.99); }
.cl-bind.is-compact { padding: 10px 12px; }
.cl-bind-ico { font-size: 20px; line-height: 1; flex: 0 0 auto; }
.cl-bind-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-bind-txt b { font-size: 13.5px; font-weight: 700; }
.cl-bind-txt span { font-size: 11.5px; color: var(--text-2); line-height: 1.35; }
.cl-bind-arr { color: var(--text-3); font-size: 18px; flex: 0 0 auto; }

/* 08.11.2026: вкладка «Карточка» — профиль и строки плиток */
.card-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.card-tile:last-child { border-bottom: 0; }
.card-tile-move-group { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; }
.card-tile-move {
  width: 30px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.card-tile-move:disabled { opacity: .35; cursor: default; }
.card-tile-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-tile-cap { width: 100%; }

/* ── 12.11.2026: экран «Заборы» (лист заборов на дату) ────────────────
   Задача гида: утром открыть список, видеть время/отель/гостей и одной
   кнопкой закрывать остановку. Поэтому крупные строки, крупные кнопки. */
.pk-dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pk-dates .chip { flex: 0 0 auto; }
.pk-date-input {
  width: auto;
  min-width: 148px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.pk-tools { display: flex; gap: 8px; flex: 0 0 auto; }
.pk-sum {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pk-sum-item {
  flex: 1 1 96px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pk-sum-item b { font-size: 20px; line-height: 1.1; letter-spacing: -.01em; }
.pk-sum-item span { font-size: 12px; color: var(--text-3); }
.pk-sum-item.is-warn { border-color: rgba(251, 191, 36, .45); background: var(--amber-soft); }
.pk-sum-item.is-warn b { color: var(--amber); }
.pk-groups { margin-bottom: 12px; }
/* 13.11.2026: фильтр «только не закрытые» — отдельная строка, чтобы не путался с группировкой. */
.pk-filter { margin: -4px 0 12px; }

/* 13.11.2026: маршрут дня — порядок объезда отелей от точки старта. */
.pk-route {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--line);
}
.pk-route > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  list-style: none;
}
.pk-route > summary::-webkit-details-marker { display: none; }
.pk-route > summary b { font-weight: 600; }
.pk-route > summary b::before { content: '▸ '; color: var(--text-3); }
.pk-route[open] > summary b::before { content: '▾ '; }
.pk-route > summary span { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.pk-route-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pk-route-list li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.pk-route-num {
  flex: 0 0 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}
.pk-route-place { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.pk-route-time { flex: 0 0 auto; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pk-route-btn { margin-top: 10px; }
.pk-next { margin-top: 10px; }
.pk-sum-item.is-empty b { color: var(--green); }

/* 13.11.2026: связь с гостем — выбор мессенджера и заметка сотрудника. */
.pk-note-cap { color: var(--text-3); font-weight: 600; }
.pk-note-staff { color: var(--text); }
.pk-note-edit {
  border: 0;
  background: none;
  padding: 0 2px;
  font: inherit;
  font-size: 12px;
  color: var(--text-3);
  text-decoration: underline;
  cursor: pointer;
}
.pk-note-add {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 2px 0 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-3);
  cursor: pointer;
}
.pk-note-add:hover, .pk-note-edit:hover { color: var(--text); }
.pk-write-list { display: flex; flex-direction: column; gap: 8px; }
.pk-write-hint { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; }

/* 13.11.2026: обзор «Все» — секции по датам. */
.pk-day { margin-bottom: 16px; }
.pk-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.pk-day-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pk-day-main b { font-size: 14px; }
.pk-day-main span { font-size: 12px; color: var(--text-3); }
.pk-day-open {
  flex: 0 0 auto;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-2);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}
.pk-day-open:hover { color: var(--text); }

.pk-list { display: flex; flex-direction: column; gap: 8px; }
.pk-group { margin-bottom: 14px; }
.pk-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 2px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: none;
}
.pk-group-head span {
  font-weight: 500;
  color: var(--text-3);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
}

.pk-item {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--line);
}
.pk-item.is-done { border-color: rgba(52, 211, 153, .45); background: var(--green-soft); }
.pk-item.is-no { opacity: .55; }
/* 13.11.2026: «гость не отвечает» — не гасим строку, а подсвечиваем: забор ещё в работе. */
.pk-item.is-noanswer { border-color: rgba(251, 191, 36, .5); background: var(--amber-soft); }
.pk-time {
  flex: 0 0 54px;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  padding-top: 1px;
}
.pk-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pk-place { font-size: 15px; font-weight: 600; line-height: 1.25; }
.pk-addr, .pk-meta { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.pk-note {
  margin-top: 3px;
  font-size: 12px;
  color: var(--amber);
  line-height: 1.35;
}
.pk-act { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.pk-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
}
.pk-btn svg { width: 17px; height: 17px; }
.pk-btn:active { transform: scale(.96); }
.pk-btn.pk-ok.is-on { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.pk-btn.pk-no.is-on { background: var(--red-soft); border-color: var(--red); color: var(--red); }
/* 13.11.2026 (v69): остановки трансфера — как в редакторе визитки: номер, время, отель, гости. */
.pk-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
}
.pk-form.is-formed { border-style: solid; border-color: rgba(52, 211, 153, .45); background: var(--green-soft); }
.pk-form-state { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pk-form-state b { font-size: 13.5px; }
.pk-form-state span { font-size: 12px; color: var(--text-3); }
.pk-form-act { display: flex; gap: 8px; flex-wrap: wrap; }
.pk-stops { display: flex; flex-direction: column; gap: 10px; }
.pk-stop {
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.pk-stop.is-drag { opacity: .5; }
.pk-stop.is-over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pk-stop-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  cursor: grab;
}
.pk-stop-num {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-2);
}
.pk-stop-time {
  flex: 0 0 auto;
  width: 104px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pk-stop-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pk-stop-place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.pk-stop-place span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-stop-place svg { width: 15px; height: 15px; flex: 0 0 auto; opacity: .7; }
.pk-stop-place.is-link:hover span { text-decoration: underline; }
.pk-stop-sub { font-size: 12px; color: var(--text-3); }
.pk-stop-grip { flex: 0 0 auto; color: var(--text-3); font-size: 15px; letter-spacing: 1px; }
.pk-stop-guests { display: flex; flex-direction: column; }
.pk-guest {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.pk-guest:first-child { border-top: 0; }
.pk-guest.is-done { background: var(--green-soft); }
.pk-guest.is-no { opacity: .55; }
.pk-guest-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pk-guest-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; }
.pk-guest-meta { font-size: 12.5px; color: var(--text-2); }
.pk-guest-contacts { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; }
.pk-guest-phone { color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.pk-guest-phone:hover { text-decoration: underline; }
.pk-guest-latin { color: var(--text-3); }
.pk-guest-act { flex: 0 0 auto; display: flex; gap: 6px; }
@media (max-width: 640px) {
  .pk-stop-head { flex-wrap: wrap; }
  .pk-stop-main { flex-basis: 100%; order: 3; }
  .pk-guest { flex-wrap: wrap; }
  .pk-guest-act { width: 100%; justify-content: flex-end; }
}
.pk-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-3);
  color: var(--text-2);
  vertical-align: middle;
  white-space: nowrap;
}
.pk-badge.is-warn { background: var(--amber-soft); color: var(--amber); }
.pk-badge.is-ok { background: var(--green-soft); color: var(--green); }
.pk-badge.is-no { background: var(--red-soft); color: var(--red); }

@media (max-width: 640px) {
  .pk-item { flex-wrap: wrap; }
  .pk-sum { gap: 6px; }
  .pk-sum-item { flex: 1 1 0; min-width: 0; padding: 8px 10px; }
  .pk-sum-item b { font-size: 17px; }
  .pk-sum-item span { font-size: 11px; }
  .pk-body { flex: 1 1 calc(100% - 70px); }
  /* 13.11.2026: кнопки и QR в одну строку под карточкой на узком экране. */
  .pk-side { flex-direction: row; align-items: center; justify-content: flex-end; width: 100%; gap: 10px; }
  .pk-act { flex: 0 0 auto; justify-content: flex-end; }
  .pk-btn { width: 44px; height: 44px; }
  .pk-btn svg { width: 20px; height: 20px; }
  .pk-date-input { flex: 1 1 auto; }
}

/* Печать листа заборов: только список, крупно, без интерфейса. */
@media print {
  .desk-nav, .topbar, .bottom-nav, .points-bar, .pk-tools, .pk-groups, .pk-filter,
  .pk-date-input, .pk-act, .pk-note-add, .pk-note-edit, .pk-day-open, .progress, .toast-root { display: none !important; }
  .pk-dates .chip { display: none; }
  .pk-route { border-color: #bbb !important; background: #fff !important; }
  .pk-route-btn { display: none !important; }
  .pk-route > summary b::before { content: ''; }
  .pk-route-list li { font-size: 13px; }
  body, .app { background: #fff !important; color: #000 !important; }
  .pk-item { break-inside: avoid; border-color: #bbb !important; background: #fff !important; }
  .pk-item.is-done, .pk-item.is-no { opacity: 1 !important; }
  .pk-sum-item { border-color: #bbb !important; background: #fff !important; }
  .pk-time { font-size: 16px; }
  .pk-badge { border: 1px solid #999; }
}

/* 12.11.2026: латинская запись имени — гид/отель/манифест. Это транслитерация,
   а не перевод: имя в заявке остаётся так, как его написал клиент. */
.detail-latin { font-size: 12.5px; color: var(--text-3); letter-spacing: .01em; margin-top: -2px; }
.pk-latin { color: var(--text-3); font-size: 12px; }
.pk-name { font-size: 13px; color: var(--text-2); }

/* 12.11.2026: длительность часами и минутами + детские тарифы по возрасту
   (единый вид с редактором услуги src/service-editor.js). */
.sv-dur { display: flex; gap: 8px; }
.sv-dur-cell { position: relative; flex: 1; display: block; }
.sv-dur-cell .input { width: 100%; padding-right: 40px; }
.sv-dur-unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--text-3); pointer-events: none; }
.sv-tiers { display: flex; flex-direction: column; gap: 8px; }
.sv-tier { display: flex; align-items: center; gap: 6px; }
.sv-tier .input { width: 66px; padding-left: 8px; padding-right: 8px; text-align: center; }
.sv-tier .sv-tier-price { flex: 1; min-width: 84px; max-width: 200px; text-align: left; }
.sv-tier-pre, .sv-tier-cur { font-size: 12px; color: var(--text-3); }
.sv-tier-cur { min-width: 34px; }
.sv-tier-del { border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--text-3); cursor: pointer; padding: 2px 6px; }
.sv-tier-del:hover { color: #e11d48; }
.sv-tier-add { margin-top: 8px; }
.sv-tier-empty { padding: 4px 0; }

/* 13.11.2026 (v70): мессенджеры гостя и QR для печати. */
.pk-guest-ch { font-size: 11px; color: var(--text-3); }
/* QR показываем и на экране (мелко) — так он точно есть и в печати, и на планшете гида. */
.pk-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.pk-qrs { display: flex; gap: 8px; justify-content: flex-end; }
.pk-qr { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; line-height: 0; }
.pk-qr img { display: block; width: 56px; height: 56px; border-radius: 4px; }
.pk-qr-cap { font-size: 9px; line-height: 1.2; color: var(--text-3); letter-spacing: .01em; line-height: 1.2; }
.pk-qr img { display: block; width: 44px; height: 44px; border-radius: 4px; }
@media print {
  .pk-qr img { width: 72px; height: 72px; }
  .pk-qr-cap { color: #000; }
  .pk-qrs { display: flex !important; }
}

/* 13.11.2026 (v70): экскурсии дня — заголовки над листом заборов. */
.pk-exc { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.pk-exc-card {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  background: var(--surface);
  border: 1px solid var(--line);
}
.pk-exc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pk-exc-main b { font-size: 13.5px; line-height: 1.25; }
.pk-exc-main span { font-size: 12px; color: var(--text-3); }
.pk-exc-count { flex: 0 0 auto; font-size: 11.5px; color: var(--text-3); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; }

/* 13.11.2026 (v70): быстрая кнопка WhatsApp у гостя, который её отметил. */
.pk-btn.pk-wa { font-size: 11px; font-weight: 800; color: #128C4B; border-color: rgba(37, 211, 102, .5); background: rgba(37, 211, 102, .12); text-decoration: none; }
.pk-btn.pk-wa:hover { background: rgba(37, 211, 102, .2); }

/* 13.11.2026 (v70): тур — главный заголовок в «Трансферах» (по умолчанию группировка по туру). */
.pk-tour { margin: 10px 0 14px; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.pk-tour-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: rgba(124, 108, 255, .12);
  background: color-mix(in srgb, var(--tour-color, #7c6cff) 14%, var(--surface));
  border-bottom: 1px solid var(--line);
}
.pk-tour-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tour-color, #7c6cff); flex: 0 0 auto; }
.pk-tour-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.pk-tour-main b { font-size: 15.5px; line-height: 1.25; color: var(--text); }
.pk-tour-main span { font-size: 12px; color: var(--text-2); }
.pk-tour-n { flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--tour-color, #7c6cff); color: #fff; }
.pk-tour .pk-list { padding: 8px 8px 0; }
.pk-tour .pk-item { margin-bottom: 8px; }

/* 13.11.2026 (v71): отправление — отдельный список гостей, свои гиды и своё формирование. */
.pk-run { margin: 10px 0 14px; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.pk-run.is-formed { border-color: rgba(52, 211, 153, .45); }
.pk-run-head {
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border-bottom: 1px solid var(--line);
}
.pk-run-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 160px; }
.pk-run-main b { font-size: 15.5px; line-height: 1.25; color: var(--text); }
.pk-run-main span { font-size: 12px; color: var(--text-2); }
.pk-run-guides { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pk-run-guide { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.pk-run-guide.is-empty { color: var(--amber); border-style: dashed; }
.pk-run-guides-btn { border: 0; background: none; color: var(--accent); font-size: 12px; padding: 2px 4px; cursor: pointer; text-decoration: underline; font-family: inherit; }
.pk-run-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.pk-run-state { font-size: 12px; color: var(--text-3); margin-right: auto; }
.pk-run-maps { display: flex; gap: 10px; }
.pk-run > .pk-stops { padding: 8px 10px 0; }

/* 13.11.2026: QR для связи с клиентом прямо в карточке заявки. */
.contact-qr { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.contact-qr-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; }
.contact-qr-item img { width: 124px; height: 124px; border-radius: 10px; background: #fff; padding: 5px; display: block; }
.contact-qr-item span { font-size: 11.5px; color: var(--text-2); }

/* 13.11.2026: строка скидки в блоке оплаты. */
.dline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0 10px; font-size: 13px; color: var(--text-2); }

/* 13.11.2026: тост с отменой последнего действия. */
.toast.is-undo { display: flex; align-items: center; gap: 12px; }
.toast.is-undo button { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 0; white-space: nowrap; }

/* 13.11.2026 (v73): карточка заявки — секции вместо сплошного списка. */
.dsec { margin: 0 0 14px; }
.dsec-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; margin: 0 0 6px; }
.info-list.is-plain { margin: 0; }
.dsum { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; margin-bottom: 10px; }
.dsum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dsum-row:last-child { border-bottom: 0; }
.dsum-row span { color: var(--text-2); }
.dsum-row b { font-weight: 700; white-space: nowrap; }
.dsum-row.is-minus b { color: var(--green); }
.dsum-row.is-total { background: var(--surface-2); }
.dsum-row.is-total span { color: var(--text); font-weight: 600; }
.dsum-row.is-total b { font-size: 15px; }
.dsec-more { margin: 8px 0; padding: 6px 10px; border: 1px dashed var(--line-strong); border-radius: var(--radius-s); }
.dsec-more > summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.dsec-more[open] > summary { margin-bottom: 6px; }
.detail-actions { display: flex; flex-direction: column; gap: 8px; }
.detail-actions-main { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-actions-main > .btn { flex: 1 1 150px; }
.more-actions { border: 1px solid var(--line); border-radius: var(--radius-s); }
.more-actions > summary { list-style: none; cursor: pointer; padding: 10px 12px; font-size: 13px; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; }
.more-actions > summary::-webkit-details-marker { display: none; }
.more-actions > summary::after { content: '▾'; }
.more-actions[open] > summary::after { content: '▴'; }
.more-list { display: flex; flex-direction: column; gap: 6px; padding: 0 10px 10px; }

/* 13.11.2026 (v72): деньги в заявке и в трансферах. */
.booking-due { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: var(--amber); }
.pk-badge.is-due { background: rgba(245, 158, 11, .16); color: var(--amber); border-color: rgba(245, 158, 11, .35); }

.pay-sum { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.pay-sum > div { flex: 1 1 90px; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface-2); }
.pay-sum span { font-size: 11px; color: var(--text-3); }
.pay-sum b { font-size: 14px; }
.pay-sum b.is-paid { color: var(--green); }
.pay-sum b.is-due { color: var(--amber); }
.pay-sum b.is-zero { color: var(--text-3); }
.pay-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.pay-row { display: grid; grid-template-columns: 1fr auto 24px; gap: 2px 10px; padding: 8px 10px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); }
.pay-row-del { border: 0; background: none; color: var(--text-3); font-size: 18px; line-height: 1; cursor: pointer; padding: 0; align-self: center; }
.pay-row-del:hover { color: var(--red); }
.pay-row-kind { font-size: 12.5px; color: var(--text-2); }
.pay-row-amt { font-size: 13px; font-weight: 700; text-align: right; }
.pay-row-when { grid-column: 1 / -1; font-size: 11px; color: var(--text-3); }
.pay-row-note { grid-column: 1 / -1; font-size: 12px; color: var(--text-2); }
.pay-add { padding: 10px; border-radius: var(--radius-s); border: 1px dashed var(--line-strong); }

/* Назначение гидов: несколько человек с равными правами. */
.pk-guide-list { display: flex; flex-direction: column; }
.pk-guide-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.pk-guide-list .pk-guide-row:last-child { border-bottom: 0; }
.pk-guide-row input { width: 18px; height: 18px; accent-color: var(--accent); }

/* 13.11.2026: шеврон у остановки — карточка открывается по клику. */
.pk-stop-more { flex: 0 0 auto; font-size: 20px; line-height: 1; color: var(--text-3); }
.pk-stop-head[data-action] { cursor: pointer; }

/* 13.11.2026: шторка «подробности остановки». */
.pk-ss { display: flex; flex-direction: column; gap: 12px; }
.pk-ss-addr { font-size: 12.5px; color: var(--text-2); }
.pk-ss-list { display: flex; flex-direction: column; gap: 10px; }
.pk-ss-g { padding: 10px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface-2); }
.pk-ss-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pk-ss-top b { font-size: 14px; }
.pk-ss-top span { font-size: 12px; color: var(--text-3); }
.pk-ss-meta { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.pk-ss-note { font-size: 12px; color: var(--amber); margin-top: 4px; line-height: 1.35; }

/* 13.11.2026 (v71): сводка сверху — кнопки, по клику расшифровка. */
button.pk-sum-item {
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: border-color .12s, transform .06s;
}
button.pk-sum-item:hover { border-color: var(--line-strong); }
button.pk-sum-item:active { transform: scale(.99); }
.pk-btn.pk-tg { background: rgba(34, 158, 217, .16); color: #29a9e0; font-weight: 700; }
.pk-ss-btn {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  appearance: none;
  transition: border-color .12s;
}
.pk-ss-btn:hover { border-color: var(--line-strong); }

/* 13.11.2026 (v71): маршрут трансфера — ссылки на Google Maps и OpenStreetMap. */
.pk-map-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pk-map-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 11.5px; font-weight: 600; color: var(--text-2);
  text-decoration: none; white-space: nowrap;
}
.pk-map-link:hover { border-color: var(--line-strong); color: var(--text); }
@media print { .pk-map-links { display: none !important; } }

/* 13.11.2026 (v71): отель в карточке заявки — явная ссылка на карту. */
.detail-map-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); }
.detail-map-link:hover { opacity: .8; }

/* 13.11.2026 (v71): остановки внутри цветного заголовка тура на конкретном дне. */
.pk-tour > .pk-stops { padding: 10px 10px 0; }

/* 13.11.2026: «Сегодня» — очередь проблем (гость не отвечает, нет телефона, нет гида). */
.problem-list { display: flex; flex-direction: column; gap: 6px; }
.problem-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 10px 12px;
  border-radius: var(--radius-s); border: 1px solid var(--line);
  background: var(--surface); color: inherit; font: inherit; cursor: pointer;
}
.problem-row:hover { border-color: var(--line-strong); }
.problem-time { min-width: 44px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.problem-main { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.problem-main b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.problem-main span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.problem-reasons { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; }
.problem-tag { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); white-space: nowrap; }
.problem-arrow { display: inline-flex; color: var(--text-3); }
.problem-more { margin-top: 8px; }
@media (max-width: 640px) {
  .problem-row { flex-wrap: wrap; }
  .problem-reasons { width: 100%; justify-content: flex-start; padding-left: 54px; }
}

/* ── 14.11.2026. Клиенты: флаги страны/языка, значки связи, QR в карточке ──
   Флаги приходят с сервера (booking-app/api.php → clients/client → geo):
   страна определяется по коду телефона, язык — clients.lang (язык переписки).
   Значки: чат кабинета, Telegram (t.me), WhatsApp (wa.me), MAX и LINE — текстом. */
.cl-flags{display:inline-flex;align-items:center;gap:4px;margin-left:6px;vertical-align:middle}
.cl-flag{position:relative;font-size:14px;line-height:1;opacity:.95;outline:none}
/* 14.11.2026: у двух флагов подсказка при наведении — что страна, а что язык.
   У языка ещё и код (🇷🇺 RU), чтобы различались с первого взгляда. */
.cl-flag.is-lang{display:inline-flex;align-items:center;gap:3px;font-size:11.5px;font-weight:800;
  padding:2px 5px;border-radius:999px;border:1px dashed rgba(127,127,127,.45);
  background:rgba(127,127,127,.08);opacity:1}
.cl-flag b{font-size:9.5px;letter-spacing:.04em}
.cl-chans{display:inline-flex;align-items:center;gap:4px;margin-top:6px}
.dt-row .cl-chans{margin-top:0}
.cl-ico{width:26px;height:26px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;
  background:rgba(127,127,127,.10);color:var(--text-3);cursor:pointer;flex:0 0 auto;
  transition:background .15s,color .15s,transform .12s}
.cl-ico svg{width:15px;height:15px}
.cl-ico.is-txt{font-size:9.5px;font-weight:800;letter-spacing:.03em;padding:0 5px;width:auto;min-width:26px}
.cl-ico:hover{background:rgba(127,127,127,.20);color:var(--text)}
.cl-ico:active{transform:scale(.94)}
.cl-ico.is-wa{color:#22A85A}
.cl-ico.is-tg{color:#2A9BD8}
.cl-geo{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:12.5px;color:var(--text-3);margin:0 0 10px}
.cl-geo .cl-flag{font-size:15px}
.cl-qr-block{margin-top:12px;padding-top:10px;border-top:1px dashed rgba(127,127,127,.28)}
.cl-qrs{display:flex;gap:14px;flex-wrap:wrap}
.cl-qr{display:flex;flex-direction:column;align-items:center;gap:5px;text-decoration:none;color:inherit}
.cl-qr img{width:120px;height:120px;border-radius:10px;background:#fff;padding:4px;border:1px solid rgba(127,127,127,.22)}
.cl-qr span{font-size:11.5px;font-weight:700}
.cl-qr span.is-wa{color:#22A85A}
.cl-qr span.is-tg{color:#2A9BD8}

/* 14.11.2026 (v77): отзывы и рейтинг — клиент и кабинет. */
.cl-stars{display:inline-flex;gap:1px;vertical-align:middle}
.cl-star{color:#5a6172;font-size:15px;line-height:1;background:none;border:0;padding:0;font-family:inherit}
.cl-star.is-on{color:#f5a623}
.cl-review{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.cl-review-h{font-weight:700;font-size:15px}
.cl-review-sub{color:var(--text-3);font-size:12.5px;margin:3px 0 8px;line-height:1.45}
.cl-review-stars{display:flex;gap:6px;margin:2px 0 8px}
.cl-review-stars .cl-star{font-size:30px;cursor:pointer;line-height:1}
.cl-review-text{width:100%;box-sizing:border-box;background:var(--surface-2);border:1px solid var(--line-strong);border-radius:10px;color:var(--text);padding:10px;font:inherit;font-size:14px;resize:vertical;min-height:64px}
.cl-review-mine{display:flex;margin:4px 0 6px}
.cl-review-mine .cl-star{font-size:20px}
.cl-review-body{font-size:14px;line-height:1.5;color:var(--text);white-space:pre-line}
.cl-review-note{font-size:12px;color:var(--text-3);margin-top:6px}
.cl-review-sum{margin-top:10px;padding-top:8px;border-top:1px dashed var(--line)}
.cl-rating-line{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-2);flex-wrap:wrap}
.cl-rating-line b{color:var(--text)}
.cl-rev-cta{margin-top:3px;font-size:12px;font-weight:700;color:#f5a623}
.cl-rev-mark{font-size:12px;color:#f5a623;letter-spacing:1px}
.rev-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin-bottom:10px}
.rev-card.is-hidden{opacity:.62}
.rev-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.rev-name{font-weight:700;font-size:14px}
.rev-date{margin-left:auto;font-size:12px;color:var(--text-3)}
.rev-svc{font-size:12.5px;color:var(--text-2);margin-top:3px}
.rev-text{margin-top:7px;font-size:14px;line-height:1.5;white-space:pre-line}
.rev-actions{display:flex;gap:8px;margin-top:9px}
.rev-hist{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:10px 14px;margin-top:10px}
.rev-hist-row{display:grid;grid-template-columns:40px 1fr 34px;align-items:center;gap:8px;font-size:12.5px;color:var(--text-2);margin:3px 0}
.rev-hist-row i{display:block;height:6px;border-radius:4px;background:#f5a623;min-width:2px}
.rev-hist-row b{text-align:right;color:var(--text)}
.rev-filters{margin:0 0 8px}
.rev-filters .select{width:100%}

/* 14.11.2026: страна, флаг и пометка перевода в отзывах. */
.rev-score{font-size:12px;font-weight:700;color:var(--text-2)}
.rev-country{font-size:12px;color:var(--text-2)}
.rev-tr{font-size:11px;color:#8a7bff;border:1px solid rgba(138,123,255,.4);border-radius:999px;padding:1px 7px}

/* 14.11.2026 (v78): архивные туры, новые отзывы, ответ бизнеса. */
.menu-row.is-archived{opacity:.92}
.menu-row.is-archived .menu-title{color:var(--text-2)}
.rev-tabs{flex-wrap:wrap}
.rev-tabs .chip b{font-weight:700;opacity:.75;margin-left:2px}
.rev-card.is-new{border-left:3px solid var(--accent,#e11d48);background:linear-gradient(90deg,rgba(225,29,72,.06),transparent 60%)}
.rev-new{font-size:10.5px;font-weight:700;color:#e11d48;border:1px solid rgba(225,29,72,.45);border-radius:999px;padding:1px 7px;text-transform:uppercase;letter-spacing:.02em}
.rev-seen-all{display:flex;justify-content:flex-end;margin:-2px 0 4px}
.rev-reply{margin-top:10px;padding:10px 12px;border-radius:12px;background:rgba(99,102,241,.08);border:1px solid rgba(99,102,241,.18)}
.rev-reply-head{font-size:11.5px;font-weight:700;color:#6366f1;margin-bottom:4px}
.rev-reply p{margin:0 0 8px;font-size:13.5px;line-height:1.5;white-space:pre-wrap}
.rev-reply-box{margin-top:10px}
.rev-reply-box textarea{width:100%;resize:vertical;min-height:74px}
.rev-reply-actions{display:flex;gap:8px;margin-top:8px}

/* v78: ответ бизнеса в карточке отзыва клиента. */
.cl-review-reply{margin-top:8px;padding:9px 11px;border-radius:10px;background:rgba(99,102,241,.08);border:1px solid rgba(99,102,241,.18)}
.cl-review-reply b{display:block;font-size:11.5px;color:#6366f1;margin-bottom:3px}
.cl-review-reply p{margin:0;font-size:13.5px;line-height:1.5;white-space:pre-wrap}

/* ── 17.11.2026: статистика в кабинете ─────────────────────── */
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-tbl th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-3);
  padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.dash-tbl td { padding: 11px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dash-tbl tr:last-child td { border-bottom: 0; }
.dash-tbl th.num, .dash-tbl td.num { text-align: right; white-space: nowrap; }
.dash-tbl td b { font-weight: 600; }
.dash-bar {
  display: inline-block; width: 56px; height: 6px; border-radius: 3px;
  background: var(--line); overflow: hidden; vertical-align: middle;
}
.dash-bar i { display: block; height: 100%; background: var(--accent-2); }
.dash-pct { display: inline-block; margin-left: 7px; color: var(--text-3); font-size: 11.5px; }
.dash-delta { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; }
.dash-delta.is-up { color: var(--green); }
.dash-delta.is-down { color: var(--amber); }
.dash-attn { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }

/* ── 17.11.2026: полный экран статистики ───────────────────── */
.dash-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.dash-kpi { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.dash-kpi .stat.has-spark b { padding-right: 58px; }
.dash-kpi .stat.has-spark .dash-spark { position: absolute; right: 10px; top: 12px; width: 56px; height: 24px; color: var(--accent-2); opacity: .9; }
.dash-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin: 0 0 16px; }
.dash-facts i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px 16px; margin-bottom: 12px; }
.dash-card-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.dash-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-card-head .dash-card-title { margin: 0; }
.dash-segs { display: flex; gap: 4px; flex-wrap: wrap; }
.dash-seg { border: 1px solid var(--line); background: transparent; color: var(--text-2); font: inherit; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; cursor: pointer; }
.dash-seg.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.dash-sep { width: 1px; background: var(--line); margin: 0 4px; }
.dash-chart svg { width: 100%; height: 190px; display: block; }
.dash-chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 4px; }
.dash-frow { margin-bottom: 9px; }
.dash-flabel { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.dash-flabel b { color: var(--text); }
.dash-fbar { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.dash-fbar i { display: block; height: 100%; background: var(--accent-2); border-radius: 4px; }
.dash-fpct { font-size: 11px; color: var(--text-3); margin-top: 2px; text-align: right; }
.dash-attn-row { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); padding: 6px 0; }
.dash-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); margin-top: 5px; flex: none; }
.dash-table-wrap { overflow-x: auto; }
.dash-tbl th.is-sorted { color: var(--text); }
.dash-tbl th[data-action] { cursor: pointer; user-select: none; }
.dash-row { cursor: pointer; }
.dash-row:hover td { background: rgba(127,127,127,.06); }
.dash-row.is-open td { background: rgba(127,127,127,.08); }
.dash-detail-row td { background: var(--surface-2, rgba(127,127,127,.05)); padding: 0; }
.dash-detail { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 8px 14px; }
.dash-dcol { min-width: 150px; flex: 1 1 150px; }
.dash-dcol-wide { flex: 2 1 240px; }
.dash-dtitle { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.dash-drow { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 3px 0; color: var(--text-2); }
.dash-drow b { color: var(--text); font-weight: 600; }
.dash-src { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 0; }
.dash-src > span:first-child { flex: 1; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-src-bar { width: 90px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; flex: none; }
.dash-src-bar i { display: block; height: 100%; background: var(--accent-2); }
.dash-empty { padding: 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.dash-days { font-size: 12px; }
.dash-day-head, .dash-day-row { display: grid; grid-template-columns: 1fr .8fr .8fr 1fr; gap: 8px; padding: 3px 0; }
.dash-day-head { color: var(--text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
.dash-day-row span:not(:first-child), .dash-day-head span:not(:first-child) { text-align: right; }
.dash-day-row { border-top: 1px dashed var(--line); }
.dash-subtabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.dash-subtab { border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; padding: 0 0 9px; cursor: pointer; position: relative; white-space: nowrap; }
.dash-subtab.is-active { color: var(--text); }
.dash-subtab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent-2); border-radius: 2px; }

/* ── 17.11.2026: статистика в стиле макетов ─────────────────── */
.dash { --dash-accent: #e8492f; --dash-accent-soft: rgba(232, 73, 47, .28); }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-title { font-size: 25px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.dash-sub { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.dash-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 17.11.2026 (этап 1): единая шапка аналитики — период, точка, обновление, экспорт. */
.stats-filters {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 10px 14px 12px; margin: 0 0 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.stats-filter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stats-filter__label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.stats-filter .chips-row { margin: 0; }
.stats-filter--actions { margin-left: auto; flex-direction: row; align-items: center; gap: 10px; }
.stats-updated { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.stats-select {
  min-width: 180px; max-width: 280px; padding: 7px 30px 7px 11px; font: inherit; font-size: 13px;
  color: var(--text); background: var(--bg, #fff);
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.stats-select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
@media (max-width: 560px) {
  .stats-filters { gap: 10px; padding: 10px 12px; align-items: stretch; }
  .stats-filter--actions { margin-left: 0; width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .stats-select { min-width: 0; width: 100%; }
  .stats-filter { width: 100%; }
}
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.dashk { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 13px; min-height: 96px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.dashk-label { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.dashk-value { font-size: 27px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.dashk-foot { display: flex; align-items: center; gap: 8px; margin-top: 7px; min-height: 16px; }
.dashk-delta { font-size: 11.5px; font-weight: 700; }
.dashk-delta.is-up { color: #1a9e5f; }
.dashk-delta.is-down { color: var(--dash-accent); }
.dashk-hint { font-size: 11.5px; color: var(--text-3); }
.dashk-spark { position: absolute; right: 14px; top: 14px; width: 74px; height: 26px; color: var(--dash-accent); opacity: .9; }
.dash-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-bottom: 14px; }
.dashfact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; align-items: baseline; gap: 8px; }
.dashfact b { font-size: 15px; font-weight: 800; }
.dashfact span { font-size: 11.5px; color: var(--text-3); }
.dash-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 12px; }
.dash-3col { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.dash-card-sub { font-size: 11.5px; color: var(--text-3); margin: -4px 0 12px; }
.dash-card-title { font-size: 13px; font-weight: 800; letter-spacing: -.01em; color: var(--text); margin-bottom: 6px; }
.dash-frow { margin-bottom: 11px; }
.dash-flabel { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; }
.dash-flabel b { color: var(--text); font-size: 12.5px; }
.dash-flabel b i { font-style: normal; color: var(--text-3); font-weight: 600; margin-left: 6px; }
.dash-fbar { height: 16px; border-radius: 8px; background: var(--line); overflow: hidden; }
.dash-fbar u { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #f2764f, var(--dash-accent)); text-decoration: none; }
.dash-attn-card { display: flex; gap: 9px; align-items: flex-start; background: rgba(232,73,47,.07); border: 1px solid rgba(232,73,47,.18); border-radius: 11px; padding: 9px 12px; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; }
.dash-attn-ico { color: var(--dash-accent); flex: none; line-height: 1.3; }
.dash-note { font-size: 12.5px; color: var(--text-3); }
.dash-toprow { display: grid; grid-template-columns: minmax(0, 1.5fr) 1.2fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 12.5px; }
.dash-toprow > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.dash-toprow em { display: block; height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.dash-toprow em i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #f2764f, var(--dash-accent)); }
.dash-toprow b { font-weight: 700; white-space: nowrap; }
.dash-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-bottom: 12px; }
.dash-pill { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; align-items: baseline; gap: 8px; }
.dash-pill b { font-size: 15px; font-weight: 800; }
.dash-pill span { font-size: 11.5px; color: var(--text-3); }
.dash-donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.dash-donut { width: 132px; height: 132px; flex: none; }
.dash-donut-num { font-size: 15px; font-weight: 800; fill: var(--text); }
.dash-donut-cap { font-size: 7px; fill: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.dash-legend { flex: 1; min-width: 150px; }
.dash-legend-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; padding: 4px 0; color: var(--text-2); }
.dash-legend-row i { width: 10px; height: 10px; border-radius: 3px; }
.dash-legend-row b { font-weight: 700; color: var(--text); }
.dash-chart svg { width: 100%; height: 190px; display: block; }

/* 17.11.2026: детали тура, загрузка, мелочи нового дашборда */
.dash-detail-block { margin-top: 10px; }
.dash-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.dash-chip b { font-weight: 800; color: var(--text); }
.dash-dayrow { display: grid; grid-template-columns: 52px 40px 1fr auto; gap: 10px; align-items: baseline; font-size: 12.5px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.dash-dayrow:last-child { border-bottom: 0; }
.dash-dayrow span { color: var(--text-3); }
.dash-dayrow b { font-weight: 700; }
.dash-dayrow i { font-style: normal; color: var(--text-3); }
.dash-dayrow em { font-style: normal; font-weight: 700; }
.dash-load { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.dash-load span { display: block; width: 54px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.dash-load span i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f2764f, var(--dash-accent)); }
.dash-load b { font-size: 11.5px; font-weight: 700; min-width: 30px; text-align: right; }
.dash-muted { color: var(--text-3); }

/* 17.11.2026: статистика на телефоне — компактные карточки в две колонки */
@media (max-width: 560px) {
  .dash-title { font-size: 21px; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dashk { padding: 11px 12px 10px; min-height: 82px; border-radius: 12px; }
  .dashk-label { font-size: 9.5px; letter-spacing: .06em; }
  .dashk-value { font-size: 20px; margin-top: 4px; }
  .dashk-spark { width: 46px; height: 18px; right: 9px; top: 9px; }
  .dash-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .dashfact { padding: 8px 10px; flex-direction: column; gap: 2px; align-items: flex-start; }
  .dash-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-2col, .dash-3col { grid-template-columns: minmax(0, 1fr); }
  .dash-card { padding: 13px 14px; border-radius: 12px; }
  .dash-donut { width: 108px; height: 108px; }
  .dash-toprow { grid-template-columns: minmax(0, 1.2fr) 1fr auto; gap: 7px; font-size: 12px; }
  .dash-chart svg { height: 150px; }
}

/* 17.11.2026: статистика по сотрудникам/гидам */
.dash-staff { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; margin-top: 8px; }
.staffcard { border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; background: var(--bg-soft); }
.staffcard-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.staffcard-name { font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.staffcard-role { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; }
.staffcard-money { margin-top: 8px; display: flex; align-items: baseline; gap: 7px; }
.staffcard-money b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.staffcard-money span { font-size: 11px; color: var(--text-3); }
.staffcard-exp { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.staffcard-exp b { color: var(--text-2); font-weight: 700; }
.staffcard-bar { height: 8px; border-radius: 5px; background: var(--line); overflow: hidden; margin: 9px 0 8px; }
.staffcard-bar u { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #f2764f, var(--dash-accent)); text-decoration: none; }
.staffcard-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-3); }
.staffcard-nums b { color: var(--text); font-weight: 700; }
.staffcard-cancel { font-size: 11.5px; color: var(--dash-accent); margin-top: 6px; }

/* 17.11.2026: журнал событий статистики */
.evfilters { margin: 4px 0 12px; }
.evfilter { cursor: pointer; font: inherit; }
.evfilter b { color: var(--text); }
.evfilter.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.evfilter.is-on b { color: var(--bg); }
.evtbl td { font-size: 12.5px; }
.evtbl .nowrap { white-space: nowrap; color: var(--text-3); }
.evtbl .evobj { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* 17.11.2026: графики с осями, значениями и подсказками (D-графики). */
.dash-chart-wrap { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: 210px 20px; gap: 2px 8px; margin-top: 6px; }
.dash-chart-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dash-chart-plot { position: relative; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dash-chart-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); opacity: .6; pointer-events: none; }
.dash-chart-na { position: absolute; left: 0; top: 0; bottom: 0; background: currentColor; opacity: .06; pointer-events: none; }
.dash-chart-bar { position: absolute; bottom: 0; background: var(--dash-accent, #e8556d); border-radius: 3px 3px 0 0; opacity: .9; }
.dash-chart-bar:hover { opacity: 1; }
.dash-chart-bar em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 10px; font-style: normal; color: var(--text-2); margin-bottom: 2px; white-space: nowrap; }
.dash-chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--dash-accent, #e8556d); overflow: visible; }
.dash-chart-pt { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--dash-accent, #e8556d); border: 2px solid var(--bg, #fff); opacity: 0; }
.dash-chart-pt.is-dot { opacity: .85; }
.dash-chart-pt:hover { opacity: 1; transform: scale(1.35); }
.dash-chart-tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); background: var(--text, #111); color: var(--bg, #fff); font-size: 11px; line-height: 1.2; padding: 4px 7px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 6; }
.dash-chart-bar:hover .dash-chart-tip, .dash-chart-pt:hover .dash-chart-tip { opacity: 1; }
.dash-chart-x { grid-column: 2; display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); }
/* 17.11.2026: место под подпись графика держим постоянным — экран не должен прыгать. */
.dash-chart-note { min-height: 18px; }
