/* Hert — общий стиль публичных страниц и кабинета. Mobile-first, без сборки.
   --accent задаёт бизнес (цвет кнопок), остальное — токены ниже. */

:root {
  /* кабинет — тёплая гамма направления A «Туф»; --accent бизнес может заменить своим цветом */
  --accent: #0E5A6B;
  --brand: #A94F36;
  --bg: #F6F2EE;
  --surface: #FFFFFF;
  --surface-2: #F1EBE5;
  --text: #221A17;
  --muted: #6B5B53;
  --line: #E6DCD3;
  --ok: #276B3C;  /* 4,5:1 на --ok-bg (было 4,47) */
  --ok-bg: #E8F3EB;
  --warn: #9A4B12;
  --warn-bg: #FBEFE3;
  --err: #A3321F;
  --err-bg: #FBEAE6;
  --info-bg: #E7F0F1;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(60 30 20 / 5%), 0 6px 18px rgb(60 30 20 / 6%);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Armenian", "Noto Sans", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #4FB3C4;
    --brand: #D07A5E;
    --bg: #121416;
    --surface: #1A1D21;
    --surface-2: #22262B;
    --text: #EDE8E3;
    --muted: #A69C94;
    --line: #2D3237;
    --ok: #5FCB82;
    --ok-bg: #12291B;
    --warn: #F0A55B;
    --warn-bg: #2B1F12;
    --err: #FF8A7A;
    --err-bg: #2E1614;
    --info-bg: #10262B;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .6em 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 1.6em 0 .6em; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.narrow { max-width: 480px; }

/* --- шапка и подвал -------------------------------------------------------- */
.topbar, .cab-top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 16px; }
.brand { font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; }
.brand:hover { text-decoration: none; }
.brand-icon { font-size: 1.2rem; }
.langs { display: flex; gap: 2px; flex-shrink: 0; }
.langs a { min-width: 44px; min-height: 44px; display: grid; place-items: center; padding: 0 6px; border-radius: 10px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.langs a.on { background: var(--bg); color: var(--text); }
.langs a:hover { text-decoration: none; color: var(--text); }

.page { max-width: 640px; margin: 0 auto; padding: 8px 16px 32px; }
.footer { max-width: 640px; margin: 0 auto; padding: 24px 16px 40px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); display: grid; gap: 4px; }

/* --- кнопки --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: filter .15s, transform .05s;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-danger { background: var(--surface); color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.btn-lg { min-height: 52px; font-size: 1.05rem; padding: 12px 22px; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.actions form { margin: 0; }

/* --- главный экран бизнеса ------------------------------------------------- */
.hero { padding: 20px 0 8px; }
.hero h1 { font-size: 1.9rem; }
.lead { font-size: 1.05rem; color: var(--muted); margin: 0 0 20px; }
.guarantee { margin-top: 10px; }
.section { margin-top: 8px; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.gallery figcaption { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.contacts { display: grid; gap: 6px; }
.how { padding-left: 1.2em; display: grid; gap: 8px; }

/* --- списки (услуги, записи, клиенты) --------------------------------------- */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list > li.muted { padding: 14px 16px; }
.list > li.inactive { opacity: .55; }
.row-link, .list > li.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; color: var(--text); min-height: 56px; }
.row-link:hover { text-decoration: none; background: var(--bg); }
.row-main { display: grid; gap: 2px; min-width: 0; }
.row-title { font-weight: 600; }
.row-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-align: right; }
.price { font-weight: 600; white-space: nowrap; }
.chev { color: var(--muted); font-size: 1.4rem; line-height: 1; }

/* --- шаги записи ----------------------------------------------------------- */
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 12px 0 4px; counter-reset: step; font-size: .85rem; }
.steps li { flex: 1; padding-top: 6px; border-top: 3px solid var(--line); color: var(--muted); counter-increment: step; }
.steps li::before { content: counter(step) ". "; }
.steps li.on { border-color: var(--accent); color: var(--text); font-weight: 600; }
.steps li.done { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.picked { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 14px 0; }

/* лента дней */
.days { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scroll-padding: 0 16px; scroll-snap-type: x proximity; }
.day { flex: 0 0 auto; width: 62px; display: grid; justify-items: center; gap: 0; padding: 8px 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); scroll-snap-align: start; }
.day:hover { text-decoration: none; border-color: var(--accent); }
.day .wd, .day .mn { font-size: .75rem; color: var(--muted); }
.day .dn { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.day.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.day.on .wd, .day.on .mn { color: rgb(255 255 255 / 85%); }
.day.empty:not(.on) { opacity: .45; }
.day-title { margin-top: 10px; }

/* слоты */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 0; }
.slot {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
}
.slot:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.slot.current, .slot:disabled { opacity: .45; cursor: default; }
.empty-state { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; justify-items: start; }
.empty-state p { margin: 0; }

/* итог записи */
.summary { display: grid; gap: 4px; margin: 14px 0; }
.big { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.status { text-align: center; padding: 18px 0 4px; }
.status h1 { margin-top: .3em; }
.status-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 700; }
.status-ok .status-icon { background: var(--ok-bg); color: var(--ok); }
.status-cancelled .status-icon { background: var(--err-bg); color: var(--err); }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; color: var(--muted); }

/* --- формы ----------------------------------------------------------------- */
.form { display: grid; gap: 14px; margin-top: 12px; }
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: .9rem; font-weight: 600; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=search], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=url], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px;
}
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: .92rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.field-check { gap: 0; }
.has-error input, .has-error select { border-color: var(--err); }
.error-text { color: var(--err); font-size: .85rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
ul[id$="resources"] { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
ul[id$="resources"] label { display: flex; gap: 8px; align-items: center; }
.search { margin: 8px 0 14px; }
.inline { display: inline; margin: 0; }

/* --- сообщения ------------------------------------------------------------- */
.alert { padding: 12px 14px; border-radius: 12px; margin: 12px 0; background: var(--info-bg); }
.alert.success { background: var(--ok-bg); color: var(--ok); }
.alert.error { background: var(--err-bg); color: var(--err); }
.alert.error a { color: inherit; text-decoration: underline; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--bg); color: var(--muted); vertical-align: middle; }
.badge.status-confirmed { background: var(--info-bg); color: var(--accent); }
.badge.status-completed { background: var(--ok-bg); color: var(--ok); }
.badge.status-no_show { background: var(--warn-bg); color: #c2410c; }
.badge.status-cancelled { background: var(--err-bg); color: var(--err); }

/* --- тексты (политика) ----------------------------------------------------- */
.prose h2 { font-size: 1.05rem; }
.prose p { margin: 0 0 .8em; }

/* --- кабинет --------------------------------------------------------------- */
.cab-top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 16px; }
.cab-top-right { display: flex; align-items: center; gap: 8px; }
.cab-top-right form { margin: 0; }
.cab-nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px 8px; }
.cab-nav a { flex-shrink: 0; padding: 6px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.cab-nav a.on { background: var(--bg); color: var(--text); }
.cab-nav a:hover { text-decoration: none; color: var(--text); }
.cab-page { max-width: 1200px; margin: 0 auto; padding: 8px 16px 40px; }
.cab-page .list, .cab-page .form.narrow, .cab-page .dl { max-width: 720px; }
.head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.dl { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 8px 16px; margin: 14px 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 10px 0; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav input[type=date] { min-height: 44px; padding: 4px 8px; width: auto; }
.cal-title { margin: 0; font-size: 1.3rem; }
.cal-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.cal {
  display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(140px, 1fr));
  grid-template-rows: auto var(--grid-h); min-width: calc(56px + var(--cols) * 140px);
}
.cal-corner, .cal-col-head { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-col-head { padding: 10px; font-weight: 700; text-align: center; border-left: 1px solid var(--line); }
.cal-hours { position: relative; }
.cal-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-hour:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 90px); }
.cal-cell { position: absolute; left: 0; right: 0; height: var(--cell-h); }
.cal-cell:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cal-booking {
  position: absolute; left: 4px; right: 4px; overflow: hidden; z-index: 1;
  padding: 4px 8px; border-radius: 8px; font-size: .8rem; line-height: 1.3;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-left: 3px solid var(--accent); color: var(--text);
  display: grid; align-content: start;
}
.cal-booking:hover { text-decoration: none; filter: brightness(.97); }
.cal-booking span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-booking strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-booking.status-completed { background: var(--ok-bg); border-left-color: var(--ok); }
.cal-booking.status-no_show { background: var(--warn-bg); border-left-color: #c2410c; }
.cal-booking.src-missed_call { box-shadow: inset 0 0 0 1px var(--ok); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--err); z-index: 2; pointer-events: none; }

.schedule { display: grid; gap: 8px; max-width: 720px; }
.sch-row { display: grid; grid-template-columns: 44px 44px 1fr 1fr; gap: 8px; align-items: center; }
.sch-row .sch-break { grid-column: 3 / span 2; display: flex; align-items: center; gap: 6px; min-width: 0; }
.sch-row input { min-width: 0; }
.sch-head { display: none; }
.sch-day { font-weight: 700; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }

@media (min-width: 720px) {
  .hero h1 { font-size: 2.3rem; }
  .gallery { grid-auto-columns: 45%; }
  .sch-row { grid-template-columns: 60px 80px 130px 130px 1fr; }
  .sch-row .sch-break { grid-column: auto; }
  .sch-head { display: grid; }
}

/* ============ кабинет по ТЗ §7C: навигация, «Сегодня», виджет, шторка, шаблоны ============ */
.i { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
.cabinet :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.brand-mark { width: 32px; height: 36px; border-radius: 16px 16px 6px 6px; background: var(--brand); color: #FFF7F2; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
/* длинное (армянское) название не обрезаем — переносим на вторую строку */
.brand-name { line-height: 1.15; overflow-wrap: anywhere; }
.cabinet .cab-top-row { padding: 10px 16px; }
.cabinet .cab-nav { display: none; }
.only-wide { display: none; }
.cab-nav a[aria-current] { background: var(--surface-2); color: var(--text); }
.cabinet .cab-page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* нижний таб-бар (телефон): Сегодня · Календарь · Клиенты · Настройки */
/* колонки по длине подписи: армянские «Հաճախորդներ», «Կարգավորումներ» не влезают в равные четверти 360 px */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min-content, 1fr); gap: 2px;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 50px; justify-content: center; padding: 0 2px; border-radius: 12px; color: var(--muted); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.tabbar a:hover { text-decoration: none; color: var(--text); }
.tabbar a[aria-current] { color: var(--accent); }
.tabbar a[aria-current] .i { stroke-width: 2.2; }

/* переключатель периода / вида */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); }
.segmented a { min-height: 40px; padding: 0 12px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); font-size: .88rem; font-weight: 600; white-space: nowrap; }
.segmented a:hover { text-decoration: none; color: var(--text); }
.segmented a[aria-current] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 10%); }

/* SavedBookingsWidget */
.saved-widget { margin: 12px 0 8px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sw-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.sw-head h2 { margin: 0; font-size: 1rem; line-height: 1.3; }
.sw-body { display: grid; gap: 12px; margin-top: 14px; }
.sw-label { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: lowercase; }
.sw-amd strong { font-size: 2.2rem; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; color: var(--ok); }
.sw-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.sw-nums div { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.sw-nums dt { font-size: .78rem; color: var(--muted); }
.sw-nums dd { margin: 0; font-size: 1.45rem; font-weight: 800; line-height: 1.2; }
.sw-nums dd.ok { color: var(--ok); }
.sw-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.sw-bar i { display: block; height: 100%; border-radius: 3px; background: var(--ok); max-width: 100%; }

/* лента «Сегодня» — BookingCard */
.today-head { margin-top: 18px; }
.today-head h1 { margin: 0; }
.today-head p { margin: 2px 0 0; }
.feed { display: grid; gap: 8px; margin: 10px 0 8px; }
.bcard { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.bcard.is-now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.bcard.is-past, .bcard.status-completed { background: var(--surface-2); box-shadow: none; }
.bcard.is-past .bcard-time strong { color: var(--muted); }
.bcard-time { display: grid; justify-items: start; color: var(--text); }
.bcard-time:hover { text-decoration: none; }
.bcard-time strong { font-size: 1.25rem; line-height: 1.1; }
.bcard-time span { font-size: .8rem; color: var(--muted); }
.tag { padding: 2px 8px; border-radius: 6px; font-style: normal; font-size: .7rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.tag.now { background: var(--accent); color: #fff; }
.bcard-main { display: grid; gap: 2px; min-width: 0; }
.bcard-name { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.bcard-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.bcard-name:hover { text-decoration: none; }
.bcard:has(.bcard-name:hover) { border-color: var(--accent); }
.bcard-actions { position: relative; z-index: 1; }
.bcard-svc { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.bcard-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.bcard-actions { display: flex; gap: 6px; }
.bcard-actions form { margin: 0; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; padding: 0; }
.icon-btn:hover { text-decoration: none; background: var(--surface-2); }
.icon-btn.ok { color: var(--ok); }
.icon-btn.danger { color: var(--err); }
.badge { display: inline-flex; align-items: center; gap: 4px; }
.badge.saved { background: var(--ok-bg); color: var(--ok); }
.badge.call-sent, .badge.call-opened { background: var(--info-bg); color: var(--accent); }
.badge.call-queued, .badge.call-new { background: var(--warn-bg); color: var(--warn); }
.badge.call-failed { background: var(--err-bg); color: var(--err); }
@media (max-width: 420px) {
  .bcard { grid-template-columns: minmax(56px, max-content) minmax(0, 1fr); }
  .bcard-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* пропущенные звонки */
.call-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; padding: 12px 16px; }
.call-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex-shrink: 0; }
.call-icon.st-booked { background: var(--ok-bg); color: var(--ok); }
.call-icon.st-sent, .call-icon.st-opened { background: var(--info-bg); color: var(--accent); }
.call-row .row-main { flex-grow: 1; }
.call-row .row-title { white-space: nowrap; }
/* узкий экран: статус и ссылка уходят под номер, номер телефона не ломается */
.call-row .row-main { flex: 1 1 170px; min-width: 0; }
.call-row .row-side { flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 1; margin-left: auto; text-align: right; }
.call-msg { color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 6px 10px; margin-top: 4px; overflow-wrap: anywhere; }
.sim { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sim p { margin: 2px 0 0; }
.sim-link { margin-bottom: 12px; }

/* меню настроек */
.menu-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); flex-shrink: 0; }
.menu .row-link { justify-content: flex-start; }
.menu .row-main { flex-grow: 1; }
.account { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account form { margin: 0; }

/* кнопка «+» и нижняя шторка быстрой записи */
.fab { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 31; width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgb(0 0 0 / 22%); }
.fab:hover { text-decoration: none; filter: brightness(1.06); }
.fab:active { transform: scale(.96); }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; margin: auto auto 0; padding: 0; border: 0; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--text); overflow: auto; }
.sheet::backdrop { background: rgb(20 12 8 / 45%); }
.sheet[open] { animation: sheet-up .32s cubic-bezier(.2,.7,.2,1); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet .form { margin: 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); padding-top: 10px; z-index: 1; }
.sheet-head h2 { margin: 0; }
.qa-when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; }
.chip { min-width: 72px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips.is-loading { opacity: .5; }

/* редактор шаблонов D */
.narrow-text { max-width: 720px; }
.tpl-form { display: grid; gap: 14px; max-width: 760px; }
.tpl-group h2 { margin: 0 0 8px; font-size: 1.05rem; }
.tpl { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.tpl:first-of-type { border-top: 0; }
.tpl-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }
.tpl-count { font-size: .82rem; color: var(--muted); font-weight: 600; }
.tpl-count.warn { color: var(--warn); }
.tpl-preview { font-size: .88rem; overflow-wrap: anywhere; }
.tpl .btn-sm { justify-self: start; }
.sticky-save { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); }
.sticky-save .btn { width: 100%; }

/* календарь: неделя */
.cal.is-week { grid-template-columns: 56px repeat(7, minmax(max(120px, var(--lanes) * 56px), 1fr)); min-width: calc(56px + 7 * max(120px, var(--lanes) * 56px)); }
/* колонка часов не уезжает при прокрутке недели вбок */
.cal.is-week .cal-hours, .cal.is-week .cal-corner { position: sticky; left: 0; z-index: 3; background: var(--surface); }
.cal.is-week .cal-corner { z-index: 4; }
.cal.is-week .cal-booking { left: calc(var(--lane) * 100% / var(--lanes) + 2px); right: auto; width: calc(100% / var(--lanes) - 4px); padding: 3px 4px; font-size: .72rem; }
.cal.is-week .cal-booking strong { overflow: visible; text-overflow: clip; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cal-col-head.is-today { color: var(--accent); }
a.cal-col-head { color: var(--text); }
.cal-booking.src-missed_call { border-left-color: var(--ok); }

@media (min-width: 900px) {
  .cabinet .cab-top-row { gap: 20px; }
  .cabinet .cab-nav { display: flex; flex-grow: 1; padding: 0; overflow: visible; }
  .only-wide { display: block; }
  .tabbar { display: none; }
  .cabinet .cab-page { padding-bottom: 48px; }
  .fab { bottom: 28px; right: 28px; }
  .sticky-save { bottom: 0; }
  .sheet { margin: auto; border-radius: 22px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "main widget" "main setup" "main calls"; grid-template-rows: auto auto 1fr; gap: 0 28px; align-items: start; }
  .home-grid.no-calls { grid-template-areas: "main setup"; grid-template-rows: auto; }
  .home-grid .setup { grid-area: setup; }
  .share-qr { grid-template-columns: auto 1fr; }
  .home-widget { grid-area: widget; }
  .home-main { grid-area: main; }
  .home-calls { grid-area: calls; }
  .sticky-save .btn { width: auto; }
}

/* ТЗ §12: без анимаций, если в системе включено «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* зона нажатия ≥ 44 px у мелких ссылок (бейдж, «открыть ссылку»), не меняя их вид */
.hit { position: relative; }
.hit::after { content: ""; position: absolute; inset: -12px -6px; }

@media (max-width: 899px) {
  .btn-sm { min-height: 44px; min-width: 44px; }
  .segmented a { min-height: 44px; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl dd { margin-bottom: 10px; }
}

/* --- MVP: профиль, ссылка и QR, Telegram, заявки, первые шаги, продавец --- */
.fs { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 16px; margin: 0; display: grid; gap: 14px; background: var(--surface); }
.fs legend { padding: 0 6px; font-weight: 700; }
.fs-more { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; background: var(--surface); }
.fs-more summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.fs-more[open] { padding-bottom: 16px; display: grid; gap: 14px; }
.photo-preview { width: 100%; max-width: 360px; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; }
input[type=color] { width: 64px; min-height: 44px; font-size: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
input[type=file] { min-height: 44px; font-size: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.share-url { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
.share-qr { display: grid; gap: 16px; align-items: center; }
.qr-box svg { width: 180px; height: 180px; display: block; border-radius: 8px; }
.share-qr-text h2 { margin: 0 0 4px; }
.tips .tip { display: grid; gap: 6px; padding: 14px 16px; }
.tips code { display: block; padding: 8px 10px; border-radius: 8px; background: var(--bg); font: .85rem/1.4 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.tips .btn { justify-self: start; }
.tg-steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 6px; }
.msg-preview { margin: 8px 0 0; padding: 12px; border-radius: 10px; background: var(--bg); white-space: pre-wrap; overflow-wrap: anywhere; font: .9rem/1.45 var(--font); }
.upsell { display: grid; gap: 6px; }
.upsell strong { display: flex; align-items: center; gap: 8px; }
.upsell .btn { justify-self: start; }
.help-line { margin-top: 12px; }
.sub-alert { display: grid; gap: 4px; }
.sub-contacts { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }

.setup { margin: 12px 0; }
.setup h2 { margin: 0; font-size: 1.1rem; }
.setup-steps { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 2px; }
.setup-steps a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); }
.setup-steps a:hover { text-decoration: none; color: var(--accent); }
.setup-steps .done a { color: var(--muted); text-decoration: line-through; }
.setup-steps .done .i { color: var(--ok); }
.dot-num { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); font-size: .78rem; font-weight: 700; flex-shrink: 0; }
.linklike { min-height: 44px; min-width: 44px; padding: 0 4px; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

.rcard { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.rcard.status-new { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.rcard.status-done, .rcard.status-cancelled { background: var(--surface-2); box-shadow: none; }
.rcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rcard-main { display: grid; gap: 2px; overflow-wrap: anywhere; }
.rcard-main span { display: flex; gap: 4px; align-items: flex-start; }
.rcard-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rcard-actions form { margin: 0; }
.badge.req-new { background: var(--warn-bg); color: var(--warn); }
.badge.req-in_work { background: var(--info-bg); color: var(--accent); }
.badge.req-done { background: var(--ok-bg); color: var(--ok); }
.badge.req-cancelled { background: var(--err-bg); color: var(--err); }

.pl-row { display: grid; gap: 10px; padding: 14px 16px; }
.pl-row.is-demo { background: var(--bg); }
.pl-main { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.pl-main .badge { justify-self: start; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pl-actions form { margin: 0; }
.pl-paid { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pl-paid input { width: auto; min-height: 44px; }


/* --- витрина платформы (/) --- */
.demo-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.demo-card { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.demo-card:hover { text-decoration: none; border-color: var(--accent); }
.demo-card .i { color: var(--accent); }
.demo-card span { display: grid; }
.demo-card small { color: var(--muted); }
.perks-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.perks-list li { display: flex; gap: 12px; align-items: flex-start; }
.perks-list .i { color: var(--accent); margin-top: 2px; }
.perks-list span { display: grid; gap: 2px; }
.perks-list small { color: var(--muted); font-size: .95rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 48px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.faq p { margin: 0 0 14px; color: var(--muted); }
@media (min-width: 720px) { .perks-list { grid-template-columns: 1fr 1fr; } }

/* --- Персональные данные и продажи (Москва): фильтры-чипы, предупреждение, чек-лист ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--card, #fff); border: 1px solid var(--line, #e5e0d8); color: inherit; text-decoration: none; font-size: .9rem; }
.chip-link.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.warn-card { border-left: 4px solid #c2410c; background: var(--warn-bg); }
.checklist { padding-left: 36px; line-height: 1.5; }
.checklist li { margin: 6px 0; }
.copy-box { width: 100%; min-height: 150px; font: inherit; font-size: 16px; padding: 10px; border-radius: 10px; border: 1px solid var(--line, #e5e0d8); background: var(--bg); }
.lead-meta { display: grid; gap: 4px; }

/* --- Очередь: экран мойщика -------------------------------------------------------------------- */
.q-walkin { padding: 12px; }
.q-walkin > summary { list-style: none; width: 100%; justify-content: center; }
.q-walkin > summary::-webkit-details-marker { display: none; }
.q-walkin-form { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.q-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.q-chip { position: relative; }
.q-chip input { position: absolute; opacity: 0; }
.q-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.q-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.q-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.q-board-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 16px 0 8px; }
.q-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.q-dot.free { background: #2FBF71; }
.q-dot.busy { background: #F0A43A; }
.q-list { display: flex; flex-direction: column; gap: 8px; }
.q-row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.q-row.is-called { outline: 2px solid var(--accent); }
.q-row.is-working { background: var(--ok-bg); }
.q-row.is-late { background: var(--warn-bg); }
.q-num { font-size: 1.6rem; font-weight: 800; }
.q-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.q-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.q-actions .btn, .q-row > form .btn { min-height: 48px; }
.q-big { min-width: 120px; font-size: 1.05rem; }
.q-row.is-next { outline: 2px solid var(--accent); }
.q-row.is-away { background: var(--surface-2, var(--surface)); box-shadow: none; border: 1.5px dashed var(--line); }
.q-next-tag { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.q-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.q-start { position: relative; }
.q-start > summary { list-style: none; cursor: pointer; }
.q-start > summary::-webkit-details-marker { display: none; }
.q-washers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 10px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.q-washers .btn { min-height: 48px; }
.q-row > form { grid-column: 1 / -1; }
.q-row > form .btn { width: 100%; }
@media (min-width: 700px) {
  .q-row { grid-template-columns: 72px 1fr auto; }
  .q-actions, .q-row > form { grid-column: auto; }
  .q-row > form .btn { width: auto; }
}
.q-today { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 16px; text-decoration: none; color: inherit; }
.q-today-main { display: flex; flex-direction: column; flex: 1; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 20px; }
.report-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.report-tile strong { font-size: 1.6rem; }

/* Отчёт: мойщики и загрузка по часам */
.report-washers { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.report-washers th, .report-washers td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.report-washers .num { text-align: right; }
.hour-bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; margin: 8px 0 16px; }
.hour-bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.hb-fill { width: 100%; height: var(--h); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); }
.hb-n { font-size: .7rem; color: var(--muted); order: -1; }
.hb-h { font-size: .7rem; color: var(--muted); }

/* Абонементы и акции: заявки с сайта */
.of-req { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.of-req .row-main { flex: 1 1 200px; }
.of-actions { display: flex; gap: 8px; }
.of-actions .btn { min-height: 44px; }
.of-history { margin: 12px 0 20px; padding: 12px 16px; }
.of-history > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }

.q-today.is-hot { border: 1.5px solid var(--accent); }
