/* CRM «Сав Бани». Сначала телефон, затем широкие экраны (≥ 900px). */

:root {
  --brand: #0176d3;
  --brand-dark: #014486;
  --brand-light: #eef4ff;
  --bg: #f3f3f3;
  --card: #fff;
  --border: #dddbda;
  --border-strong: #c9c7c5;
  --text: #181818;
  --muted: #706e6b;
  --success: #2e844a;
  --success-light: #ebf7e6;
  --warning: #a96404;
  --warning-light: #fef1ee;
  --error: #ba0517;
  --holiday: #c23934;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .08);
  --tabbar-h: 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; line-height: 1.4; }
a { color: var(--brand); text-decoration: none; }
h1, h2 { margin: 0; font-weight: 700; }
[hidden] { display: none !important; }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.boot, .loading, .empty { padding: 48px 16px; text-align: center; color: var(--muted); }

/* --- Шапка и вкладки --- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  height: 52px; padding: 0 16px;
  background: var(--card); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.topbar__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-dark); }
.topbar__brand img { width: 26px; height: 26px; }
.topbar__nav { display: none; }
.topbar__user { margin-left: auto; text-align: right; font-size: 14px; font-weight: 600; line-height: 1.15; }
.topbar__user small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--border);
}
.nav__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 12px;
}
.nav__item--active { color: var(--brand); font-weight: 600; }

.view { max-width: 1280px; margin: 0 auto; padding: 12px 12px calc(var(--tabbar-h) + 24px); }

/* --- Общие элементы --- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
.card__title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.page-header { display: flex; align-items: center; min-height: 40px; margin-bottom: 8px; }
.page-title { font-size: 22px; }
.back { font-weight: 600; font-size: 16px; padding: 8px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--card); color: var(--brand); font: inherit; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn--brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--brand:active { background: var(--brand-dark); }
.btn--neutral { color: var(--text); }
.btn--small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; font-size: 26px; line-height: 1; color: var(--text); }

.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.input {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit;
  border: 1px solid var(--border-strong); border-radius: 6px; background: #fff;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(1, 118, 211, .2); }
.form-error { color: var(--error); font-size: 14px; margin: -4px 0 12px; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.badge--brand { background: var(--brand-light); color: var(--brand-dark); }
.badge--muted { background: #ecebea; color: var(--muted); }
.badge--holiday { background: #fde9e7; color: var(--holiday); }

.status { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.status--new { background: #fff4d6; color: #8c4b02; }
.status--confirmed { background: var(--brand-light); color: var(--brand-dark); }
.status--completed { background: var(--success-light); color: var(--success); }
.status--no_show, .status--cancelled { background: #ecebea; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { padding: 4px 10px; border-radius: 14px; background: #f3f2f2; font-size: 14px; }
.chip--brand { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.kv span { color: var(--muted); }

.notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px; border-radius: var(--radius);
  background: var(--brand-light); color: var(--brand-dark); font-size: 14px; font-weight: 600;
}

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s;
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 6px;
  background: #032d60; color: #fff; font-size: 14px; z-index: 20; box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.toast--show { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: var(--error); }
.toast--success { background: var(--success); }

/* --- Вход --- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand) 55%, var(--bg) 55%); }
.login__card { width: 100%; max-width: 380px; padding: 28px 24px; }
.login__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--brand-dark); font-size: 18px; }
.login__brand img { width: 34px; height: 34px; }
.login__title { font-size: 24px; margin: 20px 0 16px; }

/* --- Расписание: панель --- */
.sched-toolbar {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-bottom: 12px;
}
.segmented {
  grid-column: 1 / -1; display: flex; padding: 3px; border-radius: 8px; background: #e5e5e5;
}
.segmented__item {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 6px; color: var(--text); font-weight: 600; font-size: 15px;
}
.segmented__item--active { background: var(--card); color: var(--brand-dark); box-shadow: var(--shadow); }
.sched-nav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.sched-nav__title { flex: 1; text-align: center; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-today { justify-self: end; }

/* --- Дни и слоты --- */
.days { display: flex; flex-direction: column; gap: 12px; }
.day { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.day--today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.day--past .slot { opacity: .7; }
.day__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #f0efee; }
.day__title { display: flex; align-items: baseline; gap: 8px; color: var(--text); }
.day__num { font-size: 22px; font-weight: 700; }
.day__wd { color: var(--muted); font-size: 15px; }
.day__badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.day__slots { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
.day__empty { color: var(--muted); font-size: 14px; padding: 4px 0; }

.slot {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: baseline;
  padding: 10px 12px; border-radius: 6px; border: 1px solid var(--border); border-left-width: 4px; color: var(--text);
}
.slot__time { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot__state { color: var(--muted); font-size: 14px; }
.slot--free { border-left-color: var(--success); background: #fafffa; }
.slot--free .slot__state { color: var(--success); font-weight: 600; }
.slot--blocked { border-left-color: #a8a6a4; background: repeating-linear-gradient(-45deg, #f6f5f4 0 8px, #efeeed 8px 16px); }
.slot--booked { border-left-color: var(--brand); background: #f8fbff; }
.slot--booked.slot--new { border-left-color: #dd7a01; }
.slot--booked.slot--completed { border-left-color: var(--success); }
.slot--booked:active { background: var(--brand-light); }
.slot__client { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot__meta, .slot__foot { grid-column: 2; font-size: 14px; color: var(--muted); }
.slot__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.slot__due { color: var(--warning); font-weight: 600; white-space: nowrap; }
.slot__paid { color: var(--success); font-weight: 600; }
.slot__phone { white-space: nowrap; }

/* --- Месяц --- */
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.month__wd { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.month__cell {
  min-height: 62px; padding: 4px; border-radius: 6px; background: var(--card); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px; color: var(--text);
}
.month__cell--out { opacity: .45; }
.month__cell--past { background: #fafaf9; }
.month__cell--today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.month__cell--off .month__num { color: var(--holiday); }
.month__num { font-weight: 700; font-size: 14px; }
.month__dots { display: flex; gap: 2px; flex-wrap: wrap; }
.month__free { display: none; font-size: 11px; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot--booked { background: var(--brand); }
.dot--free { background: #fff; border: 1.5px solid var(--success); }
.dot--blocked { background: #a8a6a4; }
.legend { display: flex; gap: 14px; justify-content: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 4px; }

/* --- Бронь --- */
.booking-head__top { display: flex; justify-content: space-between; align-items: center; }
.booking-head__time { font-size: 28px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.booking-head__date { color: var(--muted); }
.client__name { font-size: 18px; font-weight: 700; }
.client__phone { display: inline-block; margin-top: 2px; font-size: 17px; font-weight: 600; padding: 4px 0; }
.comment { margin: 12px 0 0; padding: 10px 12px; background: #fffbe6; border-radius: 6px; white-space: pre-wrap; }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #f3f2f2; }
.line:last-child { border-bottom: 0; }
.line__name .muted { display: inline; font-size: 14px; }
.line__sum { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lines--sub .line { color: var(--success); font-size: 14px; }
.totals { margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--border); }
.totals__sum { font-size: 20px; }

/* --- Панель снизу (sheet) --- */
body.no-scroll { overflow: hidden; }
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 30; background: rgba(8, 7, 7, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  background: var(--card); border-radius: 14px 14px 0 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .2);
}
.sheet__head { position: sticky; top: 0; background: var(--card); display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; }
.sheet__title { font-size: 18px; }
.sheet__close { border: 0; background: none; font-size: 30px; line-height: 1; color: var(--muted); width: 44px; height: 44px; cursor: pointer; }
.sheet__text { margin: 0 0 8px; }
.sheet__foot { display: flex; gap: 8px; margin-top: 8px; }
.sheet__foot .btn { flex: 1; }
.btn--danger { background: var(--error); border-color: var(--error); color: #fff; }
.btn--danger-outline { color: var(--error); }

/* --- Элементы формы --- */
.select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23706e6b' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 34px; }
textarea.input { min-height: 72px; resize: vertical; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 4px 0; border-bottom: 1px solid #f3f2f2; }
.row:last-child { border-bottom: 0; }
.row__label { flex: 1; min-width: 0; }
.row__label small { display: block; color: var(--muted); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field--tight { margin-bottom: 0; }
.subhead { font-size: 13px; font-weight: 700; color: var(--muted); margin: 12px 0 2px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 22px; overflow: hidden; flex-shrink: 0; }
.stepper__btn { width: 40px; height: 38px; border: 0; background: #fff; color: var(--brand); font-size: 22px; cursor: pointer; }
.stepper__btn:active { background: var(--brand-light); }
.stepper__val { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper--on { border-color: var(--brand); }

.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: #c9c7c5; transition: .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(1, 118, 211, .3); }

.suggest { position: relative; }
.suggest__list { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.suggest__item { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid #f3f2f2; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.suggest__item:last-child { border-bottom: 0; }
.suggest__item:active, .suggest__item:hover { background: var(--brand-light); }
.suggest__item small { color: var(--muted); white-space: nowrap; }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 6px; background: var(--brand-light); }
.picked b { display: block; }
.picked small { color: var(--brand-dark); }

/* --- Итог формы (закреплён снизу) --- */
.form-page { padding-bottom: 96px; }
.pricebar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 9;
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: var(--card); border-top: 1px solid var(--border); box-shadow: 0 -2px 8px rgba(0, 0, 0, .06);
}
.pricebar__sum { flex: 1; min-width: 0; }
.pricebar__total { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pricebar__note { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pricebar__note--error { color: var(--error); white-space: normal; }
.pricebar .btn { min-width: 140px; }
.breakdown .line { font-size: 15px; }

/* --- Действия в брони --- */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .btn--wide { grid-column: 1 / -1; }
.line__del { border: 0; background: none; color: var(--muted); font-size: 22px; width: 36px; height: 32px; margin: -4px -8px -4px 0; cursor: pointer; }
.slots-pick { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.slots-pick label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; }
.slots-pick input { width: 20px; height: 20px; accent-color: var(--brand); }
.slot--free[href]:active { background: var(--success-light); }
.slot__add { grid-column: 1 / -1; font-size: 14px; color: var(--brand); font-weight: 600; }

/* --- Клиенты --- */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.list-head .page-title { margin: 0; }
.search { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 4px 0 8px; }
.search__input { padding-left: 38px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23706e6b' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 12px center; }
.list-count { margin: 0 0 8px; font-size: 14px; }
.clients, .visits { list-style: none; margin: 0; padding: 0; }
.clients { display: flex; flex-direction: column; gap: 8px; }
.client-row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
}
.client-row:active { background: var(--brand-light); }
.client-row__name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-row__phone { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.client-row__facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.client-row__facts .chip { font-size: 13px; padding: 2px 8px; }
.chip--warn { background: #fef1e6; color: #a96404; }
.more { width: 100%; margin-top: 12px; }
.client-card__name { font-size: 24px; margin: 0 0 2px; }
.client__name--link { display: inline-block; color: var(--brand-dark); }
.actions--card { margin-top: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 8px; background: #f8f8f8; text-align: center; }
.stat b { font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.stat--warn b { color: #a96404; }
.visit {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0;
  border-bottom: 1px solid #f3f2f2; color: var(--text);
}
.visits li:last-child .visit { border-bottom: 0; }
.visit__date { font-weight: 600; }
.visit__time { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.visit__meta { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.visit__sum { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.visit__sum small { display: block; font-weight: 400; color: #a96404; font-size: 12px; }
.visit--cancelled .visit__date, .visit--cancelled .visit__time { text-decoration: line-through; color: var(--muted); }

/* --- Управление --- */
.admin-note { font-size: 14px; margin: -4px 0 12px; }
.admin-menu { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.admin-menu__item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border-bottom: 1px solid #f3f2f2; color: var(--text); }
.admin-menu li:last-child .admin-menu__item { border-bottom: 0; }
.admin-menu__item:active { background: var(--brand-light); }
.admin-menu__title { font-weight: 700; }
.admin-menu__item small { grid-column: 1; color: var(--muted); font-size: 14px; }
.admin-menu__arrow { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--muted); font-size: 24px; }
.admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.admin-list--flat { gap: 0; margin: 8px 0 10px; }
.admin-list--flat .admin-row { border: 0; border-bottom: 1px solid #f3f2f2; border-radius: 0; padding: 10px 0; background: none; }
.admin-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%;
  padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  font: inherit; color: var(--text); text-align: left;
}
.admin-row--btn { cursor: pointer; }
.admin-row--btn:active:not(:disabled) { background: var(--brand-light); }
.admin-row--btn:disabled { cursor: default; opacity: .75; }
.admin-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.admin-row__hit { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.admin-row__main small { color: var(--muted); font-size: 13px; }
.admin-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.admin-row__price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-row--wrap { flex-wrap: wrap; }
.admin-row__btns { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #f3f2f2; color: var(--muted); white-space: nowrap; }
.badge--info { background: var(--brand-light); color: var(--brand-dark); }
.badge--warn { background: #fef1e6; color: #a96404; }
.badge--off { background: #ecebea; color: var(--muted); }
.field__hint { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.checks { border: 0; padding: 0; margin: 0 0 12px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.year-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 10px; font-size: 18px; }
.pm__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pm__name { font-size: 18px; margin: 0 0 2px; }
.pm__comment { margin: 4px 0 0; font-size: 14px; }
.pm--off .pm__name { color: var(--muted); }
[data-when][hidden] { display: none; }

/* --- Широкий экран --- */
@media (min-width: 900px) {
  .tabbar { display: none; }
  .view { padding: 20px 24px 40px; }
  .topbar { height: 56px; padding: 0 24px; }
  .topbar__nav { display: flex; height: 100%; margin-left: 24px; }
  .topbar__nav .nav__item { flex-direction: row; gap: 6px; padding: 0 14px; font-size: 15px; border-bottom: 3px solid transparent; }
  .topbar__nav .nav__item--active { border-bottom-color: var(--brand); }
  .sched-toolbar { grid-template-columns: 320px 1fr auto; }
  .segmented { grid-column: auto; }
  .days--week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
  .days--week .day__head { flex-direction: column; align-items: flex-start; }
  .days--week .day__badges { justify-content: flex-start; }
  .days--week .slot { grid-template-columns: 1fr; }
  .days--week .slot__meta, .days--week .slot__foot { grid-column: 1; }
  .days--week .slot__client {
    white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25;
  }
  .sched-nav { justify-content: center; }
  .sched-nav__title { flex: 0 1 auto; min-width: 220px; }
  .days--day { max-width: 720px; }
  .month { gap: 6px; }
  .month__cell { min-height: 96px; padding: 8px; }
  .month__free { display: block; }
  .dot { width: 10px; height: 10px; }
  .toast { bottom: 24px; }
  .pricebar { bottom: 0; justify-content: center; }
  .pricebar__sum { flex: 0 1 560px; }
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 14px; }
  .actions { grid-template-columns: repeat(4, auto); justify-content: start; }
  .actions .btn--wide { grid-column: auto; }
  main.view > .card, main.view > form.card, main.view > section.card, main.view > .btn--block { max-width: 720px; }
}
