/* ABstyle — палитра из логотипа: коричневый #524439 на тёплом светлом #E9E2DC */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4efea;
  --cream: #e9e2dc;
  --ink: #2b231d;
  --brand: #524439;
  --muted: #7a6e65;
  --line: #e6ded6;
  --accent: #524439;
  --accent-ink: #ffffff;
  --accent-soft: #efe8e1;
  --ok: #3f7a52;
  --ok-soft: #e6f1e8;
  --warn: #9a6328;
  --warn-soft: #f7ecdf;
  --bad: #a43d3d;
  --bad-soft: #f7e1df;
  --info: #3d5f8a;
  --info-soft: #e3eaf3;
  --radius: 4px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(43, 35, 29, .05), 0 10px 30px rgba(43, 35, 29, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--sans); font-weight: 500; line-height: 1.2; margin: 0 0 .6em; text-transform: uppercase; letter-spacing: .12em; }
h1 { font-size: clamp(22px, 3vw, 30px); }
h2 { font-size: clamp(18px, 2.2vw, 22px); }
h3 { font-size: 15px; letter-spacing: .1em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding-top: 56px; padding-bottom: 56px; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 10px; }
.eyebrow { text-transform: uppercase; letter-spacing: .24em; font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } .section { padding-top: 40px; padding-bottom: 40px; } }

/* ---------- верхняя полоса и шапка ---------- */
.announce { background: var(--brand); color: #f3ede7; text-align: center; font-size: 12px; letter-spacing: .06em; padding: 8px 16px; }
.announce a { color: #fff; }
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hdr { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 76px; }
.hdr-left, .hdr-right { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.hdr-right { justify-content: flex-end; }
.logo-img { height: 54px; width: auto; }
.logo-link { display: block; }
.langs { display: flex; gap: 4px; font-size: 12px; letter-spacing: .08em; }
.langs a { text-decoration: none; padding: 3px 5px; color: var(--muted); border-bottom: 1px solid transparent; }
.langs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.icon-link { position: relative; display: inline-flex; color: var(--ink); text-decoration: none; }
.icon-link svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.icon-link b { position: absolute; top: -6px; right: -9px; background: var(--brand); color: #fff; border-radius: 999px; min-width: 17px; height: 17px; font-size: 10px; display: grid; place-items: center; padding: 0 4px; font-weight: 600; }
.catnav { display: flex; justify-content: center; gap: 30px; height: 46px; align-items: center; font-size: 13px; overflow-x: auto; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav a { text-decoration: none; white-space: nowrap; color: var(--ink); padding: 12px 0; border-bottom: 1px solid transparent; }
.catnav a:hover, .catnav a.on { border-bottom-color: var(--ink); }
.menu-btn { display: none; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--ink); }
@media (max-width: 900px) {
  .hdr { height: 60px; }
  .logo-img { height: 40px; }
  .catnav { justify-content: flex-start; gap: 22px; height: 42px; padding: 0 16px; border-top: 1px solid var(--line); }
  .hdr-left .hide-sm, .hdr-right .hide-sm { display: none; }
}

/* ---------- кнопки и формы ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 2px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 500 13px var(--sans); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, opacity .15s; white-space: nowrap; }
.btn:hover { opacity: .9; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; opacity: 1; }
.btn.accent { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.light { background: #fff; border-color: #fff; color: var(--ink); }
.btn.wa { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.btn.sm { padding: 8px 14px; font-size: 11px; }
.btn.block { width: 100%; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }

label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: .03em; }
input, select, textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink); font: 15px var(--sans); }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 14px; cursor: pointer; }
.check input { margin-top: 4px; }
.field { margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label { margin: 0; }
.chip { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink); cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--ink); }
.chip:has(input:checked), .chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- уведомления ---------- */
.flashes { position: fixed; top: 92px; left: 50%; transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; width: min(520px, calc(100% - 32px)); }
.flash { padding: 12px 16px; border-radius: 2px; box-shadow: var(--shadow); font-size: 14px; background: var(--ink); color: #fff; animation: fade 4s forwards; }
.flash.error { background: var(--bad); animation: none; }
@keyframes fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.errors { background: var(--bad-soft); color: var(--bad); padding: 12px 16px; border-radius: 2px; margin-bottom: 16px; }
.errors div + div { margin-top: 4px; }

/* ---------- главный баннер ---------- */
.hero { position: relative; background: var(--cream); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: min(78vh, 640px); gap: 40px; }
.hero-mark { display: flex; justify-content: center; }
.hero-mark img { width: min(440px, 80%); height: auto; }
.hero-text h1 { font-size: clamp(26px, 3.6vw, 44px); letter-spacing: .14em; line-height: 1.25; }
.hero-text p { color: var(--muted); max-width: 460px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero.has-img { background: #000; color: #fff; }
.hero.has-img .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .78; }
.hero.has-img .wrap { position: relative; grid-template-columns: 1fr; }
.hero.has-img p { color: #eee; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: auto; padding-top: 40px; padding-bottom: 44px; gap: 24px; text-align: center; }
  .hero-mark img { width: 200px; }
  .hero-text p { margin: 0 auto 1em; }
  .hero .actions { justify-content: center; }
}

/* лента услуг под баннером (как полоса брендов) */
.strip { border-bottom: 1px solid var(--line); }
.strip .wrap { display: flex; justify-content: space-between; gap: 24px; overflow-x: auto; padding-top: 22px; padding-bottom: 22px; scrollbar-width: none; }
.strip a { font-family: var(--serif); font-size: 22px; font-style: italic; color: var(--brand); text-decoration: none; white-space: nowrap; }
.strip a:hover { color: var(--ink); }

/* ---------- карусель и карточки товаров ---------- */
.rail-wrap { position: relative; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 24px) / 4); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-btn { position: absolute; top: 38%; width: 40px; height: 40px; border: 0; background: rgba(255,255,255,.9); cursor: pointer; font-size: 22px; color: var(--ink); z-index: 2; }
.rail-btn.prev { left: -6px; } .rail-btn.next { right: -6px; }
@media (max-width: 900px) { .rail { grid-auto-columns: 44%; gap: 14px; } .rail-btn { display: none; } }
.more-row { text-align: center; margin-top: 32px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 24px; }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr 1fr; gap: 24px 12px; } }
.card { display: flex; flex-direction: column; text-align: center; }
.card .img { aspect-ratio: 3/4; background: var(--surface-2); position: relative; display: block; overflow: hidden; text-decoration: none; }
.card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .img img { transform: scale(1.03); }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: var(--cream); }
.placeholder img { width: 46%; opacity: .35; }
.card .body { padding: 14px 6px 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .no { font-size: 11px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.card .name { font-size: 14px; text-decoration: none; line-height: 1.4; }
.card .price { font-size: 14px; font-weight: 600; }
.card .price s { color: var(--muted); font-weight: 400; margin-left: 6px; }
.card .img .badge { position: absolute; top: 10px; left: 10px; }
.badge { display: inline-block; font-size: 10px; padding: 4px 8px; background: #fff; color: var(--ink); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.badge.in { color: var(--ok); background: var(--ok-soft); }
.badge.pre { color: var(--warn); background: var(--warn-soft); }
.badge.out { color: #fff; background: var(--ink); }
.badge.info { color: var(--info); background: var(--info-soft); }
.badge.accent { color: var(--brand); background: var(--accent-soft); }

/* ---------- плитки услуг (как плитки коллекций) ---------- */
.tiles-big { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 820px) { .tiles-big { grid-template-columns: 1fr; gap: 16px; } }
.svc { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 340px; padding: 36px; background: var(--cream); color: var(--ink); overflow: hidden; }
.svc:nth-child(4n+2), .svc:nth-child(4n+3) { background: var(--brand); color: #f3ede7; }
.svc .mark { position: absolute; right: -40px; bottom: -40px; width: 260px; opacity: .08; pointer-events: none; }
.svc:nth-child(4n+2) .mark, .svc:nth-child(4n+3) .mark { opacity: .12; }
.svc h3 { font-size: 20px; letter-spacing: .14em; margin-bottom: 12px; }
.svc .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.svc .desc { max-width: 460px; opacity: .85; font-size: 14px; }
.svc .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; position: relative; }
.svc .price { font-size: 17px; font-weight: 600; letter-spacing: .04em; }
.svc .price small { font-weight: 400; opacity: .8; }
.svc:nth-child(4n+2) .btn, .svc:nth-child(4n+3) .btn { background: #fff; border-color: #fff; color: var(--ink); }
.svc select { width: auto; padding: 10px; margin-right: 6px; }
.svc.wide { grid-column: 1 / -1; min-height: 260px; }

/* ---------- редакционный блок / о стилисте ---------- */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; background: var(--surface-2); }
.about .about-side { background: var(--cream); display: grid; place-items: center; padding: 48px; }
.about .about-side img { width: min(320px, 70%); }
.about .txt { padding: 56px; display: flex; flex-direction: column; justify-content: center; }
.about-text { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 26px); line-height: 1.45; margin: 0 0 24px; }
.privacy-note { border-top: 1px solid var(--line); padding-top: 18px; font-size: 13px; color: var(--muted); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } .about .txt { padding: 32px 20px; } .about .about-side { padding: 32px; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; text-align: center; }
.steps div { padding: 0 10px; counter-increment: s; font-size: 14px; }
.steps div::before { content: "0" counter(s); display: block; font-family: var(--serif); font-size: 36px; color: var(--brand); margin-bottom: 8px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr 1fr; gap: 28px 16px; } }

/* ---------- каталог ---------- */
.page-title { text-align: center; padding: 40px 0 8px; }
.tabs { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; font-size: 13px; }
.tabs a { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; color: var(--muted); }
.tabs a.on, .tabs a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin-bottom: 28px; font-size: 13px; }
.toolbar select { width: auto; border: 0; padding: 6px 4px; font-size: 13px; background: transparent; }
.toolbar .sizes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.toolbar .sizes a { text-decoration: none; border: 1px solid var(--line); padding: 4px 10px; font-size: 12px; }
.toolbar .sizes a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- страница товара ---------- */
.crumbs { font-size: 12px; color: var(--muted); padding: 18px 0 0; letter-spacing: .04em; }
.crumbs a { text-decoration: none; }
.item-page { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; padding-top: 24px; padding-bottom: 72px; }
.item-page .photo { aspect-ratio: 3/4; background: var(--surface-2); overflow: hidden; }
.item-page .photo img { width: 100%; height: 100%; object-fit: cover; }
.item-page .info { position: sticky; top: 140px; align-self: start; }
.item-page h1 { font-size: 20px; letter-spacing: .1em; margin-bottom: 6px; }
.item-page .no { font-size: 11px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; margin-bottom: 14px; }
.item-page .price { font-size: 20px; font-weight: 600; margin: 14px 0 18px; }
.item-page .opt-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.acc { border-top: 1px solid var(--line); margin-top: 28px; }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { cursor: pointer; padding: 16px 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; list-style: none; display: flex; justify-content: space-between; }
.acc summary::after { content: "+"; font-size: 16px; }
.acc details[open] summary::after { content: "−"; }
.acc .body { padding: 0 0 18px; font-size: 14px; color: var(--muted); }
@media (max-width: 820px) { .item-page { grid-template-columns: 1fr; gap: 20px; padding-top: 12px; } .item-page .info { position: static; } }

/* ---------- панели, корзина, заказ ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { margin-bottom: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; padding: 32px 0 64px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.lines { width: 100%; border-collapse: collapse; }
.lines td, .lines th { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.lines th { font-size: 12px; color: var(--muted); font-weight: 500; }
.lines .num { text-align: right; white-space: nowrap; }
.lines input[type=number] { width: 72px; padding: 7px; }
.sum-row { display: flex; justify-content: space-between; font-size: 17px; font-weight: 600; padding-top: 14px; letter-spacing: .04em; }
.thumb { width: 56px; height: 74px; overflow: hidden; background: var(--surface-2); flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-item { display: flex; gap: 12px; align-items: center; }
details.more { border: 1px solid var(--line); border-radius: 2px; padding: 0 16px; background: var(--surface-2); margin-bottom: 16px; }
details.more summary { cursor: pointer; padding: 14px 0; font-weight: 500; font-size: 14px; }
details.more[open] { padding-bottom: 8px; }
.status-big { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 20px; }
.progress { display: flex; gap: 6px; margin: 18px 0; }
.progress div { flex: 1; height: 3px; background: var(--line); }
.progress div.on { background: var(--brand); }

/* ---------- подвал ---------- */
.site-footer { background: var(--surface-2); padding: 56px 0 28px; margin-top: 40px; font-size: 13px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 14px; font-weight: 600; }
.foot-grid a { text-decoration: none; color: var(--muted); display: block; padding: 3px 0; }
.foot-grid a:hover { color: var(--ink); }
.foot-logo { width: 150px; margin-bottom: 14px; }
.foot-bottom { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- нижнее меню на телефоне ---------- */
.tabbar { display: none; }
@media (max-width: 820px) {
  body.public { padding-bottom: 64px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); height: 60px; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; font-size: 10px; color: var(--muted); position: relative; }
  .tabbar a.on { color: var(--ink); }
  .tabbar svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.4; }
  .tabbar b { position: absolute; top: 6px; left: 55%; background: var(--brand); color: #fff; border-radius: 999px; min-width: 16px; height: 16px; font-size: 9px; display: grid; place-items: center; padding: 0 4px; }
  .wa-float { bottom: 76px !important; }
}
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 52px; height: 52px; border-radius: 50%; background: #1f8f4e; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.wa-float svg { width: 26px; height: 26px; fill: #fff; }

/* календарь записи */
.cal { max-width: 420px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; }
.cal-nav { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-wd { font-size: 11px; color: var(--muted); padding: 4px 0; }
.cal-day { aspect-ratio: 1; border: 0; background: transparent; color: #cdc3ba; font: 14px var(--sans); }
.cal-day.free { background: var(--accent-soft); color: var(--ink); cursor: pointer; font-weight: 500; }
.cal-day.free:hover { outline: 1px solid var(--brand); }
.cal-day.sel { background: var(--ink); color: #fff; }
.cal-times { margin-top: 14px; }
.cal-chosen { margin-top: 10px; }

/* =================================================================
   ADMIN
   ================================================================= */
.admin { background: #f4f1ed; }
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #e9e2d9; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.side .logo { color: #fff; padding: 0 10px 18px; font-size: 26px; display: block; }
.side a { color: #cfc5b9; text-decoration: none; padding: 9px 12px; border-radius: 9px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.side a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.on { background: rgba(255,255,255,.12); color: #fff; }
.side a b { background: var(--accent); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; }
.side .sep { height: 1px; background: rgba(255,255,255,.1); margin: 10px 4px; }
.side .bottom { margin-top: auto; }
.main { padding: 28px 32px 64px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; margin: 0; }
.admin-top { display: none; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; inset: 0; z-index: 60; height: auto; overflow: auto; }
  .side.open { display: flex; }
  .admin-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 40; }
  .admin-top .logo { color: #fff; font-size: 22px; }
  .admin-top button { background: none; border: 0; color: #fff; font-size: 24px; }
  .main { padding: 18px 16px 64px; }
}

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; display: block; }
.tile .v { font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.tile .l { font-size: 13px; color: var(--muted); }
.tile.hot { border-color: var(--accent); background: var(--accent-soft); }

.dash { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 500; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #faf8f5; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #faf7f3; }
table.t .num { text-align: right; white-space: nowrap; }
table.t tr.dim td { opacity: .5; }
.t-items { color: var(--muted); max-width: 340px; }

.st { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.st-new { background: var(--info-soft); color: var(--info); }
.st-confirmed, .st-in_progress { background: var(--warn-soft); color: var(--warn); }
.st-ready { background: var(--accent-soft); color: var(--accent); }
.st-done, .st-paid { background: var(--ok-soft); color: var(--ok); }
.st-cancelled, .st-refunded { background: var(--surface-2); color: var(--muted); }
.st-unpaid { background: var(--bad-soft); color: var(--bad); }
.st-partial { background: var(--warn-soft); color: var(--warn); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters input[type=search] { max-width: 300px; }
.filters select { width: auto; }

.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-line; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }
.client-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .client-grid { grid-template-columns: 1fr; } }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.timeline .txt { white-space: pre-line; margin-top: 3px; }
.wa-list { display: grid; gap: 8px; }
.wa-list a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: #e7f5ec; color: #17683a; text-decoration: none; font-size: 14px; font-weight: 500; }
.wa-list a:hover { background: #d6efdf; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }
.stock-ctl { display: inline-flex; align-items: center; gap: 4px; }
.stock-ctl button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 15px; line-height: 1; }
.order-line { display: grid; grid-template-columns: 1fr 80px 90px 120px 32px; gap: 8px; margin-bottom: 8px; align-items: center; }
.order-line.custom { grid-template-columns: 1fr 80px 120px 32px; }
@media (max-width: 640px) { .order-line, .order-line.custom { grid-template-columns: 1fr 1fr; } }
.x { background: none; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; }
.login-box { max-width: 380px; margin: 12vh auto; padding: 0 16px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* корзина и заказ на телефоне: название на всю ширину, ниже кол-во и сумма */
@media (max-width: 640px) {
  .lines tr { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 0 8px; border-bottom: 1px solid var(--line); }
  .lines td { border-bottom: 0; padding: 8px 2px; }
  .lines td:first-child { grid-column: 1 / -1; padding-top: 12px; }
  .panel { padding: 18px; }
}

/* админ-календарь */
.acal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.acal .h { font-size: 12px; color: var(--muted); text-align: center; }
.acal .d { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 96px; padding: 6px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.acal .d.off { background: repeating-linear-gradient(45deg, #f1ece6, #f1ece6 6px, #ebe4dc 6px, #ebe4dc 12px); }
.acal .d.today { border-color: var(--accent); }
.acal .d .n { font-weight: 600; display: flex; justify-content: space-between; }
.acal .ev { background: var(--accent-soft); border-radius: 6px; padding: 2px 5px; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acal .fr { color: var(--ok); }
@media (max-width: 700px) { .acal .d { min-height: 64px; font-size: 11px; } .acal .ev { white-space: normal; } }
.inline-edit input { width: 100px; padding: 6px 8px; font-size: 14px; }

/* админка — бренд */
.side .logo-img { height: 46px; margin: 0 10px 14px; }
.admin-top .logo-img { height: 30px; }
.admin { font-size: 14px; }
.admin h1, .admin h2, .admin h3 { text-transform: none; letter-spacing: 0; font-weight: 600; }
.admin .page-head h1 { font-family: var(--sans); font-size: 26px; }
.admin .btn { text-transform: none; letter-spacing: 0; font-size: 14px; }
.admin .badge { text-transform: none; letter-spacing: 0; font-size: 11px; }
.admin .tabs { justify-content: flex-start; }
.admin .tabs a { border: 1px solid var(--line); padding: 7px 14px; background: #fff; color: var(--ink); }
.admin .tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.admin .side { background: var(--brand); }
.svc:nth-child(4n+2) .mark, .svc:nth-child(4n+3) .mark { filter: brightness(0) invert(1); opacity: .1; }

.card .img .placeholder img, .item-page .photo .placeholder img, .thumb .placeholder img { width: 42%; height: auto; object-fit: contain; opacity: .3; }
.card:hover .img .placeholder img { transform: none; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; margin-top: 10px; }
.thumbs button { padding: 0; border: 1px solid transparent; background: none; cursor: pointer; aspect-ratio: 3/4; overflow: hidden; }
.thumbs button.on { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
