/* ═══════════════════════════════════════════════════════════════════════
   SuiteTalk design system — "Linen & Brass"
   A hospitality-native visual language: warm paper surfaces, deep pine
   structure, engraved brass objects. Custom-composed for this product;
   no component-library theme underneath.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* surfaces */
  --paper: #f3efe6;
  --surface: #fbf8f1;
  --raised: #fffdf8;
  --sunken: #ece7da;
  --pine: #14454a;
  --pine-deep: #0d3136;
  --pine-ink: #eef3ee;

  /* ink */
  --ink: #22302f;
  --ink-2: #51625f;
  --ink-3: #7d8c88;
  --hairline: rgba(34, 48, 47, 0.14);
  --hairline-strong: rgba(34, 48, 47, 0.26);

  /* brass accent */
  --brass: #a8853c;
  --brass-deep: #8a6b2b;
  --brass-soft: #f0e6cd;
  --brass-line: #c9a85c;

  /* status */
  --sage: #45775a;
  --sage-soft: #e2ecdf;
  --amber: #a9741f;
  --amber-soft: #f4e8cd;
  --terracotta: #ad4a32;
  --terracotta-soft: #f4ddd4;
  --slate: #3e5f8a;
  --slate-soft: #dfe7f2;
  --violet: #6b5687;
  --violet-soft: #e8e1f0;

  --focus: #2f6f77;
  --focus-ring: 0 0 0 2px var(--raised), 0 0 0 4.5px var(--focus);

  /* elevation */
  --shadow-1: 0 1px 2px rgba(24, 34, 33, 0.07), 0 2px 8px rgba(24, 34, 33, 0.06);
  --shadow-2: 0 2px 6px rgba(24, 34, 33, 0.08), 0 10px 28px rgba(24, 34, 33, 0.12);
  --shadow-3: 0 6px 16px rgba(24, 34, 33, 0.14), 0 24px 60px rgba(24, 34, 33, 0.18);

  /* type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", ui-monospace, Consolas, "SF Mono", monospace;

  /* rhythm (4/8) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px;

  --r-card: 12px;
  --r-chip: 6px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
  --t-fast: 150ms;
  --t-med: 280ms;
  --t-slow: 460ms;

  --sidebar-w: 244px;
}

html[data-theme="dark"] {
  --paper: #131a1a;
  --surface: #1a2323;
  --raised: #212c2c;
  --sunken: #101616;
  --pine: #0f3238;
  --pine-deep: #0b262b;
  --pine-ink: #e9efe8;

  --ink: #e8e2d3;
  --ink-2: #a8b3ac;
  --ink-3: #77857f;
  --hairline: rgba(232, 226, 211, 0.13);
  --hairline-strong: rgba(232, 226, 211, 0.25);

  --brass: #c9a85c;
  --brass-deep: #b08f45;
  --brass-soft: #33301f;
  --brass-line: #c9a85c;

  --sage: #7fb391;
  --sage-soft: #1e2f25;
  --amber: #d3a24a;
  --amber-soft: #33290f;
  --terracotta: #d97b60;
  --terracotta-soft: #38201a;
  --slate: #8aa8cf;
  --slate-soft: #1c2735;
  --violet: #a893c4;
  --violet-soft: #292134;

  --focus: #6fb4bd;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.42), 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 6px 16px rgba(0, 0, 0, 0.5), 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ── base ─────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(201, 168, 92, 0.07), transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: 0.005em; margin: 0; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--focus); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
::selection { background: var(--brass-soft); }
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus-ring); border-radius: 6px; }
button { font: inherit; color: inherit; }
svg { display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

/* boot splash */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: var(--s4); color: var(--ink-2); font-family: var(--serif); }
.boot-pulse { opacity: 0; transform-origin: center; animation: bootpulse 1.6s var(--ease) infinite; }
@keyframes bootpulse { 0% { opacity: 0.5; transform: scale(0.86); } 70% { opacity: 0; transform: scale(1.12); } 100% { opacity: 0; } }

/* ── app shell ───────────────────────────────────────────────────────── */

.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--pine) 0%, var(--pine-deep) 100%);
  color: var(--pine-ink);
  display: flex; flex-direction: column;
  padding: var(--s5) var(--s4);
  gap: var(--s5);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 0; }
.wordmark { display: flex; align-items: center; gap: var(--s3); padding: var(--s1) var(--s2); }
.wordmark b { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: 0.01em; }
.wordmark small { display: block; font-size: 10.5px; color: rgba(238, 243, 238, 0.55); letter-spacing: 0.14em; text-transform: uppercase; }

.navgroup { display: flex; flex-direction: column; gap: 2px; }
.navgroup > label { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(238, 243, 238, 0.45); padding: var(--s2) var(--s2) var(--s1); }
.navlink {
  display: flex; align-items: center; gap: var(--s3);
  padding: 9px var(--s3); border-radius: 9px; border: none; background: none; cursor: pointer;
  color: rgba(238, 243, 238, 0.82); text-align: left; width: 100%;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  font-size: 14px;
}
.navlink svg { flex: none; opacity: 0.85; }
.navlink:hover { background: rgba(238, 243, 238, 0.08); color: #fff; }
.navlink.active { background: rgba(201, 168, 92, 0.16); color: #fff; box-shadow: inset 2.5px 0 0 var(--brass-line); }
.navlink .navnote { margin-left: auto; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s3); }
.side-user { display: flex; gap: var(--s3); align-items: center; padding: var(--s3); background: rgba(0, 0, 0, 0.18); border-radius: 10px; }
.side-user b { font-size: 13px; display: block; }
.side-user small { color: rgba(238, 243, 238, 0.55); font-size: 11.5px; }
.side-user .mini-actions { margin-left: auto; display: flex; gap: var(--s1); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s4) var(--s6);
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.topbar h1 { font-size: 21px; }
.topbar .crumb { color: var(--ink-3); font-size: 13px; }
.topbar .spacer { flex: 1; }
.content { padding: var(--s6); display: flex; flex-direction: column; gap: var(--s6); max-width: 1440px; width: 100%; margin: 0 auto; }

/* mobile shell */
.bottomnav { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: var(--s4); padding-bottom: 96px; gap: var(--s4); }
  .topbar { padding: var(--s3) var(--s4); }
  .bottomnav {
    display: grid; grid-auto-flow: column; justify-content: space-around; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: color-mix(in srgb, var(--pine-deep) 94%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(201, 168, 92, 0.25);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav .navlink { flex-direction: column; gap: 3px; font-size: 10px; padding: 6px 10px; align-items: center; }
  .bottomnav .navlink.active { box-shadow: none; background: rgba(201, 168, 92, 0.18); }
}

/* ── primitives ───────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-1);
}
.card.pad { padding: var(--s5); }
.card.raised { background: var(--raised); box-shadow: var(--shadow-2); }
.card-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--hairline); }
.card-head h2, .card-head h3 { flex: 1; }
.card-body { padding: var(--s5); }
.hairline-top { border-top: 1px solid var(--hairline); }

.row { display: flex; align-items: center; gap: var(--s3); }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: var(--s3); }
.grid { display: grid; gap: var(--s4); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }
.right { margin-left: auto; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  border-radius: 9px; border: 1px solid var(--hairline-strong);
  background: var(--raised); color: var(--ink);
  padding: 8px 14px; cursor: pointer; font-size: 13.5px; font-weight: 500;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  box-shadow: 0 1px 0 rgba(24, 34, 33, 0.05);
}
.btn:hover { border-color: var(--brass); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary {
  background: linear-gradient(180deg, var(--pine) 0%, var(--pine-deep) 100%);
  color: var(--pine-ink); border-color: var(--pine-deep);
}
.btn.primary:hover { box-shadow: 0 4px 14px rgba(20, 69, 74, 0.35); }
.btn.brass {
  background: linear-gradient(180deg, var(--brass) 0%, var(--brass-deep) 100%);
  color: #fff8ea; border-color: var(--brass-deep);
}
.btn.danger { color: var(--terracotta); border-color: color-mix(in srgb, var(--terracotta) 45%, transparent); }
.btn.danger:hover { background: var(--terracotta-soft); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--sunken); border-color: transparent; }
.btn.sm { padding: 4.5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { padding: 12px 20px; font-size: 15px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.icon { padding: 7px; border-radius: 8px; }

/* chips + badges */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  padding: 2.5px 9px; border-radius: var(--r-pill);
  background: var(--sunken); color: var(--ink-2); border: 1px solid transparent;
  white-space: nowrap;
}
.chip.sage { background: var(--sage-soft); color: var(--sage); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.terracotta { background: var(--terracotta-soft); color: var(--terracotta); }
.chip.slate { background: var(--slate-soft); color: var(--slate); }
.chip.violet { background: var(--violet-soft); color: var(--violet); }
.chip.brass { background: var(--brass-soft); color: var(--brass-deep); }
.chip.pine { background: color-mix(in srgb, var(--pine) 14%, transparent); color: var(--pine); }
html[data-theme="dark"] .chip.pine { color: #9fc6c0; }
.chip.outline { background: transparent; border-color: var(--hairline-strong); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.pulse .dot { animation: chippulse 1.8s var(--ease) infinite; }
@keyframes chippulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* tables */
.tablewrap { overflow-x: auto; border-radius: var(--r-card); }
table.st { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.st th {
  text-align: left; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; padding: 10px var(--s4);
  border-bottom: 1px solid var(--hairline-strong);
  white-space: nowrap;
}
table.st td { padding: 11px var(--s4); border-bottom: 1px solid var(--hairline); vertical-align: middle; }
table.st tbody tr { transition: background var(--t-fast) var(--ease); }
table.st tbody tr:hover { background: color-mix(in srgb, var(--brass-soft) 40%, transparent); }
table.st tbody tr.clickable { cursor: pointer; }
table.st tr:last-child td { border-bottom: none; }

/* forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.03em; }
.field .hint { font-size: 11.5px; color: var(--ink-3); }
.field .err { font-size: 12px; color: var(--terracotta); display: flex; gap: 5px; align-items: center; }
.input, select.input, textarea.input {
  border: 1px solid var(--hairline-strong); border-radius: 9px;
  background: var(--raised); color: var(--ink);
  padding: 8.5px 12px; font: inherit; font-size: 13.5px; width: 100%;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input:focus-visible { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.input.invalid { border-color: var(--terracotta); }
textarea.input { resize: vertical; min-height: 74px; }
.switch { position: relative; width: 40px; height: 22px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch .trk { position: absolute; inset: 0; border-radius: 999px; background: var(--sunken); border: 1px solid var(--hairline-strong); transition: background var(--t-fast) var(--ease); }
.switch .thb { position: absolute; top: 2.5px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--raised); box-shadow: var(--shadow-1); transition: transform var(--t-fast) var(--ease); }
.switch input:checked + .trk { background: var(--sage); border-color: var(--sage); }
.switch input:checked + .trk + .thb { transform: translateX(18px); }
.switch input:focus-visible + .trk { box-shadow: var(--focus-ring); }

/* meter bars */
.meter { display: flex; flex-direction: column; gap: 4px; }
.meter .bar { height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden; position: relative; }
.meter .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pine), #2c6b70); transition: width var(--t-slow) var(--ease); }
.meter.warn .fill { background: linear-gradient(90deg, var(--amber), #c98f33); }
.meter.over .fill { background: linear-gradient(90deg, var(--terracotta), #c9664c); }
.meter .lbl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-2); }

/* modal / drawer / toast */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(13, 26, 26, 0.45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: var(--s5); animation: fadein var(--t-fast) var(--ease); }
@keyframes fadein { from { opacity: 0; } }
.modal { width: min(660px, 100%); max-height: 88vh; overflow-y: auto; background: var(--raised); border-radius: 16px; box-shadow: var(--shadow-3); border: 1px solid var(--hairline); animation: modalin var(--t-med) var(--ease); }
@keyframes modalin { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
.modal .card-head { position: sticky; top: 0; background: var(--raised); z-index: 2; border-radius: 16px 16px 0 0; }
.drawer-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(13, 26, 26, 0.35); animation: fadein var(--t-fast) var(--ease); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 96vw); background: var(--surface); border-left: 1px solid var(--hairline); box-shadow: var(--shadow-3); overflow-y: auto; animation: drawerin var(--t-med) var(--ease); }
@keyframes drawerin { from { transform: translateX(40px); opacity: 0.4; } }
.toasts { position: fixed; bottom: var(--s5); left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: var(--s2); align-items: center; pointer-events: none; }
@media (max-width: 900px) { .toasts { bottom: 96px; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s3);
  background: var(--pine-deep); color: var(--pine-ink);
  border: 1px solid rgba(201, 168, 92, 0.35);
  padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow-3);
  font-size: 13.5px; animation: toastin var(--t-med) var(--ease); max-width: min(560px, 92vw);
}
.toast.err { border-color: color-mix(in srgb, var(--terracotta) 60%, transparent); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--hairline-strong); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: none; background: none; cursor: pointer; white-space: nowrap;
  padding: 9px 14px; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  border-bottom: 2.5px solid transparent; margin-bottom: -1px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--pine); border-bottom-color: var(--brass); font-weight: 600; }
html[data-theme="dark"] .tab.active { color: var(--brass); }

/* skeleton / empty / error states */
.skeleton { border-radius: 8px; background: linear-gradient(100deg, var(--sunken) 40%, color-mix(in srgb, var(--raised) 70%, transparent) 50%, var(--sunken) 60%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; min-height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.state-panel { display: grid; place-items: center; text-align: center; gap: var(--s3); padding: var(--s8) var(--s5); color: var(--ink-2); }
.state-panel .art { opacity: 0.9; }
.state-panel h3 { color: var(--ink); }
.state-panel p { max-width: 46ch; font-size: 13px; }

/* command palette */
.palette { width: min(620px, 94vw); background: var(--raised); border-radius: 14px; box-shadow: var(--shadow-3); border: 1px solid var(--hairline); overflow: hidden; align-self: start; margin-top: 10vh; }
.palette input { border: none; background: none; width: 100%; padding: 16px 18px; font: inherit; font-size: 15px; color: var(--ink); border-bottom: 1px solid var(--hairline); }
.palette input:focus { outline: none; }
.palette .plist { max-height: 46vh; overflow-y: auto; padding: var(--s2); }
.palette .pitem { display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; border: none; background: none; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.palette .pitem:hover, .palette .pitem.sel { background: var(--brass-soft); }
.palette .pitem .k { margin-left: auto; color: var(--ink-3); font-size: 11px; }

/* ── avatar ─────────────────────────────────────────────────────────── */

.avatar-stage { display: grid; place-items: center; position: relative; }
.avatar-core { position: relative; }
.avatar-ring { position: absolute; inset: 0; }
.avatar-state-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.av-breathe { animation: avbreathe 3.6s var(--ease) infinite; transform-origin: 50% 60%; }
@keyframes avbreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.018); } }
.av-ring-spin { animation: avspin 7s linear infinite; transform-origin: center; }
@keyframes avspin { to { transform: rotate(360deg); } }
.av-ring-spin.fast { animation-duration: 1.4s; }
.av-wave line { animation: avwave 1.05s var(--ease) infinite; transform-origin: center bottom; }
@keyframes avwave { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
.av-dots circle { animation: avdots 1.2s var(--ease) infinite; }
@keyframes avdots { 0%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.av-pop { animation: avpop var(--t-med) var(--ease); }
@keyframes avpop { 0% { transform: scale(0.92); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .av-breathe, .av-ring-spin, .av-wave line, .av-dots circle { animation: none !important; }
}

/* ── guest portal ───────────────────────────────────────────────────── */

.guest-wrap { min-height: 100vh; background:
  radial-gradient(900px 400px at 50% -8%, rgba(201, 168, 92, 0.12), transparent 65%),
  linear-gradient(180deg, var(--pine-deep) 0%, var(--pine) 30%, transparent 30.05%),
  var(--paper);
  display: flex; justify-content: center; padding: 0 0 100px;
}
.guest-col { width: min(460px, 100vw); display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5) var(--s4); }
.guest-hero { color: var(--pine-ink); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding-top: var(--s3); }
.guest-hero .prop { font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(238, 243, 238, 0.66); }
.guest-hero h1 { font-size: 24px; color: #fdfaf2; }
.stay-card { display: flex; align-items: center; gap: var(--s4); }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
@media (max-width: 400px) { .service-grid { gap: var(--s1); } }
.service-tile {
  display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0;
  overflow-wrap: anywhere;
  padding: var(--s3) var(--s1) var(--s2); border-radius: 12px; border: 1px solid var(--hairline);
  background: var(--surface); cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  font-size: 11px; font-weight: 600; color: var(--ink-2); text-align: center;
}
.service-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--brass); }
.service-tile:active { transform: translateY(0); }
.service-tile.locked { opacity: 0.55; }
.service-tile .lock-note { font-size: 9.5px; color: var(--amber); font-weight: 700; }

/* chat console */
.console { display: flex; flex-direction: column; min-height: 340px; }
.transcript { flex: 1; display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4); overflow-y: auto; max-height: 46vh; }
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; animation: bubblein var(--t-med) var(--ease); position: relative; }
@keyframes bubblein { from { opacity: 0; transform: translateY(8px); } }
.bubble.guest { align-self: flex-end; background: var(--pine); color: var(--pine-ink); border-bottom-right-radius: 4px; }
.bubble.concierge { align-self: flex-start; background: var(--raised); border: 1px solid var(--hairline); border-bottom-left-radius: 4px; }
.bubble .meta { display: flex; gap: var(--s2); margin-top: 6px; flex-wrap: wrap; }
.console-input { display: flex; gap: var(--s2); padding: var(--s3); border-top: 1px solid var(--hairline); align-items: flex-end; }
.ptt {
  width: 46px; height: 46px; flex: none; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--brass-deep);
  background: radial-gradient(circle at 35% 30%, var(--brass-line), var(--brass-deep));
  display: grid; place-items: center; color: #fff8ea;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  touch-action: none;
}
.ptt:hover { box-shadow: 0 3px 12px rgba(168, 133, 60, 0.45); }
.ptt.rec { background: radial-gradient(circle at 35% 30%, #d97b60, var(--terracotta)); border-color: var(--terracotta); animation: recpulse 1.2s var(--ease) infinite; }
@keyframes recpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(173, 74, 50, 0.4); } 50% { box-shadow: 0 0 0 9px rgba(173, 74, 50, 0); } }
.ptt:disabled { opacity: 0.4; cursor: not-allowed; animation: none; }
.privacy-strip { display: flex; align-items: center; gap: var(--s2); padding: 7px var(--s4); font-size: 11.5px; border-top: 1px solid var(--hairline); color: var(--ink-2); background: color-mix(in srgb, var(--sunken) 60%, transparent); border-radius: 0 0 var(--r-card) var(--r-card); }
.privacy-strip.muted-on { background: var(--violet-soft); color: var(--violet); }

/* request tracker / routing animation */
.route-track { position: relative; padding: var(--s3) 0; }
.route-line { position: absolute; left: 24px; right: 24px; top: 50%; height: 2px; background: var(--hairline-strong); }
.route-steps { position: relative; display: flex; justify-content: space-between; }
.route-step { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; text-align: center; font-size: 10px; font-weight: 600; color: var(--ink-3); }
.route-step .node { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1.6px solid var(--hairline-strong); display: grid; place-items: center; transition: all var(--t-med) var(--ease); }
.route-step.done .node { border-color: var(--sage); background: var(--sage-soft); color: var(--sage); }
.route-step.now .node { border-color: var(--brass); background: var(--brass-soft); color: var(--brass-deep); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brass) 14%, transparent); }
.route-step.done { color: var(--sage); }
.route-step.now { color: var(--brass-deep); }
.route-pip { position: absolute; top: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 8px var(--brass-line); transition: left var(--t-slow) var(--ease); }

/* phone frame (staff mobile preview on desktop) */
.phone-frame { width: min(408px, 100%); margin: 0 auto; border-radius: 34px; border: 1.5px solid var(--hairline-strong); background: var(--pine-deep); padding: 10px; box-shadow: var(--shadow-2); }
.phone-screen { border-radius: 26px; overflow: hidden; background: var(--paper); min-height: 620px; max-height: 74vh; overflow-y: auto; }
@media (max-width: 900px) { .phone-frame { border: none; padding: 0; background: none; box-shadow: none; border-radius: 0; width: 100%; } .phone-screen { border-radius: 0; max-height: none; } }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; }
@media (max-width: 980px) { .login-wrap { grid-template-columns: 1fr; } }
.login-hero {
  background:
    radial-gradient(700px 420px at 20% 12%, rgba(201, 168, 92, 0.2), transparent 60%),
    linear-gradient(165deg, var(--pine) 0%, var(--pine-deep) 78%);
  color: var(--pine-ink); padding: var(--s8); display: flex; flex-direction: column; gap: var(--s6);
}
@media (max-width: 980px) { .login-hero { padding: var(--s6) var(--s5); } }
.login-hero h1 { font-size: clamp(26px, 3.2vw, 38px); color: #fdfaf2; line-height: 1.18; }
.login-hero .lede { color: rgba(238, 243, 238, 0.75); max-width: 42ch; font-size: 15px; }
.login-panel { padding: var(--s7) var(--s6); overflow-y: auto; max-height: 100vh; display: flex; flex-direction: column; gap: var(--s5); }
.acct {
  display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left;
  border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface);
  padding: 11px var(--s4); cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.acct:hover { border-color: var(--brass); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.acct b { display: block; font-size: 13.5px; }
.acct small { color: var(--ink-3); font-size: 11.5px; display: block; }
.acct .go { margin-left: auto; color: var(--brass-deep); flex: none; }

/* invoice paper */
.invoice-paper { font-size: 13px; }
.invoice-paper .inv-head { display: flex; justify-content: space-between; gap: var(--s4); padding-bottom: var(--s4); border-bottom: 2px solid var(--pine); margin-bottom: var(--s4); }
.invoice-paper table { width: 100%; border-collapse: collapse; }
.invoice-paper td, .invoice-paper th { padding: 7px 4px; text-align: left; }
.invoice-paper td:last-child, .invoice-paper th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.invoice-paper tr.total td { border-top: 2px solid var(--pine); font-weight: 700; font-size: 14.5px; }
.invoice-paper tr.lined td { border-top: 1px solid var(--hairline); }

/* misc */
.kbd { font-family: var(--mono); font-size: 10.5px; background: var(--sunken); border: 1px solid var(--hairline-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--ink-2); }
.divider { height: 1px; background: var(--hairline); border: none; margin: 0; }
.hero-band { background: linear-gradient(150deg, var(--pine) 0%, var(--pine-deep) 100%); color: var(--pine-ink); border-radius: 16px; padding: var(--s6); display: flex; gap: var(--s5); align-items: center; box-shadow: var(--shadow-2); position: relative; overflow: hidden; }
.hero-band::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 1px solid rgba(201, 168, 92, 0.25); }
.hero-band::before { content: ""; position: absolute; right: -20px; top: -120px; width: 280px; height: 280px; border-radius: 50%; border: 1px solid rgba(201, 168, 92, 0.15); }
.hero-band h2 { color: #fdfaf2; font-size: 22px; }
.hero-band .muted { color: rgba(238, 243, 238, 0.7); }
.testmode-ribbon { display: inline-flex; align-items: center; gap: 6px; background: var(--amber-soft); color: var(--amber); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 10px; border-radius: var(--r-pill); text-transform: uppercase; }
.sla-chip { font-variant-numeric: tabular-nums; }
.dept-lane { border-top: 3px solid var(--hairline-strong); }
.dept-lane.housekeeping { border-top-color: var(--slate); }
.dept-lane.engineering { border-top-color: var(--amber); }
.dept-lane.food_beverage { border-top-color: var(--sage); }
.dept-lane.front_desk { border-top-color: var(--violet); }
.dept-lane.duty_manager { border-top-color: var(--terracotta); }
.checkout-anim .layer { transition: transform var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease); }
.checkout-anim.wiped .layer-1 { transform: translateX(-30px) rotate(-4deg); opacity: 0; }
.checkout-anim.wiped .layer-2 { transform: translateX(28px) rotate(3deg); opacity: 0; transition-delay: 120ms; }
.checkout-anim.wiped .layer-3 { transform: translateY(-24px); opacity: 0; transition-delay: 240ms; }
.checkout-anim .shield { opacity: 0; transform: scale(0.8); transition: all var(--t-slow) var(--ease) 380ms; }
.checkout-anim.wiped .shield { opacity: 1; transform: scale(1); }
.print-only { display: none; }

/* ═══════════════════════════════════════════════════════════════════════
   PWA surface — install / update / offline / sync affordances + standalone
   safe-area handling. Motion respects the global reduced-motion rule above.
   ═══════════════════════════════════════════════════════════════════════ */

.pwa-btn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  color: #fff8ea; border: 1px solid var(--brass-deep); border-radius: 9px; padding: 7px 14px;
  background: linear-gradient(180deg, var(--brass) 0%, var(--brass-deep) 100%);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.pwa-btn:hover { box-shadow: var(--shadow-1); }
.pwa-btn:active { transform: translateY(1px); }
.pwa-btn.ghost { background: transparent; color: inherit; border-color: transparent; }
.pwa-btn.ghost:hover { background: rgba(255, 255, 255, 0.12); box-shadow: none; }

/* install banner — sits above the mobile bottom nav */
.pwa-install-banner {
  position: fixed; z-index: 70; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(560px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 10px;
  background: var(--raised); color: var(--ink);
  border: 1px solid var(--hairline-strong); border-radius: 14px;
  box-shadow: var(--shadow-3); padding: 12px 14px;
  animation: pwa-rise var(--t-med) var(--ease);
}
@media (max-width: 900px) { .pwa-install-banner { bottom: calc(80px + env(safe-area-inset-bottom)); } }
@keyframes pwa-rise { from { opacity: 0; transform: translate(-50%, 12px); } }

/* update-ready bar — bottom center */
.pwa-update {
  position: fixed; z-index: 110; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
  background: var(--pine-deep); color: var(--pine-ink);
  border: 1px solid rgba(201, 168, 92, 0.4); border-radius: 12px;
  box-shadow: var(--shadow-3); padding: 10px 14px;
  max-width: min(560px, calc(100vw - 24px));
  animation: pwa-rise var(--t-med) var(--ease);
}
@media (max-width: 900px) { .pwa-update { bottom: calc(80px + env(safe-area-inset-bottom)); } }

/* offline bar — thin top strip */
.pwa-offline-bar {
  position: fixed; z-index: 115; top: 0; left: 0; right: 0;
  padding: calc(6px + env(safe-area-inset-top)) 16px 6px;
  background: var(--amber); color: #221a06; font-size: 12.5px; font-weight: 600;
  text-align: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  animation: pwa-drop var(--t-fast) var(--ease);
}
@keyframes pwa-drop { from { transform: translateY(-100%); } }

/* offline recolor of the avatar ring cue (product avatar has its own offline state) */
html.pwa-offline .topbar { box-shadow: inset 0 -2px 0 var(--amber); }

/* sync badge — bottom-left pill */
.sync-badge {
  position: fixed; z-index: 68; left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  background: var(--pine); color: var(--pine-ink);
  border: 1px solid rgba(201, 168, 92, 0.35); border-radius: var(--r-pill);
  padding: 7px 14px; font-size: 12px; font-weight: 600;
  box-shadow: var(--shadow-2); animation: pwa-rise var(--t-med) var(--ease);
}
@media (max-width: 900px) { .sync-badge { bottom: calc(80px + env(safe-area-inset-bottom)); } }
.sync-badge[hidden] { display: none; }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brass-line); flex: none; }
.sync-dot.spin { border: 2px solid rgba(201, 168, 92, 0.35); border-top-color: var(--brass-line); background: none; box-sizing: border-box; animation: av-spin 0.8s linear infinite; }
@keyframes av-spin { to { transform: rotate(360deg); } }

/* iOS install sheet */
.pwa-sheet-wrap {
  position: fixed; inset: 0; z-index: 130; background: rgba(13, 26, 26, 0.5); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center; animation: fadein var(--t-fast) var(--ease);
}
@media (min-width: 640px) { .pwa-sheet-wrap { align-items: center; } }
.pwa-sheet {
  width: min(460px, 100%); background: var(--raised);
  border-radius: 18px 18px 0 0; box-shadow: var(--shadow-3);
  border: 1px solid var(--hairline); padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px; animation: pwa-rise var(--t-med) var(--ease);
}
@media (min-width: 640px) { .pwa-sheet { border-radius: 18px; } }
.pwa-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pwa-steps li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.pwa-step-ic {
  flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brass-soft); color: var(--brass-deep); font-weight: 700;
}
.btn.block { width: 100%; }

/* standalone: pad content clear of the translucent iOS status bar / notch */
html.pwa-standalone .topbar { padding-top: max(var(--s4), env(safe-area-inset-top)); }
html.pwa-standalone .sidebar { padding-top: max(var(--s5), env(safe-area-inset-top)); }
html.pwa-standalone .guest-hero { padding-top: max(var(--s5), calc(env(safe-area-inset-top) + var(--s2))); }
html.pwa-standalone .login-hero,
html.pwa-standalone .login-panel { padding-top: max(var(--s7), calc(env(safe-area-inset-top) + var(--s4))); }
html.pwa-standalone .guest-wrap { padding-top: env(safe-area-inset-top); }
