/* ============================================================
   Vertical AI Reception — "digital maître d'"
   Warm candlelit palette. The caller's screen is built around a
   single breathing candle-orb; everything else stays quiet.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Hanken+Grotesque:wght@400;500;600;700&family=Spline+Sans+Mono:wght@400;500&display=swap');

:root {
  --ink: #17130f;
  --ink-2: #221b14;
  --ink-3: #2c2318;
  --claret: #8a2733;
  --claret-soft: #b24a52;
  --candle: #e9a94d;
  --candle-soft: #f4cd86;
  --cream: #f3ebdd;
  --cream-dim: #b3a892;
  --cream-faint: #7c735f;

  --paper: #f4ecdd;
  --paper-2: #fbf6ec;
  --paper-line: rgba(34, 27, 20, 0.12);
  --paper-ink: #241c12;
  --paper-dim: #6d6350;

  --ok: #4f7a52;
  --warn: #b07b2e;

  --display: 'Fraunces', Georgia, serif;
  --body: 'Hanken Grotesque', system-ui, sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, monospace;

  --r: 14px;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.05ms !important; }
}

/* ---------------------------------------------------------- CALL PAGE */
.call-body {
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 50% -10%, #2a2016 0%, var(--ink) 55%) fixed;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.call-topbar {
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
}
.brand { font-family: var(--display); font-weight: 500; letter-spacing: 0.2px; font-size: 18px; }
.brand small { color: var(--cream-faint); font-family: var(--body); font-weight: 500; }
.pick { display: flex; gap: 6px; background: rgba(0,0,0,0.25); padding: 5px; border-radius: 999px; }
.pick button {
  border: 0; background: transparent; color: var(--cream-dim);
  padding: 8px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  transition: background 0.25s, color 0.25s;
}
.pick button[aria-pressed="true"] { background: var(--claret); color: var(--cream); }

.stage {
  flex: 1; width: 100%; max-width: 620px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 10px 24px 40px;
}
.venue-name { font-family: var(--display); font-size: clamp(30px, 6vw, 46px); font-weight: 500; margin: 0 0 6px; }
.venue-line { color: var(--cream-dim); font-size: 15px; margin: 0 0 34px; }

/* The signature: the candle orb */
.orb-wrap { position: relative; width: 260px; height: 260px; display: grid; place-items: center; margin-bottom: 8px; }
.orb {
  width: 150px; height: 150px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, var(--candle-soft) 0%, var(--candle) 34%, #b9701f 72%, #6b3d12 100%);
  box-shadow: 0 0 60px -6px rgba(233, 169, 77, 0.6), inset 0 -10px 24px rgba(0,0,0,0.35);
  animation: breathe 4.6s ease-in-out infinite;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.orb-halo {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(233,169,77,0.30) 0%, transparent 62%);
  opacity: 0.7; transition: opacity 0.4s, transform 0.4s;
}
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.8); opacity: 0; } }

/* States */
.stage[data-state="idle"] .orb { filter: saturate(0.8) brightness(0.85); }
.stage[data-state="connecting"] .orb { animation: breathe 1.4s ease-in-out infinite; }
.stage[data-state="speaking"] .orb {
  transform: scale(1.12);
  box-shadow: 0 0 90px 4px rgba(233,169,77,0.75), inset 0 -10px 24px rgba(0,0,0,0.3);
}
.stage[data-state="speaking"] .orb-halo { opacity: 1; transform: scale(1.15); }
.stage[data-state="listening"] .orb { filter: brightness(0.92) saturate(0.9); transform: scale(0.98); }
.stage[data-state="listening"] .orb-halo {
  background: radial-gradient(circle, rgba(178,74,82,0.28) 0%, transparent 60%);
  opacity: 0.9;
}
.stage[data-state="listening"]::after { content: none; }
.listen-ring {
  position: absolute; width: 150px; height: 150px; border-radius: 50%;
  border: 2px solid rgba(233,169,77,0.5); opacity: 0; pointer-events: none;
}
.stage[data-state="listening"] .listen-ring { animation: ripple 1.8s ease-out infinite; }

.status-line { min-height: 22px; margin: 22px 0 4px; color: var(--candle-soft); font-size: 14px; letter-spacing: 0.4px; font-weight: 600; }

.caption {
  min-height: 66px; max-width: 460px; margin: 8px auto 0;
  font-family: var(--display); font-size: 20px; line-height: 1.45; font-weight: 400;
  color: var(--cream); transition: opacity 0.3s;
}
.caption.you { color: var(--cream-dim); font-family: var(--body); font-size: 16px; font-style: italic; }

.call-controls { display: flex; gap: 14px; margin-top: 30px; }
.btn-call, .btn-end {
  border: 0; border-radius: 999px; padding: 15px 34px; font-size: 15px; font-weight: 700;
  letter-spacing: 0.3px; transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.btn-call { background: var(--candle); color: #3a2408; box-shadow: 0 10px 30px -10px rgba(233,169,77,0.8); }
.btn-call:hover { transform: translateY(-1px); }
.btn-end { background: transparent; color: var(--cream-dim); border: 1px solid rgba(255,255,255,0.16); }
.btn-end:hover { color: var(--cream); border-color: rgba(255,255,255,0.32); }

.mode-tag {
  margin-top: 26px; font-size: 12px; color: var(--cream-faint); letter-spacing: 0.5px;
  font-family: var(--mono);
}
.mode-tag b { color: var(--candle-soft); font-weight: 500; }
.footlink { margin: 8px 0 26px; font-size: 12.5px; }
.footlink a { color: var(--cream-faint); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.14); padding-bottom: 1px; }
.footlink a:hover { color: var(--cream-dim); }

/* ---------------------------------------------------------- DASHBOARD */
.dash-body { background: var(--paper); color: var(--paper-ink); min-height: 100vh; }
.dash-shell { max-width: 1080px; margin: 0 auto; padding: 0 24px 80px; }

.dash-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 30px 0 20px; border-bottom: 1px solid var(--paper-line); gap: 16px; flex-wrap: wrap;
}
.dash-head h1 { font-family: var(--display); font-weight: 500; font-size: 30px; margin: 0; letter-spacing: 0.2px; }
.dash-head .sub { color: var(--paper-dim); font-size: 14px; margin-top: 3px; }
.dash-head .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.venue-switch { display: flex; gap: 6px; background: #ece2d0; padding: 5px; border-radius: 999px; }
.venue-switch button {
  border: 0; background: transparent; color: var(--paper-dim); padding: 8px 14px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
}
.venue-switch button[aria-pressed="true"] { background: var(--claret); color: var(--paper-2); }

.pill-link {
  text-decoration: none; background: var(--paper-ink); color: var(--paper-2);
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
}
.pill-link.ghost { background: transparent; color: var(--paper-ink); border: 1px solid var(--paper-line); }

/* KPI row */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0 8px; }
.kpi { background: var(--paper-2); border: 1px solid var(--paper-line); border-radius: var(--r); padding: 16px 18px; }
.kpi .n { font-family: var(--display); font-size: 30px; font-weight: 500; line-height: 1; }
.kpi .l { color: var(--paper-dim); font-size: 12.5px; margin-top: 8px; letter-spacing: 0.3px; }
.kpi .n small { font-size: 15px; color: var(--paper-dim); }

.grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin-top: 22px; }
.card { background: var(--paper-2); border: 1px solid var(--paper-line); border-radius: var(--r); overflow: hidden; }
.card > h2 {
  font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--paper-dim); margin: 0; padding: 16px 18px 12px;
}
.card .body { padding: 0 18px 8px; }

.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--paper-line); }
.row:first-child { border-top: 0; }
.row .when { font-family: var(--mono); font-size: 13px; color: var(--claret); min-width: 108px; }
.row .who { font-weight: 600; font-size: 14.5px; }
.row .meta { color: var(--paper-dim); font-size: 12.5px; margin-top: 1px; }
.row .party { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--paper-ink); white-space: nowrap; }
.row .x { border: 0; background: transparent; color: var(--paper-dim); font-size: 16px; padding: 2px 6px; border-radius: 6px; }
.row .x:hover { color: var(--claret); background: #f0e5d3; }

.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.4px; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }
.tag.booking { background: #e3efe1; color: var(--ok); }
.tag.enquiry { background: #efe7d6; color: var(--warn); }
.tag.callback { background: #f6e2df; color: var(--claret); }
.tag.missed { background: #eadfce; color: var(--paper-dim); }
.tag.preview { background: #eadfce; color: var(--paper-dim); }
.tag.sent { background: #e3efe1; color: var(--ok); }
.tag.pending { background: #f5e6cf; color: var(--warn); }
.tag.paid { background: #e3efe1; color: var(--ok); }
.tag.expired, .tag.failed { background: #f6e2df; color: var(--claret); }

.callitem { padding: 13px 0; border-top: 1px solid var(--paper-line); cursor: pointer; border-radius: 8px; }
.callitem:first-child { border-top: 0; }
.callitem:hover, .callitem:focus-visible { background: #ece2d0; margin: 0 -10px; padding: 13px 10px; outline: none; }
.callitem:first-child:hover, .callitem:first-child:focus-visible { border-top: 0; }
.callitem .top { display: flex; align-items: center; gap: 10px; }
.callitem .dur { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--paper-dim); }
.callitem p { margin: 6px 0 0; font-size: 13.5px; color: #4a4132; line-height: 1.5; }

.empty { color: var(--paper-dim); font-size: 14px; padding: 22px 0 28px; text-align: center; }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 100px; padding: 20px 0 22px; }
.spark .bar { flex: 1; background: linear-gradient(var(--candle), var(--claret)); border-radius: 5px 5px 0 0; min-height: 4px; position: relative; }
.spark .bar span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--paper-dim); }
.spark .bar em { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--paper-dim); font-style: normal; }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(23,19,15,0.5); display: none; place-items: center; padding: 20px; z-index: 40; }
.modal-back.open { display: grid; }
.modal { background: var(--paper-2); border-radius: 16px; padding: 22px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.modal h3 { font-family: var(--display); font-weight: 500; margin: 0 0 14px; font-size: 20px; }
.modal label { display: block; font-size: 12px; font-weight: 600; color: var(--paper-dim); margin: 10px 0 4px; letter-spacing: 0.3px; }
.modal input { width: 100%; padding: 10px 12px; border: 1px solid var(--paper-line); border-radius: 9px; font-family: inherit; font-size: 14px; background: #fff; }
.modal .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal .foot button { border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 600; border: 0; }
.modal .foot .save { background: var(--claret); color: var(--paper-2); }
.modal .foot .cancel { background: transparent; color: var(--paper-dim); }
.modal .note { font-size: 12.5px; color: var(--paper-dim); margin-top: 10px; min-height: 18px; }

.transcript-modal { max-width: 520px; }
.transcript-modal .top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.transcript-modal .top .dur { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--paper-dim); }
.transcript-modal h3 { font-size: 16px; font-weight: 400; color: #4a4132; }
.transcript { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px 2px 4px; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; position: relative; }
.bubble .who { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; opacity: 0.55; margin-bottom: 3px; }
.bubble.assistant { align-self: flex-start; background: #ece2d0; color: var(--paper-ink); border-bottom-left-radius: 3px; }
.bubble.user { align-self: flex-end; background: var(--claret); color: var(--paper-2); border-bottom-right-radius: 3px; }
.bubble.user .who { opacity: 0.75; }

/* Content watch — review queue for website/Facebook findings */
.sugg-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 4px; }
.sugg-toolbar .meta { color: var(--paper-dim); font-size: 12.5px; }
.sugg-item { padding: 14px 0; border-top: 1px solid var(--paper-line); }
.sugg-item:first-child { border-top: 0; }
.sugg-item .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sugg-item .title { font-weight: 600; font-size: 14.5px; margin-top: 6px; }
.sugg-item .detail { color: #4a4132; font-size: 13px; margin-top: 3px; line-height: 1.45; }
.sugg-item .excerpt { color: var(--paper-dim); font-size: 12px; font-style: italic; margin-top: 6px; border-left: 2px solid var(--paper-line); padding-left: 8px; }
.sugg-item .actions { display: flex; gap: 8px; margin-top: 10px; }
.sugg-item .actions button { border: 0; border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; }
.sugg-item .actions .approve { background: var(--ok); color: #fff; }
.sugg-item .actions .dismiss { background: transparent; color: var(--paper-dim); border: 1px solid var(--paper-line); }
.tag.website { background: #eadfce; color: var(--paper-dim); }
.tag.facebook { background: #dce7f5; color: #2f5da8; }
.tag.specials, .tag.faq { background: #e3efe1; color: var(--ok); }
.tag.closure, .tag.hours { background: #f5e6cf; color: var(--warn); }
.tag.note { background: #eadfce; color: var(--paper-dim); }

@media (max-width: 820px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
}
