﻿/* ==========================================================================
   Дизайн-токены (Figma «Сайт», главная). Менять здесь: цвета, радиусы, тени.
   Палитра: тёплый кремовый фон, терракотовый акцент, «карамельные» тени.
   ========================================================================== */
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/golos-text-cyrillic.woff2?v=1") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/golos-text-cyrillic-ext.woff2?v=1") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/golos-text-latin.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/playfair-display-cyrillic.woff2?v=1") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/playfair-display-latin.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #d25a37;
  --brand-dark: #b9411e;
  --brand-light: #ee7b59;
  --accent: #d25a37;
  --bg: #f6f2ec;
  --surface: #f6f2ec;
  --surface-soft: #fffdf9;
  --text: #111111;
  --muted: #8c8c8c;
  --line: #e6ddd1;
  --ok: #166534;
  --warn: #92400e;
  --bad: #991b1b;
  --radius: 30px;
  --radius-sm: 15px;
  --maxw: 720px;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --shadow-card: 0 0 10px rgba(0, 0, 0, .25);
  --shadow-float: 0 6px 24px rgba(0, 0, 0, .12);
  --candy-light: inset -3px 3px 3px 0 rgba(255, 255, 255, .75), inset 3px -3px 3px 0 rgba(168, 168, 168, .75);
  --candy-accent: inset 3px -3px 3px 0 var(--brand-light), inset -3px 3px 3px 0 var(--brand-dark);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }
main { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 24px; }
main.home { padding: 0 0 24px; }
a { color: var(--brand-dark); }
h1 { font-family: var(--font); font-size: 28px; font-weight: 600; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 18px; font-weight: 500; margin: 0 0 12px; }
h3 { font-size: 16px; font-weight: 500; margin: 0 0 6px; }
p { margin: 0 0 10px; }
ul { margin: 0 0 10px; padding-left: 20px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

/* ---------- шапка внутренних страниц (витрина использует .hero) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  border-radius: 0 0 30px 30px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
  padding: 14px 20px;
}
.site-header .row {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.site-header .who { flex: 1 1 100%; }
.site-header .who strong { font-size: 20px; font-weight: 600; }
.site-header nav { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.site-header nav a { font-size: 14px; text-decoration: none; color: var(--muted); }
main > h1:first-child { margin-top: 20px; }

/* ---------- главная: верхний блок по макету ---------- */
.hero {
  position: relative;
  background: var(--bg);
  border-radius: 0 0 50px 50px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
  padding: 32px 20px 20px;
  margin-bottom: 8px;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; }
.hero-title { font-size: 28px; font-weight: 600; line-height: 1.15; margin: 0; }
.hero-name { font-size: 18px; margin: 6px 0 0; }
.hero-actions { display: flex; align-items: center; gap: 15px; margin-top: 18px; }
.hero-actions .btn-cta { flex: 1 1 auto; }
.btn-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 60px; padding: 12px 20px;
  border: 2px solid var(--brand); border-radius: 30px;
  background: var(--brand); color: #fff;
  font: inherit; font-size: 20px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  position: relative; overflow: hidden;
  box-shadow: -2px 2px 2px rgba(0, 0, 0, .25);
}
.btn-cta::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--candy-accent); pointer-events: none; }
.btn-cta:active { transform: translateY(1px); }

.btn-round {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; flex: 0 0 60px;
  border: 0; border-radius: 30px;
  background: var(--bg); color: #6e3c2b;
  font-family: var(--font-display); font-size: 24px; line-height: 1;
  text-decoration: none; cursor: pointer;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.btn-round::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--candy-light); pointer-events: none; }

/* меню «...» в шапке */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: 68px; z-index: 30;
  min-width: 220px; padding: 10px;
  background: var(--surface-soft);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
}
.menu-panel a {
  display: block; padding: 10px 12px;
  border-radius: 12px;
  color: var(--text); text-decoration: none; font-size: 15px;
}
.menu-panel a:hover { background: var(--bg); }

/* ---------- секции главной ---------- */
.section { padding: 12px 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.section-head a { font-size: 14px; color: var(--brand); text-decoration: none; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  font: inherit; font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary {
  position: relative; overflow: hidden;
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: -2px 2px 2px rgba(0, 0, 0, .2);
}
.btn.primary::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--candy-accent); pointer-events: none; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--surface-soft); border-color: #e6b3b3; color: var(--bad); }
.btn.small { padding: 8px 14px; font-size: 14px; font-weight: 500; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

/* ---------- карточки ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 15px;
  margin: 0 0 15px;
  box-shadow: var(--shadow-card);
}
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--candy-light); pointer-events: none; }
.card.tight { padding: 12px; }
.card > * { position: relative; z-index: 1; }
.grid { display: grid; gap: 15px; }
@media (min-width: 620px) { .grid.two { grid-template-columns: 1fr 1fr; } }

.promise { background: var(--surface); }
.promise p { font-size: 17px; margin: 0; }

/* ---------- карточка услуги по макету ---------- */
.service-card {
  position: relative;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  min-height: 60px; padding: 15px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}
.service-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--candy-light); pointer-events: none; }
.service-card > * { position: relative; z-index: 1; }
button.service-card { border: 0; font: inherit; text-align: left; width: 100%; cursor: pointer; }
.service-card[aria-pressed="true"] { outline: 2px solid var(--brand); outline-offset: 2px; }
.service-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.service-name { font-size: 16px; font-weight: 400; margin: 0; }
.service-prices { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.service-price { color: var(--brand); font-size: 16px; }
.service-duration { color: var(--muted); font-size: 14px; white-space: nowrap; }
.service-desc { font-size: 14px; margin: 0; }
.service-deposit { color: var(--muted); font-size: 13px; margin: 0; }
.arrow-btn {
  flex: 0 0 30px; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 15px; background: var(--brand); color: #fff;
  box-shadow: -2px 2px 2px rgba(0, 0, 0, .25);
  position: relative; overflow: hidden;
}
.arrow-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--candy-accent); pointer-events: none; }
.arrow-btn svg { width: 16px; height: 16px; position: relative; z-index: 1; }

/* старая карточка услуги (осталась на случай, если её использует другой экран) */
.service { display: flex; flex-direction: column; gap: 6px; }
.service .head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.service .price { font-weight: 600; white-space: nowrap; color: var(--brand); }
.service .meta { color: var(--muted); font-size: 14px; }
.service[aria-pressed="true"] { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- выбор окна ---------- */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  position: relative; overflow: hidden;
  border: 0; background: var(--surface); border-radius: 15px;
  padding: 5px 14px; min-height: 30px;
  font: inherit; font-size: 14px; color: var(--text);
  cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-card);
  display: inline-flex; align-items: center; justify-content: center;
}
.chip::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--candy-light); pointer-events: none; }
.chip[aria-pressed="true"], .chip.active { background: var(--brand); color: #fff; }
.chip[aria-pressed="true"]::after, .chip.active::after { box-shadow: var(--candy-accent); }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot {
  border: 0; background: var(--surface); border-radius: 15px;
  padding: 8px 14px; font: inherit; font-weight: 500; cursor: pointer;
  box-shadow: var(--shadow-card);
}
.slot[aria-pressed="true"] { background: var(--brand); color: #fff; }
.slot:disabled { opacity: .45; cursor: default; }

/* ---------- формы ---------- */
form.stack { display: grid; gap: 12px; }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
input, textarea, select {
  width: 100%; padding: 12px; font: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-soft);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 400; }
.consent input { width: auto; margin-top: 3px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin: 0; }
legend { padding: 0 6px; font-size: 14px; font-weight: 500; }

.notice { border-left: 4px solid var(--brand); background: #fbf3ec; padding: 10px 12px; border-radius: 12px; }
.notice.warn { border-color: var(--accent); background: #fdf6ec; }
.notice.bad { border-color: var(--bad); background: #fdf1f1; }
.notice.ok { border-color: var(--ok); background: #f1f7f2; }

/* ---------- статусы ---------- */
.tag { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); }
.tag.new, .tag.pending { background: #fdf6ec; color: var(--warn); border-color: #f0d9b5; }
.tag.confirmed, .tag.done, .tag.received, .tag.sent { background: #f1f7f2; color: var(--ok); border-color: #bfdcc6; }
.tag.cancelled, .tag.no_show, .tag.failed { background: #fdf1f1; color: var(--bad); border-color: #e8c4c4; }
.tag.expected, .tag.scheduled { background: #eef4fb; color: #1e4b7a; border-color: #c3d7ea; }

/* ---------- шаги ---------- */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
ol.steps li { counter-increment: step; padding: 10px 0 10px 42px; position: relative; border-bottom: 1px dashed var(--line); }
ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 8px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}

/* ---------- FAQ по макету ---------- */
.faq-item {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 15px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.faq-item::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--candy-light); pointer-events: none; }
.faq-item summary {
  display: flex; align-items: center; gap: 15px;
  min-height: 60px; padding: 15px;
  cursor: pointer; list-style: none;
  position: relative; z-index: 1;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q { font-size: 16px; font-weight: 500; }
.faq-item p { margin: 0; padding: 0 15px 15px 60px; color: var(--muted); font-size: 14px; position: relative; z-index: 1; }
.faq-item[open] .arrow-btn svg { transform: rotate(90deg); }
.arrow-btn svg { transition: transform .15s ease; }

/* общий details (страница /faq и кабинет) */
main details:not(.faq-item) {
  position: relative;
  border: 0;
  border-radius: var(--radius);
  padding: 15px;
  background: var(--surface);
  margin-bottom: 15px;
  box-shadow: var(--shadow-card);
}
main details:not(.faq-item) summary { font-weight: 500; }
main details:not(.faq-item) p { color: var(--muted); }

/* ---------- галерея «до/после» ---------- */
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-soft); }
.gallery img { width: 100%; height: 150px; object-fit: cover; display: block; }
.gallery figcaption { padding: 8px; font-size: 13px; color: var(--muted); }

/* ---------- кабинет ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.tab { border: 1px solid var(--line); background: var(--surface-soft); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.stats { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.stat { border: 0; border-radius: var(--radius-sm); padding: 10px; background: var(--surface); box-shadow: var(--shadow-card); }
.stat b { display: block; font-size: 20px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- график кабинета ---------- */
.weekband { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.day-card {
  display: flex; flex-direction: column; gap: 3px; padding: 8px; text-align: left;
  font: inherit; font-size: 13px; background: var(--surface-soft);
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.day-card-title { font-weight: 700; font-size: 12px; }
.day-card b { font-size: 14px; }
.day-card:hover { border-color: var(--muted); }
.day-card.off { background: #efe9df; }
.day-card.off .day-card-title { color: var(--muted); }
.day-card.occupied { border-color: #e8c4c4; }
.day-card.active { border-color: var(--text); box-shadow: 0 0 0 2px rgba(22, 33, 29, .12); }
.day-card .bar { display: block; height: 6px; border-radius: 3px; background: #e7ecea; margin-top: 4px; }
.day-card .bar s { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.day-card.occupied .bar s { background: var(--bad); }
.band-head { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: baseline; justify-content: space-between; }
.opts { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0; padding: 0; }
.opt { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--muted); }
.band-note { color: var(--warn); }
@media (max-width: 720px) {
  .weekband { grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr); overflow-x: auto; padding-bottom: 4px; }
}

.dayline { margin: 12px 0 6px; }
.track { position: relative; height: 26px; border-radius: 8px; background: #eadfd2; overflow: hidden; }
.track s { position: absolute; top: 0; bottom: 0; }
.seg-work { background: var(--surface-soft); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.seg-blocked { background: #b9c4bf; }
.seg-booking { background: var(--brand); }
.dayline-scale { position: relative; height: 16px; margin-top: 2px; }
.dayline-scale u { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); text-decoration: none; }

.tag.blocked-kind.personal { background: #f2f5f4; color: #3c5149; border-color: #cdd8d4; }
.tag.blocked-kind.break { background: #fdf6ec; color: var(--warn); border-color: #f0d9b5; }
.tag.blocked-kind.training { background: #eef4fb; color: #1e4b7a; border-color: #c3d7ea; }
.tag.blocked-kind.hold { background: #eef4fb; color: #1e4b7a; border-color: #c3d7ea; }
.tag.blocked-kind.other { background: #f4f4f2; color: var(--muted); }
.tag.booking-origin.site { background: #f1f7f2; color: var(--ok); border-color: #bfdcc6; }
.tag.booking-origin.manual { background: #fdf0e6; color: #8a4b12; border-color: #efd3ba; }

/* ---------- подвал по макету ---------- */
.site-footer {
  position: relative;
  flex-shrink: 0;
  background: var(--bg);
  border-radius: 50px 50px 0 0;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, .12);
  margin-top: auto;
  padding: 20px;
}
.site-footer .row { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.site-footer .footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 6px; font-size: 16px; margin: 0 0 8px; }
.site-footer .footer-links a { color: var(--brand); }
.site-footer .footer-note { color: var(--muted); font-size: 16px; margin: 0; }

.install-tip { display: none; }
.install-tip.show { display: block; }

.hidden { display: none !important; }

#toast {
  display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  max-width: 520px; margin: 0 auto; box-shadow: var(--shadow-float);
}
#toast.show { display: block; }

.offline-bar { display: none; }
body.is-offline .offline-bar { display: block; }

/* ---------- адаптация под десктоп ---------- */
@media (min-width: 700px) {
  .services-list { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .service-card { height: 100%; }
}
@media (min-width: 760px) {
  .hero { padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .site-header, .hero, .btn, .btn-cta, .tabs { display: none; } }
