/* БРАТЕЦ — дизайн-система.
   Шрифты: Alumni Sans (заголовки, вывеска), Golos Text (текст, цены, формы), JetBrains Mono (номера, время).
   Сигнатура: «талон» — номерная сводка записи с перфорацией. */

:root {
  --bg: #0B0B0B;
  --surface: #191919;
  --surface-2: #212020;
  --line: #2C2A27;
  --line-strong: #3D3A35;
  --text: #F5EBD5;
  --muted: #B8B2A7;
  --faint: #8A857C;
  --gold: #D8BD86;
  --gold-soft: rgba(216, 189, 134, .12);
  --ink: #0B0B0B;

  --ok: #8DB89A;      /* завершено, оплачено */
  --info: #9CB4D8;    /* пришёл, в работе */
  --warn: #E0B26A;    /* ожидает */
  --bad: #D98A7A;     /* отмена, ошибка */
  --idle: #8A857C;    /* неявка, отменено системой */

  --f-display: "Alumni Sans", "Arial Narrow", sans-serif;
  --f-body: "Golos Text", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --r: 14px;
  --r-sm: 9px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1240px;
  --header-h: 72px;
  --tabbar-h: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--tabbar-h);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--f-mono); font-feature-settings: "zero" 0; letter-spacing: -.01em; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- типографика */
.display {
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
  line-height: .86; letter-spacing: .005em; margin: 0;
}
.h1 { font-size: clamp(64px, 12vw, 168px); }
.h2 { font-size: clamp(44px, 7vw, 88px); }
.h3 { font-size: clamp(30px, 4vw, 40px); line-height: .95; }
.eyebrow {
  font: 600 12px/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 46ch; margin: 0; }
h1, h2, h3, h4 { font-weight: 600; margin: 0; }
p { margin: 0 0 1em; }

/* ---------- кнопки */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  font: 600 15px/1 var(--f-body); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: var(--gold); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--text); border-color: var(--text); color: var(--ink); }
.btn-primary:hover { background: #fff8e8; border-color: #fff8e8; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-ghost { border-color: transparent; color: var(--muted); padding: 0 12px; }
.btn-ghost:hover { color: var(--text); border-color: transparent; }
.btn-danger { border-color: rgba(217,138,122,.5); color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { --h: 58px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn .spinner { display: none; }
.btn.is-loading .spinner { display: inline-block; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- иконки */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.i-fill { fill: currentColor; stroke: none; }

/* ---------- шапка */
.demo-ribbon { background: var(--gold); color: var(--ink); font: 600 13px/1.3 var(--f-body); text-align: center; padding: 7px var(--gutter); }
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: rgba(11,11,11,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { width: 46px; height: 46px; border-radius: 50%; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font: 800 27px/.9 var(--f-display); letter-spacing: .06em; }
.brand-name small { font: 500 10.5px/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; padding: 6px 0; border-bottom: 1px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }
.header-actions { display: flex; gap: 10px; align-items: center; }
@media (max-width: 1080px) { .main-nav { display: none; } .header-actions { margin-left: auto; } }

/* ---------- нижняя панель (телефон) */
.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --tabbar-h: calc(64px + env(safe-area-inset-bottom)); --header-h: 64px; }
  .header-actions .hide-m { display: none; }
  .brand img { width: 40px; height: 40px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(17,17,17,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--faint); font-size: 11.5px; }
  .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar a[aria-current="page"] .i { color: var(--gold); }
  .tabbar .tab-cta .i { color: var(--ink); background: var(--text); border-radius: 50%; width: 34px; height: 34px; padding: 7px; }
  /* при открытой клавиатуре панель прячется, чтобы не закрывать поля */
  body.kb-open .tabbar { display: none; }
  body.kb-open { padding-bottom: 0; }
}

/* ---------- секции */
.section { padding: clamp(64px, 10vw, 128px) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(28px, 5vw, 56px); flex-wrap: wrap; }
.section-head .lead { margin-top: 14px; }
.page-top { padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); }
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--faint); margin-bottom: 20px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }

/* ---------- первый экран */
.hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 clamp(48px, 8vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 56px); align-items: stretch; }
.hero-mark { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(24px, 4vw, 40px); }
.hero-mark img { width: clamp(84px, 11vw, 120px); height: auto; border-radius: 50%; }
.hero-mark .brand-name b { font-size: clamp(40px, 6vw, 64px); }
.hero-mark .brand-name small { font-size: 12px; margin-top: 8px; }
.hero h1 { margin-bottom: 22px; }
.hero h1 span { display: block; }
.hero h1 span:nth-child(2) { color: var(--gold); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 28px; }
.hero-address { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 15px; }
.hero-address b { color: var(--text); font-weight: 500; display: block; }
.hero-media {
  position: relative; border-radius: var(--r); overflow: hidden; min-height: 460px;
  background: radial-gradient(120% 90% at 50% 20%, #1d1c1a 0%, var(--bg) 70%); border: 1px solid var(--line);
}
.hero-media img.photo { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-media .emblem { position: absolute; inset: 0; display: grid; place-items: center; }
.hero-media .emblem img { width: 62%; max-width: 340px; opacity: .92; }
.hero-media .caption { position: absolute; left: 16px; bottom: 16px; right: 16px; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { min-height: 280px; order: -1; display: none; }
  .hero-media.has-photo { display: block; }
}

/* полоса ближайшего времени */
.nearest { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.slot-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .2s var(--ease);
}
.slot-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.slot-card .t { font: 500 28px/1 var(--f-mono); }
.slot-card .d { font-size: 13px; color: var(--gold); text-transform: lowercase; }
.slot-card .w { font-size: 13px; color: var(--muted); }
.tz-note { font-size: 13px; color: var(--faint); display: inline-flex; gap: 6px; align-items: center; }

/* ---------- карточки */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 2.4vw, 26px); }
.grid { display: grid; gap: 16px; }
.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)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* услуга */
.service { display: flex; flex-direction: column; gap: 14px; position: relative; }
.service-top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.service h3 { font: 700 30px/.95 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.price { font: 600 20px/1 var(--f-body); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.price-na { font-size: 14px; color: var(--muted); font-weight: 500; }
.service .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.service .meta span { display: inline-flex; gap: 6px; align-items: center; }
.includes { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 14.5px; color: var(--muted); }
.includes li { display: flex; gap: 10px; }
.includes li::before { content: ""; width: 6px; height: 1px; background: var(--gold); margin-top: .8em; flex: none; }
.service .foot { margin-top: auto; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding-top: 6px; }

/* выбор (услуги, мастер, время) — цвет + рамка + отметка */
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .check {
  position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); display: grid; place-items: center; transition: all .2s;
}
.pick .check svg { width: 14px; height: 14px; opacity: 0; stroke: var(--ink); stroke-width: 2.4; fill: none; }
.pick:has(input:checked) > .card, .pick.is-selected > .card { border-color: var(--gold); background: linear-gradient(0deg, var(--gold-soft), var(--gold-soft)), var(--surface); box-shadow: inset 0 0 0 1px var(--gold); }
.pick:has(input:checked) .check, .pick.is-selected .check { background: var(--gold); border-color: var(--gold); }
.pick:has(input:checked) .check svg, .pick.is-selected .check svg { opacity: 1; }
.pick:has(input:focus-visible) > .card { outline: 2px solid var(--gold); outline-offset: 3px; }
.pick:has(input:disabled) { cursor: not-allowed; opacity: .5; }
.selected-label { display: none; font-size: 12px; font-weight: 600; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.pick:has(input:checked) .selected-label { display: inline; }

/* мастер */
.barber { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.barber .ph { aspect-ratio: 4 / 5; background: var(--surface-2); position: relative; overflow: hidden; }
.barber .ph img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.15) contrast(1.05); transition: transform .6s var(--ease); }
.barber:hover .ph img { transform: scale(1.03); }
.barber .ph .initials { position: absolute; inset: 0; display: grid; place-items: center; font: 800 96px/1 var(--f-display); color: var(--line-strong); }
.barber .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.barber h3 { font: 700 32px/.95 var(--f-display); text-transform: uppercase; }
.barber .next { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.barber .next b { color: var(--text); font-family: var(--f-mono); font-weight: 500; }
.barber .foot { margin-top: auto; padding-top: 10px; }

/* работы */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); text-decoration: none; font-size: 14px; background: none; cursor: pointer;
}
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.work { position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4/5; background: var(--surface); }
.work img { width: 100%; height: 100%; object-fit: cover; }
.work .over { position: absolute; inset: auto 0 0 0; padding: 40px 14px 14px; background: linear-gradient(transparent, rgba(0,0,0,.85)); display: flex; justify-content: space-between; align-items: end; gap: 8px; font-size: 13px; }

/* пусто */
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: clamp(28px, 5vw, 48px); text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); font: 700 28px/1 var(--f-display); text-transform: uppercase; margin-bottom: 8px; }
.empty .btn { margin-top: 16px; }

/* семья */
.family { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.family > div { padding: clamp(24px, 4vw, 48px); }
.family .side { background: var(--surface); border-left: 1px solid var(--line); display: grid; gap: 16px; align-content: center; }
.family .row { display: flex; gap: 14px; align-items: baseline; }
.family .row .mono { color: var(--gold); min-width: 64px; }
@media (max-width: 760px) { .family { grid-template-columns: 1fr; } .family .side { border-left: 0; border-top: 1px solid var(--line); } }

/* отзывы */
.review { display: flex; flex-direction: column; gap: 12px; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 15px; }
.review .src { font-size: 13px; color: var(--faint); margin-top: auto; }

/* контакты */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .contacts { grid-template-columns: 1fr; } }
.contact-line { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-line:first-child { padding-top: 0; }
.contact-line .i { color: var(--gold); margin-top: 2px; }
.contact-line b { display: block; font-weight: 500; }
.big-phone { font: 700 clamp(38px, 5vw, 56px)/1 var(--f-display); text-decoration: none; letter-spacing: .02em; }
.socials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.social { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); text-decoration: none; background: var(--surface); }
.social:hover { border-color: var(--gold); }
.social svg { width: 26px; height: 26px; flex: none; }
.social small { display: block; color: var(--faint); font-size: 12px; }
.social.is-off { opacity: .55; pointer-events: none; }
.map { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); min-height: 320px; background: var(--surface); position: relative; }
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; filter: grayscale(1) invert(.92) contrast(.9); }

/* ---------- формы */
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label, .label { font-size: 14px; font-weight: 500; color: var(--text); }
.field .hint { font-size: 13px; color: var(--faint); }
.input, select.input, textarea.input {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: var(--r-sm);
  background: #121212; border: 1px solid var(--line-strong); color: var(--text); font-size: 16px;
  transition: border-color .2s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.input::placeholder { color: #6d6962; }
.field.has-error .input { border-color: var(--bad); }
.field .error { color: var(--bad); font-size: 13.5px; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); cursor: pointer; font-size: 15px; }
.radio-pill input:checked + span { background: var(--gold-soft); border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.radio-pill input:checked + span::before { content: "✓"; color: var(--gold); font-weight: 700; }
.radio-pill input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.radio-pill input:disabled + span { opacity: .45; cursor: not-allowed; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--gold); margin-top: 2px; }

/* ---------- сообщения */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); margin-bottom: 16px; font-size: 15px; }
.alert .i { margin-top: 1px; }
.alert-error { border-color: rgba(217,138,122,.55); background: rgba(217,138,122,.08); }
.alert-error .i { color: var(--bad); }
.alert-success { border-color: rgba(141,184,154,.5); background: rgba(141,184,154,.08); }
.alert-success .i { color: var(--ok); }
.alert-info .i { color: var(--gold); }
.messages { position: fixed; top: calc(var(--header-h) + 12px); right: 16px; left: 16px; z-index: 60; display: grid; justify-items: end; gap: 8px; pointer-events: none; }
.messages .alert { pointer-events: auto; max-width: 440px; box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: toast .35s var(--ease); }
@keyframes toast { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- запись: шаги и талон */
.booking { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(20px, 3vw, 40px); align-items: start; }
@media (max-width: 980px) { .booking { grid-template-columns: 1fr; } }
.steps { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0 0 28px; counter-reset: s; overflow-x: auto; scrollbar-width: none; }
.steps li { flex: 1; min-width: 92px; counter-increment: s; }
.steps a, .steps span { display: block; padding-top: 12px; border-top: 2px solid var(--line-strong); font-size: 13px; color: var(--faint); text-decoration: none; white-space: nowrap; }
.steps .done a { border-color: var(--gold); color: var(--muted); }
.steps .current span { border-color: var(--text); color: var(--text); font-weight: 600; }
.step-title { margin-bottom: 8px; }
.step-sub { color: var(--muted); margin-bottom: 26px; }
.step-actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

.ticket {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: var(--text); color: var(--ink); border-radius: var(--r);
  --hole: 11px;
  -webkit-mask: radial-gradient(circle var(--hole) at 0 var(--cut, 118px), transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--hole) at 100% var(--cut, 118px), transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--hole) at 0 var(--cut, 118px), transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--hole) at 100% var(--cut, 118px), transparent 98%, #000) right / 51% 100% no-repeat;
}
.ticket-head { height: var(--cut, 118px); padding: 20px 22px 0; display: flex; justify-content: space-between; gap: 12px; }
.ticket-head .kind { font: 800 30px/.9 var(--f-display); text-transform: uppercase; }
.ticket-head .kind small { display: block; font: 500 11px/1.4 var(--f-body); letter-spacing: .22em; margin-top: 6px; color: #5c554a; }
.ticket-head .no { font: 500 13px/1.2 var(--f-mono); text-align: right; color: #5c554a; }
.ticket-head .no b { display: block; font-size: 22px; color: var(--ink); font-weight: 600; margin-top: 2px; }
.ticket-perf { height: 0; border-top: 2px dashed rgba(11,11,11,.22); margin: 0 18px; }
.ticket-body { padding: 18px 22px 22px; display: grid; gap: 12px; }
.ticket dl { margin: 0; display: grid; gap: 10px; }
.ticket dl > div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; font-size: 14.5px; }
.ticket dt { color: #6a6358; }
.ticket dd { margin: 0; font-weight: 500; }
.ticket .empty-val { color: #9a9285; font-weight: 400; }
.ticket-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid rgba(11,11,11,.14); }
.ticket-total b { font: 700 36px/1 var(--f-display); }
.ticket .tz { font-size: 12px; color: #6a6358; }
.ticket .btn-primary { background: var(--ink); color: var(--text); border-color: var(--ink); }
.ticket .btn-primary:hover { background: #222; }
@media (max-width: 980px) {
  .ticket { position: static; order: -1; }
  .ticket.compact .ticket-body dl > div:not(.keep) { display: none; }
}

/* календарь */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: 68px; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.day {
  scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0;
  border-radius: var(--r-sm); border: 1px solid var(--line-strong); text-decoration: none; background: var(--surface);
}
.day .wd { font-size: 12px; color: var(--muted); text-transform: lowercase; }
.day .dn { font: 600 22px/1.1 var(--f-body); }
.day .mn { font-size: 11px; color: var(--faint); }
.day.is-off { opacity: .35; background: transparent; pointer-events: none; }
.day.is-off .dn { text-decoration: line-through; text-decoration-thickness: 1px; }
.day[aria-current="date"] { border-color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.time-group { margin-bottom: 20px; }
.time-group h4 { font-size: 13px; color: var(--faint); font-weight: 500; margin-bottom: 10px; text-transform: lowercase; }
.time {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 52px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface);
  font: 500 17px/1 var(--f-mono); cursor: pointer;
}
.time small { font: 400 11px/1.2 var(--f-body); color: var(--faint); margin-top: 3px; }
.time:hover { border-color: var(--gold); }
.time input { position: absolute; opacity: 0; }
.time:has(input:checked) { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.time:has(input:checked) small { color: #4a4336; }
.time:has(input:checked)::after { content: "✓"; position: absolute; top: 4px; right: 7px; font: 700 11px/1 var(--f-body); }
.time:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- таблицы */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12.5px; letter-spacing: .04em; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #141414; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover { background: #151515; }

/* статусы: цвет всегда вместе с текстом */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; border: 1px solid currentColor; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-awaiting_payment, .s-pending, .s-requested, .s-new, .s-waiting, .s-open, .s-unpaid, .s-prepaid, .s-partial { color: var(--warn); }
.s-booked, .s-sent, .s-offered, .s-in_progress { color: var(--gold); }
.s-arrived, .s-in_service { color: var(--info); }
.s-completed, .s-delivered, .s-paid, .s-approved, .s-done, .s-enrolled, .s-published, .s-succeeded { color: var(--ok); }
.s-cancelled, .s-failed, .s-rejected, .s-declined, .s-refunded, .s-partial_refund { color: var(--bad); }
.s-no_show, .s-closed, .s-hidden { color: var(--idle); }

/* ---------- футер */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- состояния загрузки */
.skeleton { background: linear-gradient(90deg, #171717 0%, #212121 50%, #171717 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r-sm); }
@keyframes sk { to { background-position: -200% 0; } }
.offline-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 90; background: var(--bad); color: var(--ink); text-align: center; font-weight: 600; font-size: 14px; padding: 8px; }

/* ---------- появление */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.hero-in > * { animation: rise .8s var(--ease) both; }
.hero-in > *:nth-child(2) { animation-delay: .06s; }
.hero-in > *:nth-child(3) { animation-delay: .12s; }
.hero-in > *:nth-child(4) { animation-delay: .18s; }
.hero-in > *:nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================================================================ ПАНЕЛЬ ПЕРСОНАЛА */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.app-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; background: #0e0e0e; }
.app-side .brand { padding: 4px 8px 18px; }
.app-side .brand img { width: 38px; height: 38px; }
.app-side .brand-name b { font-size: 22px; }
.nav-group { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 16px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 14.5px; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: inset 2px 0 0 var(--gold); }
.nav-link .count { margin-left: auto; font: 500 11px/1 var(--f-mono); background: var(--gold); color: var(--ink); border-radius: 999px; padding: 3px 6px; }
.app-side .me { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.app-main { min-width: 0; }
.app-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px var(--gutter); border-bottom: 1px solid var(--line); background: rgba(11,11,11,.9); backdrop-filter: blur(10px); flex-wrap: wrap; }
.app-top h1 { font: 800 34px/1 var(--f-display); text-transform: uppercase; letter-spacing: .01em; margin-right: auto; }
.app-body { padding: 24px var(--gutter) 48px; }
.menu-toggle { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .app-side { position: fixed; z-index: 70; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .app-side.is-open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .menu-toggle { display: inline-flex; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; }
.stat .k { font-size: 12.5px; color: var(--faint); }
.stat .v { font: 600 24px/1.2 var(--f-body); font-variant-numeric: tabular-nums; margin-top: 4px; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 400; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { min-height: 40px; padding: 8px 12px; width: auto; font-size: 14px; }

/* сетка расписания: мастера — колонки, время — строки */
.sched { --row: 22px; --cols: 3; display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; max-height: calc(100vh - 230px); background: #0f0f0f; }
.sched-head { position: sticky; top: 0; z-index: 3; background: #141414; border-bottom: 1px solid var(--line); padding: 10px 12px; font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.sched-head .dot { width: 9px; height: 9px; border-radius: 50%; }
.sched-corner { position: sticky; left: 0; top: 0; z-index: 4; background: #141414; border-bottom: 1px solid var(--line); }
.sched-times { position: sticky; left: 0; z-index: 2; background: #0f0f0f; border-right: 1px solid var(--line); }
.sched-times div { height: calc(var(--row) * 2); font: 12px/1 var(--f-mono); color: var(--faint); padding: 4px 8px 0; border-top: 1px solid var(--line); }
.sched-col { position: relative; border-right: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px calc(var(--row) * 2)); }
.sched-col .off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #141414 0 6px, #0f0f0f 6px 12px); }
.sched-col .blk { position: absolute; left: 4px; right: 4px; border-radius: 6px; background: #1b1b1b; border: 1px dashed var(--line-strong); font-size: 12px; color: var(--faint); padding: 4px 8px; overflow: hidden; }
.appt { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 6px 9px; overflow: hidden; text-decoration: none; background: var(--surface-2); border: 1px solid var(--line-strong); border-left: 3px solid currentColor; font-size: 12.5px; line-height: 1.3; display: flex; flex-direction: column; gap: 2px; }
.appt:hover { z-index: 2; box-shadow: 0 8px 26px rgba(0,0,0,.6); }
.appt b { color: var(--text); font-weight: 600; }
.appt .svc { color: var(--muted); }
.appt .badge { align-self: flex-start; font-size: 11px; padding: 1px 7px 1px 6px; margin-top: 2px; }
.appt .buf { position: absolute; left: 0; right: 0; bottom: 0; background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255,255,255,.04) 4px 8px); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 2; }
.list-day { display: grid; gap: 8px; }
.list-appt { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); text-decoration: none; }
.list-appt .t { font: 500 18px/1 var(--f-mono); }

.drawer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .drawer-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .span-2 { grid-column: 1 / -1; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

/* кабинет барбера — мобильный */
.bb { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
.bb-top { display: flex; align-items: center; gap: 12px; padding: 8px 0 18px; }
.bb-top img { width: 36px; height: 36px; border-radius: 50%; }
.bb-top h1 { font: 800 30px/1 var(--f-display); text-transform: uppercase; }
.bb-next { background: var(--text); color: var(--ink); border-radius: var(--r); padding: 20px; display: grid; gap: 10px; }
.bb-next .in { font: 600 13px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: #6a6358; }
.bb-next .who { font: 800 44px/.9 var(--f-display); text-transform: uppercase; }
.bb-next .when { font: 500 20px/1 var(--f-mono); }
.bb-next .note { background: rgba(11,11,11,.07); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.bb-next .btn-primary { background: var(--ink); color: var(--text); border-color: var(--ink); }
.bb-next .btn { border-color: rgba(11,11,11,.3); color: var(--ink); }
.bb-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(17,17,17,.97); border-top: 1px solid var(--line); }
.bb-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--faint); font-size: 11.5px; }
.bb-tabbar a[aria-current="page"] { color: var(--text); }
.bb-tabbar a[aria-current="page"] .i { color: var(--gold); }
@media (min-width: 900px) { .bb-tabbar { max-width: 640px; margin: 0 auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; } }

/* печать и выгрузка */
@media print { .site-header, .tabbar, .app-side, .app-top, .bb-tabbar, .messages { display: none !important; } body { background: #fff; color: #000; } }
