@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap;
  src: url(fonts/manrope-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap;
  src: url(fonts/manrope-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant"; font-weight: 500; font-display: swap;
  src: url(fonts/cormorant-garamond-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-weight: 500; font-display: swap;
  src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant"; font-weight: 600; font-display: swap;
  src: url(fonts/cormorant-garamond-cyrillic-600-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-weight: 600; font-display: swap;
  src: url(fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); }

:root {
  --milk: #fbf8f4;
  --cream: #f5efe8;
  --beige: #ebe1d6;
  --powder: #efd9d4;
  --rose: #c38e88;
  --rose-deep: #a46c66;
  --ink: #2a2629;
  --ink-2: #4a4447;
  --muted: #8a807b;
  --line: #e9e0d7;
  --card: #ffffff;
  --ok: #5f8f71;
  --ok-bg: #e6f0e8;
  --warn: #b5893c;
  --warn-bg: #f7eedc;
  --danger: #b4554d;
  --danger-bg: #f7e4e1;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(42, 38, 41, .04), 0 6px 24px rgba(42, 38, 41, .06);
  --serif: "Cormorant", "Georgia", serif;
  --sans: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--milk); color: var(--ink);
  font: 15px/1.45 var(--sans); font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--rose-deep); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.ic { flex: none; vertical-align: middle; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; }

/* ---------- кнопки ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; font: 600 15px/1 var(--sans);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 14px; color: var(--ink);
  background: var(--cream); transition: transform .12s ease, background .2s, opacity .2s;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-rose { background: var(--rose); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-line { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-ok { background: var(--ok-bg); color: var(--ok); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn-block { width: 100%; }
.icon-btn {
  appearance: none; border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
  width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:active { background: var(--cream); }

/* ---------- карточки и списки ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.card-title { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  margin: 22px 4px 10px; display: flex; justify-content: space-between; align-items: center; }
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; position: relative;
  transition: background .15s; }
.item + .item::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--line); }
.item:active { background: var(--cream); }
.item .title { font-weight: 600; }
.item .sub { color: var(--muted); font-size: 13px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--powder); color: var(--rose-deep); font-weight: 700; font-size: 15px; }
.avatar.model { background: var(--beige); color: var(--ink-2); }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; background: var(--cream); color: var(--ink-2); white-space: nowrap; }
.badge.pending { background: var(--warn-bg); color: var(--warn); }
.badge.confirmed { background: #e8e4f3; color: #6c5ea8; }
.badge.done { background: var(--ok-bg); color: var(--ok); }
.badge.cancelled, .badge.no_show { background: var(--danger-bg); color: var(--danger); }
.badge.model { background: var(--beige); }
.badge.rose { background: var(--powder); color: var(--rose-deep); }

.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .ic { color: var(--rose); margin: 0 auto 10px; display: block; }

/* ---------- формы ---------- */
.field { display: block; }
.field + .field { margin-top: 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 2px 6px; font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; border: 1px solid var(--line); background: #fff; border-radius: 13px;
  padding: 0 14px; font: 16px var(--sans); color: var(--ink); outline: none; transition: border .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
textarea.input { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
  linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 34px; }
.input:focus { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(195, 142, 136, .15); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 .field + .field { margin-top: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--rose-deep); margin: 1px 0 0; flex: none; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--beige); transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: .2s; }
.switch input:checked + i { background: var(--rose); }
.switch input:checked + i::after { transform: translateX(18px); }

.seg { display: flex; background: var(--cream); border-radius: 13px; padding: 3px; gap: 2px; }
.seg button { flex: 1; appearance: none; border: 0; background: transparent; height: 36px; border-radius: 10px;
  font: 600 14px var(--sans); color: var(--muted); cursor: pointer; transition: .2s; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { appearance: none; border: 1px solid var(--line); background: #fff; height: 34px; padding: 0 14px;
  border-radius: 99px; font: 500 14px var(--sans); color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- всплывающие окна ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(42, 38, 41, .32); animation: fade .2s ease; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--milk);
  border-radius: 24px 24px 0 0; padding: 8px 18px calc(20px + var(--safe-bottom)); animation: up .28s cubic-bezier(.2,.8,.2,1);
  overscroll-behavior: contain; }
.sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--beige); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { font-size: 20px; }
.sheet-actions { position: sticky; bottom: calc(-20px - var(--safe-bottom)); background: var(--milk);
  padding: 12px 0 calc(20px + var(--safe-bottom)); margin: 16px 0 calc(-20px - var(--safe-bottom)); display: flex; gap: 10px; }
@media (min-width: 640px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 24px; } }

.toast { position: fixed; left: 50%; bottom: calc(88px + var(--safe-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; z-index: 80;
  max-width: calc(100% - 32px); box-shadow: 0 8px 30px rgba(0,0,0,.2); animation: up .25s ease; }
.toast.error { background: var(--danger); }

.spinner { width: 26px; height: 26px; border: 3px solid var(--beige); border-top-color: var(--rose); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 40px auto; }
.skeleton { background: linear-gradient(90deg, var(--cream), #fff, var(--cream)); background-size: 200% 100%;
  animation: shimmer 1.2s infinite; border-radius: 12px; }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
.fade-in { animation: up .3s cubic-bezier(.2,.8,.2,1); }
