/* Ben's Grass & Greenery Care: demo admin console. Builds on ../css/site.css
   (tokens, fonts, buttons, demo bar); everything here is the console itself. */

body.admin { background: #f2eee5; font-size: 15px; line-height: 1.5; }
body.admin.gate-open { overflow: hidden; }
:where(.admin) svg { width: 20px; height: 20px; flex: none; }   /* icons; charts size themselves */

:root {
  --card: #fffdf8;
  --edge: rgba(19, 18, 17, .11);
  --shadow: 0 1px 0 rgba(19, 18, 17, .04), 0 10px 26px -18px rgba(19, 18, 17, .35);
  --ok: #2f6b3f; --ok-bg: #e3efe1;
  --warn: #8a5a00; --warn-bg: #fdf0d8;
  --hh: 56px; /* one hour in the schedule */
}

/* ---- shell ------------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: calc(100svh - var(--bar-h)); }
.side {
  position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px 16px; background: var(--ink); color: #ddd6c8; overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 14px; text-decoration: none; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-brand span { display: flex; flex-direction: column; line-height: 1.05; }
.side-brand b { font-weight: 850; font-stretch: 112%; font-size: 21px; text-transform: uppercase; }
.side-brand small { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #ff8f86; margin-top: 3px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; font-weight: 560; font-size: 15px; color: #cfc7b8; transition: background-color .2s, color .2s;
}
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.is-on { background: rgba(239, 26, 18, .16); color: #fff; }
.side-nav a.is-on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--red); }
.count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--red-btn); color: #fff; font-size: 11.5px; font-weight: 700; text-align: center; }
.count:empty { display: none; }
.side-foot { margin-top: auto; display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.side-site { display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #cfc7b8; text-decoration: none; font-size: 14px; }
.side-site svg { width: 16px; height: 16px; }
.side-site:hover { color: #fff; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.05); }
.me span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.me b { color: #fff; font-size: 14px; }
.me small { font-size: 12px; color: #a39b8c; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red-btn); color: #fff; font-weight: 800; flex: none; }

.main { min-width: 0; padding: clamp(18px, 3vw, 34px) clamp(16px, 3vw, 38px) 60px; outline: none; }
.view { max-width: 1240px; margin: 0 auto; animation: view-in .35s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tabbar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding-bottom: 110px; }
  .tabbar {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--ink); box-shadow: 0 -10px 30px -20px rgba(0,0,0,.6);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border-radius: 10px; color: #b9b1a2; text-decoration: none; font-size: 11px; font-weight: 600; }
  .tabbar a.is-on { color: #fff; background: rgba(239,26,18,.18); }
  .tabbar .count { position: absolute; top: 2px; left: 50%; margin-left: 6px; font-size: 10px; padding: 0 5px; min-width: 18px; }
}

/* ---- page parts ------------------------------------------------------------ */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red-ink); margin-bottom: 6px; }
.page-head h1 { font: 500 clamp(30px, 3.4vw, 42px)/1.05 var(--serif); font-variation-settings: "opsz" 144; letter-spacing: -.02em; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn svg { width: 18px; height: 18px; }
.btn-xs { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-xs svg { width: 16px; height: 16px; }
.btn-quiet { border-color: var(--edge); background: var(--card); }
.btn-quiet:hover { border-color: var(--ink); background: var(--card); color: var(--ink); }

.card { background: var(--card); border: 1px solid var(--edge); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-weight: 750; font-size: 16px; }
.card-head p { color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 18px; margin-top: 18px; }
.grid-2.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .grid-2, .grid-2.even { grid-template-columns: 1fr; } }
.muted { color: var(--muted); }
.empty { padding: 30px 10px; text-align: center; color: var(--muted); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { position: relative; overflow: hidden; }
.kpi-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi-label svg { width: 17px; height: 17px; color: var(--red-btn); }
.kpi-value { margin-top: 8px; font: 600 clamp(30px, 3vw, 38px)/1 var(--serif); font-variation-settings: "opsz" 144; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-note { margin-top: 8px; font-size: 13px; color: var(--muted); }
.up { color: var(--ok); font-weight: 650; }
.kpi.alert { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.kpi.alert .kpi-label, .kpi.alert .kpi-note { color: #cfc7b8; }
.kpi.alert .kpi-label svg { color: #ff8f86; }

/* service colours */
.sv-mow { --c: #4f7a3a; --bg: #e7f0dc; }
.sv-leaf { --c: #c0120b; --bg: #fde4df; }
.sv-hedge { --c: #2f6b55; --bg: #ddefe7; }
.sv-beds { --c: #8a6235; --bg: #f3e6d2; }
.sv-seed { --c: #6b8a1f; --bg: #eef3d6; }
.sv-snow { --c: #4b6378; --bg: #e3eaf1; }
.svc { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; background: var(--bg); color: var(--c); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.svc svg { width: 15px; height: 15px; }
.svcs { display: flex; flex-wrap: wrap; gap: 6px; }

/* status chips */
.st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-new { background: var(--red-btn); color: #fff; }
.st-replied { background: #ece6da; color: var(--ink-2); }
.st-booked, .st-paid { background: var(--ok-bg); color: var(--ok); }
.st-due { background: var(--warn-bg); color: var(--warn); }
.st-overdue { background: #fde4df; color: var(--red-ink); }

/* ---- today ---------------------------------------------------------------- */
.weather { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 14px 18px; }
.weather-days { display: flex; gap: 8px; margin-left: auto; overflow-x: auto; }
.wd { display: grid; justify-items: center; gap: 2px; min-width: 54px; padding: 6px 4px; border-radius: 10px; font-size: 12px; color: var(--ink-2); }
.wd svg { width: 22px; height: 22px; }
.wd b { font-size: 13px; }
.wd.rain { background: #e3eaf1; color: #2f4a60; }
.weather-msg { display: flex; align-items: center; gap: 12px; }
.weather-msg > svg { width: 34px; height: 34px; color: #4b6378; }
.weather-msg b { display: block; }
@media (max-width: 760px) { .weather { flex-direction: column; align-items: stretch; } .weather-days { margin-left: 0; } }

.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: stop; }
.stop { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--edge); border-radius: 14px; background: #fff; transition: opacity .3s, background-color .3s; }
.stop-no { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; }
.stop.is-done { opacity: .55; background: transparent; }
.stop.is-done .stop-no { background: var(--ok); }
.stop.is-done .stop-name { text-decoration: line-through; }
.stop-time { font-size: 12.5px; font-weight: 700; color: var(--red-ink); letter-spacing: .02em; }
.stop-name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.stop-addr { font-size: 13.5px; color: var(--muted); }
.stop-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 8px; border-radius: 8px; background: #fff7e3; color: #6b4f12; font-size: 12.5px; }
.stop .svcs { margin-top: 7px; }
.stop-actions { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 560px) { .stop { grid-template-columns: 30px minmax(0, 1fr); } .stop-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } }
.btn-done.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }

.map { width: 100%; height: auto; aspect-ratio: 4 / 3.2; border-radius: 12px; background: #f3efe4; }
.map .road { stroke: #fff; stroke-width: 7; stroke-linecap: round; fill: none; }
.map .road-edge { stroke: rgba(19,18,17,.08); stroke-width: 9; stroke-linecap: round; fill: none; }
.map .water { fill: #d8e4ea; }
.map .park { fill: #dde8cf; }
.map .route { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-dasharray: 7 6; stroke-linecap: round; }
.map .route-done { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; }
.map .pin circle { fill: var(--red-btn); stroke: #fff; stroke-width: 2.5; }
.map .pin.is-done circle { fill: var(--ok); }
.map .pin text { fill: #fff; font: 800 11px var(--sans); text-anchor: middle; dominant-baseline: central; }
.map .shop rect { fill: var(--ink); }
.map .shop text { fill: var(--ink); font: 700 10px var(--sans); }
.map-legend { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--muted); }

.bars { width: 100%; height: auto; }
.bars text { font: 600 11px var(--sans); fill: var(--muted); }
.bars .val { fill: var(--ink); font-weight: 700; }
.donut-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
@media (max-width: 420px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } }
.donut { width: 150px; height: 150px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 9px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; background: var(--c); flex: none; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ---- requests ------------------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } .split.has-sel .req-list { display: none; } .split:not(.has-sel) .req-detail { display: none; } }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters button { border: 1px solid var(--edge); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 650; cursor: pointer; }
.filters button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.req-items { display: grid; gap: 8px; }
.req-item { display: grid; gap: 6px; width: 100%; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--edge); background: var(--card); cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.req-item:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.req-item.is-sel { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--red); }
.req-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.req-name { font-weight: 750; font-size: 15.5px; }
.req-when { font-size: 12.5px; color: var(--muted); }
.req-snip { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.req-detail .card + .card { margin-top: 14px; }
.who { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.who h2 { font: 500 28px/1.1 var(--serif); letter-spacing: -.01em; }
.contact { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.contact span { display: inline-flex; align-items: center; gap: 6px; }
.contact svg { width: 16px; height: 16px; color: var(--muted); }
.back-link { display: none; align-items: center; gap: 4px; margin-bottom: 10px; border: 0; background: none; padding: 0; font-weight: 650; cursor: pointer; }
@media (max-width: 1000px) { .back-link { display: inline-flex; } }
.answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .answers { grid-template-columns: 1fr; } }
.answer-box { padding: 12px 14px; border-radius: 12px; background: #f6f1e7; }
.answer-box dt { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.answer-box dd { margin: 0; font-weight: 600; }
.quote-note { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--red); background: #fff7f5; font: italic 400 16px/1.45 var(--serif); }
.estimate { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.estimate td { padding: 9px 0; border-bottom: 1px dashed var(--edge); }
.estimate td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.estimate tr.total td { border-bottom: 0; padding-top: 12px; font-weight: 800; font-size: 16px; }
.draft-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.draft-head h3 { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; font-size: 16px; }
.draft-head h3 svg { color: var(--red-btn); }
.tones { display: inline-flex; padding: 3px; border-radius: 999px; background: #f0eadf; }
.tones button { border: 0; background: none; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.tones button.is-on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.draft {
  width: 100%; min-height: 220px; resize: vertical; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--edge); background: #fff; font: 400 15px/1.6 var(--sans); color: var(--ink);
}
.draft:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.draft.is-writing { background: linear-gradient(90deg, #fff, #fff6f4, #fff) 0 0 / 200% 100%; animation: shimmer 1s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.draft-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.draft-foot .fine-ai { margin-right: auto; font-size: 12.5px; color: var(--muted); }

/* ---- schedule -------------------------------------------------------------- */
.sched-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.sched-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.sched { --cols: 6; display: grid; grid-template-columns: 54px repeat(var(--cols), minmax(0, 1fr)); background: var(--card); border: 1px solid var(--edge); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; user-select: none; }
.sched-corner { border-bottom: 1px solid var(--edge); }
.sched-day { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--edge); border-left: 1px solid var(--edge); }
.sched-day b { display: block; font-size: 13px; }
.sched-day small { font-size: 12px; color: var(--muted); }
.sched-day.is-today b { color: var(--red-ink); }
.sched-day button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--edge); background: none; cursor: pointer; color: #4b6378; }
.sched-day button svg { width: 17px; height: 17px; }
.sched-day button:hover { background: #e3eaf1; }
.sched-hours { position: relative; }
.sched-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-weight: 600; }
.sched-col {
  position: relative; height: calc(var(--hh) * 11); border-left: 1px solid var(--edge);
  background-image: linear-gradient(var(--edge) 1px, transparent 1px); background-size: 100% var(--hh);
}
.sched-col.is-today { background-color: rgba(239, 26, 18, .035); }
.sched-col.is-drop { background-color: rgba(19, 18, 17, .05); }
.job {
  position: absolute; left: 4px; right: 4px; z-index: 1; padding: 6px 8px; border-radius: 9px; overflow: hidden;
  background: var(--bg); border-left: 4px solid var(--c); color: var(--ink); font-size: 12.5px; line-height: 1.25;
  cursor: grab; touch-action: none; transition: box-shadow .2s, transform .2s;
}
.job:hover { box-shadow: 0 6px 16px -10px rgba(0,0,0,.45); }
.job b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job small { display: block; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job.is-done { opacity: .55; }
.job.is-drag { z-index: 5; cursor: grabbing; box-shadow: 0 14px 30px -12px rgba(0,0,0,.5); transform: scale(1.03); transition: none; }
.job:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.now-line { position: absolute; left: 0; right: 0; z-index: 3; height: 2px; background: var(--red); pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.day-tabs { display: none; }
@media (max-width: 900px) {
  .sched { --cols: 1; }
  .sched > .sched-day:not(.is-shown), .sched > .sched-col:not(.is-shown) { display: none; }
  .day-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; }
  .day-tabs button { flex: none; border: 1px solid var(--edge); background: var(--card); border-radius: 12px; padding: 8px 12px; font-weight: 650; font-size: 13px; cursor: pointer; }
  .day-tabs button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
  .sched-legend { margin-left: 0; }
}

/* ---- customers & invoices ------------------------------------------------------ */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search input { width: 100%; min-height: 44px; padding: 0 14px 0 40px; border-radius: 12px; border: 1px solid var(--edge); background: var(--card); font: inherit; }
.search input:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 12px 10px; border-bottom: 1px solid var(--edge); white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--edge); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background-color .15s; }
.table tbody tr:hover { background: #faf6ee; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .name { font-weight: 700; }
.table .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.table-card { padding: 8px 8px 4px; overflow-x: auto; }
@media (max-width: 760px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 8px; border-bottom: 1px solid var(--edge); }
  .table td { padding: 2px 4px; border: 0; }
  .table .num { text-align: left; }
  .table .hide-m { display: none; }
}
.plan-tag { font-size: 12.5px; font-weight: 650; padding: 3px 9px; border-radius: 8px; background: #f0eadf; white-space: nowrap; }
.plan-tag.four { background: var(--ink); color: #fff; }
.money { font-variant-numeric: tabular-nums; }
.inv-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
@media (max-width: 760px) { .inv-sum { grid-template-columns: 1fr; } }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---- drawer ---------------------------------------------------------------------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 80; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(19,18,17,.38); opacity: 0; transition: opacity .3s; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); overflow-y: auto; outline: none;
  background: var(--paper); box-shadow: -20px 0 50px -20px rgba(0,0,0,.4); padding: 22px 24px 40px;
  transform: translateX(104%); transition: transform .4s var(--ease);
}
.drawer-wrap.is-open .drawer-scrim { opacity: 1; }
.drawer-wrap.is-open .drawer { transform: none; }
.drawer-close { float: right; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--edge); background: var(--card); cursor: pointer; }
.drawer h2 { font: 500 30px/1.1 var(--serif); letter-spacing: -.01em; margin: 6px 0 4px; }
.drawer h3 { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.notes { display: grid; gap: 8px; }
.notes li { list-style: none; display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #fff7e3; color: #5a430f; font-size: 14px; }
.notes { padding: 0; margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--edge); display: grid; gap: 14px; }
.timeline li { position: relative; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); }
.timeline small { display: block; color: var(--muted); font-size: 12.5px; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; border: 1px solid var(--edge); background: #c1c7a2; }
.photo.after { background: repeating-linear-gradient(100deg, #cad9ae 0 18px, #b8cb93 18px 36px); }
.photo img { position: absolute; width: 22%; }
.photo span { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

/* ---- website editor ------------------------------------------------------------------ */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } }
.field-row { display: grid; gap: 6px; margin-bottom: 16px; }
.field-row > span { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field-row input[type="text"], .field-row input[type="number"], .field-row textarea, .field-row select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--edge); background: #fff; font: inherit; color: var(--ink);
}
.field-row textarea { min-height: 76px; resize: vertical; }
.field-row input:focus, .field-row textarea:focus, .field-row select:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--edge); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .knob { position: relative; width: 46px; height: 28px; border-radius: 999px; background: #d9d2c4; transition: background-color .25s; flex: none; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.switch input:checked + .knob { background: var(--red-btn); }
.switch input:checked + .knob::after { transform: translateX(18px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--ink); outline-offset: 2px; }
.switch b { display: block; font-size: 15px; }
.switch small { color: var(--muted); font-size: 13px; }
.hours-grid { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: center; }
.hours-grid input { min-height: 40px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--edge); background: #fff; font: inherit; width: 100%; }
.prices-grid { display: grid; grid-template-columns: 1fr 110px; gap: 8px 12px; align-items: center; }
.prices-grid label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.prices-grid .dollar { position: relative; }
.prices-grid .dollar::before { content: "$"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.prices-grid input { width: 100%; min-height: 40px; padding: 8px 10px 8px 22px; border-radius: 9px; border: 1px solid var(--edge); background: #fff; font: inherit; text-align: right; }
.publish-bar { position: sticky; bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: #e9e3d6; }
.publish-bar p { margin-right: auto; font-size: 14px; }
.publish-bar .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9fd29a; margin-right: 6px; }
.publish-bar.is-dirty .dot { background: #ffb35c; }
@media (max-width: 900px) { .publish-bar { bottom: 84px; } }

.phone { position: sticky; top: 18px; width: 100%; max-width: 340px; margin: 0 auto; padding: 12px; border-radius: 40px; background: var(--ink); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.phone-screen { height: 620px; overflow-y: auto; border-radius: 30px; background: var(--paper); font-size: 13px; scrollbar-width: none; }
.phone-screen::-webkit-scrollbar { display: none; }
.pv-banner { padding: 10px 14px; background: var(--red-btn); color: #fff; font-weight: 650; font-size: 12.5px; text-align: center; }
.pv-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--edge); }
.pv-head span { display: flex; align-items: center; gap: 6px; font-weight: 850; font-stretch: 112%; text-transform: uppercase; }
.pv-head img { width: 18px; height: 18px; }
.pv-head i { font-style: normal; font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 7px; background: var(--red-btn); color: #fff; }
.pv-hero { padding: 16px 14px 6px; }
.pv-hero img { width: 100%; height: auto; }
.pv-name { margin-top: 6px; text-align: center; font-weight: 860; font-stretch: 112%; text-transform: uppercase; font-size: 40px; line-height: .9; letter-spacing: -.02em; }
.pv-sub { text-align: center; font-size: 8.5px; font-weight: 650; letter-spacing: .28em; text-transform: uppercase; margin-top: 6px; }
.pv-status { margin: 12px 14px 0; padding: 8px 10px; border-radius: 9px; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 12px; text-align: center; }
.pv-status.closed { background: #fde4df; color: var(--red-ink); }
.pv-sec { padding: 14px; }
.pv-sec h4 { margin: 0 0 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--red-ink); }
.pv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pv-list li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--edge); }
.pv-list b { font-variant-numeric: tabular-nums; }
.flash { animation: flash 1s ease; }
@keyframes flash { 0% { background-color: #fff2b8; } 100% { background-color: transparent; } }

/* ---- settings ----------------------------------------------------------------------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--edge); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list small { display: block; color: var(--muted); font-size: 13px; }
.key-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #f0eadf; }
.more-grid { display: grid; gap: 10px; }
.more-grid a { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--edge); text-decoration: none; font-weight: 650; }
.more-grid a svg:last-child { margin-left: auto; color: var(--muted); }

/* ---- toasts, modal, sign-in gate --------------------------------------------------------- */
.toasts { position: fixed; z-index: 120; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(400px, calc(100vw - 36px)); pointer-events: none; }
@media (max-width: 900px) { .toasts { bottom: 90px; right: 50%; transform: translateX(50%); } }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; background: var(--ink); color: #f3efe6;
  box-shadow: 0 16px 40px -18px rgba(0,0,0,.7); font-size: 14px; pointer-events: auto; animation: toast-in .4s var(--ease);
}
.toast svg { color: #9fd29a; margin-top: 1px; }
.toast b { color: #fff; }
.toast small { display: block; margin-top: 4px; color: #b9b1a2; font-size: 12.5px; }
.toast.is-out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
.sms { margin-top: 8px; padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: #2a2825; color: #f3efe6; font-size: 13px; line-height: 1.4; }

.modal { width: min(560px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.modal::backdrop { background: rgba(19,18,17,.45); }
.modal[open] { animation: aisle-in .4s var(--ease); }
.modal-body { padding: 24px; }
.modal-body h2 { font: 500 28px/1.1 var(--serif); margin-bottom: 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 24px; }
.moves { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.moves li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--edge); font-size: 14px; }
.moves li span { margin-left: auto; font-weight: 700; color: var(--ok); white-space: nowrap; }

.gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: var(--ink); transition: opacity .5s ease, visibility 0s .5s; }
.gate::before { content: ""; position: absolute; inset: 0; opacity: .07; background-image: url(../img/leaf-e.svg), url(../img/leaf-a.svg); background-size: 70px 80px; background-position: 0 0, 35px 40px; }
.gate.is-gone { opacity: 0; visibility: hidden; }
.gate-card { position: relative; width: min(420px, 100%); padding: 34px 30px 26px; border-radius: 24px; background: var(--paper); text-align: center; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); }
.gate-card img { margin: 0 auto 12px; }
.gate-card h1 { font: 500 34px/1.1 var(--serif); }
.gate-card p { margin-top: 8px; color: var(--ink-2); }
.gate-go { width: 100%; margin-top: 22px; }
.gate-go.is-busy { pointer-events: none; }
.gate-go.is-busy svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gate-note { font-size: 13px; color: var(--muted) !important; }

@media (prefers-reduced-motion: reduce) {
  .view, .toast, .modal[open] { animation: none; }
  .drawer, .drawer-scrim, .gate { transition: none; }
}

/* ---- small utilities (the page's CSP forbids style="" attributes) ---------------- */
.mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; } .mt-16 { margin-top: 16px; } .mt-18 { margin-top: 18px; }
.on-dark { color: #fff; border-color: rgba(255,255,255,.4); }
.on-dark:hover { background: #fff; color: var(--ink); }
.avatar.alt { background: #4f7a3a; }
.pv-caption { margin-top: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.legend li i { background: var(--c); }
.linklike { display: block; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; font-size: 16px; line-height: 1.3; text-align: left; cursor: pointer; color: var(--ink); }
.linklike:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
html.no-js .gate { display: none; }
