/* TableTalk staff view. Same palette and type as the voice demo page (voice/static/site.css). */
:root {
  --bg: #f7f4ee; --surface: #ffffff; --ink: #1b1a17; --muted: #6f6a60; --line: #e6e0d4;
  --accent: #b9472a; --accent-ink: #ffffff; --accent-soft: #f6e4dc; --soft: #f1ede4;
  --ok: #2e7d4f; --ok-soft: #e1f0e6; --warn: #9a5b06; --warn-soft: #f7ead2;
  --bad: #b3261e; --bad-soft: #f8e1df;
  --shadow: 0 1px 2px rgb(40 30 10 / .05), 0 8px 24px -14px rgb(40 30 10 / .2);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13120f; --surface: #1d1b17; --ink: #f1ede4; --muted: #a39d90; --line: #34302a;
    --accent: #e57a5a; --accent-ink: #1b0f0a; --accent-soft: #3a241b; --soft: #26231e;
    --ok: #6cc28a; --ok-soft: #1c3326; --warn: #e0a84a; --warn-soft: #3a2c14;
    --bad: #f08a80; --bad-soft: #3d1f1c;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -16px rgb(0 0 0 / .6);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: var(--accent); }
code { font-size: .88em; }
.muted { color: var(--muted); font-weight: normal; }
.small { font-size: .85rem; }

/* header */
header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .bar, nav.tabs { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
header.top .bar { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand .role { font-weight: 500; color: var(--muted); border-left: 1px solid var(--line); padding-left: 9px; margin-left: 2px; }
.links { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.links .demo { color: var(--muted); text-decoration: none; font-size: 14px; }
.links .demo:hover { color: var(--ink); }
.tenant { color: var(--ink); text-decoration: none; font-weight: 600; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.tenant span { color: var(--muted); }
.tenant:hover { border-color: var(--accent); }
nav.tabs { display: flex; gap: 4px; overflow-x: auto; }
nav.tabs a { color: var(--muted); text-decoration: none; padding: 8px 12px 10px; border-bottom: 2px solid transparent; font-weight: 500; white-space: nowrap; }
nav.tabs a:hover { color: var(--ink); }
nav.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* page */
main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-bottom: 18px; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.eyebrow a { text-decoration: none; }
h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
h1 .muted { font-family: var(--sans); font-size: 16px; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 21px; margin: 32px 0 12px; }
h3 { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 6px; color: var(--muted); }
.aside { max-width: 30rem; margin: 0; font-size: 14px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 2px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .note { font-size: 12.5px; color: var(--muted); }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--soft) 60%, transparent); }
th { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--soft); }
tbody td:first-child { white-space: nowrap; }
td.empty { color: var(--muted); text-align: center; padding: 36px 16px; }
td.desc { max-width: 22rem; color: var(--muted); }
td a { font-weight: 600; text-decoration: none; }
tr.cancelled td, tr.unavailable td { color: var(--muted); }
tr.cancelled td:nth-child(-n+4) { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
table.numbers td { font-variant-numeric: tabular-nums; }
.lines { margin: 0; padding: 0; list-style: none; }
.lines li + li { margin-top: 2px; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.confirmed, .badge.reservation_created, .badge.order_placed { background: var(--ok-soft); color: var(--ok); }
.badge.ready { background: var(--ok); color: var(--surface); }
.badge.cancelled, .badge.reservation_cancelled { background: var(--bad-soft); color: var(--bad); }
.badge.transferred { background: var(--warn-soft); color: var(--warn); }
.ok { color: var(--ok); } .slow { color: var(--bad); font-weight: 600; }

/* controls */
button { font: inherit; font-size: 14px; font-weight: 500; padding: 5px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; transition: border-color .12s, background .12s; }
button:hover { border-color: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button[type="submit"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.toggle { min-width: 5.5rem; }
tr.unavailable button.toggle { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
td.actions { white-space: nowrap; }
td.actions button + button { margin-left: 6px; }
.htmx-request button, button.htmx-request { opacity: .5; }
.day-nav { display: flex; gap: 6px; align-items: center; }
.day-nav a { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; }
.day-nav a:hover { border-color: var(--accent); }
.day-nav span { padding: 0 8px; }
input { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; }
.day-nav input { width: auto; height: 34px; padding: 4px 8px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--bad); background: var(--bad-soft); }
small.error { color: var(--bad); display: block; margin-top: 3px; }

/* menu form */
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 12px 16px; margin-bottom: 14px; }
.fields label { font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.fields label.check { display: flex; gap: 8px; align-items: center; align-self: end; color: var(--ink); padding-bottom: 8px; }
tr.editing td { background: var(--accent-soft) !important; padding: 16px; }
tr.editing form button + button { margin-left: 6px; }
form.add { background: var(--surface); padding: 18px; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }

/* restaurant picker */
ul.tenant-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
ul.tenant-cards a { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
ul.tenant-cards a:hover { border-color: var(--accent); }
ul.tenant-cards strong, ul.tenant-cards .muted { display: block; }
.mono { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft);
  color: var(--accent); font-family: var(--serif); font-weight: 600; font-size: 21px; }
.go { color: var(--muted); font-size: 18px; }

/* call detail */
dl.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin: 0; }
dl.facts > * { margin: 0; }
dl.facts dt { display: none; }
dl.facts dd { padding: 14px 16px; border-right: 1px solid var(--line); }
dl.facts dd:last-of-type { border-right: 0; }
dl.facts dd::before { content: attr(data-label); display: block; font-size: 13px; color: var(--muted); }
ol.transcript { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
ol.transcript li { padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); max-width: 46rem; width: fit-content; }
ol.transcript li.caller { justify-self: end; background: var(--accent-soft); border-color: transparent; }
ol.transcript li.tool { border-style: dashed; font-size: 14px; background: transparent; max-width: 100%; width: 100%; }
ol.transcript li.tool.error { border-color: var(--bad); }
ol.transcript li.tool summary { cursor: pointer; color: var(--muted); }
.who { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.at { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: normal; }
.tool-io { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; background: var(--soft); padding: 10px; border-radius: 8px; }

.readonly { max-width: 1200px; margin: 16px auto 0; padding: 0 16px; }
.readonly p { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); font-size: 14px; }
#flash { position: fixed; bottom: 16px; right: 16px; max-width: 26rem; padding: 12px 16px; border-radius: 12px;
  background: var(--bad); color: #fff; box-shadow: var(--shadow); }
@media (max-width: 760px) {
  .panel { overflow-x: auto; }
  table { min-width: 680px; }
  .tool-io { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
