/* ---------- токены ---------- */
:root {
  --accent: #d6457a;
  --accent-strong: #b8336a;
  --accent-soft: #fbe7ef;
  --accent-ink: #ffffff;
  --bg: var(--tg-bg, #f6f3f5);
  --surface: var(--tg-secondary, #ffffff);
  --surface-2: #f1ecef;
  --text: var(--tg-text, #1e1b1f);
  --hint: var(--tg-hint, #7d7581);
  --line: rgba(30, 27, 31, 0.08);
  --ok: #129266;
  --ok-soft: #dff5ec;
  --warn: #b86c00;
  --warn-soft: #fff1d6;
  --danger: #d64545;
  --danger-soft: #fde5e5;
  --info: #2f6fe4;
  --info-soft: #e6efff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 10, 20, 0.05), 0 8px 24px rgba(20, 10, 20, 0.06);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --accent-soft: #3a1f2b;
    --bg: var(--tg-bg, #141215);
    --surface: var(--tg-secondary, #1e1b20);
    --surface-2: #28242b;
    --text: var(--tg-text, #f2edf1);
    --hint: #a097a3;
    --line: rgba(255, 255, 255, 0.09);
    --ok-soft: #123a2c;
    --warn-soft: #3d2d10;
    --danger-soft: #3f1d1d;
    --info-soft: #1d2d4d;
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --accent-soft: #3a1f2b;
  --bg: var(--tg-bg, #141215);
  --surface: var(--tg-secondary, #1e1b20);
  --surface-2: #28242b;
  --text: var(--tg-text, #f2edf1);
  --hint: #a097a3;
  --line: rgba(255, 255, 255, 0.09);
  --ok-soft: #123a2c;
  --warn-soft: #3d2d10;
  --danger-soft: #3f1d1d;
  --info-soft: #1d2d4d;
  --shadow: none;
  color-scheme: dark;
}

/* ---------- база ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
}

body.sheet-open {
  overflow: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 17px;
}

h3 {
  font-size: 15px;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

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

.view {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
}

body.has-tabbar .view {
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

body.has-cta .view {
  padding-bottom: 110px;
}

body.has-cta.has-tabbar .view {
  padding-bottom: 170px;
}

.page {
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.small {
  font-size: 13px;
}

.center {
  text-align: center;
}

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

.group-title {
  margin: 10px 0 -4px;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.link {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 4px;
  text-decoration: none;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
}

/* ---------- иконки (inline SVG: цвет берётся из currentColor) ---------- */
.ico {
  display: inline-block;
  flex: none;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
}

/* ---------- кнопки ---------- */
.btn {
  height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.08s, opacity 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 20px rgba(214, 69, 122, 0.28);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

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

.btn-danger-text {
  color: var(--danger);
  background: transparent;
}

.btn-light {
  background: #fff;
  color: #7a1f44;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.icon-btn:active {
  background: var(--surface-2);
}

.icon-btn .ico {
  width: 20px;
  height: 20px;
}

.chip {
  flex: none;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--hint);
  font-size: 12px;
  font-weight: 700;
}

.tag-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ---------- поиск, баннеры, сегменты ---------- */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--hint);
}

.search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px 2px;
  scrollbar-width: none;
}

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

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 14px;
}

.banner > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
}

.seg-item {
  flex: 1;
  height: 38px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--hint);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
}

.seg-item.is-on {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.seg-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 2px 16px 4px;
  scrollbar-width: none;
}

.seg-scroll::-webkit-scrollbar {
  display: none;
}

.seg-scroll .seg-item {
  flex: none;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--hint);
  font-size: 13px;
}

.seg-scroll .seg-item.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- шапка страницы ---------- */
.page-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.page-head h1 {
  flex: 1;
  min-width: 0;
}

.page-head-actions {
  display: flex;
  gap: 6px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar .chip {
  height: 32px;
}

/* ---------- главная ---------- */
.hero {
  position: relative;
  min-height: 280px;
  margin: 12px 12px 0;
  border-radius: 26px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: var(--accent-soft);
  color: #fff;
  display: flex;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(40, 10, 25, 0.1) 0%, rgba(40, 10, 25, 0.78) 100%);
}

.hero-body {
  position: relative;
  padding: 22px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.hero h1 {
  color: #fff;
  font-size: 30px;
  margin-top: 6px;
}

.hero-sub {
  opacity: 0.92;
  font-size: 14px;
  margin: 2px 0 10px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions .btn {
  height: 42px;
}

.next-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  border: 1px solid var(--line);
}

.next-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.next-main > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.next-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.next-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cat-tile {
  position: relative;
  height: 120px;
  padding: 0;
  border: none;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface-2);
  text-align: left;
}

.cat-tile > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(20, 8, 15, 0.75));
}

.cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cat-badge img {
  width: 24px;
  height: 24px;
}

.cat-name {
  position: absolute;
  left: 12px;
  right: 10px;
  bottom: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
}

.cat-tile:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  height: 110px;
}

.hscroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 2px 16px 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

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

.hscroll > * {
  scroll-snap-align: start;
  flex: none;
}

.mini-card {
  width: 160px;
  padding: 14px;
  border: none;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font: inherit;
}

.mini-card b {
  font-size: 14px;
  line-height: 1.25;
  min-height: 35px;
}

.mini-card .small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mini-price {
  color: var(--accent);
  font-weight: 800;
  font-size: 17px;
}

.master-chip {
  width: 116px;
  padding: 10px 6px;
  border: none;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font: inherit;
  text-align: center;
}

.master-chip b {
  font-size: 14px;
  margin-top: 4px;
}

.master-chip .small {
  line-height: 1.2;
}

.info-card {
  padding: 4px 0;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row > .ico {
  color: var(--accent);
  width: 20px;
  height: 20px;
}

.info-row > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* ---------- аватары ---------- */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar-md {
  width: 52px;
  height: 52px;
  font-size: 18px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.avatar-xl {
  width: 84px;
  height: 84px;
  font-size: 30px;
}

.avatar-hero {
  width: 112px;
  height: 112px;
  font-size: 40px;
}

.avatar-init {
  background: hsl(var(--hue, 340), 55%, 62%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ---------- каталог услуг ---------- */
.svc {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr 44px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

.svc.is-on {
  box-shadow: inset 0 0 0 2px var(--accent), var(--shadow);
}

.svc-img {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--surface-2);
}

.svc-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.svc-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.svc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--hint);
}

.svc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.svc-meta b {
  color: var(--text);
  font-size: 15px;
}

.svc-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.svc-toggle.is-on,
.svc-toggle[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.svc-toggle .ico {
  width: 20px;
  height: 20px;
}

/* ---------- мастера ---------- */
.master-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.master-card {
  padding: 18px 12px;
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font: inherit;
}

.master-card b {
  font-size: 15px;
  margin-top: 4px;
}

.master-card .small {
  line-height: 1.25;
  min-height: 34px;
}

.master-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding-top: 4px;
}

.master-hero h2 {
  font-size: 22px;
  margin-top: 8px;
}

.bio {
  line-height: 1.5;
  color: var(--text);
}

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

.line-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.master-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  color: var(--text);
  font: inherit;
  text-align: left;
}

.master-row.is-dim,
.svc-admin.is-dim,
.adm-booking.is-dim {
  opacity: 0.55;
}

.master-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ---------- мастер визард ---------- */
.steps {
  display: flex;
  gap: 6px;
}

.step {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
}

.step.done,
.step.current {
  background: var(--accent);
}

.step-label {
  margin-top: -6px;
}

.mini-summary {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.mini-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mini-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-line .ico {
  color: var(--accent);
}

.step-title {
  margin-top: 4px;
}

.sub-title {
  font-size: 15px;
  margin-top: 4px;
}

.pick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pick {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font: inherit;
  text-align: left;
}

.pick.is-on {
  border-color: var(--accent);
}

.pick-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pick-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: none;
}

.pick.is-on .radio {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 2px 16px 4px;
  scrollbar-width: none;
}

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

.day {
  flex: none;
  width: 58px;
  height: 74px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.day-w {
  font-size: 12px;
  color: var(--hint);
  text-transform: capitalize;
}

.day-n {
  font-size: 19px;
  font-weight: 800;
}

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

.day.is-on .day-w {
  color: rgba(255, 255, 255, 0.85);
}

.day.is-off {
  opacity: 0.35;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.time {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
}

.time.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > span {
  font-size: 13px;
  font-weight: 700;
  color: var(--hint);
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.input:focus {
  border-color: var(--accent);
}

textarea.input {
  resize: vertical;
  min-height: 0;
  line-height: 1.4;
}

.input-sm {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 15px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.row3 {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 8px;
  align-items: end;
}

.error {
  color: var(--danger);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.legal {
  line-height: 1.5;
  text-align: center;
}

.summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sum-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sum-row > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sum-row > .ico {
  color: var(--accent);
  width: 20px;
  height: 20px;
}

.sum-list {
  display: flex;
  flex-direction: column;
}

.sum-line,
.sum-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.sum-total {
  font-size: 16px;
  font-weight: 800;
  padding-top: 12px;
}

.page-success {
  align-items: center;
  text-align: center;
  padding-top: 40px;
}

.success-mark {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.success-mark .ico {
  width: 40px;
  height: 40px;
}

.code {
  color: var(--accent);
  letter-spacing: 0.12em;
  font-size: 16px;
}

/* ---------- записи клиента ---------- */
.booking {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.booking-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.booking-date {
  font-size: 16px;
}

.booking-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.booking-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}

.st-new {
  background: var(--warn-soft);
  color: var(--warn);
}

.st-confirmed {
  background: var(--info-soft);
  color: var(--info);
}

.st-done {
  background: var(--ok-soft);
  color: var(--ok);
}

.st-cancelled {
  background: var(--surface-2);
  color: var(--hint);
}

.st-noshow {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ---------- профиль ---------- */
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.profile-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  color: var(--text);
  font: inherit;
  text-align: left;
}

.action-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.action-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ---------- пустые состояния и загрузка ---------- */
.empty {
  padding: 28px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.empty-icon .ico {
  width: 28px;
  height: 28px;
}

.empty h3 {
  margin-top: 4px;
}

.empty p {
  max-width: 300px;
}

.empty .btn {
  margin-top: 8px;
}

.skeleton {
  border-radius: 16px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shine 1.2s infinite;
}

@keyframes shine {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ---------- уведомления ---------- */
.toasts {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  animation: toast-in 0.25s ease-out;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.out {
  opacity: 0;
  transform: translateY(-6px);
}

.toast-success {
  background: var(--ok);
  color: #fff;
}

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

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---------- нижняя панель и главная кнопка ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-width: 560px;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.tab {
  border: none;
  background: transparent;
  color: var(--hint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.tab .ico {
  width: 22px;
  height: 22px;
}

.tab.is-active {
  color: var(--accent);
}

.cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-width: 560px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 40%);
  z-index: 40;
}

body.has-tabbar .cta {
  bottom: calc(72px + env(safe-area-inset-bottom));
}

/* ---------- шторка ---------- */
#sheet-root {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 6, 10, 0.45);
  animation: fade 0.2s ease-out;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-width: 560px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  animation: slide-up 0.25s ease-out;
}

.sheet-grab {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  margin: 8px auto 0;
  flex: none;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px 4px 18px;
  flex: none;
}

.sheet-head h3 {
  font-size: 17px;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 18px 18px;
  -webkit-overflow-scrolling: touch;
}

.sheet-foot {
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  flex: none;
}

.sheet-foot .btn {
  flex: 1;
}

.sheet-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sheet-section .sum-row > div {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  line-height: 1.4;
}

.sheet p {
  line-height: 1.5;
}

.invite-code {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--accent);
  margin: 18px 0;
}

@keyframes slide-up {
  from {
    transform: translateY(40px);
    opacity: 0.4;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ---------- переключатели, чекбоксы, формы админа ---------- */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch > span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.2s;
}

.switch > span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.switch input:checked + span {
  background: var(--accent);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 700;
}

.check-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.check-group > b {
  font-size: 13px;
  color: var(--hint);
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14px;
}

.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.check small {
  color: var(--hint);
  white-space: nowrap;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}

.check-inline input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.filters .input {
  min-height: 42px;
  padding: 6px 10px;
  font-size: 15px;
}

.filters .field > span {
  font-size: 12px;
}

/* ---------- панель мастера ---------- */
.day-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.day-pick {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.day-pick input {
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.day-label {
  font-size: 18px;
  font-weight: 800;
  text-transform: capitalize;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat b {
  font-size: 18px;
}

.stat-alert {
  box-shadow: inset 0 0 0 1.5px var(--warn), var(--shadow);
}

.adm-booking {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  align-items: start;
}

.adm-time {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adm-time b {
  font-size: 16px;
}

.adm-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 14px;
}

.adm-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.adm-note {
  font-style: italic;
  color: var(--hint);
}

.adm-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.adm-actions .btn-sm {
  white-space: nowrap;
}

.svc-admin {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.svc-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.svc-admin-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 14px;
}

.svc-admin-body .ico {
  margin-right: 4px;
  color: var(--hint);
}

.cat-row {
  display: grid;
  grid-template-columns: 34px 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.cat-row img {
  width: 32px;
  height: 32px;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.icon-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.icon-pick input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.icon-pick img {
  width: 34px;
  height: 34px;
}

.icon-pick:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.img-pick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.img-pick input[type='file'] {
  font: inherit;
  font-size: 13px;
  max-width: 100%;
}

.img-preview {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--surface-2);
}

.img-preview.wide {
  width: 100%;
  height: 140px;
}

.photo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.sched-row {
  display: grid;
  grid-template-columns: 84px 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.client {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px;
}

.client-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-actions {
  display: flex;
  gap: 2px;
}

.team {
  margin-top: 4px;
}

.team .btn {
  margin-top: 8px;
}

.team .line-item:last-of-type {
  border-bottom: none;
}

.stats + .group-title,
.toolbar + .stats {
  margin-top: 4px;
}
