/* Juniper & Crane booking site. Plain CSS, no build step.
   Palette: bone ground, deep juniper green owns whole regions, copper for actions. */

:root {
  --ink: #1b2622;
  --ink-2: #47564f;
  --ink-3: #6f7f78;
  --ink-on-green: #f2ede3;
  --ink-on-green-2: #b9c9bf;
  --ground: #f2ede3;
  --surface: #fbf8f2;
  --surface-2: #e8e2d4;
  --line: #d8d1c2;
  --line-strong: #bdb4a2;
  --juniper-900: #10291f;
  --juniper-800: #173f35;
  --juniper-700: #22564a;
  --juniper-600: #2f6d5d;
  --juniper-200: #c9d9cf;
  --juniper-100: #dde7e0;
  --juniper-50: #ecf1ec;
  --copper-700: #8e4318;
  --copper-600: #a9531f;
  --copper-500: #b8622c;
  --copper-100: #f3dfd1;
  --copper-50: #f9efe6;
  --good: #2e7d4f;
  --good-bg: #dff0e4;
  --warn: #a8701a;
  --warn-bg: #f6e9cf;
  --bad: #b23a3a;
  --bad-bg: #f5dcdc;
  --info: #22564a;
  --info-bg: #dde7e0;
  --serif: "Young Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-ctl: 6px;
  --r-panel: 14px;
  --shadow-1: 0 1px 2px rgba(27, 38, 34, 0.06), 0 4px 14px rgba(27, 38, 34, 0.06);
  --shadow-2: 0 2px 6px rgba(27, 38, 34, 0.08), 0 14px 34px rgba(27, 38, 34, 0.12);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 0;
}
::selection { background: var(--juniper-200); color: var(--juniper-900); }
:focus-visible { outline: 2px solid var(--copper-500); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, .opt, .slot, .date-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--copper-500); color: #fff; padding: 10px 14px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 8px; }
#page:focus { outline: none; }
a { color: var(--juniper-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- Icons ---------- */
.ic { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ic-sm { width: 16px; height: 16px; vertical-align: -3px; }
.ic-lg { width: 28px; height: 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform 140ms var(--ease), background 140ms, border-color 140ms, box-shadow 140ms;
}
.btn:hover { background: #fff; border-color: var(--ink-3); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--copper-500); border-color: var(--copper-600); color: #fff; }
.btn-primary:hover { background: var(--copper-600); border-color: var(--copper-700); color: #fff; }
.btn-green { background: var(--juniper-800); border-color: var(--juniper-900); color: var(--ink-on-green); }
.btn-green:hover { background: var(--juniper-700); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(27, 38, 34, 0.06); border-color: transparent; }
.btn-danger { color: var(--bad); border-color: #d9a9a9; background: #fff; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-lg { min-height: 50px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
.btn-on-green { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); color: var(--ink-on-green); }
.btn-on-green:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.4); color: #fff; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--ink-3); }
.field .error { font-size: 12px; color: var(--bad); }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 8px 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  transition: border-color 120ms, box-shadow 120ms;
}
textarea.input { min-height: 90px; resize: vertical; line-height: 1.45; }
.input::placeholder { color: #8a978f; }
.input:focus { outline: none; border-color: var(--juniper-700); box-shadow: 0 0 0 3px var(--juniper-100); }
.input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2347564f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Option pills (radio-like) */
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.opt span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-weight: 500;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.opt input:checked + span { background: var(--juniper-800); border-color: var(--juniper-900); color: var(--ink-on-green); }
.opt input:focus-visible + span { outline: 2px solid var(--copper-500); outline-offset: 2px; }
.opt:hover span { border-color: var(--ink-3); }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip-green { background: var(--juniper-100); color: var(--juniper-800); }
.chip-copper { background: var(--copper-100); color: var(--copper-700); }
.chip-good { background: var(--good-bg); color: var(--good); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-outline { background: transparent; border: 1px solid var(--line-strong); }

/* ---------- Panels & layout ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; }
.panel-tight { padding: 14px 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.panel-head h2, .panel-head h3 { font-size: 17px; font-weight: 700; }
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 24px; }
.divided > * + * { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-family: var(--serif); font-size: 15px; color: #fff; flex: 0 0 auto; letter-spacing: 0.02em; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: rgba(23, 63, 53, 0.04); }

/* Toasts */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--juniper-900); color: var(--ink-on-green); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-2); font-size: 14px; display: flex; gap: 10px; align-items: center; animation: toast-in 320ms var(--ease); pointer-events: auto; }
.toast.bad { background: #6e2222; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Dialog */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-panel); background: var(--surface); color: var(--ink); width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-2); }
dialog.modal::backdrop { background: rgba(16, 41, 31, 0.5); backdrop-filter: blur(2px); }
dialog.modal .modal-body { padding: 24px; max-height: 85vh; overflow-y: auto; overscroll-behavior: contain; }
dialog.modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
dialog.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-wide { width: min(760px, calc(100vw - 32px)) !important; }

/* Empty states */
.empty { padding: 30px 20px; text-align: center; color: var(--ink-2); border: 1px dashed var(--line-strong); border-radius: var(--r-panel); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* Demo tag */
.demo-tag { display: inline-flex; align-items: flex-start; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); }
.demo-tag::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; margin-top: 0.45em; border-radius: 50%; background: var(--warn); }

/* ================= ROLE PICKER ================= */
.door-page { min-height: 100dvh; background: var(--juniper-900); color: var(--ink-on-green); display: grid; grid-template-rows: auto 1fr auto; }
.door-top { display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(16px, 4vw, 48px); }
.brand { font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
@media (max-width: 480px) { .brand { font-size: 18px; gap: 8px; } .brand-mark { width: 26px; height: 26px; font-size: 13px; } }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--copper-500); display: inline-grid; place-items: center; color: #fff; font-family: var(--serif); font-size: 15px; }
.door-main { padding: 0 clamp(16px, 4vw, 48px) 40px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: center; max-width: 1280px; margin: 0 auto; width: 100%; }
.door-intro h1 { font-family: var(--serif); font-size: clamp(38px, 5.2vw, 64px); line-height: 1.02; letter-spacing: -0.02em; color: #fff; }
.door-intro p { margin-top: 18px; color: var(--ink-on-green-2); font-size: 17px; max-width: 42ch; }
.door-intro .demo-tag { margin-top: 26px; color: var(--ink-on-green-2); }
.doors { display: grid; gap: 14px; }
.door { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--r-panel); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: inherit; text-decoration: none; text-align: left; transition: background 180ms, border-color 180ms, transform 220ms var(--ease); }
.door:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }
.door:active { transform: translateY(0); }
.door-ic { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: var(--juniper-700); color: #fff; }
.door-ic .ic { width: 26px; height: 26px; }
.door h2 { font-size: 20px; color: #fff; font-weight: 700; }
.door p { color: var(--ink-on-green-2); margin-top: 4px; font-size: 14px; }
.door-go { color: var(--copper-100); }
.door-foot { padding: 18px clamp(16px, 4vw, 48px); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--ink-on-green-2); font-size: 13px; border-top: 1px solid rgba(255,255,255,0.1); }
.door-foot a, .door-foot button { color: inherit; }
@media (max-width: 860px) { .door-main { grid-template-columns: 1fr; padding-top: 10px; } .door-intro h1 { font-size: 40px; } }

/* ================= CUSTOMER SITE ================= */
.site { min-height: 100dvh; display: flex; flex-direction: column; }
.site-head { background: var(--juniper-800); color: var(--ink-on-green); position: sticky; top: 0; z-index: 30; }
.site-head-inner { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--ink-on-green-2); text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 500; transition: background 120ms, color 120ms; }
.site-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.site-nav a.active { color: #fff; background: rgba(255,255,255,0.12); }
.site-head .btn { min-height: 38px; }
.cart-btn { position: relative; }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--copper-500); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.site-main { flex: 1; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.wrap-narrow { max-width: 760px; }
.site-foot { background: var(--juniper-900); color: var(--ink-on-green-2); margin-top: 60px; }
.site-foot .wrap { padding-top: 40px; padding-bottom: 28px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.site-foot h3 { color: #fff; font-size: 14px; margin-bottom: 8px; }
.site-foot a { color: var(--ink-on-green-2); }
.site-foot .foot-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
@media (max-width: 720px) { .site-foot .wrap { grid-template-columns: 1fr; } }

/* Mobile nav */
.mobile-tabs { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--juniper-900); color: var(--ink-on-green-2); z-index: 30; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid rgba(255,255,255,0.1); }
.mobile-tabs a { flex: 1; display: grid; place-items: center; gap: 2px; padding: 8px 4px 10px; font-size: 11px; color: inherit; text-decoration: none; }
.mobile-tabs a.active { color: #fff; }
.mobile-tabs a.active .ic { color: var(--copper-100); }
@media (max-width: 760px) {
  .site-nav { display: none; }
  .mobile-tabs { display: flex; }
  .site-main { padding-bottom: 70px; }
  .site-foot { margin-bottom: 64px; }
}

/* Hero */
.hero { background: var(--juniper-800); color: var(--ink-on-green); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(36px, 6vw, 72px); }
.hero h1 { font-family: var(--serif); font-size: clamp(36px, 4.8vw, 58px); line-height: 1.04; letter-spacing: -0.02em; color: #fff; }
.hero .lede { margin-top: 18px; font-size: 17px; color: var(--ink-on-green-2); max-width: 44ch; }
.hero .actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.openings { background: var(--juniper-900); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--r-panel); padding: 20px; }
.openings h2 { font-size: 14px; font-weight: 600; color: var(--ink-on-green-2); }
.openings .day { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.1); }
.openings .day:first-of-type { border-top: 0; }
.openings .day-name { font-weight: 700; color: #fff; }
.openings .day-name small { display: block; font-weight: 400; color: var(--ink-on-green-2); font-size: 12px; }
.openings .slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; font-size: 13px; font-variant-numeric: tabular-nums; border: 1px solid transparent; transition: background 120ms, border-color 120ms; }
.slot-link:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); }
.slot-link .dot { width: 8px; height: 8px; border-radius: 50%; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

.section { padding-top: clamp(36px, 5vw, 64px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.01em; }
.section-head p { color: var(--ink-2); max-width: 52ch; }

/* Stylists */
.stylists { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stylist { padding: 20px; border-radius: var(--r-panel); color: #fff; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; position: relative; overflow: hidden; }
.stylist .avatar { position: absolute; top: 18px; left: 18px; background: rgba(255,255,255,0.18); }
.stylist h3 { font-family: var(--serif); font-size: 22px; }
.stylist p { color: rgba(255,255,255,0.8); font-size: 13px; }
.stylist .days { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 6px; }
@media (max-width: 900px) { .stylists { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .stylists { grid-template-columns: 1fr; } }

/* Services */
.service-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.service-group h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 8px; }
.service { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: center; }
.service:first-of-type { border-top: 0; }
.service .name { font-weight: 600; grid-column: 1; grid-row: 1; }
.service .desc { grid-column: 1; grid-row: 2; color: var(--ink-2); font-size: 13px; }
.service .meta { grid-column: 1; grid-row: 3; color: var(--ink-3); font-size: 13px; }
.service .price { grid-column: 2; grid-row: 1 / span 3; align-self: center; text-align: right; display: grid; gap: 6px; justify-items: end; }
.service .price strong { font-size: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .service-groups { grid-template-columns: 1fr; } }

/* Products */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product { border-radius: var(--r-panel); overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform 200ms var(--ease), box-shadow 200ms; }
.product:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.product-art { aspect-ratio: 5 / 4; display: flex; align-items: flex-end; padding: 16px; font-family: var(--serif); color: #fff; position: relative; }
.product-art .brand-line { font-size: 12px; font-family: var(--sans); font-weight: 600; opacity: 0.8; position: absolute; top: 14px; left: 16px; }
.product-art .art-name { font-size: 20px; line-height: 1.1; max-width: 80%; }
.product-art .vol { position: absolute; right: 14px; bottom: 14px; font-family: var(--sans); font-size: 12px; opacity: 0.85; }
.product-body { padding: 14px 16px 16px; display: grid; gap: 8px; flex: 1; }
.product-body .name { font-weight: 600; }
.product-body .blurb { color: var(--ink-2); font-size: 13px; }
.product-body .buy { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.product-body .price { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 960px) { .products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .products { gap: 10px; } .product-art { aspect-ratio: 1; padding: 12px; } .product-art .art-name { font-size: 16px; } .product-body { padding: 10px 12px 12px; } }

/* Booking flow */
.book { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; padding-top: 32px; align-items: start; }
.book-steps { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.book-step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px; font-size: 13px; color: var(--ink-3); background: transparent; border: 1px solid transparent; }
.book-step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.book-step.done .n { background: var(--juniper-800); color: #fff; }
.book-step.current { color: var(--ink); background: var(--surface); border-color: var(--line); }
.book-step.current .n { background: var(--copper-500); color: #fff; }
.book-summary { position: sticky; top: 82px; }
.book-summary h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.book-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.book-summary dt { color: var(--ink-3); }
.book-summary dd { margin: 0; font-weight: 500; }
.book-summary .total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; font-weight: 700; font-size: 17px; }
@media (max-width: 880px) { .book { grid-template-columns: 1fr; } .book-summary { position: static; order: -1; } }

.pick-list { display: grid; gap: 10px; }
.pick-list.plain { gap: 0; }
.pick-list.plain .pick { border-radius: 0; border-width: 1px 0 0; background: transparent; padding: 14px 4px; }
.pick-list.plain .pick:hover { background: var(--surface); }
.pick-list.plain .pick.selected { background: var(--juniper-50); box-shadow: none; border-top-color: var(--line); }
.pick { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: border-color 120ms, background 120ms, transform 160ms var(--ease); }
.pick:hover { border-color: var(--juniper-600); background: #fff; }
.pick.selected { border-color: var(--juniper-800); background: var(--juniper-50); box-shadow: inset 0 0 0 1px var(--juniper-800); }
.pick .t { font-weight: 600; grid-column: 1; grid-row: 1; }
.pick .s { color: var(--ink-2); font-size: 13px; grid-column: 1; grid-row: 2; }
.pick .r { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick-stylist { grid-template-columns: auto 1fr auto; }
.pick-stylist .avatar { grid-column: 1; grid-row: 1 / span 2; }
.pick-stylist .t { grid-column: 2; }
.pick-stylist .s { grid-column: 2; }
.pick-stylist .r { grid-column: 3; }

.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; margin-bottom: 16px; }
.date-btn { flex: 0 0 auto; width: 64px; padding: 10px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 2px; text-align: center; }
.date-btn small { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.date-btn strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.date-btn .avail { font-size: 10px; color: var(--good); }
.date-btn.closed { opacity: 0.45; }
.date-btn.selected { background: var(--juniper-800); border-color: var(--juniper-900); color: #fff; }
.date-btn.selected small, .date-btn.selected .avail { color: var(--ink-on-green-2); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot { min-height: 42px; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: #fff; font-variant-numeric: tabular-nums; font-weight: 600; display: grid; place-items: center; gap: 0; }
.slot small { font-weight: 400; font-size: 11px; color: var(--ink-3); }
.slot:hover { border-color: var(--juniper-700); }
.slot.selected { background: var(--juniper-800); border-color: var(--juniper-900); color: #fff; }
.slot.selected small { color: var(--ink-on-green-2); }
.slot-period { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); }

/* Card form */
.card-form { display: grid; gap: 12px; }
.card-brand { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-3); pointer-events: none; }
.card-num-wrap { position: relative; }
.test-cards { font-size: 12px; color: var(--ink-3); background: var(--surface-2); padding: 10px 12px; border-radius: 8px; line-height: 1.6; }
.test-cards code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink); background: #fff; padding: 1px 5px; border-radius: 4px; }
.paying { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--juniper-800); animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.confirm { text-align: center; padding: 40px 0 20px; }
.confirm .check { width: 64px; height: 64px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: grid; place-items: center; margin: 0 auto 18px; }
.confirm h1 { font-family: var(--serif); font-size: 32px; }
.receipt { text-align: left; margin: 24px auto 0; max-width: 460px; }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.receipt dt { color: var(--ink-3); }
.receipt dd { margin: 0; font-weight: 500; }
.policy { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 12px 14px; }

/* Appointments (customer) */
.appt-list { display: grid; gap: 12px; }
.appt { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); }
.appt .when { text-align: center; display: grid; gap: 0; }
.appt .when small { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); }
.appt .when strong { font-size: 24px; font-family: var(--serif); font-weight: 400; line-height: 1; }
.appt .what { display: grid; gap: 3px; }
.appt .what .t { font-weight: 600; }
.appt .what .s { color: var(--ink-2); font-size: 13px; }
.appt .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.appt.past { opacity: 0.85; }
@media (max-width: 640px) { .appt { grid-template-columns: 56px 1fr; } .appt .acts { grid-column: 1 / -1; justify-content: flex-start; } }

/* Thread */
.thread { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.4; position: relative; }
.msg.staff { background: var(--juniper-800); color: #fff; border-bottom-left-radius: 4px; justify-self: start; }
.msg.client { background: var(--surface-2); color: var(--ink); border-bottom-right-radius: 4px; justify-self: end; }
.msg.alert { background: var(--copper-100); color: var(--copper-700); border: 1px solid #e6c9b5; justify-self: start; border-bottom-left-radius: 4px; }
.msg time { display: block; font-size: 11px; opacity: 0.7; margin-top: 4px; }
.thread-compose { display: flex; gap: 8px; margin-top: 12px; }
.thread-compose .input { flex: 1; }
.templates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* Cart */
.cart-line { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.cart-line:first-child { border-top: 0; }
.cart-art { width: 56px; height: 56px; border-radius: 8px; }
.qty { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); overflow: hidden; }
.qty button { width: 32px; height: 34px; border: 0; background: #fff; }
.qty button:hover { background: var(--surface-2); }
.qty span { width: 34px; display: grid; place-items: center; font-variant-numeric: tabular-nums; font-weight: 600; background: #fff; }
.totals { display: grid; gap: 6px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-weight: 700; font-size: 17px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }

/* ================= TOOL SHELL (staff + manager) ================= */
.tool { display: grid; grid-template-columns: 236px 1fr; min-height: 100dvh; }
.tool > div { min-width: 0; }
.tool-side { background: var(--juniper-900); color: var(--ink-on-green); display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100dvh; }
.tool-side .brand { padding: 4px 8px 16px; font-size: 17px; white-space: nowrap; }
.tool-side .who { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 10px; }
.tool-side .who .name { font-weight: 600; color: #fff; font-size: 14px; }
.tool-side .who .role { font-size: 12px; color: var(--ink-on-green-2); }
.tool-nav { display: grid; gap: 2px; }
.tool-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-on-green-2); text-decoration: none; font-weight: 500; font-size: 14px; transition: background 120ms, color 120ms; }
.tool-nav a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.tool-nav a.active { background: rgba(255,255,255,0.13); color: #fff; }
.tool-nav a .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--copper-500); color: #fff; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; }
.tool-side .spacer { flex: 1; }
.tool-side .side-foot { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 12px; color: var(--ink-on-green-2); }
.tool-main { min-width: 0; padding: 22px clamp(16px, 3vw, 36px) 60px; }
.tool-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.tool-head h1 { font-family: var(--serif); font-size: 26px; font-weight: 400; letter-spacing: -0.01em; }
.tool-head .sub { color: var(--ink-3); font-size: 14px; margin-top: 2px; }
.tool-topbar { display: none; }
@media (max-width: 900px) {
  .tool { grid-template-columns: 1fr; }
  .tool-side { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform 240ms var(--ease); z-index: 50; }
  .tool-side.open { transform: none; box-shadow: var(--shadow-2); }
  .tool-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--juniper-900); color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 40; }
  .tool-main { padding-top: 16px; }
  .scrim { position: fixed; inset: 0; background: rgba(16,41,31,0.5); z-index: 45; }
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.stat { padding: 16px 16px 16px 0; border-right: 1px solid var(--line); margin-right: 16px; }
.stat:last-child { border-right: 0; }
.stat .l { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats.compact .v { font-size: 20px; }
.stat .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-top: 2px; line-height: 1.1; }
.stat .d { font-size: 12px; margin-top: 4px; color: var(--ink-3); }
.stat .d.up { color: var(--good); }
.stat .d.down { color: var(--bad); }

/* Day sheet */
.day-sheet { display: grid; gap: 10px; }
.visit { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: start; padding: 16px 18px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); }
.visit.status-checked_in { background: var(--juniper-50); border-color: var(--juniper-200); }
.visit.status-in_progress { background: var(--copper-50); border-color: #e6cdb9; }
.visit.status-completed { opacity: 0.8; }
.visit.status-no_show, .visit.status-cancelled { opacity: 0.65; }
.visit.now { border-color: var(--copper-500); }
.visit .time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; }
.visit .time small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
.visit .client { font-weight: 700; font-size: 16px; }
.visit .svc { color: var(--ink-2); font-size: 14px; }
.visit .comfort { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.visit .note { margin-top: 8px; font-size: 13px; color: var(--copper-700); background: var(--copper-50); border-radius: 6px; padding: 6px 10px; display: inline-block; }
.visit .acts { display: grid; gap: 6px; justify-items: end; }
@media (max-width: 700px) { .visit { grid-template-columns: 1fr; } .visit .acts { justify-items: start; grid-auto-flow: column; } }

/* Calendar week grid */
.cal { display: grid; grid-template-columns: 56px repeat(var(--cols, 6), minmax(120px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; background: var(--surface); }
.cal-wrap { overflow-x: auto; }
.cal .corner, .cal .dayhead { background: var(--surface-2); padding: 10px 8px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.cal .dayhead small { display: block; font-weight: 400; color: var(--ink-3); }
.cal .dayhead.today { color: var(--copper-700); }
.cal .hours { font-size: 11px; color: var(--ink-3); border-right: 1px solid var(--line); position: relative; }
.cal .hours div { height: var(--hour-h, 64px); padding: 4px 6px; border-top: 1px solid var(--line); box-sizing: border-box; font-variant-numeric: tabular-nums; }
.cal .col { position: relative; border-right: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour-h, 64px) - 1px), var(--line) calc(var(--hour-h, 64px) - 1px), var(--line) var(--hour-h, 64px)); }
.cal .col.closed { background-color: var(--surface-2); background-image: none; }
.cal .col.off { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(27,38,34,0.05) 8px 9px); }
.cal .ev { position: absolute; left: 4px; right: 4px; border-radius: 6px; padding: 3px 8px; font-size: 11.5px; line-height: 1.25; overflow: hidden; color: #fff; border: 0; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.cal .ev strong { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.cancelled, .cal .ev.no_show { background: repeating-linear-gradient(135deg, #b7b0a0 0 6px, #cfc8b8 6px 12px) !important; color: var(--ink-2); text-decoration: line-through; }
.cal .ev.completed { opacity: 0.7; }
.cal .open-slot { position: absolute; left: 4px; right: 4px; border: 1px dashed var(--juniper-600); border-radius: 6px; background: rgba(47,109,93,0.06); color: var(--juniper-700); font-size: 11px; display: grid; place-items: center; cursor: pointer; }
.cal .open-slot:hover { background: rgba(47,109,93,0.14); }
.cal .nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--copper-500); z-index: 1; }

/* Client list & record */
.client-list { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.client-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.client-row:hover { background: rgba(23,63,53,0.04); }
.client-row .n { font-weight: 600; }
.client-row .m { font-size: 13px; color: var(--ink-3); }
.client-row .tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.record { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.record-side { display: grid; gap: 16px; position: sticky; top: 20px; }
.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head h1 { font-size: 26px; font-weight: 700; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.pinned { background: var(--copper-50); border: 1px solid #ecd3c2; border-radius: 10px; padding: 14px 16px; }
.pinned h3 { font-size: 13px; color: var(--copper-700); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.pinned textarea { background: transparent; border: 0; width: 100%; resize: vertical; min-height: 60px; padding: 0; font: inherit; color: var(--ink); }
.pinned textarea:focus { outline: none; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.tl .d { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl .d strong { display: block; color: var(--ink); font-weight: 600; }
.tl .t { font-weight: 600; }
.tl .s { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.tl .formula { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2); padding: 4px 8px; border-radius: 4px; display: inline-block; margin-top: 6px; }
.tl .note { margin-top: 6px; font-size: 13px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); position: relative; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; padding: 4px 6px; background: rgba(16,41,31,0.7); color: #fff; }
.photo-add { aspect-ratio: 1; border-radius: 8px; border: 1px dashed var(--line-strong); display: grid; place-items: center; color: var(--ink-3); font-size: 12px; cursor: pointer; background: transparent; }
.photo-add:hover { border-color: var(--juniper-600); color: var(--juniper-700); }
@media (max-width: 960px) { .record { grid-template-columns: 1fr; } .record-side { position: static; } }

/* Inbox */
.inbox { display: grid; grid-template-columns: 300px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; background: var(--surface); min-height: 520px; }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 70vh; }
.inbox-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.inbox-item:hover { background: rgba(23,63,53,0.04); }
.inbox-item.active { background: var(--juniper-50); }
.inbox-item > div { min-width: 0; }
.inbox-item .n { font-weight: 600; font-size: 14px; }
.inbox-item .p { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-item .t { font-size: 11px; color: var(--ink-3); }
.inbox-pane { padding: 18px; display: flex; flex-direction: column; }
.inbox-pane .thread { flex: 1; max-height: none; }
@media (max-width: 800px) { .inbox { grid-template-columns: 1fr; } .inbox-list { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); } }

/* Charts */
.chart { width: 100%; max-width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--juniper-700); }
.chart .bar:hover { fill: var(--copper-500); }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart text { font-family: var(--sans); font-size: 11px; fill: var(--ink-3); }
.bars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 140px 1fr 70px; gap: 12px; align-items: center; font-size: 14px; }
.hbar .track { height: 10px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 4px; background: var(--juniper-700); }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.seg { display: flex; height: 14px; border-radius: 6px; overflow: hidden; gap: 2px; background: transparent; }
.seg div { height: 100%; }

/* P&L */
.pl { display: grid; gap: 0; }
.pl-row { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pl-row.head { font-weight: 700; border-bottom: 1px solid var(--line-strong); padding-top: 14px; }
.pl-row.total { font-weight: 700; border-bottom: 2px solid var(--ink); }
.pl-row.profit { font-size: 18px; font-weight: 700; border-bottom: 0; padding-top: 14px; }
.pl-row .num { font-variant-numeric: tabular-nums; }
.pl-row.indent { padding-left: 16px; color: var(--ink-2); }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-strong); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; background: transparent; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--juniper-800); border-bottom-color: var(--copper-500); }

/* Waitlist */
.wl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.wl .n { font-weight: 600; }
.wl .m { font-size: 13px; color: var(--ink-2); }

/* Print & motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
