:root {
  --bg: #fff8f4;
  --surface: #ffffff;
  --surface-2: #fdf0ec;
  --blush: #f6dcd8;
  --rose: #d9878a;
  --rose-deep: #b05f68;
  --sage: #b7cfb1;
  --sage-deep: #557f62;
  --lav: #e3dcf2;
  --peach: #f9e1cc;
  --ink: #45363f;
  --muted: #8a7882;
  --line: #f0e1dc;
  --shadow: 0 6px 24px rgba(150, 95, 100, 0.10);
  --shadow-sm: 0 2px 10px rgba(150, 95, 100, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --open: #4f8a63;
  --closed: #b9616a;
  --nav-h: 68px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Assistant", "Heebo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
}
h1, h2, h3, .brand-name { font-family: "Varela Round", "Assistant", sans-serif; font-weight: 400; margin: 0; }
a { color: var(--rose-deep); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 248, 244, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand img { width: 38px; height: 38px; }
.brand-name { font-size: 22px; letter-spacing: -0.3px; }
.brand-tag { font-size: 12px; color: var(--muted); margin-top: -4px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- hero & search ---------- */
.hero { padding: 22px 0 8px; }
.hero h1 { font-size: 28px; line-height: 1.2; }
.hero p { color: var(--muted); margin: 6px 0 16px; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--surface);
  border-radius: 999px; padding: 6px 6px 6px 8px; box-shadow: var(--shadow);
}
.search svg { width: 20px; height: 20px; color: var(--muted); margin-inline-start: 10px; flex: none; }
.search input { border: 0; outline: 0; flex: 1; min-width: 0; background: transparent; padding: 10px 4px; font-size: 16px; }
.near-btn {
  border: 0; border-radius: 999px; background: var(--rose); color: #fff; padding: 10px 16px;
  display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; font-weight: 600;
}
.near-btn svg { width: 16px; height: 16px; color: #fff; margin: 0; }
.near-btn.on { background: var(--sage-deep); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 7px 14px; font-size: 14px; cursor: pointer; transition: all .15s;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.soft.on { background: var(--blush); color: var(--rose-deep); border-color: var(--blush); font-weight: 600; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 10px; gap: 8px; }
.count { color: var(--muted); font-size: 14px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform .18s, box-shadow .18s; color: var(--ink); display: block;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cover { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--blush), var(--peach) 55%, var(--lav)); position: relative; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; opacity: .85; }
.cover .pill { position: absolute; top: 10px; inset-inline-start: 10px; }
.card-body { padding: 12px 14px 14px; }
.card-title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 17px; }
.card-sub { color: var(--muted); font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.92); color: var(--muted);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.open { color: var(--open); }
.pill.closed { color: var(--closed); }
.verified { color: var(--sage-deep); display: inline-flex; }
.verified svg { width: 17px; height: 17px; }
.stars { color: #e0a24f; letter-spacing: 1px; font-size: 14px; }
.price { color: var(--muted); letter-spacing: 1px; }
.price b { color: var(--ink); font-weight: 700; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 46px; }

/* ---------- map ---------- */
.map { height: calc(100vh - 230px); min-height: 360px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--surface-2); }
.map.small { height: 220px; min-height: 0; }
.leaflet-container { font-family: inherit; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--rose); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.pin.free { background: var(--sage-deep); }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #6f8fd6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(111,143,214,.25); }
.leaflet-popup-content-wrapper { border-radius: 16px; }
.pop { min-width: 180px; direction: rtl; text-align: right; }
.pop b { font-size: 15px; }

/* ---------- store page ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; margin: 14px 0 10px; color: var(--muted); cursor: pointer; background: none; border: 0; padding: 0; }
.gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img, .gallery .ph-big { flex: none; width: 88%; max-width: 560px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); scroll-snap-align: start; cursor: zoom-in; }
.gallery img:only-child { width: 100%; }
.ph-big { background: linear-gradient(135deg, var(--blush), var(--peach) 55%, var(--lav)); display: grid; place-items: center; font-size: 70px; width: 100% !important; }
.store-head { margin: 16px 0 6px; }
.store-head h1 { font-size: 28px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); margin-top: 6px; }
.tag { background: var(--surface-2); border-radius: 999px; padding: 4px 11px; font-size: 13px; color: var(--ink); }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.act {
  background: var(--surface); border-radius: 18px; padding: 12px 4px 10px; text-align: center; color: var(--ink);
  box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; cursor: pointer;
}
.act .ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.act .ic svg { width: 22px; height: 22px; }
.act.call .ic { background: var(--blush); color: var(--rose-deep); }
.act.wa .ic { background: #dff3e4; color: #2f8a4c; }
.act.waze .ic { background: #def0fa; color: #2c84b6; }
.act.gmap .ic { background: var(--lav); color: #6a5aa0; }
.act.disabled { opacity: .45; pointer-events: none; }
.section { background: var(--surface); border-radius: var(--radius); padding: 18px; margin: 14px 0; box-shadow: var(--shadow-sm); }
.section h2 { font-size: 19px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.notice { background: var(--peach); border-radius: var(--radius-sm); padding: 10px 14px; margin: 10px 0; font-size: 15px; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 5px 0; }
.hours td:last-child { text-align: left; color: var(--muted); direction: ltr; }
.hours tr.today td { font-weight: 700; color: var(--ink); }
.post { border-top: 1px solid var(--line); padding: 12px 0; }
.post:first-of-type { border-top: 0; padding-top: 0; }
.post img { border-radius: var(--radius-sm); margin-top: 8px; max-height: 340px; object-fit: cover; width: 100%; }
.post-kind { font-size: 12.5px; font-weight: 700; color: var(--rose-deep); }
.post-kind.need { color: #a2662a; }
.post-kind.event { color: #6a5aa0; }
.post-kind.new { color: var(--sage-deep); }
.when { color: var(--muted); font-size: 13px; }
.review { border-top: 1px solid var(--line); padding: 12px 0; }
.review:first-of-type { border-top: 0; }
.reply { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; margin-top: 8px; font-size: 14.5px; }
.rating-big { display: flex; align-items: center; gap: 10px; }
.rating-big .num { font-size: 34px; font-family: "Varela Round"; }

/* ---------- forms ---------- */
label.f { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
label.f > span { display: block; margin-bottom: 4px; }
.in, textarea.in, select.in {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 11px 13px;
  font-size: 16px; color: var(--ink); outline: none; transition: border .15s;
}
.in:focus { border-color: var(--rose); background: #fff; }
textarea.in { min-height: 90px; resize: vertical; }
.btn {
  border: 0; border-radius: 999px; padding: 12px 22px; background: var(--rose); color: #fff; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 15.5px;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:disabled { opacity: .6; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.sage { background: var(--sage-deep); }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.star-pick { display: flex; gap: 4px; direction: ltr; justify-content: flex-end; }
.star-pick button { border: 0; background: none; font-size: 30px; color: #e8d6cf; cursor: pointer; padding: 0 2px; }
.star-pick button.on { color: #e0a24f; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 10px 0; }
.check input { margin-top: 4px; accent-color: var(--rose); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; clip-path: inset(50%); }

/* ---------- bottom nav ---------- */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); padding: 4px 14px; border-radius: 14px; }
.nav a svg { width: 23px; height: 23px; }
.nav a.on { color: var(--rose-deep); font-weight: 700; }
.nav a.on svg { transform: translateY(-1px); }

/* ---------- toast & modal ---------- */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 20px); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; opacity: 0; transition: all .25s;
  z-index: 100; font-size: 15px; pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal { position: fixed; inset: 0; background: rgba(69, 54, 63, .35); z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--bg); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; border-radius: 26px 26px 0 0;
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); animation: up .22s ease-out;
}
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 26px; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lightbox { position: fixed; inset: 0; background: rgba(30, 22, 27, .92); z-index: 95; display: grid; place-items: center; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 14px; }

/* ---------- more / pages ---------- */
.menu { display: grid; gap: 10px; margin: 16px 0; }
.menu-item { display: flex; gap: 14px; align-items: center; background: var(--surface); padding: 15px 16px; border-radius: 18px; box-shadow: var(--shadow-sm); color: var(--ink); cursor: pointer; border: 0; width: 100%; text-align: inherit; }
.menu-item .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--rose-deep); flex: none; }
.menu-item .ic svg { width: 21px; height: 21px; }
.menu-item small { display: block; color: var(--muted); }
.prose h2 { font-size: 20px; margin: 18px 0 6px; }
.prose p, .prose li { color: #5d4c56; }

/* ---------- dashboards ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; background: var(--surface); padding: 9px 15px; border-radius: 999px; cursor: pointer; box-shadow: var(--shadow-sm); font-size: 14.5px; }
.tabs button.on { background: var(--ink); color: #fff; }
.tabs .n { background: var(--blush); color: var(--rose-deep); border-radius: 999px; padding: 0 7px; font-size: 12px; margin-inline-start: 4px; font-weight: 700; }
.tabs button.on .n { background: rgba(255,255,255,.2); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 10px 0; }
.kpi { background: var(--surface); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.kpi .v { font-family: "Varela Round"; font-size: 30px; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: 13.5px; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .tip { position: absolute; background: var(--ink); color: #fff; font-size: 13px; padding: 5px 10px; border-radius: 10px; pointer-events: none; transform: translate(-50%, -110%); white-space: nowrap; }
.lead { background: var(--surface); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.lead-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.lead h3 { font-size: 17px; font-family: "Assistant"; font-weight: 700; }
.lead .sub { color: var(--muted); font-size: 14px; }
.lead .phone { direction: ltr; display: inline-block; font-weight: 600; color: var(--ink); }
.lead .row { margin-top: 10px; }
.status { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.st-new { background: var(--lav); color: #5d4f8f; }
.st-called, .st-no_answer { background: var(--peach); color: #95602c; }
.st-interested { background: #dff0de; color: var(--sage-deep); }
.st-declined { background: #f1e3e3; color: #9a5a5a; }
.st-approved { background: var(--sage-deep); color: #fff; }
.st-hidden { background: #e9e3e6; color: var(--muted); }
.mini-btn { border: 0; background: var(--surface-2); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; cursor: pointer; color: var(--ink); display: inline-flex; gap: 5px; align-items: center; }
.mini-btn svg { width: 15px; height: 15px; }
.mini-btn.call { background: var(--blush); color: var(--rose-deep); }
.mini-btn.wa { background: #dff3e4; color: #2f8a4c; }
.mini-btn.ok { background: var(--sage-deep); color: #fff; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr 1fr; } .filters .in:first-child { grid-column: span 2; } }
.photos-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photos-edit .p { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
.photos-edit .p img { width: 100%; height: 100%; object-fit: cover; }
.photos-edit .p button { position: absolute; top: 4px; inset-inline-end: 4px; border: 0; border-radius: 50%; width: 26px; height: 26px; background: rgba(255,255,255,.9); cursor: pointer; }
.photos-edit .p .cv { inset-inline-end: auto; inset-inline-start: 4px; width: auto; border-radius: 999px; padding: 0 8px; font-size: 12px; }
.photos-edit .add { border: 2px dashed var(--blush); border-radius: 12px; aspect-ratio: 1; display: grid; place-items: center; color: var(--rose-deep); cursor: pointer; background: var(--surface); text-align: center; font-size: 13px; }
.toggle-big { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.toggle-big button { border: 2px solid var(--line); background: var(--surface); border-radius: 16px; padding: 12px 6px; cursor: pointer; font-weight: 600; }
.toggle-big button.on.o { border-color: var(--open); color: var(--open); background: #eef6ef; }
.toggle-big button.on.c { border-color: var(--closed); color: var(--closed); background: #fbefef; }
.toggle-big button.on.a { border-color: var(--ink); }
.hours-edit { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; align-items: center; }
.code-box { font-family: ui-monospace, monospace; font-size: 26px; letter-spacing: 4px; text-align: center; background: var(--surface); border-radius: 14px; padding: 14px; margin: 10px 0; direction: ltr; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; }

@media (min-width: 900px) {
  .store-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
  .hero h1 { font-size: 34px; }
}
.leaflet-tile-pane { filter: saturate(.6) sepia(.14) hue-rotate(-8deg) brightness(1.04); }

/* report objectionable content */
.report-link { background: none; border: 0; padding: 4px 0; margin-top: 4px; color: #8a7882; font: inherit; font-size: 12px; cursor: pointer; display: block; }
.report-link:hover { text-decoration: underline; }
