/* Окошко: сайт, страница записи, кабинет салона и суперадмин. Один файл: токены, база, компоненты. */

/* ---------- 1. Токены ---------- */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-15: 15px; --fs-17: 17px;
  --fs-21: 21px; --fs-28: 28px; --fs-40: 40px; --fs-56: 56px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --fill: #f2f2f4;
  --fill-hover: #e8e8ed;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #737378;
  --sep: rgba(0, 0, 0, .08);
  --sep-strong: rgba(0, 0, 0, .14);
  --nav-bg: rgba(251, 251, 253, .72);

  /* один тёплый медный акцент */
  --accent: #a8582f;
  --accent-hover: #96491f;
  --accent-press: #873f19;
  --accent-text: #9a4d25;
  --accent-soft: rgba(168, 88, 47, .09);
  --accent-soft-2: rgba(168, 88, 47, .16);
  --accent-ring: rgba(168, 88, 47, .24);
  --on-accent: #ffffff;

  --green: #248a3d;
  --green-soft: rgba(52, 199, 89, .14);
  --orange: #b25000;
  --orange-soft: rgba(255, 159, 10, .16);
  --red: #d70015;
  --red-soft: rgba(255, 59, 48, .09);
  --red-ring: rgba(255, 59, 48, .2);

  --r-card: 22px;
  --r-big: 28px;
  --r-tile: 14px;
  --r-field: 12px;
  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .04);
  --sh-2: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .07);

  --ease: cubic-bezier(.25, .1, .25, 1);
  --t-fast: 150ms;
  --t: 220ms;

  --container: 1120px;
  --gutter: 24px;
  --nav-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #161618;
    --fill: #2c2c2e;
    --fill-hover: #3a3a3c;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --sep: rgba(255, 255, 255, .1);
    --sep-strong: rgba(255, 255, 255, .18);
    --nav-bg: rgba(22, 22, 23, .72);

    --accent: #e3925f;
    --accent-hover: #eaa274;
    --accent-press: #d98550;
    --accent-text: #eda57a;
    --accent-soft: rgba(227, 146, 95, .14);
    --accent-soft-2: rgba(227, 146, 95, .22);
    --accent-ring: rgba(227, 146, 95, .34);
    --on-accent: #1d1d1f; /* тёмный текст на светлой меди: контраст выше 4.5:1 */

    --green: #30d158;
    --green-soft: rgba(48, 209, 88, .18);
    --orange: #ffb340;
    --orange-soft: rgba(255, 159, 10, .2);
    --red: #ff6961;
    --red-soft: rgba(255, 69, 58, .16);
    --red-ring: rgba(255, 69, 58, .32);

    --sh-1: none;
    --sh-2: none;
  }
}

/* ---------- 2. База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: var(--fs-17); line-height: 1.47; letter-spacing: -0.022em;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-ring); }
img, svg { max-width: 100%; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; background: var(--fill); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.icon { width: 20px; height: 20px; flex: none; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-13); letter-spacing: -0.01em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: calc(640px + var(--gutter) * 2); }
.main { flex: 1; padding-bottom: var(--s-16); }
.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 100; padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh-2); }
.skip:focus { top: var(--s-2); }

/* ---------- 3. Шапка ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; background: var(--nav-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--sep);
}
.nav__row { height: var(--nav-h); display: flex; align-items: center; gap: var(--s-4); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__name { font-size: var(--fs-17); font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__sub { font-size: var(--fs-11); color: var(--text-2); letter-spacing: 0; white-space: nowrap; }
.nav__links { display: flex; gap: var(--s-1); margin-left: auto; align-items: center; }
.nav__links a { padding: 6px 12px; border-radius: var(--r-pill); font-size: var(--fs-13); color: var(--text-2); letter-spacing: -0.01em; }
.nav__links a:hover { color: var(--text); text-decoration: none; }
.nav__links a[aria-current="page"] { color: var(--text); background: var(--fill); font-weight: 500; }
.nav__cta { margin-left: var(--s-2); }

/* ---------- 4. Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5); font: inherit; font-size: var(--fs-15); font-weight: 500; letter-spacing: -0.01em;
  border: 0; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn .icon { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:active { background: var(--accent-press); }
.btn--secondary { background: var(--fill); color: var(--text); }
.btn--secondary:hover { background: var(--fill-hover); }
.btn--ghost { background: transparent; color: var(--accent-text); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--danger { background: var(--red-soft); color: var(--red); }
.btn--danger:hover { background: var(--red-ring); }
.btn--sm { min-height: 34px; padding: 0 var(--s-4); font-size: var(--fs-13); }
.btn--lg { min-height: 52px; padding: 0 var(--s-8); font-size: var(--fs-17); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.inline { display: inline; }

/* ---------- 5. Карточки, секции ---------- */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-1); padding: var(--s-6); min-width: 0; }
.card--flat { box-shadow: none; border: 1px solid var(--sep); }
.card + .card { margin-top: var(--s-4); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap; }
.card__title { font-size: var(--fs-21); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.card__sub { font-size: var(--fs-13); color: var(--text-2); }
.section { padding-top: var(--s-16); }
.section__eyebrow { font-size: var(--fs-15); font-weight: 600; color: var(--accent-text); margin-bottom: var(--s-2); }
.section__title { font-size: var(--fs-40); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; max-width: 760px; }
.section__lead { margin-top: var(--s-3); font-size: var(--fs-21); line-height: 1.38; color: var(--text-2); max-width: 680px; letter-spacing: -0.02em; }
.grid { display: grid; gap: var(--s-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding: var(--s-8) 0 var(--s-6); }
.page-title { font-size: var(--fs-40); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.page-sub { margin-top: var(--s-2); color: var(--text-2); font-size: var(--fs-17); }

/* ---------- 6. Лендинг ---------- */
.hero { padding: var(--s-16) 0 var(--s-8); text-align: center; }
.hero__badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-text); font-size: var(--fs-13); font-weight: 500; }
.hero__title { margin: var(--s-5) auto 0; font-size: var(--fs-56); line-height: 1.06; font-weight: 700; letter-spacing: -0.035em; max-width: 920px; }
.hero__lead { margin: var(--s-5) auto 0; font-size: var(--fs-21); line-height: 1.4; color: var(--text-2); max-width: 680px; }
.hero__actions { display: flex; justify-content: center; gap: var(--s-3); margin-top: var(--s-8); flex-wrap: wrap; }
.hero__note { margin-top: var(--s-4); font-size: var(--fs-13); color: var(--text-2); }
.showcase { margin-top: var(--s-12); display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s-4); text-align: left; }
.phone-card { background: var(--surface); border-radius: var(--r-big); box-shadow: var(--sh-2); padding: var(--s-6); }
.chat { display: flex; flex-direction: column; gap: var(--s-2); }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: var(--fs-15); line-height: 1.4; }
.bubble--bot { background: var(--fill); border-bottom-left-radius: 6px; }
.bubble--me { background: var(--accent); color: var(--on-accent); align-self: flex-end; border-bottom-right-radius: 6px; }
.chips-demo { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-demo { padding: 6px 12px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-text); font-size: var(--fs-13); font-weight: 500; }
.feature { display: flex; flex-direction: column; gap: var(--s-2); }
.feature__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: var(--s-2); }
.feature__icon .icon { width: 22px; height: 22px; }
.feature__title { font-size: var(--fs-17); font-weight: 600; }
.feature__text { font-size: var(--fs-15); color: var(--text-2); line-height: 1.5; }
.steps { counter-reset: step; }
.step-card { position: relative; padding-top: var(--s-12); }
.step-card::before { counter-increment: step; content: counter(step); position: absolute; top: var(--s-6); left: var(--s-6); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: var(--fs-15); }
.step-card { padding: var(--s-16) var(--s-6) var(--s-6); }
.example { border: 1px dashed var(--accent); background: var(--accent-soft); }
.example__label { display: inline-block; font-size: var(--fs-12); font-weight: 600; color: var(--accent-text); text-transform: uppercase; letter-spacing: .04em; }
.big-num { font-size: var(--fs-40); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.plan { display: flex; flex-direction: column; gap: var(--s-3); position: relative; }
.plan--hl { box-shadow: 0 0 0 2px var(--accent), var(--sh-2); }
.plan__tag { position: absolute; top: -12px; left: var(--s-6); padding: 3px 12px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: var(--fs-12); font-weight: 600; }
.plan__name { font-size: var(--fs-21); font-weight: 600; }
.plan__price { font-size: var(--fs-40); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.plan__price small { font-size: var(--fs-15); font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.plan__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--fs-15); }
.plan__list li { display: flex; gap: var(--s-2); align-items: flex-start; }
.plan__list .icon { width: 18px; height: 18px; color: var(--accent-text); margin-top: 2px; }
.plan__cta { margin-top: auto; padding-top: var(--s-3); }
.faq-list details { border-top: 1px solid var(--sep); padding: var(--s-4) 0; }
.faq-list details:last-child { border-bottom: 1px solid var(--sep); }
.faq-list summary { cursor: pointer; font-weight: 600; font-size: var(--fs-17); list-style: none; display: flex; justify-content: space-between; gap: var(--s-3); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent-text); font-weight: 400; font-size: var(--fs-21); line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin-top: var(--s-2); color: var(--text-2); }

/* ---------- 7. Поля и формы ---------- */
.form { display: flex; flex-direction: column; gap: var(--s-4); }
.form-row { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: var(--fs-13); font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.label__opt { font-weight: 400; color: var(--text-3); }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; font-size: var(--fs-15); color: var(--text);
  background: var(--fill); border: 1px solid transparent; border-radius: var(--r-field); outline: none;
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.47; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--sep-strong); }
.input:focus, .select:focus, .textarea:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.input--sm { min-height: 36px; padding: 6px 10px; font-size: var(--fs-13); }
.help { font-size: var(--fs-12); color: var(--text-2); letter-spacing: 0; }
.check { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; font-size: var(--fs-13); color: var(--text-2); line-height: 1.45; }
.check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.check--strong { color: var(--text); font-size: var(--fs-15); }
.checks { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }

/* ---------- 8. Плашки, баннеры, бейджи ---------- */
.banner { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) var(--s-5); border-radius: var(--r-tile); background: var(--fill); font-size: var(--fs-15); }
.banner .icon { margin-top: 1px; }
.banner--accent { background: var(--accent-soft); }
.banner--accent .icon { color: var(--accent-text); }
.banner--warn { background: var(--orange-soft); }
.banner--warn .icon { color: var(--orange); }
.banner--error { background: var(--red-soft); }
.banner--error .icon { color: var(--red); }
.banner--ok { background: var(--green-soft); }
.banner--ok .icon { color: var(--green); }
.banner__body { flex: 1; min-width: 0; }
.banner__title { font-weight: 600; }
.banner__actions { margin-top: var(--s-2); }
.banners { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-4); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 600; letter-spacing: 0; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.badge--accent { background: var(--accent-soft); color: var(--accent-text); }
.badge--ok { background: var(--green-soft); color: var(--green); }
.badge--warn { background: var(--orange-soft); color: var(--orange); }
.badge--bad { background: var(--red-soft); color: var(--red); }
.acting { background: var(--accent); color: var(--on-accent); font-size: var(--fs-13); }
.acting .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 40px; }
.acting .btn { background: rgba(255, 255, 255, .2); color: inherit; }
.demo-strip { background: var(--orange-soft); font-size: var(--fs-13); }
.demo-strip .container { display: flex; gap: var(--s-2); align-items: center; padding-top: 10px; padding-bottom: 10px; }
.flash { margin-bottom: var(--s-4); }

/* ---------- 9. Метрики, полосы ---------- */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__label { font-size: var(--fs-13); color: var(--text-2); }
.stat__value { font-size: var(--fs-28); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.stat__note { font-size: var(--fs-12); color: var(--text-3); letter-spacing: 0; }
.bar { height: 8px; border-radius: var(--r-pill); background: var(--fill); overflow: hidden; }
.bar__fill { height: 100%; border-radius: inherit; background: var(--accent); }
.bar__fill--warn { background: var(--orange); }
.bar__fill--bad { background: var(--red); }
.usage { display: flex; flex-direction: column; gap: 6px; }
.usage__row { display: flex; justify-content: space-between; gap: var(--s-2); font-size: var(--fs-13); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.checklist li { display: flex; gap: var(--s-3); align-items: center; font-size: var(--fs-15); }
.checklist .dot { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--text-3); }
.checklist .done .dot { background: var(--green); color: #fff; }
.checklist .dot .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.checklist .done span.t { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--sep-strong); }
.metric-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--sep); align-items: baseline; }
.metric-row:first-child { border-top: 0; }
.metric-row__value { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kind { font-size: var(--fs-11); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }
.kind--fact { background: var(--green-soft); color: var(--green); }
.kind--est { background: var(--accent-soft); color: var(--accent-text); }
.total { background: linear-gradient(135deg, var(--accent-soft-2), var(--accent-soft)); }

/* ---------- 10. Таблицы (на телефоне превращаются в карточки) ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.table th { text-align: left; font-size: var(--fs-12); font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--sep); }
.table td { padding: var(--s-3); border-bottom: 1px solid var(--sep); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: var(--s-3) 0; border-top: 1px solid var(--sep); display: flex; gap: var(--s-3); align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.list > li:first-child { border-top: 0; }
.list__main { min-width: 0; flex: 1; }
.list__title { font-weight: 600; }
.list__meta { font-size: var(--fs-13); color: var(--text-2); }

/* ---------- 11. Кабинет ---------- */
.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--s-8); padding-top: var(--s-6); }
.side { position: sticky; top: calc(var(--nav-h) + var(--s-6)); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.side a { display: flex; align-items: center; gap: var(--s-3); padding: 8px 12px; border-radius: 10px; color: var(--text); font-size: var(--fs-15); }
.side a:hover { background: var(--fill); text-decoration: none; }
.side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.side a .icon { width: 18px; height: 18px; color: var(--text-2); }
.side a[aria-current="page"] .icon { color: var(--accent-text); }
.side__group { margin-top: var(--s-3); padding: 0 12px 4px; font-size: var(--fs-11); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.app-main { min-width: 0; }
.app-main .page-head { padding-top: 0; }
.day-nav { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.master-col + .master-col { margin-top: var(--s-4); }
.bk { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--sep); align-items: start; }
.bk:first-of-type { border-top: 0; }
.bk__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.bk__time small { display: block; font-weight: 400; color: var(--text-3); font-size: var(--fs-12); }
.bk__actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.bk--cancelled { opacity: .55; }
.week { display: grid; grid-template-columns: 52px repeat(4, minmax(0, 1fr)); gap: var(--s-2); align-items: center; }
.week__day { font-weight: 600; font-size: var(--fs-15); }
.week__head { font-size: var(--fs-12); color: var(--text-2); }
.qr { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 16px; }
.qr svg { width: 100%; height: 100%; }
.copy { display: flex; gap: var(--s-2); }
.copy .input { flex: 1; }
.empty { text-align: center; padding: var(--s-10) var(--s-4); color: var(--text-2); border: 1px dashed var(--sep-strong); border-radius: var(--r-tile); }
.empty .icon { width: 28px; height: 28px; color: var(--text-3); }
.errors { margin: 0; padding-left: 1.2em; color: var(--red); font-size: var(--fs-15); }
.errors li + li { margin-top: 4px; }
.stars { color: var(--accent); letter-spacing: 1px; }

/* ---------- 12. Страница записи клиента ---------- */
.booking-hero { padding: var(--s-10) 0 var(--s-6); }
.booking-hero__title { font-size: var(--fs-40); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.booking-hero__meta { margin-top: var(--s-3); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); color: var(--text-2); font-size: var(--fs-15); }
.booking-hero__meta span { display: inline-flex; gap: 6px; align-items: center; }
.booking { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-6); align-items: start; }
.booking__aside { position: sticky; top: calc(var(--nav-h) + var(--s-6)); display: flex; flex-direction: column; gap: var(--s-4); }
.step-title { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-21); font-weight: 600; letter-spacing: -0.02em; margin-bottom: var(--s-4); }
.step-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: var(--fs-13); font-weight: 700; flex: none; }
.cat-title { font-size: var(--fs-13); font-weight: 600; color: var(--text-2); margin: var(--s-4) 0 var(--s-2); text-transform: uppercase; letter-spacing: .04em; }
.cat-title:first-child { margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.tile { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-3) var(--s-4); border-radius: var(--r-tile); box-shadow: inset 0 0 0 1px var(--sep-strong); cursor: pointer; transition: box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.tile:hover { background: var(--fill); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile__title { font-size: var(--fs-15); font-weight: 600; line-height: 1.3; }
.tile__meta { font-size: var(--fs-13); color: var(--text-2); }
.tile:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 var(--s-4); border-radius: var(--r-pill); background: var(--fill); font-size: var(--fs-15); font-weight: 500; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.chip:hover span { background: var(--fill-hover); }
.chip input:checked + span { background: var(--accent); color: var(--on-accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.days { display: flex; gap: var(--s-2); overflow-x: auto; padding-bottom: var(--s-1); scroll-snap-type: x proximity; scrollbar-width: thin; }
.day { flex: 0 0 64px; position: relative; cursor: pointer; scroll-snap-align: start; }
.day input { position: absolute; opacity: 0; pointer-events: none; }
.day__body { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 72px; border-radius: var(--r-tile); background: var(--fill); transition: background-color var(--t-fast) var(--ease); }
.day:hover .day__body { background: var(--fill-hover); }
.day__wd { font-size: var(--fs-12); color: var(--text-2); }
.day__num { font-size: var(--fs-21); font-weight: 600; line-height: 1.15; }
.day__mon { font-size: var(--fs-11); color: var(--text-3); }
.day input:checked + .day__body { background: var(--accent); color: var(--on-accent); }
.day input:checked + .day__body :is(.day__wd, .day__mon) { color: inherit; opacity: .85; }
.day input:focus-visible + .day__body { outline: 2px solid var(--accent); outline-offset: 2px; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: var(--s-2); }
.times .chip span { width: 100%; }
.slots { transition: opacity var(--t) var(--ease); }
.slots.is-loading { opacity: .45; pointer-events: none; }
.summary { display: flex; flex-direction: column; gap: var(--s-2); }
.summary__row { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--sep); font-size: var(--fs-15); }
.summary__row:first-child { border-top: 0; }
.summary__row dt { color: var(--text-2); }
.summary__row dd { margin: 0; font-weight: 600; text-align: right; }
dl { margin: 0; }
.ask-answer { margin-top: var(--s-3); padding: var(--s-4); border-radius: var(--r-tile); background: var(--fill); font-size: var(--fs-15); white-space: pre-line; }
.result { text-align: center; padding: var(--s-10) var(--s-6); }
.result__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; }
.result__icon--warn { background: var(--orange); }
.result__icon--muted { background: var(--fill); color: var(--text-2); }
.result__icon .icon { width: 32px; height: 32px; stroke-width: 2.2; }
.result__title { margin-top: var(--s-5); font-size: var(--fs-28); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.result__lead { margin: var(--s-3) auto 0; max-width: 460px; color: var(--text-2); }
.result__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-6); }

/* ---------- 13. Документы ---------- */
.prose { padding: var(--s-10); }
.prose h1 { font-size: var(--fs-40); line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; margin-bottom: var(--s-6); }
.prose h2 { font-size: var(--fs-21); font-weight: 600; margin: var(--s-8) 0 var(--s-3); }
.prose p, .prose li { font-size: var(--fs-17); line-height: 1.6; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: var(--s-3); }
.prose ul { padding-left: 1.25em; margin: var(--s-3) 0 0; }

/* ---------- 14. Подвал ---------- */
.foot { border-top: 1px solid var(--sep); margin-top: var(--s-10); }
.foot__row { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding-top: var(--s-6); padding-bottom: var(--s-8); font-size: var(--fs-12); color: var(--text-2); letter-spacing: 0; }
.foot a { color: var(--text-2); }
.foot a:hover { color: var(--text); }
.foot__links { display: flex; gap: var(--s-4); flex-wrap: wrap; }

/* ---------- 15. Адаптив ---------- */
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); padding-top: var(--s-3); }
  .side { position: static; flex-direction: row; overflow-x: auto; gap: var(--s-1); padding-bottom: var(--s-2); margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side a { flex: none; white-space: nowrap; background: var(--surface); }
  .side__group { display: none; }
  .booking { grid-template-columns: minmax(0, 1fr); }
  .booking__aside { position: static; }
  .showcase { grid-template-columns: minmax(0, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav__links a:not(.nav__keep) { display: none; }
  .hero { padding-top: var(--s-10); }
  .hero__title { font-size: var(--fs-40); }
  .hero__lead { font-size: var(--fs-17); }
  .hero__actions .btn { width: 100%; }
  .section { padding-top: var(--s-12); }
  .section__title, .page-title { font-size: var(--fs-28); }
  .section__lead { font-size: var(--fs-17); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: var(--s-5) var(--s-4); }
  .prose { padding: var(--s-6) var(--s-4); }
  .prose h1 { font-size: var(--fs-28); }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .booking-hero__title { font-size: var(--fs-28); }
  .bk { grid-template-columns: 56px minmax(0, 1fr); }
  .bk__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .week { grid-template-columns: 40px repeat(2, minmax(0, 1fr)); }
  .week .week__break { display: none; }
  /* таблица превращается в карточки */
  .table--cards thead { display: none; }
  .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
  .table--cards tr { padding: var(--s-3) 0; border-bottom: 1px solid var(--sep); }
  .table--cards tr:last-child { border-bottom: 0; }
  .table--cards td { border: 0; padding: 2px 0; }
  .table--cards td[data-label]::before { content: attr(data-label) ": "; color: var(--text-2); font-size: var(--fs-13); }
  .table--cards .actions { text-align: left; padding-top: var(--s-2); }
  .result { padding: var(--s-8) var(--s-4); }
  .result__actions .btn { width: 100%; }
  .foot__row { flex-direction: column; }
}

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