/* VIVA CRM styles, ported from docs/reference/index.html (class names kept). Tokens: tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0; background: var(--sand); color: var(--espresso);
  font: 400 15px/1.5 var(--font-body);
  display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh;
}
body.auth { display: grid; grid-template-columns: 1fr; min-height: 100vh; place-items: center; background: var(--espresso); padding: 1rem; }
h1, h2, h3, .serif { font-family: var(--font-head); font-weight: 400; font-variation-settings: "SOFT" 60, "WONK" 0, "opsz" 72; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.9rem; margin-bottom: 1rem; }
h2 { font-size: 1.25rem; margin-bottom: .75rem; }
em { font-family: var(--font-head); color: var(--ochre); font-style: italic; }
[hidden] { display: none !important; }
a { color: var(--terracotta); }
button, select, input, textarea { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible,
.tab:focus-visible, .btn:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--espresso); color: var(--cream); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: 0; }

/* ---------- sidebar ---------- */
aside.side { background: var(--espresso); color: var(--cream); padding: 30px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { display: block; width: 170px; margin: 0 0 10px 6px; }
.logo img { display: block; width: 100%; height: auto; }
.tag { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--sage); opacity: .75; margin: 0 0 26px 12px; }
aside nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--r-sm); color: inherit; text-decoration: none; font-weight: 500; font-size: 14px; opacity: .85; margin-bottom: 2px; }
aside nav a:hover { background: rgba(184,204,185,.10); opacity: 1; }
aside nav a.active { background: var(--cream); color: var(--espresso); opacity: 1; }
aside nav a.active::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
aside nav a.active .badge { display: none; }
aside nav a.ext { color: var(--sun); opacity: 1; }
aside nav .sep { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--sage); opacity: .7; margin: 18px 12px 8px; }
.badge { background: var(--terracotta); color: var(--cream); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.badge:empty { display: none; }
.user { margin-top: auto; font-size: 13px; border-top: 1px solid rgba(184,204,185,.2); padding: 16px 12px 0; }
.user b { display: block; font-weight: 500; }
.user span { color: var(--sage); }
.user form { margin: 8px 0 0; }
.user .linklike { background: none; border: 0; padding: 0; color: var(--sun); cursor: pointer; font-size: 13px; text-decoration: underline; }

/* ---------- main ---------- */
main.page { padding: 30px 36px 60px; max-width: 1280px; width: 100%; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.eyebrow { display: block; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.page-head h1 { font-size: 34px; line-height: 1.1; margin: 0; }
.page-head p { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; width: 280px; max-width: 100%; }
.back { display: inline-block; font-size: 13px; font-weight: 500; color: var(--terracotta); text-decoration: none; margin-bottom: 10px; }
.back:hover { text-decoration: underline; }

/* buttons: .btn = primary pill (mockup) */
.btn { display: inline-block; background: var(--terracotta); color: var(--cream); border: 1px solid transparent; border-radius: 999px; padding: 9px 18px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { filter: brightness(.93); }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }
.btn.ghost { background: transparent; color: var(--espresso); border-color: var(--line); }
.btn.ghost:hover { background: var(--sand); filter: none; }
.btn.ghost.on { background: var(--espresso); color: var(--cream); border-color: var(--espresso); }
.btn.danger { background: #8E2F2F; color: #fff; }
.btn.danger-ghost { background: transparent; color: #8E2F2F; border-color: #D9B3B3; }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: progress; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.kpi small, .label, .meta small { display: block; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.kpi strong { display: block; font: 400 36px/1.15 var(--font-head); font-variation-settings: "SOFT" 60, "WONK" 0; margin: 6px 0 2px; }
.kpis.compact .kpi strong { font-size: 23px; margin: 8px 0 4px; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi.hl { background: var(--espresso); color: var(--cream); border-color: var(--espresso); }
.kpi.hl small, .kpi.hl span { color: var(--sage); }
.kpi .warn { color: var(--terracotta); }

.grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }
.card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; overflow-x: auto; transition: background .6s; margin: 0 0 16px; }
.stack > .card, .grid > .card { margin: 0; }
.card h2 { font-size: 21px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card h2 a.more, .more-l { font: 500 12.5px/1 var(--font-body); color: var(--terracotta); text-decoration: none; }
.more-l:hover, .card h2 a.more:hover { text-decoration: underline; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 6px 12px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.flash, .flash { background: #F7E7C7; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.right { text-align: right; }

/* ---------- tags and statuses ---------- */
.type { display: inline-block; background: var(--sand); border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; font: 700 10.5px/1.8 var(--font-body); letter-spacing: .12em; color: var(--espresso); vertical-align: middle; }
.cat { display: inline-block; border-radius: 999px; padding: 0 9px; font: 700 10.5px/1.85 var(--font-body); letter-spacing: .12em; vertical-align: middle; white-space: nowrap; }
.cat-experience { background: rgba(181,101,74,.15); color: #8E4A33; }
.cat-journey { background: rgba(110,122,78,.18); color: #4C5732; }
.cat-retreat { background: rgba(200,154,76,.24); color: #77551A; }
.bg-experience { background: var(--terracotta); color: var(--cream); }
.bg-journey { background: var(--olive); color: var(--cream); }
.bg-retreat { background: var(--ochre); color: var(--espresso); }
.code { font: 500 12px/1 var(--font-body); letter-spacing: .08em; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 4px 7px; white-space: nowrap; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.st.paid, .st.confirmed, .st.linked, .st.active, .st.scheduled, .st.issued, .st.published { color: #55603A; }
.st.pending, .st.review, .st.pending_email, .st.requested, .st.declined, .st.failed { color: #A04B33; }
.st.sent, .st.waitlist, .st.draft, .st.closed { color: #8A6318; }
.st.cancelled, .st.rejected, .st.spam, .st.void, .st.archived, .st.refunded, .st.completed, .st.inactive { color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 4px; vertical-align: 1px; }
.dot.confirmed { background: var(--olive); }
.dot.sent { background: #C8952F; }
.dot.ok { background: var(--olive); }
.dot.off { background: var(--muted); }
.inv { color: var(--clay); text-decoration: underline dotted; font-size: 12.5px; white-space: nowrap; }
.lnk { text-decoration: none; border-bottom: 1px solid var(--line); color: inherit; }
.lnk:hover { border-color: var(--terracotta); color: var(--terracotta); }
.src { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--olive); border: 1px solid currentColor; border-radius: 5px; padding: 0 4px; vertical-align: middle; }

/* ---------- people ---------- */
.av { width: 36px; height: 36px; border-radius: var(--seed); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex-shrink: 0; color: var(--cream); }
.av.c0 { background: var(--terracotta); } .av.c1 { background: var(--olive); }
.av.c2 { background: var(--ochre); color: var(--espresso); } .av.c3 { background: var(--clay); }
.who { display: flex; align-items: center; gap: 12px; }
.who b { font-weight: 500; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row b { display: block; font-size: 14px; font-weight: 500; }
.row span.sub { font-size: 12.5px; color: var(--muted); }
.row .grow { flex: 1; min-width: 0; }
.bk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 3px 0; }
.bk + .bk { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 3px; }

/* ---------- bookings ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 500; font-size: 13.5px; cursor: pointer; text-decoration: none; color: inherit; }
.tab span { margin-left: 7px; font-size: 12px; opacity: .6; }
.tab:hover { background: var(--cream); }
.tab.on { background: var(--espresso); color: var(--cream); border-color: var(--espresso); }
.bk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.bk-head h2 { margin: 0; font-size: 23px; display: block; }
.desc { color: var(--muted); font-size: 14px; max-width: 780px; margin: 0 0 14px; }
.meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; font-size: 14px; }
.block { margin-bottom: 14px; font-size: 14px; }
.block .label { margin-bottom: 5px; }
.people { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.note { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; font-size: 13.5px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }
.empty-card { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-card strong { display: block; font: 400 20px/1.3 var(--font-head); color: var(--espresso); margin-bottom: 4px; }

/* ---------- calendar (FullCalendar skin) ---------- */
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: var(--seed); margin-right: 6px; vertical-align: -1px; }
#calendar { min-height: 200px; }
.fc { --fc-border-color: var(--line); --fc-page-bg-color: var(--paper); --fc-neutral-bg-color: var(--sand);
      --fc-today-bg-color: rgba(226,169,67,.16); --fc-button-bg-color: var(--paper); --fc-button-border-color: var(--line);
      --fc-button-text-color: var(--espresso); --fc-button-hover-bg-color: var(--sand); --fc-button-hover-border-color: var(--line);
      --fc-button-active-bg-color: var(--espresso); --fc-button-active-border-color: var(--espresso);
      --fc-event-border-color: transparent; --fc-list-event-hover-bg-color: var(--sand); font-family: var(--font-body); }
.fc .fc-toolbar-title { font-family: var(--font-head); font-weight: 400; font-size: 24px; }
.fc .fc-button { border-radius: 999px; font-weight: 500; text-transform: none; }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { color: var(--cream); }
.fc .fc-button:focus-visible, .fc a:focus-visible, .fc-event:focus-visible { outline: 3px solid var(--ochre); outline-offset: 1px; box-shadow: none; }
.fc .fc-col-header-cell-cushion, .fc .fc-daygrid-day-number { color: var(--espresso); text-decoration: none; }
.fc-event { cursor: pointer; border-radius: 7px 5px 8px 4px; font-size: 11.5px; }
.cal-wrap { overflow-x: auto; }
.cal-wrap .fc { min-width: 640px; }

/* ---------- misc ---------- */
.claude { background: var(--espresso); color: var(--cream); border-color: var(--espresso); }
.claude .label { color: var(--sage); }
.claude h2 { color: var(--cream); }
.prompt { display: block; background: rgba(184,204,185,.10); border: 1px solid rgba(184,204,185,.25); border-radius: var(--r-sm); padding: 10px 12px; margin-top: 8px; font-size: 13.5px; color: var(--cream); }
.quote { background: var(--sun); border-radius: var(--r); padding: 22px; font: 400 22px/1.25 var(--font-head); font-variation-settings: "SOFT" 60; color: var(--espresso); }
.quote em { color: var(--espresso); }
.quote small { display: block; font: 500 11px/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; margin-top: 12px; opacity: .7; }
.token-once { border-color: var(--ochre); background: var(--sand); }
code { background: var(--sand); padding: .15rem .4rem; border-radius: var(--r-sm); word-break: break-all; }
pre { background: var(--sand); padding: 12px; border-radius: var(--r-sm); overflow-x: auto; }

/* ---------- forms ---------- */
label { display: block; font-weight: 500; margin: .5rem 0 .25rem; font-size: 14px; }
input, select, textarea { width: 100%; padding: .55rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); }
textarea { min-height: 5.5rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; }
select { cursor: pointer; }
.tools select, .tools input.search { width: auto; }
.tools select { background: var(--paper); border-radius: 999px; padding: 8px 14px; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.field-error { color: #8E2F2F; font-size: 12.5px; margin: .2rem 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.grid-form { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: .5rem 1rem; align-items: center; max-width: 42rem; }
.grid-form label { margin: 0; }
.grid-form button { grid-column: 2; justify-self: start; }
.grid-form .hint { grid-column: 1 / -1; margin: 0; }
form.inline { display: inline-flex; gap: .4rem; align-items: center; margin: .15rem .5rem .15rem 0; }
form.inline input, form.inline select { width: auto; min-width: 9rem; }
details.panel { border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 10px 14px; margin: 10px 0; background: var(--paper); }
details.panel > summary { cursor: pointer; font-weight: 500; color: var(--terracotta); }
.notice { padding: .7rem 1rem; border-radius: var(--r-sm); margin: 0 0 1rem; border: 1px solid var(--line); }
.notice.ok { background: #EEF1E6; border-color: var(--olive); }
.notice.err { background: #FBEAE4; border-color: var(--terracotta); }
.notice p, .notice ul { margin: 0; }
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* ---------- toast + dialog ---------- */
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--espresso); color: var(--cream); padding: 12px 16px; border-radius: var(--r-sm); font-size: 13.5px; box-shadow: 0 8px 24px rgba(44,32,29,.25); }
.toast::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--sun); margin-right: 9px; }
.toast.error { background: #6E2323; }
.toast.error::before { background: #F0B3A4; }
dialog.confirm { border: 1px solid var(--line); border-radius: var(--r); background: var(--cream); color: var(--espresso); padding: 24px; width: min(460px, calc(100vw - 32px)); }
dialog.confirm::backdrop { background: rgba(44,32,29,.55); }
dialog.confirm h2 { margin-bottom: .5rem; display: block; }
dialog.confirm p { margin: .25rem 0 .75rem; }

/* ---------- auth + legacy topbar (login, error pages) ---------- */
.auth-card { width: 100%; max-width: 24rem; background: var(--cream); border-radius: var(--r); padding: 2rem 1.5rem; }
.auth-logo { display: block; margin: 0 0 1.25rem; background: var(--espresso); padding: .75rem 1rem; border-radius: var(--r-sm); }
.auth-card .btn { margin-top: 1rem; }

@media (max-width: 1100px) { .grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  body { grid-template-columns: minmax(0, 1fr); }
  aside.side { position: static; height: auto; padding: 20px 16px; }
  .logo { width: 120px; }
  aside nav { display: flex; flex-wrap: wrap; gap: 4px; }
  aside nav .sep { width: 100%; margin: 10px 4px 2px; }
  .tag { margin-bottom: 12px; }
  .user { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 4px 0; }
  .user span { display: none; }
  .user form { margin: 0; }
  main.page { padding: 22px 16px 48px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { width: 100%; }
  .page-head h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  .grid-form, .form-grid { grid-template-columns: 1fr; }
  .grid-form button { grid-column: 1; }
  .kpi strong { font-size: 28px; }
  .tools { width: 100%; }
  .tools select { flex: 1; min-width: 0; }
  .toast-region { right: 16px; left: 16px; max-width: none; }
}

/* ---- fork A: dashboard / finder / invoices extras ---- */
.row .btn.sm { flex-shrink: 0; }
#finder-out .row .sub { display: block; }
.st.revoked { color: var(--muted); }

/* ---- fork C: bookings and date detail ---- */
.item .form-actions form { margin: 0; }
.item .form-actions { align-items: center; }
td form.inline { margin: 0 6px 6px 0; }
td details.panel { margin: 4px 0; min-width: 14rem; }
tr.muted td { opacity: .65; }
#client-results label.check { padding: 4px 0; }
.kpi strong.warn { color: var(--terracotta); }
fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { background: var(--sand); }

/* Registrations grouped by booking: participants against the minimum */
.go-booking { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.go-booking h2 { font-size: 1.35rem; }
.go-booking .go-min { margin-left: auto; font-size: 13px; }
.seed-num { flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--seed); background: var(--terracotta); color: var(--cream); font-family: var(--font-head); font-style: italic; font-size: 17px; }
/* one colour per category, the same as the category chips: EXP terracotta, JOU olive, RET ochre */
.seed-num.experience { background: var(--terracotta); }
.seed-num.journey { background: var(--olive); }
.seed-num.retreat { background: var(--ochre); color: var(--espresso); }
.go-head { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.go-head > * { min-width: 0; }
.go-when { display: flex; flex-direction: column; gap: 2px; }
.go-when .lnk { font-weight: 500; align-self: flex-start; }
.go-count b { font-family: var(--font-head); font-size: 1.6rem; font-weight: 400; }
.go-count span { color: var(--muted); font-size: 13px; }
.go-meter { position: relative; display: flex; height: 12px; background: var(--sand); border-radius: 8px 5px 9px 4px; overflow: visible; }
.go-meter .seg { height: 100%; }
.go-meter .seg:first-child { border-radius: 8px 0 0 4px; }
.go-meter .seg.paid { background: var(--olive); }
.go-meter .seg.unpaid { background: var(--ochre); }
.go-meter .seg.pending { background: repeating-linear-gradient(135deg, var(--terracotta) 0 4px, #D9A08C 4px 8px); }
.go-meter .min-mark { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--espresso); border-radius: 2px; }
.go-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 7px; font-size: 12.5px; }
.go-legend .k::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.go-legend .k.paid::before { background: var(--olive); }
.go-legend .k.unpaid::before { background: var(--ochre); }
.go-legend .k.pending::before { background: var(--terracotta); }
.go-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 900px) {
  .go-head { grid-template-columns: 1fr; }
  .go-actions { justify-content: flex-start; }
  .go-booking { flex-wrap: wrap; }
  .go-booking .go-min { margin-left: 0; }
}
.go-booking .btn { flex-shrink: 0; }
.go-dates { margin: 6px 0 10px; }
.go-dates .go-head { border-top: 1px solid var(--line); padding: 12px 0 8px; }
.pax-list { margin-top: 6px; }
.pax-list td { vertical-align: top; }
.pax-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.pax-actions select { min-width: 0; width: auto; }
.confirmed-mark { margin-top: 3px; font-size: 12.5px; font-weight: 500; color: #55603A; }

/* link for customers (booking card, date page) */
.public-link { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: .6rem 0; }
.public-link .label { margin: 0; }
.public-link code { background: var(--sand, #F4EEE4); border-radius: 10px 8px 12px 7px; padding: .2rem .55rem; font-size: .85em; overflow-wrap: anywhere; min-width: 0; }

/* Confirm not possible (not enough seats): greyed out, the reason shows on hover / focus */
.btn-blocked { display: inline-block; cursor: not-allowed; border-radius: 999px; }
.btn-blocked .btn[disabled] { pointer-events: none; opacity: .45; cursor: not-allowed; filter: grayscale(1); }
.btn-blocked:focus-visible { outline: 2px solid var(--terracotta, #B5654A); outline-offset: 2px; }
.btn-blocked { position: relative; }
.btn-blocked:hover::after, .btn-blocked:focus-visible::after {
  content: attr(data-tip); position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  width: max-content; max-width: 15rem; white-space: normal; z-index: 30;
  background: #2C201D; color: var(--cream, #FBF7F0); font-size: .8rem; line-height: 1.35; font-weight: 400;
  padding: .45rem .65rem; border-radius: 12px 9px 14px 8px; box-shadow: 0 6px 18px rgba(44, 32, 29, .18);
}

/* past dates on a booking card (collapsed by default) */
.past-dates { margin-top: .6rem; }
.past-dates > summary { cursor: pointer; color: var(--muted); font-size: .9em; padding: .3rem 0; }
.past-dates > summary:hover { color: var(--terracotta, #B5654A); }
.past-dates table { margin-top: .4rem; }

/* ---- folds: a little arrow opens / closes the details (cards = <details class="fold">,
   table rows = button[data-fold-toggle] + tr.fold-detail) ---- */
details.fold > summary { list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
.fold-arrow, details.fold > summary .fold-arrow {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 1.6rem; height: 1.6rem; border-radius: 50%; color: var(--terracotta, #B5654A);
  background: transparent; border: 0; padding: 0; cursor: pointer; transition: background .15s;
}
.fold-arrow::before {
  content: ""; width: .45rem; height: .45rem; margin-left: -.15rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .18s ease;
}
details.fold[open] > summary .fold-arrow::before, .fold-arrow[aria-expanded="true"]::before {
  transform: rotate(45deg); margin: -.2rem 0 0 0;
}
details.fold > summary:hover .fold-arrow, .fold-arrow:hover { background: var(--sand, #F4EEE4); }
details.fold > summary:focus-visible { outline: 2px solid var(--terracotta, #B5654A); outline-offset: 3px; border-radius: 12px; }
.fold-body { margin-top: .8rem; }
.fold-tools { display: inline-flex; gap: .4rem; }
tr.fold-detail > td { background: var(--cream, #FBF7F0); padding-top: .2rem; }
.fold-detail .detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .5rem 1.2rem; padding: .4rem 0 .6rem 2.2rem; }
.fold-detail .detail-grid small { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }

/* booking card, closed: one line with the basics */
.bk-sum { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; }
.bk-sum h2 { margin: 0; font-size: 1.15rem; }
.bk-basics { display: flex; flex-wrap: wrap; gap: .2rem .9rem; width: 100%; padding-left: 2.2rem; color: var(--muted); font-size: .9em; }
.bk-basics b { color: var(--espresso, #2C201D); font-weight: 500; }

/* registrations block, closed: the BOK and a red count of PAX left to confirm */
.go-sum { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.go-sum h2 { margin: 0; }
.pax-due { display: inline-flex; align-items: center; justify-content: center; min-width: 1.7rem; height: 1.7rem; padding: 0 .45rem;
  border-radius: 999px; background: #C8384A; color: #fff; font-weight: 600; font-size: .85rem; }
.pax-due.none { background: var(--sand, #F4EEE4); color: var(--muted); font-weight: 500; }

/* ---------- FAC page (/fac) ---------- */
body.fac { display: block; }
.fac-top { background: var(--espresso); color: var(--cream); display: flex; align-items: center; gap: 24px; padding: 14px 36px; flex-wrap: wrap; }
.fac-logo img { display: block; height: auto; }
.fac-top nav { display: flex; gap: 6px; flex: 1; }
.fac-top nav a { color: inherit; text-decoration: none; font-weight: 500; font-size: 14px; padding: 7px 12px; border-radius: var(--r-sm); opacity: .85; }
.fac-top nav a[aria-current="page"] { background: var(--cream); color: var(--espresso); opacity: 1; }
.fac-who { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.fac-who form { margin: 0; }
.fac-who .linklike { background: none; border: 0; padding: 0; color: var(--sun); cursor: pointer; font-size: 13px; text-decoration: underline; }
.fac-page { margin: 0 auto; }
.prewrap { white-space: pre-wrap; }
ul.plain { list-style: none; padding: 0; margin: .25rem 0 0; }
.mcal-nav { display: inline-flex; gap: 6px; }
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mcal-h { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 2px 6px; }
.mcal-d { min-height: 78px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 6px; background: var(--cream); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mcal-d.out { opacity: .45; }
.mcal-d.past { opacity: .6; }
.mcal-d.free { background: #E3EBDD; border-color: #B8CCB9; }
.mcal-d.today { outline: 2px solid var(--ochre); outline-offset: -2px; }
.mcal-n { font-size: 12px; font-weight: 600; }
.mcal-s { display: block; font-size: 11.5px; line-height: 1.25; padding: 2px 5px; border-radius: 6px; text-decoration: none; color: var(--espresso); background: #DCE6F2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcal-s.confirmed { background: #C9DDBE; }
.mcal-s.sent, .mcal-s.pending_email { background: #F6E3A8; }
.mcal-s.declined { background: #EBD3CB; text-decoration: line-through; }
.mcal-key { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.mcal-key .k::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.mcal-key .free::before { background: #E3EBDD; border: 1px solid #B8CCB9; }
.mcal-key .confirmed::before { background: #C9DDBE; }
.mcal-key .sent::before { background: #F6E3A8; }
.mcal-key .declined::before { background: #EBD3CB; }
@media (max-width: 640px) {
  .fac-top { padding: 12px 16px; gap: 12px; }
  .mcal { gap: 2px; }
  .mcal-d { min-height: 54px; padding: 2px 3px; }
  .mcal-s { font-size: 0; padding: 0; height: 6px; }
  .mcal-h { font-size: 9px; padding: 0; letter-spacing: 0; }
}

/* ---------- facilitator cover (suggest / confirm / reject) ---------- */
.cover { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; padding: 6px 0 2px; }
.cover-label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cover-who { display: inline-flex; gap: 6px; align-items: center; }
.cover-none { background: #E9B4AA; color: #7A2414; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; }
.cover-why { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.cover form.inline { margin: 0; }
dialog.pick { max-width: 34rem; width: calc(100% - 2rem); }
.pick-list { border: 0; padding: 0; margin: .75rem 0; display: grid; gap: 4px; max-height: 55vh; overflow-y: auto; }
.pick-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; flex-wrap: wrap; }
.pick-opt.off { opacity: .55; cursor: not-allowed; }
.pick-name { font-weight: 500; }
.pick-why { margin-left: auto; font-size: 12px; color: #A04B33; }
.pick-why.ok { color: #55603A; }
.avail-grid { font-size: 12px; border-collapse: collapse; }
.avail-grid th, .avail-grid td { padding: 3px 4px; text-align: center; border: 1px solid var(--line); min-width: 24px; }
.avail-grid thead th span { display: block; font-size: 9.5px; color: var(--muted); font-weight: 400; }
.avail-grid tbody th { text-align: left; white-space: nowrap; font-weight: 500; padding-right: 10px; }
.avail-grid th.we { background: var(--sand); }
.avail-grid .ok { background: #DCE8D2; color: #3F5A2C; }
.avail-grid .s { background: #CFE0F2; color: #2C4A6B; font-weight: 700; }
.avail-grid .gap { background: #F6D5CE; }
.avail-grid th.today { outline: 2px solid var(--ochre); outline-offset: -2px; }
.team-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.team-pick legend { margin-bottom: 6px; }
.team-pick label { margin: 0; font-size: 13px; }
.avail-grid .gap-mark { display: block; color: #7A2414; font-size: 11px; line-height: 1; }

/* ---- Planner: task board, cards, comments ---- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.board-col { background: var(--sand); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 12px; min-height: 180px; transition: background .15s, border-color .15s; }
.board-col.over { background: #F7E7C7; border-color: var(--ochre); }
.board-col h2 { font-size: 18px; margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.board-count { font: 500 12px/1 var(--font-body); background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; color: var(--muted); }
.board-list { display: grid; gap: 10px; min-height: 8px; }
.board-empty { display: none; text-align: center; }
.board-list:not(:has(.task-card)) + .board-empty { display: block; }
.board-col .hint { margin-top: 10px; }
.task-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; box-shadow: 0 1px 0 rgba(44,32,29,.04); }
.task-card[draggable="true"] { cursor: grab; }
.task-card.dragging { opacity: .45; }
.task-title { display: block; font-weight: 500; font-size: 14.5px; color: var(--espresso); text-decoration: none; overflow-wrap: anywhere; }
.task-title:hover { color: var(--terracotta); text-decoration: underline; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.task-start { background: var(--sand); border-radius: 6px; padding: 1px 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.task-due { white-space: nowrap; font-variant-numeric: tabular-nums; }
.board-col:not([data-status="done"]) .task-due.late, .page-head .task-due.late { background: #FBEAE4; color: #8E2F2F; border-radius: 6px; padding: 1px 7px; font-weight: 500; }
.board.one { grid-template-columns: minmax(0, 34rem); }
.fc-event.task-overdue { border-width: 2px; }
.legend i.task-overdue-key { background: transparent; border: 2px solid #8E2F2F; }
.planner-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; }
.planner-bar .tabs { margin: 0; }
.planner-filter label { margin: 0 0 3px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.planner-filter select, .planner-filter input { width: auto; min-width: 9rem; height: 38px; box-sizing: border-box; background: var(--paper); border-radius: 999px; padding: 7px 14px; }
.planner-filter > .btn, .planner-filter > .more-l { margin-bottom: 6px; }
.planner-note { margin: -6px 0 14px; }
.task-who { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; }
.task-who .av { width: 22px; height: 22px; font-size: 9.5px; }
.task-move { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 9px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; }
.task-move .btn.sm { padding: 2px 9px; font-size: 11.5px; }
.board-col[data-status="todo"] .task-move button[value="todo"],
.board-col[data-status="in_progress"] .task-move button[value="in_progress"],
.board-col[data-status="done"] .task-move button[value="done"] { display: none; }
.task-dot { display: inline-block; width: 10px; height: 10px; border-radius: var(--seed); margin-right: 8px; }
i.task-todo { background: var(--terracotta); }
i.task-in_progress { background: var(--ochre); }
i.task-done { background: var(--olive); }
.st.task-todo { color: #A04B33; }
.st.task-in_progress { color: #8A6318; }
.st.task-done { color: #55603A; }
.fc-event.task-done .fc-event-title { text-decoration: line-through; opacity: .85; }
.planner-filter { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment .av { width: 30px; height: 30px; font-size: 11px; flex-shrink: 0; }
.comment .grow { flex: 1; min-width: 0; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13.5px; }
.comment-head b { font-weight: 500; }
.comment-head form { margin: 0 0 0 auto; }
.comment-head .linklike { background: none; border: 0; padding: 0; color: #8E2F2F; cursor: pointer; font-size: 12px; text-decoration: underline; }
.comment p { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.comment-form { margin-top: 12px; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
