/* ============================================================
   Студия — визуальная система v2
   Палитра: слива / роза / золото. Крупная серифная типографика.
   ============================================================ */

:root {
  --bg: #fbf6f7;
  --bg-2: #f6eef1;
  --card: #ffffff;
  --ink: #2a1020;
  --ink-2: #4a2a3c;
  --muted: #8b7382;
  --line: #f0e2e8;
  --line-2: #e7d3dc;

  --accent: #d6336c;
  --accent-2: #a01e57;
  --accent-soft: #fdeaf1;
  --plum: #2a1020;
  --plum-2: #4b1a35;
  --gold: #c9a227;
  --gold-soft: #f7ecd0;

  --ok: #1f8a5b;
  --warn: #b26a00;
  --danger: #c0392b;

  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 22px 48px -28px rgba(70, 20, 45, 0.45);
  --shadow-sm: 0 10px 24px -16px rgba(70, 20, 45, 0.5);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", "Times New Roman", Georgia, serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* мягкий «дышащий» фон */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 40% at 12% 0%, rgba(214, 51, 108, 0.14), transparent 70%),
    radial-gradient(50% 40% at 92% 8%, rgba(201, 162, 39, 0.12), transparent 70%),
    radial-gradient(70% 50% at 50% 100%, rgba(75, 26, 53, 0.10), transparent 70%),
    linear-gradient(180deg, #fdf8f9 0%, var(--bg) 40%, var(--bg-2) 100%);
}

body { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
a { color: inherit; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px 130px; }

/* ---------------- top bar ---------------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(253, 248, 249, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(231, 211, 220, 0.7);
}
.topbar-inner {
  max-width: 720px; margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; gap: 12px;
}
.logo {
  width: 42px; height: 42px; border-radius: 15px;
  background: linear-gradient(145deg, #e8508a 0%, var(--accent) 45%, var(--plum-2) 100%);
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display);
  font-weight: 700; font-size: 20px;
  flex: none;
  box-shadow: 0 10px 22px -12px rgba(160, 30, 87, 0.9), inset 0 1px 0 rgba(255,255,255,.35);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600; font-size: 19px; line-height: 1.1; letter-spacing: .1px;
}
.brand-sub {
  font-size: 11.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px;
}
.topbar .spacer { flex: 1; }
.icon-btn {
  border: 1px solid var(--line-2); background: rgba(255,255,255,0.85);
  border-radius: 14px; padding: 9px 14px; font-size: 14px; font-family: inherit;
  cursor: pointer; color: var(--ink); font-weight: 600;
  transition: transform .14s var(--ease), background .14s;
}
.icon-btn:active { transform: scale(.96); background: #fff; }

/* ---------------- типографика ---------------- */

h1 {
  font-family: var(--font-display);
  font-size: 30px; line-height: 1.15; margin: 24px 0 8px;
  letter-spacing: -0.5px; font-weight: 600;
}
h2 {
  font-family: var(--font-display);
  font-size: 21px; margin: 24px 0 12px; font-weight: 600; letter-spacing: -0.2px;
}
.sub { color: var(--muted); font-size: 14.5px; margin: 0 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------------- карточки ---------------- */

.card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.8);
  margin-bottom: 14px;
}

/* ---------------- hero ---------------- */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 120% at 85% -20%, rgba(214, 51, 108, 0.55), transparent 60%),
    radial-gradient(90% 90% at 0% 110%, rgba(201, 162, 39, 0.30), transparent 60%),
    linear-gradient(148deg, #341226 0%, #4b1a35 55%, #24101c 100%);
  color: #fff; border-radius: 30px; padding: 26px 22px 22px; margin-top: 20px;
  box-shadow: 0 30px 60px -34px rgba(52, 18, 38, 0.85);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .35; pointer-events: none;
  mask-image: linear-gradient(160deg, #000 0%, transparent 65%);
  -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 65%);
}
.hero .kicker {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,.66); margin-bottom: 12px;
}
.hero h1 {
  margin: 0 0 10px; font-size: 34px; color: #fff; line-height: 1.08;
  font-weight: 600; letter-spacing: -0.6px;
}
.hero h1 em { font-style: italic; color: #ffd9e6; }
.hero p { margin: 0 0 18px; color: rgba(255,255,255,0.74); font-size: 14px; max-width: 30ch; }
.hero-row { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.pill {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22);
  padding: 8px 14px; border-radius: 999px; font-size: 12.5px; color: #fff;
  cursor: pointer; font-family: inherit; font-weight: 500;
  backdrop-filter: blur(6px);
  transition: background .16s var(--ease), transform .16s var(--ease);
}
.pill:active { transform: scale(.96); }
.pill:hover { background: rgba(255,255,255,0.22); }
.hero-facts { display: flex; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14); position: relative; z-index: 1; }
.hero-facts .f { flex: 1; }
.hero-facts .f b { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.hero-facts .f span { font-size: 11.5px; color: rgba(255,255,255,.6); letter-spacing: .04em; }

/* ---------------- кнопки ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: none; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #e8508a 0%, var(--accent) 60%, var(--accent-2) 100%);
  color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .01em;
  padding: 16px 20px; border-radius: 18px; min-height: 54px;
  box-shadow: 0 18px 30px -18px rgba(214, 51, 108, 0.9);
  transition: transform .14s var(--ease), box-shadow .2s, filter .16s;
}
.btn:active { transform: scale(0.98); box-shadow: 0 10px 20px -14px rgba(214, 51, 108, 0.9); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.secondary {
  background: #fff; color: var(--ink);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
}
.btn.ghost { background: var(--accent-soft); color: var(--accent-2); box-shadow: none; }
.btn.dark { background: linear-gradient(135deg, #3a1528, var(--plum)); }
.btn.small { width: auto; min-height: 40px; padding: 9px 15px; font-size: 13.5px; border-radius: 13px; }

/* ---------------- шаги ---------------- */

.stepper { margin: 18px 0 6px; }
.stepper-line { display: flex; gap: 6px; }
.step-dot {
  flex: 1; height: 3px; border-radius: 99px; background: rgba(160, 30, 87, 0.13);
  transition: background .3s var(--ease);
}
.step-dot.on { background: linear-gradient(90deg, #e8508a, var(--accent)); }
.stepper-meta {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.stepper-meta b { color: var(--accent-2); font-weight: 700; }

/* ---------------- чипы категорий ---------------- */

.chips {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 2px 2px; margin-bottom: 18px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line-2); background: rgba(255,255,255,0.75);
  color: var(--ink-2); padding: 10px 16px; border-radius: 999px; font-size: 13.5px;
  font-family: inherit; font-weight: 600; cursor: pointer;
  transition: all .18s var(--ease);
}
.chip.active {
  background: linear-gradient(135deg, #3a1528, var(--plum-2));
  color: #fff; border-color: transparent;
  box-shadow: 0 12px 22px -14px rgba(42, 16, 32, 0.9);
}

/* ---------------- услуги ---------------- */

.svc-list { display: flex; flex-direction: column; gap: 10px; }
.service {
  display: flex; align-items: center; gap: 14px; padding: 15px;
  background: #fff; border: 1px solid rgba(231, 211, 220, 0.7);
  border-radius: 20px; cursor: pointer; width: 100%; text-align: left;
  font-family: inherit; color: inherit;
  box-shadow: 0 12px 26px -22px rgba(70, 20, 45, 0.8);
  transition: transform .16s var(--ease), box-shadow .2s, border-color .2s;
  animation: rise .45s var(--ease) both;
}
.service:active { transform: scale(.985); border-color: var(--accent); }
.service .ico-wrap {
  width: 46px; height: 46px; border-radius: 15px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #fff0f5, #fbe0ea);
  color: var(--accent-2);
  border: 1px solid rgba(214, 51, 108, 0.14);
}
.service .ico-wrap svg { width: 22px; height: 22px; }
.service .grow { flex: 1; min-width: 0; }
.service .name { font-weight: 700; font-size: 15.5px; letter-spacing: -0.1px; }
.service .meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.service .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.service .price {
  font-weight: 800; font-size: 16px; white-space: nowrap; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.service .price small { font-weight: 600; font-size: 11px; color: var(--muted); margin-left: 2px; }
.service .chev { color: var(--line-2); flex: none; margin-left: 2px; }

/* ---------------- даты ---------------- */

.dates {
  display: flex; gap: 9px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 18px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.dates::-webkit-scrollbar { display: none; }
.date-btn {
  flex: none; width: 64px; padding: 11px 0 10px; text-align: center; cursor: pointer;
  background: #fff; border: 1px solid rgba(231, 211, 220, 0.8); border-radius: 18px;
  font-family: inherit; color: inherit; transition: all .18s var(--ease); scroll-snap-align: start;
}
.date-btn .wd { font-size: 10.5px; color: var(--muted); text-transform: lowercase; letter-spacing: .04em; }
.date-btn .d { font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1.25; }
.date-btn.active {
  background: linear-gradient(160deg, #3a1528, var(--plum-2)); border-color: transparent; color: #fff;
  box-shadow: 0 16px 26px -16px rgba(42, 16, 32, 0.85); transform: translateY(-2px);
}
.date-btn.active .wd { color: rgba(255,255,255,.65); }

/* ---------------- слоты ---------------- */

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 9px; }
.slot {
  padding: 13px 0; border-radius: 15px; border: 1px solid rgba(231, 211, 220, 0.85);
  background: #fff; font-family: inherit; font-weight: 700; font-size: 15px;
  cursor: pointer; text-align: center; color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: all .16s var(--ease);
}
.slot:active { transform: scale(.96); }
.slot.active {
  background: linear-gradient(135deg, #e8508a, var(--accent-2));
  color: #fff; border-color: transparent;
  box-shadow: 0 14px 24px -16px rgba(214, 51, 108, 0.95);
}
.slots-title { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 4px 0 10px; }

/* ---------------- формы ---------------- */

label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; letter-spacing: .03em; }
input[type="text"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], textarea, select {
  width: 100%; padding: 14px 15px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--line-2); border-radius: 16px; background: #fff; color: var(--ink);
  -webkit-appearance: none; appearance: none;
  transition: border-color .16s, box-shadow .16s;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(214, 51, 108, 0.12);
}
.check { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin: 12px 0; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex: none; }

/* ---------------- предоплата ---------------- */

.pay-box {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #fff6f9, #fdeaf1);
  border: 1px solid rgba(214, 51, 108, 0.22);
  border-radius: 22px; padding: 18px; margin: 14px 0;
}
.pay-box::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px;
  border-radius: 50%; background: radial-gradient(circle, rgba(201,162,39,.22), transparent 70%);
}
.pay-box .sum { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--accent-2); line-height: 1.15; }
.row-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.row-line b { font-weight: 700; text-align: right; }
.card .row-line + .row-line { border-top: 1px dashed rgba(231, 211, 220, 0.9); }
.copy-value { display: flex; align-items: center; gap: 8px; }
.copy-value code { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; background: rgba(255,255,255,.7); padding: 2px 6px; border-radius: 6px; }
.copy-btn {
  border: 1px solid rgba(214, 51, 108, 0.3); background: #fff; color: var(--accent-2);
  border-radius: 9px; padding: 5px 10px; font-size: 11.5px; cursor: pointer; font-family: inherit; font-weight: 600;
}

/* ---------------- записи ---------------- */

.appt {
  border: 1px solid rgba(231, 211, 220, 0.75); border-radius: 20px; padding: 16px;
  background: #fff; margin-bottom: 11px;
  box-shadow: 0 12px 26px -24px rgba(70, 20, 45, 0.9);
}
.appt .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.appt .when { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.2px; }
.appt .what { color: var(--muted); font-size: 13px; margin-top: 4px; }
.badge {
  font-size: 11px; padding: 6px 10px; border-radius: 99px; font-weight: 700;
  white-space: nowrap; letter-spacing: .02em;
}
.badge.confirmed { background: #e7f6ee; color: var(--ok); }
.badge.new { background: #fff2e0; color: var(--warn); }
.badge.came { background: #e9f0ff; color: #2b5bd7; }
.badge.done { background: #f1ecfa; color: #6b4ba8; }
.badge.cancelled, .badge.noshow { background: #f7e9e7; color: var(--danger); }

/* ---------------- успех ---------------- */

.done-card {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(165deg, #3a1528 0%, #4b1a35 60%, #2a1020 100%);
  color: #fff; border-radius: 30px; padding: 34px 22px 26px;
  box-shadow: 0 34px 60px -36px rgba(42, 16, 32, 0.95);
  margin-top: 22px;
}
.done-card::after {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 70%;
  background: radial-gradient(closest-side, rgba(255,255,255,.22), transparent);
  pointer-events: none;
}
.done-ring {
  width: 84px; height: 84px; margin: 0 auto 16px; position: relative;
  display: grid; place-items: center;
}
.done-ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.done-ring circle { fill: none; stroke-width: 3; stroke-linecap: round; }
.done-ring .bg { stroke: rgba(255,255,255,.18); }
.done-ring .fg { stroke: #ffd9e6; stroke-dasharray: 240; stroke-dashoffset: 240; animation: ring 1s var(--ease) .15s forwards; }
.done-check { position: absolute; inset: 0; width: 84px; height: 84px; transform: none; }
.done-check path {
  fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 56; stroke-dashoffset: 56;
  animation: tick .45s var(--ease) .65s forwards;
}
.done-card h1 { color: #fff; margin: 0 0 8px; font-size: 30px; }
.done-card p { color: rgba(255,255,255,.72); font-size: 14px; margin: 0 0 20px; }
.done-card .card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); box-shadow: none; text-align: left; backdrop-filter: blur(6px); }
.done-card .card .row-line { color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.12) !important; }
.done-card .card .muted { color: rgba(255,255,255,.6); }
.done-card .btn.secondary { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.2); }
.done-card .btn.ghost { background: transparent; color: #ffd9e6; border: 1px solid rgba(255,217,230,.35); }

@keyframes ring { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes tick { to { stroke-dashoffset: 0; } }

/* ---------------- таббар ---------------- */

.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  max-width: 520px; margin: 0 auto;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(231, 211, 220, 0.9);
  border-radius: 26px;
  padding: 8px;
  display: flex; gap: 4px;
  box-shadow: 0 22px 44px -22px rgba(52, 18, 38, 0.45);
}
.tabbar button {
  flex: 1; background: none; border: none; font-family: inherit;
  font-size: 10.5px; letter-spacing: .02em; color: var(--muted);
  padding: 8px 4px 7px; cursor: pointer; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 48px;
  transition: color .18s, background .18s;
}
.tabbar button svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.tabbar button.active {
  color: #fff; background: linear-gradient(135deg, #3a1528, var(--plum-2));
  box-shadow: 0 12px 22px -14px rgba(42, 16, 32, 0.8);
}
.tabbar .ico { font-size: 18px; line-height: 1; }

/* ---------------- тост ---------------- */

.toast {
  position: fixed; left: 50%; transform: translate(-50%, 12px);
  bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60;
  background: rgba(42, 16, 32, 0.94); color: #fff; padding: 13px 20px; border-radius: 16px;
  font-size: 13.5px; max-width: 88vw; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6);
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease), transform .22s var(--ease);
  backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spinner {
  width: 22px; height: 22px; border: 2px solid rgba(214,51,108,.2);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 22px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.empty { text-align: center; color: var(--muted); padding: 38px 14px; font-size: 14px; }

/* ---------------- установка приложения ---------------- */

.install {
  position: fixed; left: 12px; right: 12px; bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 55; max-width: 520px; margin: 0 auto;
  background: linear-gradient(165deg, #331225 0%, #4b1a35 70%, #2a1020 100%);
  border-radius: 26px; padding: 18px 18px 16px; color: #fff;
  box-shadow: 0 30px 60px -26px rgba(42, 16, 32, 0.9);
  border: 1px solid rgba(255,255,255,.12);
  transform: translateY(140%); opacity: 0; pointer-events: none;
  transition: transform .4s var(--ease), opacity .3s;
}
.install.show { transform: none; opacity: 1; pointer-events: auto; }
.install-top { display: flex; gap: 14px; align-items: center; }
.install-icon {
  width: 54px; height: 54px; border-radius: 16px; flex: none;
  background: linear-gradient(145deg, #e8508a, var(--accent-2));
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 12px 24px -14px rgba(0,0,0,.8);
}
.install-icon svg { width: 26px; height: 26px; }
.install h3 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.install p { margin: 3px 0 0; font-size: 12.5px; color: rgba(255,255,255,.66); line-height: 1.4; }
.install-actions { display: flex; gap: 8px; margin-top: 14px; }
.install-actions .btn { min-height: 46px; font-size: 14.5px; border-radius: 15px; box-shadow: none; }
.install-actions .btn.secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.18); }
.install-close {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: rgba(255,255,255,.8);
  font-size: 16px; cursor: pointer; line-height: 1;
}
.install-steps { margin: 12px 0 0; padding-left: 18px; font-size: 12.5px; color: rgba(255,255,255,.72); }
.install-steps li { margin: 5px 0; }

/* ---------------- модалка ---------------- */

.modal-back {
  position: fixed; inset: 0; background: rgba(30, 12, 24, 0.5); z-index: 100;
  display: none; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-back.open { display: flex; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; width: 100%; max-width: 560px; border-radius: 28px 28px 0 0;
  padding: 22px; max-height: 88vh; overflow-y: auto;
  animation: sheet .3s var(--ease);
}
@keyframes sheet { from { transform: translateY(30px); } to { transform: none; } }
@media (min-width: 700px) {
  .modal-back { align-items: center; padding: 20px; }
  .modal { border-radius: 26px; }
}

/* ============================================================
   Админка
   ============================================================ */

.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 18px 18px 70px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 20px; }
.admin-nav button {
  flex: 1 1 auto; border: 1px solid rgba(231, 211, 220, 0.9); background: rgba(255,255,255,.8);
  color: var(--ink-2); padding: 11px 15px; border-radius: 14px; font-size: 13.5px;
  font-family: inherit; cursor: pointer; font-weight: 600; white-space: nowrap;
  transition: all .16s var(--ease);
}
.admin-nav button.active {
  background: linear-gradient(135deg, #3a1528, var(--plum-2)); color: #fff; border-color: transparent;
  box-shadow: 0 12px 22px -16px rgba(42, 16, 32, 0.8);
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: #fff; border-radius: 20px; padding: 16px; border: 1px solid rgba(231, 211, 220, 0.7);
  box-shadow: 0 14px 30px -26px rgba(70, 20, 45, 0.9);
}
.stat .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.stat .v { font-family: var(--font-display); font-size: 27px; font-weight: 600; margin-top: 6px; letter-spacing: -0.3px; }

table.grid {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: #fff; border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(231, 211, 220, 0.8);
  box-shadow: 0 16px 34px -30px rgba(70, 20, 45, 0.9);
}
table.grid th, table.grid td { padding: 13px 14px; text-align: left; font-size: 13.5px; border-bottom: 1px solid var(--line); }
table.grid th {
  background: #fcf7f9; font-size: 10.5px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
}
table.grid tr:last-child td { border-bottom: none; }
table.grid td input, table.grid td select { padding: 8px 10px; font-size: 14px; border-radius: 10px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }

.day-list .appt { cursor: pointer; }
.appt.status-done { background: #fcfaff; }
.appt.status-cancelled, .appt.status-noshow { opacity: .6; }

.hint { font-size: 12.5px; color: var(--muted); margin: -4px 0 14px; line-height: 1.45; }
.danger { color: var(--danger); border-color: #f0d2ce !important; }
.sep { height: 1px; background: var(--line); margin: 18px 0; }

@media (max-width: 420px) {
  .hero h1 { font-size: 30px; }
  h1 { font-size: 26px; }
  table.grid th, table.grid td { padding: 11px 10px; }
}

/* ---------------- десктоп ---------------- */

@media (min-width: 900px) {
  .wrap { max-width: 880px; padding-bottom: 150px; }
  .topbar-inner { max-width: 880px; }
  .hero { padding: 40px 36px 32px; border-radius: 34px; }
  .hero h1 { font-size: 44px; }
  .hero p { max-width: 44ch; font-size: 15px; }
  .hero-facts { max-width: 520px; }
  .tabbar { max-width: 560px; bottom: 22px; }
  .svc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .service { padding: 17px 18px; }
  .done-card { padding: 44px 36px 34px; }
  .modal { max-width: 600px; }
}

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