:root {
  /* Light pink theme (Ramona's choice). Text colours checked for readability (WCAG AA). */
  --bg: #fdf6f8; --card: #ffffff; --ink: #4e2d3c; --muted: #7c6170; --line: #f1dce3;
  --accent: #a94f72; --accent-ink: #ffffff; --accent-text: #9a4467; --accent-soft: #fbe6ed; --blush: #f7d9e0; --gold: #c8a26b;
  --ok: #2f7a4f; --ok-soft: #e3f2e8; --warn: #9a5b00; --warn-soft: #fdf1dc; --bad: #b3261e; --bad-soft: #fbe6e4; --paper: #fffdfd;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Great Vibes", "Snell Roundhand", cursive;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@font-face { font-family: "Great Vibes"; src: url(/fonts/great-vibes-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(/fonts/cormorant-garamond-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--accent-text); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5rem; color: var(--ink); }
h1 { letter-spacing: .01em; }
h1 { font-size: 2rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 .75rem; }
.wrap { max-width: 860px; margin: 0 auto; padding: 16px; }
.top { padding-top: max(12px, env(safe-area-inset-top)) !important; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fdeef3, #fbe6ed); position: sticky; top: 0; z-index: 5; }
.brand { font-family: var(--script); font-size: 2.1rem; font-weight: 400; line-height: 1.2; padding-top: 4px; color: var(--accent); text-decoration: none; }
.brand small { display: block; font-family: var(--serif); font-size: .72rem; letter-spacing: .3em; color: var(--ink); font-weight: 600; margin-top: 4px; }
.brand small::before { content: "✦ "; color: var(--gold); letter-spacing: 0; }
.brand-logo { display: block; height: 58px; width: auto; }
.logo-hero { display: block; width: min(320px, 80%); height: auto; margin: 4px auto 10px; }
nav.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
nav.tabs a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; }
nav.tabs a.on { background: #fff; color: var(--accent-text); box-shadow: 0 1px 2px rgba(169,79,114,.15); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(169,79,114,.05); padding: 18px; margin-bottom: 16px; }
.muted { color: var(--muted); } .small { font-size: .88rem; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 200px; }
.row.tight > * { flex: 0 0 auto; }
label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: 12px; }
label > input, label > select, label > textarea { margin-top: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=checkbox] { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 2px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; min-height: 44px; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.link { border: 0; background: none; padding: 4px 0; min-height: 0; color: var(--accent-text); font-weight: 500; text-decoration: underline; }
button.danger { color: var(--bad); }
button:disabled { opacity: .55; cursor: default; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.alert { padding: 10px 14px; border-radius: 10px; margin: 0 0 12px; }
.alert.error { background: var(--bad-soft); color: var(--bad); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; }
.badge.signed { background: var(--ok-soft); color: var(--ok); }
.badge.invited, .badge.sent { background: var(--warn-soft); color: var(--warn); }
.badge.cancelled { background: #eee; color: #666; }
.badge.returning { background: #e8eefb; color: #2a4f9a; }
.list { display: grid; gap: 10px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; }
.item:hover { border-color: var(--accent); }
.item strong { display: block; }
.item .meta { color: var(--muted); font-size: .9rem; }
.item .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.section-title { font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; font-weight: 600; }
.linkbox { background: var(--accent-soft); border-radius: 12px; padding: 14px; margin: 12px 0; }
.linkbox input { font-size: .85rem; background: #fff; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; max-width: 360px; }
.totals dt { color: var(--muted); } .totals dd { margin: 0; text-align: right; font-weight: 600; }
.session { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.session label { flex: 1 1 140px; margin-bottom: 8px; }
.svc-table { width: 100%; border-collapse: collapse; }
.svc-table th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: 4px; }
.svc-table td { padding: 4px; vertical-align: middle; }
.svc-table input[type=text], .svc-table input[type=number], .svc-table select { padding: 8px; }
.svc-table .cap { display: none; font-size: .75rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 640px) {
  .svc-table .cap { display: block; }
  .top { flex-wrap: wrap; padding: 10px 16px 6px; }
  .top .brand { white-space: nowrap; }
  nav.tabs { width: 100%; }
  .svc-table thead { display: none; }
  .svc-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .svc-table td:first-child { grid-column: 1 / -1; }
}
/* Contract "paper", like the Word document */
.paper { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 28px 26px; font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.55; box-shadow: 0 1px 3px rgba(169,79,114,.08); }
.paper .banner { text-align: center; font-weight: 700; letter-spacing: .04em; margin-bottom: 18px; font-size: 14px; }
.paper ol { padding-left: 1.4em; } .paper li { margin-bottom: 8px; }
.paper h3 { font-family: Georgia, serif; font-size: 15px; font-weight: 700; margin: 18px 0 6px; }
.paper .fees { margin: 0 0 8px 1.4em; }
.paper .fees p { margin: 0 0 3px; }
.paper .sig { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 4px 0; }
.paper .line { border-bottom: 1px solid #999; min-width: 160px; display: inline-block; padding: 0 4px; }
.paper .choices { margin: 8px 0 8px 1.4em; }
.paper .choices label { font-weight: 400; font-family: var(--sans); }
@media (max-width: 480px) { .paper { padding: 20px 16px; font-size: 14.5px; } h1 { font-size: 1.7rem; } }
.hero { text-align: center; padding: 20px 8px 8px; }
.hero .eyebrow { letter-spacing: .16em; font-size: .75rem; color: var(--muted); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 24px; }
.hidden { display: none !important; }
.events p { margin: 0 0 6px; font-size: .88rem; } .events small { color: var(--muted); }
/* In-page jumps stop below the sticky header */
#details, #preview { scroll-margin-top: 140px; }
.hero .contact { margin-top: 6px; }
/* Customer pages: centred logo header */
.top:has(.brand-logo) { justify-content: center; }
.top .brand-logo { height: 72px; }

/* ---- Booking stages (colour-coded everywhere, incl. calendar dots) ---- */
.badge.st-invited, .badge.st-sent { background: var(--warn-soft); color: var(--warn); }
.badge.st-submitted { background: var(--accent-soft); color: var(--accent-text); }
.badge.st-awaiting_deposit { background: #fff0d6; color: #8a4b00; }
.badge.st-confirmed, .badge.st-completed { background: var(--ok-soft); color: var(--ok); }
.badge.st-cancelled { background: #eee; color: #5f5f5f; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #bbb; }
.dot.st-confirmed { background: #2f9a5c; } .dot.st-awaiting_deposit { background: #e39a1b; }
.dot.st-sent { background: #c9a0b0; } .dot.st-submitted { background: var(--accent); }

/* ---- Proof of signing ---- */
.proof { border-color: #cfe8d8; }
.proof-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.proof-tick { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.proof-list { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 6px 14px; margin: 0 0 10px; font-size: .92rem; }
.proof-list dt { color: var(--muted); } .proof-list dd { margin: 0; overflow-wrap: anywhere; }
.hash { font-size: .75rem; word-break: break-all; background: #faf3f5; padding: 2px 4px; border-radius: 4px; }
@media (max-width: 520px) { .proof-list { grid-template-columns: 1fr; } .proof-list dd { margin-bottom: 6px; } }

/* ---- Deposit card ---- */
.deposit.due { border-color: #f3d9a8; background: #fffbf3; }
.deposit.ok { border-color: #cfe8d8; background: #f7fcf9; }

/* ---- Notifications card ---- */
.notify { background: linear-gradient(180deg, #fff, #fdf0f4); }

/* ---- Tables (Clients) — rows become cards on phones ---- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th { text-align: left; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fdf7f9; white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table a.strong { font-weight: 600; color: var(--ink); }
button.small-btn { min-height: 34px; padding: 5px 12px; font-size: .85rem; }
@media (max-width: 760px) {
  .table-wrap { background: none; border: 0; overflow: visible; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; margin-bottom: 10px; }
  .data-table td { border: 0; padding: 5px 0 5px 122px; position: relative; overflow-wrap: anywhere; min-height: 30px; line-height: 1.9; }
  .data-table td::before { content: attr(data-label); position: absolute; left: 0; top: 5px; width: 114px; color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.9; }
}

/* ---- Calendar ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav { min-height: 40px; width: 44px; padding: 0; font-size: 1.4rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow div { text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); padding: 4px 0; text-transform: uppercase; letter-spacing: .05em; }
.cal-cell { min-height: 54px; border-radius: 10px; border: 1px solid transparent; background: #fdf7f9; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 500; color: var(--ink); }
.cal-cell.empty { background: none; }
.cal-cell.has { background: #fff; border-color: var(--line); }
.cal-cell.today .cal-num { background: var(--accent); color: #fff; border-radius: 999px; min-width: 26px; padding: 0 6px; }
.cal-cell.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(169,79,114,.2); }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.appt { background: var(--card); border: 1px solid var(--line); border-left: 4px solid #ccc; border-radius: 12px; padding: 12px 14px; }
.appt.st-confirmed { border-left-color: #2f9a5c; } .appt.st-awaiting_deposit { border-left-color: #e39a1b; }
.appt.st-sent { border-left-color: #c9a0b0; } .appt.st-submitted { border-left-color: var(--accent); }
.appt-main { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.appt-main > span:nth-child(2) { flex: 1 1 auto; } .appt-main .meta { display: block; color: var(--muted); font-size: .88rem; }
.appt-time { font-weight: 700; color: var(--accent-text); min-width: 68px; }
.appt .actions { margin-top: 10px; } .appt .actions .btn, .appt .actions button { min-height: 38px; padding: 7px 14px; font-size: .9rem; }
@media (max-width: 420px) { .cal-cell { min-height: 46px; } nav.tabs a { padding: 8px 10px; } }
/* Pages with a table use more of a laptop screen */
.wrap:has(.data-table) { max-width: 1240px; }
.data-table td .badge + .small-btn, .data-table td .badge + button { margin-left: 4px; }
@media (min-width: 761px) { .data-table td:nth-child(1) { white-space: nowrap; } }
/* Requests filter chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .9rem; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-n { display: inline-block; margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: .78rem; }
.chip.on .chip-n { background: rgba(255,255,255,.25); color: #fff; }
.data-table a.btn.small-btn { min-height: 34px; padding: 5px 12px; font-size: .85rem; white-space: nowrap; }
.paper-logo { display: block; width: min(240px, 70%); height: auto; margin: 0 auto 14px; }
/* Client's deposit payment card */
.pay { border-color: #f3d9a8; background: #fffbf3; }
.pay.paid { border-color: #cfe8d8; background: #f7fcf9; }
.pay-btn { display: flex; width: 100%; font-size: 1.05rem; min-height: 52px; }
.pay-zelle { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.pay-zelle h3 { font-family: var(--serif); margin: 0 0 4px; }
.pay-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pay-row > span:first-child { flex: 1 1 auto; overflow-wrap: anywhere; }
.review { background: #fdf7f9; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.review h3 { font-family: var(--serif); margin: 0 0 6px; }
.review-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.review-line:last-child { border-bottom: 0; }
.review-line span { color: var(--muted); } .review-line strong { text-align: right; }
.review-line.warn strong { color: var(--warn); } .review-line.warn strong::before { content: "⚠ "; }
/* Contract wording editor (Settings) */
.token-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip.token { min-height: 32px; padding: 4px 10px; font-size: .8rem; font-family: ui-monospace, Menlo, monospace; font-weight: 500; }
.clause-edit { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 2px; margin-bottom: 10px; background: #fffdfd; }
.clause-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.clause-tools { display: flex; gap: 6px; }
.clause-tools .small-btn { min-width: 36px; }
.wording textarea { font-family: Georgia, "Times New Roman", serif; font-size: .95rem; line-height: 1.45; }
#wording, #contract-preview { scroll-margin-top: 140px; }
