/* По месту — мини-приложение. Цвета бренда: зелёный #2F6B4F, кремовый #FFF3E2, оранжевый #F28C38 */
:root {
  --green: #2F6B4F; --green-2: #3f8562; --green-soft: #e4efe8;
  --cream: #FFF3E2; --orange: #F28C38; --orange-dark: #d9741f;
  --text: #1f2a24; --muted: #66716b; --line: #e3e0d8;
  --bg: #faf7f1; --card: #ffffff; --danger: #b3261e; --danger-soft: #fbe9e7;
  --ok: #2e7d4f; --warn: #a15c00; --warn-soft: #fff1dc;
  --radius: 14px; --shadow: 0 1px 2px rgba(31, 42, 36, .06), 0 2px 10px rgba(31, 42, 36, .05);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --green: #7cc29c; --green-2: #8fd0ad; --green-soft: #1f3329;
  --cream: #2a261f; --text: #eef2ef; --muted: #a2ada7; --line: #2f3a34;
  --bg: #121a16; --card: #1a241f; --danger: #ff8a80; --danger-soft: #3a1f1d;
  --ok: #7cc29c; --warn: #ffb74d; --warn-soft: #3a2c17;
  --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
}
#app { max-width: 640px; margin: 0 auto; padding: 12px 16px 96px; }
h1 { font-size: 22px; margin: 6px 0 4px; line-height: 1.25; }
h2 { font-size: 18px; margin: 18px 0 8px; }
h3 { font-size: 16px; margin: 14px 0 6px; }
p { margin: 6px 0; }
a { color: var(--green); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.hidden { display: none !important; }

/* карточки */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
  border: 1px solid var(--line); }
.card + .card { margin-top: 10px; }
.card.cream { background: var(--cream); border-color: transparent; }
.card.warn { background: var(--warn-soft); border-color: transparent; }
.card.danger { background: var(--danger-soft); border-color: transparent; }
.card.tap { cursor: pointer; }
.card.tap:active { transform: scale(.995); }

/* кнопки */
button, .btn {
  font: inherit; border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer;
  background: var(--green-soft); color: var(--green); font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
}
button:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:active { background: var(--orange-dark); }
.btn-green { background: var(--green); color: #fff; }
:root[data-theme="dark"] .btn-green { color: #102018; }
.btn-ghost { background: transparent; color: var(--green); padding: 8px 10px; min-height: 36px; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-small { padding: 7px 12px; min-height: 34px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 5; }
.bottom-bar .inner { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.bottom-bar .inner > * { flex: 1; }

/* формы */
label.field { display: block; margin-top: 14px; }
label.field > span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=time], input[type=tel], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; min-height: 44px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--green-2); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 90px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.counter { float: right; font-size: 12px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: center; padding: 8px 0; cursor: pointer; }
.seg { display: flex; background: var(--green-soft); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; background: transparent; min-height: 38px; padding: 6px 8px; font-weight: 500; color: var(--text); }
.seg button.on { background: var(--card); color: var(--green); font-weight: 600; box-shadow: var(--shadow); }

/* ошибки и тосты */
.error { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom));
  background: #1f2a24; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 20; max-width: 90vw;
  box-shadow: 0 4px 20px rgba(0,0,0,.2); font-size: 15px; }
.toast.err { background: var(--danger); color: #fff; }

/* значки статуса */
.pill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  background: var(--green-soft); color: var(--green); white-space: nowrap; }
.pill.draft { background: var(--warn-soft); color: var(--warn); }
.pill.hidden, .pill.paused { background: var(--line); color: var(--muted); }
.pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.rejected, .pill.blocked { background: var(--danger-soft); color: var(--danger); }

/* вкладки */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 14px -16px 10px; padding: 0 16px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 500;
  min-height: 38px; padding: 7px 14px; border-radius: 99px; white-space: nowrap; }
.tabs button.on { background: var(--green); border-color: var(--green); color: #fff; }
:root[data-theme="dark"] .tabs button.on { color: #102018; }

/* плитки категорий */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 12px;
  text-align: left; color: var(--text); font-weight: 600; display: block; min-height: 84px; }
.tile .ico { font-size: 26px; display: block; margin-bottom: 4px; }
.tile.on { border-color: var(--green); background: var(--green-soft); }

/* фото */
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--line); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .cover { position: absolute; left: 6px; top: 6px; background: var(--orange); color: #fff; font-size: 11px;
  font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.ph .acts { position: absolute; right: 4px; top: 4px; display: flex; flex-direction: column; gap: 4px; }
.ph .acts button { min-height: 30px; width: 30px; padding: 0; border-radius: 99px; background: rgba(0,0,0,.55);
  color: #fff; font-size: 15px; }
.ph.add { display: flex; align-items: center; justify-content: center; flex-direction: column; border: 2px dashed var(--line);
  background: transparent; color: var(--green); cursor: pointer; font-weight: 600; font-size: 14px; }
.ph.add .plus { font-size: 28px; line-height: 1; }
.ph .loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.6); color: #1f2a24; font-size: 13px; }

/* позиции */
.item { display: flex; gap: 12px; align-items: center; }
.thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--green-soft); flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.price { font-weight: 700; white-space: nowrap; }
.variant-row { display: grid; grid-template-columns: 1.4fr 1fr .8fr auto; gap: 6px; align-items: center; margin-top: 6px; }
.variant-row.single { grid-template-columns: 1fr 1fr; }
.variant-row input { min-height: 40px; padding: 8px 10px; }
.variant-row .x { min-height: 40px; width: 40px; padding: 0; background: transparent; color: var(--muted); }

/* шаги мастера */
.steps { display: flex; gap: 6px; margin: 4px 0 14px; }
.steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--line); }
.steps i.on { background: var(--green); }

/* витрина */
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { height: 220px; max-width: 86%; border-radius: var(--radius); object-fit: cover; scroll-snap-align: start; flex: none; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); cursor: pointer; }
.pcard img, .pcard .noimg { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--green-soft); }
.pcard .b { padding: 8px 10px 10px; }
.pcard .n { font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge-stock { font-size: 12px; color: var(--ok); }
.badge-stock.low { color: var(--warn); }

.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 10; display: flex; align-items: flex-end; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; margin: 0 auto; border-radius: 18px 18px 0 0;
  max-height: 92vh; overflow-y: auto; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet .grip { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 10px; }

.qr { width: 180px; height: 180px; background: #fff; border-radius: 12px; padding: 6px; }
.linkbox { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; background: var(--green-soft);
  padding: 9px 11px; border-radius: 10px; word-break: break-all; user-select: all; }
.checklist li { margin: 6px 0; }
.checklist .done { color: var(--ok); }
.sched-day { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sched-day:last-child { border-bottom: 0; }
.sched-times { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sched-times input { width: 104px; min-height: 40px; padding: 7px 8px; }
.logo { width: 56px; height: 56px; border-radius: 14px; }
.skeleton { color: var(--muted); padding: 40px 0; text-align: center; }

/* окна записи */
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slots button { min-height: 42px; padding: 6px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.slots button.on { background: var(--green); border-color: var(--green); color: #fff; }
:root[data-theme="dark"] .slots button.on { color: #102018; }
.tabs button:disabled { opacity: .4; }
.timeline .tl { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.timeline .tl:last-child { border-bottom: 0; }
.timeline .t { width: 50px; font-weight: 700; flex: none; }
.timeline .tl.block { opacity: .7; }
.timeline .tl.free .t { color: var(--ok); font-weight: 500; }
.row.wrap > button { white-space: nowrap; flex-shrink: 0; }
.row.wrap > button.grow { flex: 1 0 auto; }

/* ---------- календарь на месяц ---------- */
.mcal { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px 10px 6px; box-shadow: var(--shadow);
  overflow: hidden; user-select: none; touch-action: pan-y; }
.mcal-head { display: flex; align-items: center; gap: 6px; padding: 2px 2px 8px; }
.mcal-title { flex: 1; text-align: center; font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.mcal-arrow { min-height: 38px; width: 38px; padding: 0; border-radius: 12px; font-size: 22px; line-height: 1; background: var(--green-soft); }
.mcal-arrow:disabled { opacity: .25; }
.mcal-wd { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.mcal-wd span:nth-child(n+6) { color: var(--orange-dark); }
.mcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mcell { position: relative; min-height: 52px; padding: 5px 2px 6px; border-radius: 12px; background: transparent; color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; font-weight: 600;
  border: 1.5px solid transparent; transition: background .15s, transform .1s; }
.mcell:active { transform: scale(.94); }
.mcell .num { font-size: 15px; line-height: 20px; }
.mcell.we .num { color: var(--orange-dark); }
.mcell.out { opacity: .35; }
.mcell.past:not(.sel) .num { color: var(--muted); }
.mcell.dis { opacity: .3; cursor: default; }
.mcell.dis:active { transform: none; }
.mcell.today { border-color: var(--green-2); }
.mcell.sel { background: var(--green); border-color: var(--green); }
.mcell.sel .num { color: #fff !important; }
:root[data-theme="dark"] .mcell.sel .num { color: #102018 !important; }
.mcell.off { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 6px); }
.mcell.off.sel { background: var(--green); }
.mcell.special::after { content: ''; position: absolute; top: 5px; right: 6px; width: 5px; height: 5px; border-radius: 9px; background: var(--orange); }
.mcell .badges { min-height: 17px; display: flex; }
.mcell .b-cnt, .mcell .b-new { font-size: 11px; font-weight: 700; min-width: 18px; height: 17px; line-height: 17px; padding: 0 5px;
  border-radius: 99px; background: var(--green-soft); color: var(--green); }
.mcell .b-new { background: var(--orange); color: #fff; }
.mcell.sel .b-cnt { background: rgba(255,255,255,.25); color: #fff; }
.mcell .load { position: absolute; left: 7px; right: 7px; bottom: 4px; height: 3px; border-radius: 9px; background: var(--line); overflow: hidden; }
.mcell .load i { display: block; height: 100%; background: var(--green-2); border-radius: 9px; }
.mcell .load i.hi { background: var(--orange); }
.mcell.sel .load { background: rgba(255,255,255,.3); } .mcell.sel .load i { background: #fff; }
.mcell .dot { width: 7px; height: 7px; border-radius: 9px; background: var(--ok); }
.mcell .dot.few { background: var(--orange); }
.mcell.sel .dot { background: #fff; }
.mcal-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.legend { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.legend i:first-child { margin-left: 0; }
.lg-cnt { background: var(--green-soft); border: 1px solid var(--green-2); } .lg-new { background: var(--orange); }
.lg-off { background: repeating-linear-gradient(135deg, transparent 0 2px, var(--muted) 2px 3px); }
.lg-free { background: var(--ok); border-radius: 9px !important; } .lg-few { background: var(--orange); border-radius: 9px !important; }
.mcal-spin { width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mslide-next-enter-active, .mslide-next-leave-active, .mslide-prev-enter-active, .mslide-prev-leave-active { transition: transform .18s ease, opacity .18s ease; }
.mslide-next-enter-from, .mslide-prev-leave-to { transform: translateX(40px); opacity: 0; }
.mslide-next-leave-to, .mslide-prev-enter-from { transform: translateX(-40px); opacity: 0; }

/* ---------- день мастера ---------- */
.dayhead { margin-top: 12px; }
.dayhead h2 { margin: 0 0 6px; font-size: 19px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--green-soft); color: var(--green); }
.chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.muted { background: var(--line); color: var(--muted); }
.chip.info { background: var(--cream); color: var(--text); }
.tl2 { margin-top: 12px; position: relative; }
.tl2 .row2 { display: flex; gap: 10px; align-items: stretch; margin-bottom: 8px; }
.tl2 .tm { width: 46px; flex: none; text-align: right; font-weight: 700; font-size: 14px; padding-top: 10px; font-variant-numeric: tabular-nums; }
.tl2 .tm small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.tl2 .ev { flex: 1; min-width: 0; border-radius: 14px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--green-2); box-shadow: var(--shadow); cursor: pointer; }
.tl2 .ev.new, .tl2 .ev.proposed { border-left-color: var(--orange); background: var(--warn-soft); }
.tl2 .ev.done { border-left-color: var(--muted); opacity: .75; }
.tl2 .ev.no_show { border-left-color: var(--danger); opacity: .75; }
.tl2 .ev.block { border-left-color: var(--muted); background: repeating-linear-gradient(135deg, var(--card) 0 8px, var(--bg) 8px 16px); }
.tl2 .ev.manual { border-left-color: #6f8fd6; }
.tl2 .ev.pickup { border-left-color: #b07ad6; }
.tl2 .ev .t1 { font-weight: 700; display: flex; gap: 6px; align-items: center; }
.tl2 .ev .t1 .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl2 .ev .t2 { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tl2 .gap { flex: 1; border: 1.5px dashed var(--line); border-radius: 14px; padding: 9px 12px; color: var(--ok); font-size: 14px;
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; background: transparent; }
.tl2 .gap b { font-weight: 600; } .tl2 .gap .plus { font-size: 20px; font-weight: 700; }
.slot-group { margin-top: 10px; } .slot-group .lbl { font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* применение шаблона времени к датам */
.mcal.applying { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242, 140, 56, .18); }
.mcal.applying .mcell:not(.past):not(.dis) { background: var(--warn-soft); }
.mcal .mcell.mark { background: var(--orange) !important; }
.mcal .mcell.mark .num { color: #fff !important; }
.apply-bar { position: sticky; top: 6px; z-index: 6; margin: 8px 0; padding: 10px 12px; border-radius: 14px; background: var(--orange);
  color: #fff; display: flex; gap: 10px; align-items: center; box-shadow: 0 4px 16px rgba(242, 140, 56, .35); }
.apply-bar .grow { font-size: 13.5px; line-height: 1.3; }
.apply-bar button { background: #fff; color: var(--orange-dark); min-height: 36px; padding: 6px 12px; }

/* сетка времени дня у мастера */
.cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.cellb { min-height: 46px; padding: 4px 2px; border-radius: 11px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums;
  background: transparent; color: var(--muted); border: 1.5px dashed var(--line); transition: background .12s, transform .1s; }
.cellb:active { transform: scale(.94); }
.cellb small { font-size: 10.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cellb.open { background: var(--green-soft); color: var(--green); border: 1.5px solid var(--green-2); }
.cellb.busy { background: var(--green); color: #fff; border: 1.5px solid var(--green); }
.cellb.busy.pending { background: var(--orange); border-color: var(--orange); }
.cellb.busy.blocked { background: var(--muted); border-color: var(--muted); }
.cellb.busy.closedbusy { box-shadow: inset 0 0 0 2px var(--danger); }
:root[data-theme="dark"] .cellb.busy { color: #102018; }
.cells-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.save-state { font-size: 12px; color: var(--muted); margin-left: auto; }
.cells-legend { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.cells-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* ================== Обновлённый стиль (ноябрь 2026): компактнее и современнее ================== */
:root {
  --bg: #f6f5f1; --card: #ffffff; --line: #e9e6de; --text: #1c2420; --muted: #6b746f;
  --radius: 16px; --shadow: 0 1px 2px rgba(28, 36, 32, .04), 0 6px 20px rgba(28, 36, 32, .05);
}
:root[data-theme="dark"] { --bg: #0f1512; --card: #18201c; --line: #26302b; }
body { font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
#app { padding: 10px 14px 96px; }
h1 { font-size: 21px; letter-spacing: -.02em; font-weight: 750; }
h2 { font-size: 17px; letter-spacing: -.01em; margin: 20px 0 8px; }
h3 { font-size: 15px; }
.small { font-size: 13.5px; } .tiny { font-size: 12px; }
.card { padding: 13px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.card + .card { margin-top: 8px; }
button, .btn { min-height: 42px; padding: 10px 14px; border-radius: 12px; font-size: 15px; letter-spacing: -.005em;
  transition: transform .08s, filter .15s, background .15s; }
button:active:not(:disabled), .btn:active { transform: scale(.97); }
.btn-small { min-height: 32px; padding: 6px 11px; font-size: 13.5px; border-radius: 10px; }
.btn-primary { background: linear-gradient(180deg, #f59a4c, var(--orange)); box-shadow: 0 4px 14px rgba(242, 140, 56, .28); }
.btn-green { box-shadow: 0 4px 14px rgba(47, 107, 79, .22); }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=time], input[type=tel], textarea, select {
  min-height: 42px; padding: 9px 11px; font-size: 15px; border-radius: 12px; }
label.field { margin-top: 12px; } label.field > span { font-size: 13px; }
.pill { font-size: 11.5px; padding: 3px 8px; }
.tabs button { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.seg button { min-height: 34px; font-size: 14px; }
.thumb { width: 56px; height: 56px; border-radius: 12px; }
.tile { min-height: 70px; padding: 11px; font-size: 14px; border-radius: 14px; border-width: 1.5px; }
.tile .ico { font-size: 22px; }
.toast { font-size: 14px; border-radius: 14px; }
.bottom-bar { padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
.logo { width: 44px; height: 44px; border-radius: 12px; }

/* шапка главной */
.hero { margin: -10px -14px 0; padding: 14px 14px 12px; background: linear-gradient(160deg, #2F6B4F 0%, #3f8562 100%);
  color: #fff; border-radius: 0 0 22px 22px; }
:root[data-theme="dark"] .hero { background: linear-gradient(160deg, #1d3b2c, #24493a); }
.hero .row { align-items: center; }
.hero h1 { color: #fff; margin: 0; font-size: 20px; }
.hero .sub { color: rgba(255,255,255,.8); font-size: 13px; }
.hero .logo { box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.hero form { margin: 12px 0 0 !important; }
.hero input[type=search] { border: 0; background: rgba(255,255,255,.96); color: #1c2420; }
.hero .btn-green { background: var(--orange); box-shadow: none; }
.hero .btn-small { background: rgba(255,255,255,.16); color: #fff; }

/* список категорий */
.catlist { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.catrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; width: 100%; background: transparent; border-radius: 0;
  min-height: 0; text-align: left; color: var(--text); font-weight: 400; border-bottom: 1px solid var(--line); }
.catrow:last-child { border-bottom: 0; }
.catrow:active { background: var(--green-soft); transform: none; }
.catrow .ci { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 21px; flex: none; }
.catrow .cn { flex: 1; min-width: 0; }
.catrow .cn b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catrow .cn span { font-size: 12.5px; color: var(--muted); }
.catrow .cnt { font-size: 13px; font-weight: 700; color: var(--green); background: var(--green-soft); border-radius: 99px;
  padding: 2px 9px; min-width: 28px; text-align: center; }
.catrow .cnt.zero { color: var(--muted); background: var(--bg); font-weight: 500; }
.catrow .chev { color: var(--muted); font-size: 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 0 8px; }
.section-head h2 { margin: 0; }
.ai-badge { font-size: 10.5px; font-weight: 700; color: #7a4fd6; background: #f0e9ff; border-radius: 99px; padding: 1px 6px; margin-left: 4px; }
:root[data-theme="dark"] .ai-badge { background: #2b2140; color: #c6a8ff; }
.pcard { border-radius: 14px; box-shadow: var(--shadow); }
.pcard .b { padding: 8px 9px 9px; }
.pcard .n { font-size: 14px; }
.grid2 { gap: 8px; }
.mcell { min-height: 46px; } .mcell .num { font-size: 14px; }
.cellb { min-height: 42px; font-size: 14px; }
.slots button { min-height: 38px; font-size: 14px; }
.linkish { color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
/* тарифы */
.plan-now .meter { height: 6px; border-radius: 3px; background: var(--line); margin: 10px 0 4px; overflow: hidden; }
.plan-now .meter span { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plan-card { text-align: left; padding: 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); display: block; height: auto; }
.plan-card.on { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.plan-card:disabled { opacity: .65; }
.plan-card .tag { background: var(--line); border-radius: 6px; padding: 1px 5px; }
.plan-price { font-size: 18px; font-weight: 700; margin: 6px 0 2px; }
.pay-sum { font-size: 26px; font-weight: 800; margin: 6px 0 8px; }
@media (max-width: 380px) { .plans { grid-template-columns: 1fr; } }
/* админка */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.tile { display: flex !important; flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); height: auto; display: block; }
.tile b { display: block; font-size: 22px; }
.tile.hot b { color: var(--warn); }
.badge-warn { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 8px; font-size: 12px; background: var(--warn-soft, rgba(255,181,71,.15)); color: var(--warn); }
/* профиль */
.profile-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.profile-head .avatar { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; flex: none;
  font-size: 24px; font-weight: 800; color: #06140d; background: linear-gradient(135deg, var(--green), var(--orange)); }
.ai-note { background: linear-gradient(135deg, rgba(74,222,128,.12), rgba(247,132,31,.10)); border-color: rgba(74,222,128,.25); }
/* вход на сайте */
.login { max-width: 440px; margin: 0 auto; padding-top: 18px; text-align: center; }
.login .card { text-align: left; margin-top: 12px; }
.login-logo { width: 84px; height: 84px; border-radius: 22px; }
.qr-box { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.qr-box img { width: 132px; height: 132px; border-radius: 10px; background: #fff; flex: none; }
/* установка */
.install-banner { display: flex; gap: 12px; align-items: center; }
.install-banner img { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.howto { padding-left: 20px; margin: 10px 0; } .howto li { margin: 8px 0; }
.ios-share { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; }
.install-page { max-width: 440px; margin: 0 auto; text-align: center; padding-top: 24px; }
.install-icon { width: 120px; height: 120px; border-radius: 28px; box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.install-page h1 { font-size: 24px; margin: 18px 0 8px; }
.install-page .card { text-align: left; }
.btn-huge { min-height: 64px; font-size: 20px; margin-top: 18px; border-radius: 18px; }
.btn-big { min-height: 56px; font-size: 17px; }
.big-hint { font-size: 16px; line-height: 1.5; margin: 14px 0; }
.pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(247,132,31,.25); } }
/* лента и рейтинг */
.feed-sort { margin-top: 2px; }
.chips { display: flex; gap: 6px; margin-top: 8px; }
.chips button.chip { min-height: 32px; padding: 0 14px; border-radius: 99px; font-size: 13.5px; font-weight: 500; background: transparent; border: 1px solid var(--line); color: var(--muted); box-shadow: none; }
.chips button.chip.on { background: var(--green); border-color: var(--green); color: #06140d; font-weight: 700; }
.stars-line { font-size: 12.5px; margin-top: 3px; } .st { color: #ffb84d; }
.kind-tag { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(4,14,9,.82); color: var(--green); }
.review { margin-top: 8px; }
.star-pick { display: flex; justify-content: center; gap: 6px; margin: 16px 0; }
.star-pick button { width: 52px; height: 52px; font-size: 32px; padding: 0; border: 0; background: transparent !important; color: rgba(255,255,255,.18); box-shadow: none !important; }
.star-pick button.on { color: #ffb84d; }
/* лента и каталог списком: компактные строки */
.flist { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.frow { display: flex; gap: 10px; align-items: center; padding: 5px 8px 5px 5px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line); cursor: pointer; min-height: 50px; }
.fthumb { width: 40px; height: 40px; flex: none; border-radius: 9px; overflow: hidden; display: flex; }
.fthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fbody { min-width: 0; }
.fname { font-size: 14.5px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmeta { display: flex; gap: 6px; align-items: baseline; font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; }
.fmeta b { color: var(--text); font-size: 13px; }
.fstock { color: var(--green); } .fstock.low { color: var(--warn); }
.ftag { color: var(--green); } .fstar { color: #ffb84d; }
.fshop { overflow: hidden; text-overflow: ellipsis; }
.frow-heart { flex: none; width: 30px !important; height: 30px !important; min-height: 30px !important; }
.frow-heart svg { width: 16px !important; height: 16px !important; }
/* значок категории вместо фото */
.caticon { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: inherit; }
.caticon svg { width: 62%; height: 62%; }
.pcard .noimg { display: flex; } .pcard .noimg .caticon { border-radius: 0; }
.thumb .caticon { border-radius: 10px; }
