/* ---------- Базовые настройки ---------- */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --border: #e4e9f2;
  --text: #101828;
  --text-muted: #667085;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-ring: rgba(79, 70, 229, 0.16);
  --success: #047857;
  --success-soft: #e6f7ef;
  --danger: #d92d20;
  --danger-hover: #b42318;
  --danger-soft: #feeceb;
  --warning: #b54708;
  --warning-soft: #fef3e2;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 32px -24px rgba(16, 24, 40, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(900px 420px at 50% -180px, #e6ebff 0%, rgba(230, 235, 255, 0) 70%);
  background-repeat: no-repeat;
}

h1, h2, h3, h4, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}

.container--narrow {
  max-width: 720px;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 13px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px -10px rgba(79, 70, 229, 0.9);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
}

/* Кнопка «Мои записи» на публичных страницах: как «Записаться» (primary). */
#my-records-link {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 8px 18px -10px rgba(79, 70, 229, 0.9);
}

#my-records-link:hover {
  background: var(--accent-hover);
}

.btn-ghost:hover {
  background: var(--surface-muted);
}

.btn-danger {
  color: #fff;
  background: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-muted);
  border-color: var(--border);
}

.icon-btn.danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #fecdca;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Шапка сайта ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 10px 22px -10px rgba(79, 70, 229, 0.85);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#public-link .link-icon {
  display: none;
}

/* ---------- Карточки и панели ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.panel {
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.panel-head h2 {
  font-size: 17px;
  font-weight: 700;
}

.panel-head p {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
}

.panel-note {
  padding: 12px 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: #fafbfe;
  border-top: 1px solid var(--border);
}

/* ---------- Сводка ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 18px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat--accent {
  background: linear-gradient(140deg, #eef2ff, #ffffff 65%);
  border-color: #dde3fb;
}

.stat--accent .stat-value {
  color: var(--accent);
}

/* ---------- Вкладки ---------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: none;
  padding: 9px 15px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tab:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.tab[aria-selected="true"] {
  color: #fff;
  background: var(--accent);
}

/* ---------- Инструменты списка ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.search {
  position: relative;
  flex: 1 1 240px;
  max-width: 360px;
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.search input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  color: var(--text);
  border-color: #c9d0e0;
}

.chip[aria-pressed="true"] {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
}

.chip .count {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.select-inline {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.select-inline:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

/* ---------- Таблицы ---------- */
.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table thead th {
  padding: 11px 18px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--text-muted);
  background: #fafbfe;
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr.is-clickable {
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: #f8faff;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.cell-date {
  width: 160px;
}

.time-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.date-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
}

.today-pill {
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.primary-cell {
  font-weight: 600;
}

.phone-link {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.phone-link:hover {
  text-decoration: underline;
}

/* Комбинированное поле: ввод + список вариантов */
.field {
  position: relative;
}

.combobox-list {
  position: absolute;
  top: calc(100% - 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  z-index: 30;
}

.combobox-item {
  padding: 9px 12px;
  font-size: 14px;
  cursor: pointer;
}

.combobox-item:hover {
  background: rgba(37, 99, 235, 0.08);
}

.secondary-cell {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.note-cell {
  margin-top: 2px;
  max-width: 260px;
  overflow: hidden;
  font-size: 12.5px;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-status {
  width: 165px;
}

.cell-actions {
  width: 92px;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}

/* ---------- Значки ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--new { color: #1d4ed8; background: #e9efff; }
.badge--confirmed { color: var(--success); background: var(--success-soft); }
.badge--completed { color: #475467; background: #eef1f6; }
.badge--cancelled { color: #b42318; background: var(--danger-soft); }
.badge--online { color: #b54708; background: var(--warning-soft); }

.badge--plain::before {
  display: none;
}

.badge--role-owner { color: #6d28d9; background: #f1ecfe; }
.badge--role-admin { color: #1d4ed8; background: #e9efff; }
.badge--role-staff { color: #475467; background: #eef1f6; }
.badge--kind { color: #0f766e; background: #e7f6f3; }
.badge--off { color: #667085; background: #eef1f6; }

/* ---------- Пустое состояние ---------- */
.empty {
  padding: 52px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 16px;
}

.empty-icon svg {
  width: 26px;
  height: 26px;
}

.empty h3 {
  margin-bottom: 4px;
  font-size: 16px;
  color: var(--text);
}

.empty p {
  font-size: 14px;
}

/* ---------- Сетка карточек ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 16px;
}

.item-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.item-card:hover {
  border-color: #d3d9e8;
  box-shadow: var(--shadow-sm);
}

.item-card.is-off {
  background: var(--surface-muted);
}

.item-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item-card-title {
  font-size: 15px;
  font-weight: 700;
}

.item-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-card-text {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- Внешний вид (инлайн-редактор) ---------- */

.appearance-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.appearance-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.appearance-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 12px;
  align-items: start;
}

@media (max-width: 1100px) {
  .appearance-layout {
    grid-template-columns: 1fr;
  }
}

.appearance-frame-box {
  border: 2px solid var(--accent);
  border-radius: 12px;
  overflow: hidden;
  height: 640px;
  background: #f5f7fb;
}

#appearance-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.appearance-inspector {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface);
}

.appearance-inspector h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
}

/* Просмотр кабинета объекта во фрейме */
.dialog--frame {
  width: min(1200px, 96vw);
  height: 92vh;
  min-width: 560px;
  min-height: 420px;
  max-width: 98vw;
  max-height: 97vh;
  padding: 0;
  /* Изменяемый размер: тянуть за правый нижний угол */
  resize: both;
  overflow: hidden;
}

.cabinet-frame-box {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cabinet-frame-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--warning, #d97706);
  background: var(--surface);
}

.cabinet-frame-head h2 {
  font-size: 15px;
  margin: 0;
}

.cabinet-frame-head .hint {
  margin: 0;
  color: var(--warning, #d97706);
}

#cabinet-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #f5f7fb;
}

.problem-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

.problem-link:hover {
  text-decoration: underline;
}

.problem-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.item-card-actions {
  display: flex;
  gap: 4px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* ---------- Формы ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-size: 13px;
  font-weight: 600;
}

.field .hint {
  font-size: 12px;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color-scheme: light;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.1);
}

.field-error {
  display: none;
  font-size: 12.5px;
  color: var(--danger);
}

.field-error.visible {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row--3 {
  grid-template-columns: repeat(3, 1fr);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.kind-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.kind-option-group {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.kind-option-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kind-option {
  padding: 4px 6px;
  cursor: pointer;
}

.object-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.object-thumb-wrap {
  width: 92px;
  height: 68px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.object-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.object-thumb.is-broken {
  opacity: 0.25;
}

.booking-gallery {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-bottom: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.booking-thumb {
  flex: none;
  width: 168px;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  cursor: zoom-in;
}

.img-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.75);
  cursor: zoom-out;
}

.img-overlay.is-open {
  display: grid;
}

.img-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* ---------- Лента дат онлайн-записи ---------- */
.day-picker {
  min-width: 0;
}

.day-picker-head {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.day-strip {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 8px;
  padding: 2px 2px 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.day-strip::-webkit-scrollbar {
  display: none;
}

.day-nav {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  padding: 0;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.day-nav svg {
  width: 16px;
  height: 16px;
}

.day-nav:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-muted);
}

.day-nav:disabled {
  opacity: 0.4;
  cursor: default;
}

.day-nav.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.month-grid {
  margin-top: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.month-grid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.month-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
}

.month-cells {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.month-weekday {
  padding: 2px 0;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.month-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px 5px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.month-day:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.month-day:disabled {
  color: var(--text-muted);
  opacity: 0.45;
  cursor: default;
}

.month-day.is-selected {
  color: #fff;
  background: var(--accent);
}

.month-day.is-empty .month-day-num {
  opacity: 0.55;
}

.month-day-num {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.day-count--mini {
  min-width: 16px;
  padding: 0 4px;
  font-size: 9.5px;
}

.month-day.is-selected .day-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.day-chip {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 76px;
  padding: 10px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.day-chip:hover {
  border-color: var(--accent);
}

.day-chip.is-selected {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.day-chip.is-empty {
  opacity: 0.45;
}

.day-name {
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  color: var(--text-muted);
}

.day-chip.is-selected .day-name {
  color: rgba(255, 255, 255, 0.85);
}

.day-date {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

.day-count {
  min-width: 22px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.day-chip.is-selected .day-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.day-count--empty {
  color: var(--text-muted);
  background: var(--surface-muted);
}

/* ---------- Типы мест ---------- */
.kind-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.kind-thumb-wrap {
  width: 92px;
  height: 68px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.kind-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kind-thumb.is-broken {
  opacity: 0.25;
}

.kind-info {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.kind-info-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.kind-info .kind-gallery {
  margin-top: 8px;
}

.booking-thumb--small {
  width: 92px;
  height: 68px;
}

/* ---------- Доска занятости ---------- */
.board-wrap {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.board-table {
  min-width: 0;
}

.board-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
}

.board-table th:first-child,
.board-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 150px;
  background: var(--surface);
}

.board-table .primary-cell,
.board-table .secondary-cell {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  font-variant-numeric: normal;
}

.board-table thead th:first-child {
  z-index: 4;
}

.board-table tbody tr:hover td:first-child {
  background: var(--surface);
}

.board-table td {
  padding: 4px;
  vertical-align: top;
}

.board-table th {
  white-space: nowrap;
}

.board-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: 64px;
  padding: 8px 4px;
  color: var(--text);
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.board-cell .board-time {
  font-size: 12px;
  font-weight: 700;
}

.board-cell .board-client {
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  color: var(--text-muted);
}

.board-cell.is-free:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.board-cell.is-busy {
  background: var(--warning-soft);
  border-color: transparent;
  cursor: pointer;
}

.board-cell.is-busy .board-client {
  color: var(--warning);
}

.board-cell.is-busy.is-foreign {
  background: var(--surface-muted);
  cursor: default;
}

.board-cell.is-busy.is-foreign .board-client {
  color: var(--text-muted);
}

.board-cell.is-closed {
  background: transparent;
  border-style: dotted;
  opacity: 0.5;
}

.board-cell.is-closed .board-client {
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.board-more {
  font-size: 9.5px;
  color: var(--warning);
}

.board-off {
  text-align: center;
}

.board-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 2px;
}

.board-legend .board-cell {
  width: auto;
  min-width: 64px;
  pointer-events: none;
}

.board-week-cell {
  display: block;
  width: 100%;
  padding: 8px 4px;
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.board-week-cell:hover {
  border-color: var(--accent);
}

.board-week-cell.is-empty {
  color: var(--text-muted);
  opacity: 0.6;
}

/* ---------- Панель поддержки ---------- */
.dialog--wide {
  width: min(960px, calc(100vw - 32px));
}

.manage-block {
  margin-top: 16px;
}

.manage-block h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.manage-list {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}

.manage-item:last-child {
  border-bottom: 0;
}

.manage-item-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.raw-box {
  max-height: 320px;
  margin-top: 10px;
  padding: 12px;
  overflow: auto;
  font-size: 11.5px;
  line-height: 1.45;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.required {
  color: var(--accent);
}

/* ---------- Лендинг ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 44px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  margin-bottom: 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero p.lead {
  margin-top: 14px;
  font-size: 16.5px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-preview {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hero-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
}

.hero-preview-row + .hero-preview-row {
  margin-top: 4px;
}

.hero-preview-row.is-active {
  background: var(--accent-soft);
}

.hero-preview-time {
  flex: none;
  width: 54px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hero-preview-body {
  min-width: 0;
}

.hero-preview-title {
  font-size: 14px;
  font-weight: 600;
}

.hero-preview-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

.section {
  padding: 34px 0;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-subtitle {
  margin-top: 6px;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.feature h3 {
  font-size: 15.5px;
  font-weight: 700;
}

.feature p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
  counter-reset: step;
}

.step {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 9px;
}

.step h3 {
  font-size: 15px;
  font-weight: 700;
}

.step p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.demo-card {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
  margin-top: 24px;
  background: linear-gradient(140deg, #eef2ff, #ffffff 60%);
  border: 1px solid #dde3fb;
  border-radius: 18px;
}

.demo-card h3 {
  font-size: 17px;
  font-weight: 700;
}

.demo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.demo-list li {
  padding: 5px 11px;
  font-size: 12.5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #dde3fb;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.site-footer {
  padding: 28px 0 40px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ---------- Страницы входа ---------- */
.auth-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 130px);
  padding: 32px 0 48px;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 22px;
  font-weight: 700;
}

.auth-card .lead {
  margin-top: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer {
  margin-top: 18px;
  padding-top: 16px;
  font-size: 13.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.demo-entry {
  display: grid;
  gap: 12px;
  padding: 16px;
  margin-bottom: 22px;
  background: linear-gradient(140deg, #eef2ff, #ffffff 70%);
  border: 1px solid #dde3fb;
  border-radius: 14px;
}

.demo-entry h2 {
  font-size: 15.5px;
  font-weight: 700;
}

.demo-entry p {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.demo-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-entry-actions .btn {
  flex: 1 1 140px;
}

.object-choice-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

#object-choice .demo-template-card {
  margin-bottom: 8px;
}

#object-choice .btn {
  margin-top: 12px;
  width: 100%;
}

.demo-templates {
  display: grid;
  gap: 8px;
}

.demo-template-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.demo-template-card:hover {
  border-color: var(--accent);
}

.demo-template-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.demo-template-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.demo-template-name {
  font-size: 14px;
  font-weight: 700;
}

.demo-template-desc {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

.demo-template-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ---------- Степпер доп. времени ---------- */
.extra-stepper {
  margin-top: 8px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.stepper-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.stepper-btn:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
}

.stepper-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.stepper-value {
  flex: 1;
  display: grid;
  gap: 2px;
  text-align: center;
  min-width: 0;
}

.stepper-title {
  font-size: 13px;
  font-weight: 700;
}

.stepper-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.demo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-top: 18px;
  font-size: 13.5px;
  color: #1d4ed8;
  background: #e9efff;
  border: 1px solid #cdd9f8;
  border-radius: 14px;
}

.demo-banner-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  min-width: 0;
}

.demo-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-banner-title {
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.form-actions .btn {
  min-width: 150px;
}

.alert {
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13.5px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.alert--error {
  color: #b42318;
  background: var(--danger-soft);
  border-color: #fecdca;
}

.alert--success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #b7e4cd;
}

.alert--info {
  color: #1d4ed8;
  background: #e9efff;
  border-color: #cdd9f8;
}

.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  background: var(--surface-muted);
  border: 1px dashed #c9d0e0;
  border-radius: 12px;
}

.link-box input {
  flex: 1;
  min-width: 0;
  padding: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  background: transparent;
  border: none;
}

.link-box input:focus {
  outline: none;
}

.dev-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------- Личный кабинет ---------- */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 50%;
}

.user-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
}

.tab-section {
  margin-bottom: 28px;
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.list-toolbar h2 {
  font-size: 16px;
  font-weight: 700;
}

.list-toolbar p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Диалоги ---------- */
.dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: none;
  border-radius: 18px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 40px 70px -30px rgba(16, 24, 40, 0.5);
}

.dialog--narrow {
  width: min(440px, calc(100vw - 28px));
}

.dialog::backdrop {
  background: rgba(16, 24, 40, 0.45);
  backdrop-filter: blur(3px);
}

.dialog[open] {
  animation: dialog-in 0.18s ease-out;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.dialog-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
}

.dialog-header h2 {
  font-size: 19px;
  font-weight: 700;
}

.dialog-hint {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.dialog-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px;
  overflow-y: auto;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
  border-radius: 0 0 18px 18px;
}

.confirm-form {
  padding: 24px 24px 0;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 14px;
}

.confirm-icon svg {
  width: 22px;
  height: 22px;
}

.confirm-form h2 {
  font-size: 18px;
  font-weight: 700;
}

.confirm-text {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.confirm-form .dialog-footer {
  margin: 22px -24px 0;
}

/* ---------- Уведомление ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: #fff;
  background: #101828;
  border-radius: 999px;
  box-shadow: 0 14px 30px -10px rgba(16, 24, 40, 0.6);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  background: var(--danger);
}

/* ---------- Публичная запись ---------- */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
  align-items: start;
  padding: 26px 0 48px;
}

.booking-info {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.booking-info h1 {
  font-size: 22px;
  font-weight: 700;
}

.booking-info .lead {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.info-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
}

.info-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.info-list svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--accent);
}

.booking-form-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 9px 6px;
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.slot .slot-state {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.8;
}

.slot:hover {
  border-color: var(--accent);
}

.slot[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.slots-empty {
  padding: 14px;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
  background: var(--surface-muted);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.slots--dialog {
  max-height: 132px;
  padding: 2px 2px 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.slot-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.slot-suggestions .slot {
  padding: 6px 10px;
  font-size: 12.5px;
}

.slot--suggestion {
  border-color: var(--accent);
  color: var(--accent);
}

.slot--busy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--text-muted);
  background: var(--surface-muted);
  border-style: dashed;
}

/* Внерабочее время: неактивный слот «закрыто» */
.slot--closed {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--text-muted);
  background: transparent;
  border-style: dotted;
  opacity: 0.5;
  cursor: not-allowed;
}

.slot--closed .slot-state {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.8;
}

.slot--busy .slot-state {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.8;
}

.slot--busy:hover {
  border-color: var(--warning);
}

.slot--busy[aria-pressed="true"] {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: var(--warning);
}

.busy-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: var(--warning-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.busy-panel-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--warning);
}

.busy-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.busy-item-main {
  min-width: 0;
}

.busy-item-title {
  font-size: 13px;
  font-weight: 600;
}

.busy-item-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.return-note {
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--warning);
  background: var(--warning-soft);
  border-radius: 10px;
}

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.field-head .hint {
  font-weight: 500;
}

.hint--warning {
  color: var(--warning);
}

.summary {
  display: grid;
  gap: 10px;
  padding: 18px;
  margin-top: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.summary-row span:first-child {
  color: var(--text-muted);
}

.summary-row strong {
  text-align: right;
}

.price-tag {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Адаптивность ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 0 28px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .booking-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 820px) {
  .container {
    padding: 0 14px;
  }

  .board-table th:first-child,
  .board-table td:first-child {
    min-width: 108px;
    max-width: 140px;
  }

  .header-inner {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .stats {
    gap: 10px;
    margin: 16px 0 14px;
  }

  .stat {
    padding: 12px 14px;
  }

  .stat-label {
    font-size: 10.5px;
  }

  .stat-value {
    font-size: 22px;
  }

  .toolbar {
    padding: 12px;
  }

  .search {
    max-width: none;
  }

  .filters {
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: none;
  }

  .data-table {
    min-width: 0;
  }

  .data-table:not(.board-table) thead {
    display: none;
  }

  .data-table:not(.board-table),
  .data-table:not(.board-table) tbody {
    display: block;
  }

  .data-table:not(.board-table) tbody {
    padding: 12px;
  }

  .data-table:not(.board-table) tbody tr {
    display: block;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
  }

  .data-table:not(.board-table) tbody tr:last-child {
    margin-bottom: 0;
  }

  .data-table:not(.board-table) td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    border: none;
  }

  .data-table:not(.board-table) td::before {
    flex: none;
    padding-top: 3px;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .cell-body {
    min-width: 0;
    text-align: right;
  }

  .time-main {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px 6px;
  }

  .time-main .today-pill,
  .time-main .badge {
    font-size: 9.5px;
    padding: 1px 6px;
  }

  .phone-link {
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
  }

  .phone-link:hover {
    text-decoration: underline;
  }

  .note-cell {
    max-width: none;
    white-space: normal;
  }

  .cell-actions {
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
  }

  .cell-actions::before {
    display: none;
  }

  .form-row,
  .form-row--3 {
    grid-template-columns: 1fr;
  }

  .dialog-footer {
    flex-direction: column-reverse;
  }

  .dialog-footer .btn,
  .form-actions .btn {
    width: 100%;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .header-actions .btn-ghost {
    display: none;
  }

  /* «Мои записи» остаётся доступной на телефоне — компактная основная кнопка */
  #my-records-link.btn-ghost {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 10px;
    font-size: 12.5px;
    color: #fff;
    background: var(--accent);
    border-color: transparent;
  }

  #my-records-link.btn-ghost:hover {
    background: var(--accent-hover);
  }

  /* «Публичная страница» остаётся доступной на телефоне — как иконка */
  #public-link.btn-ghost {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-color: var(--border);
    background: var(--surface);
  }

  #public-link .link-icon {
    display: block;
    width: 17px;
    height: 17px;
  }

  #public-link .link-text {
    display: none;
  }

  .user-chip {
    padding: 4px;
  }

  .user-chip .user-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Уведомления в кабинете ---------- */

.icon-btn--sm {
  width: 28px;
  height: 28px;
  padding: 0;
}

.icon-btn--sm svg {
  width: 15px;
  height: 15px;
}

.notify-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent, #2563eb);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.notify-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  z-index: 40;
}

.notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-weight: 600;
  font-size: 14px;
}

.notify-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}

.notify-item {
  padding: 8px 10px;
  border-radius: 8px;
}

.notify-item:hover {
  background: rgba(37, 99, 235, 0.06);
}

.notify-item--cancelled .notify-item-title {
  color: #b45309;
}

.notify-item-title {
  font-size: 13.5px;
  font-weight: 600;
}

.notify-item-meta {
  font-size: 12px;
  color: var(--muted, #64748b);
  margin-top: 2px;
}

.notify-empty {
  padding: 14px 10px;
  font-size: 13px;
  color: var(--muted, #64748b);
  text-align: center;
}

.header-actions {
  position: relative;
}

/* ---------- Страница «Мои записи» клиента ---------- */

.my-body .my-container {
  max-width: 720px;
}

.my-empty {
  text-align: left;
}

.my-section {
  margin-top: 18px;
}

.my-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}

.my-object {
  margin-bottom: 12px;
}

.my-object-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.my-object-name {
  font-size: 15.5px;
  font-weight: 700;
}

.my-object-meta {
  font-size: 13px;
  color: var(--muted, #64748b);
}

.my-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.my-appointment {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  flex-wrap: wrap;
}

.my-appointment-when {
  min-width: 130px;
}

.my-appointment-date {
  font-weight: 700;
  font-size: 14px;
}

.my-appointment-time {
  font-size: 13px;
  color: var(--muted, #64748b);
}

.my-appointment-info {
  flex: 1;
  min-width: 140px;
}

.my-appointment-service {
  font-size: 14px;
  font-weight: 600;
}

.my-appointment-meta {
  font-size: 12.5px;
  color: var(--muted, #64748b);
}

.my-cancelled-row {  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.my-none {
  padding: 8px 12px;
}

@media (max-width: 560px) {
  .my-appointment-when {
    min-width: 100px;
  }
}

/* ---------- Настройки (кабинет и панель) ---------- */

.settings-group {
  padding: 14px 0;
  border-top: 1px solid var(--border, #e2e8f0);
}

.settings-group:first-of-type {
  border-top: none;
}

.settings-group h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
}

.settings-switches {
  display: grid;
  gap: 8px;
  margin: 8px 0;
}

.form-row--2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 640px) {
  .form-row--2 {
    grid-template-columns: 1fr;
  }
}

