:root {
  --teal: #0f7d7d;
  --teal-deep: #0a5c5c;
  --mint: #e7f5f3;
  --sun: #f2a63b;
  --ink: #16242b;
  --muted: #5d6f78;
  --line: #dde5e7;
  --paper: #ffffff;
  --ground: #f3f7f7;
  --ok: #2f7a4f;
  --alert: #b3401f;
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
main { padding: 28px 0 60px; }

/* ---------- demo chrome ---------- */

.demo-bar { background: #0d1b21; color: #fff; font-size: 13px; }
.demo-bar .wrap-wide { display: flex; align-items: center; gap: 18px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.demo-bar-id { display: flex; align-items: center; gap: 8px; }
.demo-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); }
.demo-bar-name { font-weight: 700; letter-spacing: 0.01em; }
.demo-bar-by { opacity: 0.6; }
.demo-tabs { display: flex; gap: 6px; margin-left: auto; }
.demo-tabs a {
  color: rgba(255,255,255,0.72); text-decoration: none; padding: 5px 12px;
  border-radius: 999px; font-weight: 600;
}
.demo-tabs a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.demo-tabs a.on { background: var(--teal); color: #fff; }
.demo-reset button { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: rgba(255,255,255,0.8); }
.demo-reset button:hover { background: rgba(255,255,255,0.1); color: #fff; }

.site-head { background: var(--teal); color: #fff; padding: 20px 0; }
.site-head .wrap-wide { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.site-head .brand { font-size: 21px; margin: 0; font-weight: 700; }
.site-head .brand a { color: #fff; text-decoration: none; }
.site-head .tagline { margin: 0; font-size: 13px; opacity: 0.85; }
.site-head .callbar { margin-left: auto; font-size: 13px; opacity: 0.9; }

.demo-note { background: #0d1b21; color: rgba(255,255,255,0.66); font-size: 12.5px; padding: 16px 0; }
.demo-note strong { color: #fff; }

/* ---------- cards & layout ---------- */

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px;
}
h1 { font-size: 25px; margin: 0 0 6px; font-weight: 700; }
h2 { font-size: 17px; margin: 0 0 10px; font-weight: 700; }
.lede { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }
.cols { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.cols > .main { flex: 1 1 520px; min-width: 0; }
.cols > .side { flex: 1 1 300px; min-width: 0; }

button, .btn {
  font: inherit; font-size: 14px; font-weight: 600; padding: 10px 20px;
  border-radius: 8px; border: 1px solid var(--teal); background: var(--teal);
  color: #fff; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--teal-deep); }
button[disabled] { opacity: 0.5; cursor: progress; }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 999px; }

/* ---------- chat ---------- */

.chat { display: flex; flex-direction: column; height: min(66vh, 560px); padding: 0; overflow: hidden; }
.chat-head {
  background: var(--teal); color: #fff; padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
  flex: 0 0 auto; position: relative; z-index: 1;
}
.chat-head .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--teal);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.chat-head .who { font-weight: 700; font-size: 14.5px; }
.chat-head .status { font-size: 12px; opacity: 0.85; display: block; font-weight: 400; }
.chat-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: #fbfdfd; }
.msg { flex: 0 0 auto; max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; white-space: pre-wrap; line-height: 1.5; }
.msg.bot { background: var(--mint); border: 1px solid #d3e9e5; border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.me { background: var(--teal); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.sys { align-self: center; background: #fff5e4; border: 1px solid #f2ddb5; color: #77531a; font-size: 12.5px; max-width: 94%; }
.msg .meta { display: block; margin-top: 7px; font-size: 11.5px; opacity: 0.7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--mint); border-radius: 14px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); opacity: 0.4; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* Openings as tappable chips — the concierge names a couple and the list does the rest. */
.slot-chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 92%; flex: 0 0 auto; }
.slot-chips.spent { opacity: 0.45; pointer-events: none; }
.slot-chip {
  background: #fff; color: var(--ink); border: 1px solid #bcdedb; border-radius: 12px;
  padding: 9px 13px; text-align: left; line-height: 1.3; font-weight: 600; font-size: 13.5px;
  display: flex; flex-direction: column; gap: 2px; cursor: pointer;
}
.slot-chip:hover { background: var(--mint); border-color: var(--teal); }
.slot-chip .who { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.slot-chip.urgent { border-color: #f0c9a8; background: #fffaf4; }
.slot-chip.urgent:hover { background: #fff2e2; border-color: var(--sun); }
.slot-chip.urgent .when::after { content: " · same-day"; color: var(--alert); font-weight: 700; font-size: 11px; }

/* The booking, as a card rather than six lines of plain text. */
.booked-card {
  align-self: flex-start; max-width: 92%; flex: 0 0 auto; background: #fff; border: 1px solid #bcdedb;
  border-left: 4px solid var(--teal); border-radius: 12px; overflow: hidden; font-size: 13.5px;
}
.booked-head {
  background: var(--mint); color: var(--teal-deep); font-weight: 700; font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 9px 14px;
}
.booked-row { display: flex; gap: 12px; padding: 7px 14px; border-bottom: 1px dashed var(--line); }
.booked-row .k { color: var(--muted); flex: 0 0 74px; font-size: 12.5px; }
.booked-row .v { font-weight: 600; min-width: 0; }
.booked-foot { padding: 9px 14px; color: var(--muted); font-size: 12.5px; }

.chat-form { flex: 0 0 auto; display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-form input {
  flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 15px; min-width: 0;
}
.chat-form input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.chat-form button { border-radius: 999px; }

.prompts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.prompts button {
  background: #fff; color: var(--teal); border: 1px solid #bcdedb;
  font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px;
}
.prompts button:hover { background: var(--mint); }

/* ---------- side panel ---------- */

.panel { font-size: 13.5px; }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; word-break: break-word; }
.kv .v.pending { font-weight: 400; color: #a8b4ba; }
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
  font-weight: 700; letter-spacing: 0.02em; background: var(--mint); color: var(--teal-deep);
}
.pill.live { background: #e4f3e9; color: var(--ok); }
.pill.fallback { background: #fdf0e6; color: var(--alert); }
.pill.booked { background: #e4f3e9; color: var(--ok); }

/* ---------- tables ---------- */

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { flex: 1 1 150px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 25px; font-weight: 700; color: var(--teal-deep); }
.stat .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
