/* Bookings & enquiries demo — flat, geometric, calm. Same rules as the rest of
   the studio's work: no shadows, no gradients, borders separate, colour means
   something (act = the thing to press, good = confirmed, warn = attention,
   stone = off). Each business paints its own tokens from biz-data.js. */

:root {
  --paper: #F5F1EA; --card: #FFFDF9; --ink: #26231F; --ink2: #6B655B;
  --line: #E7E0D3; --line-strong: #CFC6B4; --act: #2F5D50; --act-deep: #1E3F36;
  --wash: #DDEBE4; --good: #4F7A5E; --warn: #B8623A; --warn-wash: #F6E7DB; --stone: #8A8477;
  --r: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
       background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.45; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--act); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.k { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: var(--ink2); }
.muted { color: var(--ink2); }
.small { font-size: 13px; }

/* ---------- shell ---------- */
.shell { max-width: 560px; margin: 0 auto; padding: 0 16px 40px; }
.site-head { display: flex; align-items: center; gap: 12px; padding: 16px 0 14px; border-bottom: 2px solid var(--ink); }
.site-head .logo { width: 44px; height: 44px; flex: none; }
.site-head h1 { font-size: 19px; line-height: 1.15; }
.brand-sub { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; color: var(--ink2); margin-top: 2px; }
.site-head .spacer { flex: 1; }
.linkbtn { border: 2px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; font-weight: 650; font-size: 13px; color: var(--ink2); background: var(--card); text-decoration: none; white-space: nowrap; }

main { padding-top: 18px; }
h2 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.lede { color: var(--ink2); margin-top: 6px; }
.backlink { display: inline-block; margin-bottom: 12px; font-size: 14px; font-weight: 650; color: var(--ink2); text-decoration: none; }
.backlink:hover { color: var(--ink); }

/* steps */
.steps { display: flex; gap: 6px; margin: 14px 0 18px; }
.steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--act); }
.steps span.done { background: var(--act); opacity: 0.45; }

/* lists of choices */
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
       border: 2px solid var(--line); border-radius: var(--r); background: var(--card); padding: 13px 14px; }
.opt:hover { border-color: var(--line-strong); }
.opt.on { border-color: var(--act); background: var(--wash); }
.opt .t { flex: 1; min-width: 0; }
.opt .t b { display: block; font-size: 15.5px; }
.opt .t span { display: block; font-size: 13px; color: var(--ink2); margin-top: 1px; }
.opt .price { font-weight: 800; white-space: nowrap; }
.opt .price small { font-weight: 600; color: var(--ink2); font-size: 12px; }
.opt.urgent { border-color: var(--warn); }
.opt.urgent .t b { color: var(--warn); }
.divider { text-align: center; color: var(--ink2); font-size: 13px; margin: 18px 0 8px; }

/* days & times */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; margin-top: 12px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 64px; border: 2px solid var(--line); border-radius: var(--r); background: var(--card); padding: 9px 4px; text-align: center; }
.day b { display: block; font-size: 17px; }
.day span { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--ink2); }
.day small { display: block; font-size: 10.5px; color: var(--stone); margin-top: 2px; }
.day.on { border-color: var(--act); background: var(--wash); }
.day.closed { opacity: 0.45; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 14px; }
.time { border: 2px solid var(--line); border-radius: 999px; background: var(--card); padding: 9px 4px; font-weight: 700; font-size: 14px; text-align: center; }
.time.on { border-color: var(--act); background: var(--act); color: #fff; }
.time.gone { opacity: 0.35; text-decoration: line-through; }
.times.windows { grid-template-columns: 1fr 1fr; }
.times.windows .time { border-radius: var(--r); padding: 12px 6px; }
.empty { color: var(--ink2); padding: 20px 0; text-align: center; }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.field label { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: var(--ink2); margin-bottom: 4px; }
.field input, .field textarea, .field select { width: 100%; border: 2px solid var(--line-strong); border-radius: 10px; padding: 11px 12px; background: var(--card); font-size: 16px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--act); }
.field textarea { min-height: 96px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--act); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 2px solid var(--line-strong); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; font-weight: 650; color: var(--ink2); background: var(--card); }
.chip.on { border-color: var(--act); background: var(--wash); color: var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 13px 20px; font-weight: 800; font-size: 15px; width: 100%; }
.btn-primary { background: var(--act); color: #fff; border: 2px solid var(--act); }
.btn-primary:disabled { opacity: 0.45; cursor: default; }
.btn-ghost { background: var(--card); color: var(--ink); border: 2px solid var(--line-strong); }
.btn-warn { background: var(--warn); color: #fff; border: 2px solid var(--warn); }
.foot-bar { position: sticky; bottom: 0; padding: 12px 0 18px; background: var(--paper); margin-top: 18px; }

/* summary / confirmation */
.summary { border: 2px solid var(--line); border-radius: var(--r); background: var(--card); padding: 14px 16px; margin-top: 14px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; }
.summary .row:first-child { border-top: none; padding-top: 0; }
.summary .row span:first-child { color: var(--ink2); }
.summary .row b { text-align: right; }
.done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--good); display: flex; align-items: center; justify-content: center; margin: 8px 0 14px; }
.done-mark svg { width: 34px; height: 34px; }
.note-box { border: 2px solid var(--line); border-radius: var(--r); background: var(--card); padding: 12px 14px; font-size: 14px; color: var(--ink2); margin-top: 12px; }
.note-box b { color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper);
         padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; opacity: 0; transition: opacity .2s, transform .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.tiny { font-size: 12px; color: var(--stone); text-align: center; margin-top: 22px; }

/* ---------- the desk (owner's CRM) ---------- */
body.desk { background: var(--paper); }
.desk-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 2px solid var(--ink);
             position: sticky; top: 0; background: var(--paper); z-index: 20; }
.desk-head .brand { display: flex; align-items: center; gap: 12px; }
.desk-head .logo { width: 40px; height: 40px; }
.desk-head h1 { font-size: 17px; }
.desk-head .spacer { flex: 1; }
.seg { display: flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg button { padding: 9px 16px; font-weight: 700; font-size: 14px; color: var(--ink2); position: relative; }
.seg button.on { background: var(--ink); color: var(--paper); }
.seg button .n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 12px; text-align: center; }
.seg button.on .n { background: var(--paper); color: var(--ink); }
.seg button .n[hidden] { display: none; }
.board { padding: 18px 20px 60px; max-width: 1100px; margin: 0 auto; }
.board h2 { font-size: 16px; margin: 6px 0 12px; }
.board h2 .muted { font-weight: 500; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card { border: 2px solid var(--line); border-radius: var(--r); background: var(--card); padding: 14px 16px; }
.card.new { border-color: var(--warn); }
.card.urgent { border-color: var(--warn); background: var(--warn-wash); }
.card .top { display: flex; align-items: baseline; gap: 10px; }
.card .top b { font-size: 16px; }
.card .top .when { margin-left: auto; font-weight: 800; white-space: nowrap; }
.card .meta { color: var(--ink2); font-size: 13.5px; margin-top: 3px; }
.card .msg { margin-top: 8px; font-size: 14.5px; }
.card .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.card .acts button, .card .acts a { border: 2px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--ink2); background: var(--card); text-decoration: none; }
.card .acts button.primary { border-color: var(--act); background: var(--act); color: #fff; }
.card .acts button.good { border-color: var(--good); color: var(--good); }
.pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; }
.pill.booked { background: var(--wash); color: var(--act-deep); }
.pill.done { background: #E9EFE6; color: #3E5E3E; }
.pill.cancelled, .pill.noshow, .pill.closed { background: var(--line); color: var(--ink2); }
.pill.new { background: var(--warn); color: #fff; }
.pill.replied { background: #E9EFE6; color: #3E5E3E; }
.daynav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.daynav button { border: 2px solid var(--line-strong); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13px; background: var(--card); color: var(--ink2); }
.daynav button.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.lane { border: 2px solid var(--line); border-radius: var(--r); background: var(--card); padding: 12px 14px; }
.lane h3 { font-size: 14px; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.lane h3 span { color: var(--ink2); font-weight: 500; font-size: 12.5px; }
.slot { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.slot:first-of-type { border-top: none; }
.slot .t { width: 62px; flex: none; font-weight: 800; color: var(--ink2); font-variant-numeric: tabular-nums; }
.slot .w { flex: 1; min-width: 0; }
.slot .w b { display: block; }
.slot .w span { color: var(--ink2); font-size: 13px; }
.slot.gap .w { color: var(--stone); font-size: 13px; }
table.crm { width: 100%; border-collapse: collapse; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; }
table.crm th, table.crm td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.crm th { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--ink2); background: var(--paper); }
table.crm td.n { text-align: right; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input { border: 2px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; background: var(--card); font-size: 14px; min-width: 220px; }
.toolbar .right { margin-left: auto; }
.agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.agent { border: 2px solid var(--line); border-radius: var(--r); background: var(--card); padding: 14px 16px; }
.agent .top { display: flex; align-items: center; gap: 12px; }
.agent .top b { font-size: 15.5px; flex: 1; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; flex: none; border: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--good); }
.switch.on::after { left: 21px; }
.agent p { color: var(--ink2); font-size: 13.5px; margin-top: 6px; }
.agent .preview { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: 13.5px; }
.agent .preview .k { display: block; margin-bottom: 4px; }
/* the way in appears when the agent is on — a fade, not a snap */
.agent .agent-link { display: block; margin-top: 10px; font-weight: 800; font-size: 14px; color: var(--act); text-decoration: none;
                     opacity: 0; transform: translateY(4px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.agent .agent-link .muted { font-weight: 500; font-size: 12.5px; }
.agent.is-on .agent-link { opacity: 1; transform: none; pointer-events: auto; }
/* auto pilot on the desk: reveals with the agent, same look as the agents page */
.agent .auto { border: 2px solid var(--line-strong); border-radius: 10px; padding: 9px 11px; margin-top: 10px; background: var(--paper);
               opacity: 0; max-height: 0; overflow: hidden; transition: opacity .45s ease, max-height .45s ease; pointer-events: none; }
.agent.is-on .auto { opacity: 1; max-height: 220px; pointer-events: auto; }
.agent .auto.is-on { border-color: var(--good); }
.auto-row { display: flex; align-items: center; gap: 10px; }
.auto-k { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: var(--ink); }
.auto-state { flex: 1; font-size: 13px; color: var(--ink2); }
.auto.is-on .auto-state { color: var(--good); font-weight: 700; }
.auto-note { font-size: 12.5px; color: var(--ink2); margin-top: 6px; }
.switch.small { width: 38px; height: 22px; }
.switch.small::after { width: 16px; height: 16px; }
.switch.small.on::after { left: 19px; }
.desk-foot { padding: 20px; text-align: center; }
.resetbtn { border: 2px solid var(--stone); color: var(--stone); border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 13px; background: var(--card); }
@media (max-width: 640px) {
  .desk-head { padding: 12px 14px; }
  .board { padding: 14px 14px 60px; }
  .seg button { padding: 8px 11px; font-size: 13px; }
}
