/* Most Welcome — Host app and sign-in, on the house tokens (mw-tokens.css loads first). Calm field, one jolt. */
:root {
  --card: var(--surface-raised); --muted: var(--ink-muted); --tint: var(--surface-sunken); --brand-ink: var(--blush);
  --ok: var(--success); --warn: var(--warning); --bad: var(--danger);
  --radius: var(--radius-lg); --font-display: var(--font-headings); --font-body: var(--font-text);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--surface); color: var(--ink); font: 15px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; letter-spacing: -0.01em; margin: 0 0 .4em; font-variation-settings: "SOFT" 100, "WONK" 0; }
h1 { font-size: 30px; } h2 { font-size: 21px; } h3 { font-size: 17px; font-family: var(--font-body); font-weight: 500; font-variation-settings: normal; }
p { margin: 0 0 .8em; }
code { font-family: var(--font-mono); font-size: .86em; background: var(--surface-sunken); padding: 1px 5px; border-radius: var(--radius-sm); }
.muted { color: var(--muted); } .small { font-size: 13px; } .nowrap { white-space: nowrap; }

.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--brand); color: var(--brand-ink); padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.side .logo { padding: 2px 10px 18px; }
.side .logo img { height: 20px; width: auto; display: block; }
.side .org { font-size: 11.5px; opacity: .8; padding: 0 10px 14px; text-transform: uppercase; letter-spacing: .13em; }
.side a.nav { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: var(--radius-md); text-decoration: none; opacity: .86; }
.side a.nav:hover { background: rgba(239, 217, 206, .09); opacity: 1; }
.side a.nav.on { background: rgba(239, 217, 206, .16); opacity: 1; }
.side .count { background: var(--blush); color: var(--oxblood); border-radius: var(--radius-pill); font-size: 11px; font-weight: 500; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.side .foot { margin-top: auto; font-size: 13px; padding: 10px; opacity: .85; }
.side .foot button { background: none; border: 0; color: inherit; padding: 0; text-decoration: underline; cursor: pointer; font: inherit; }
.side :focus-visible { outline-color: var(--blush); }
.main { padding: 28px 36px 60px; max-width: 1200px; width: 100%; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 16px; }

.stat .label { font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); }
.stat .value { font-family: var(--font-display); font-weight: 300; font-size: 34px; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; font-variation-settings: "SOFT" 100, "WONK" 0; }
/* The money stat: the one jolt on the page is the underline under the recovered figure. */
.hero .label { color: var(--brand-text); letter-spacing: .22em; }
.hero .value { font-size: 46px; }
.hero .value em { font-style: normal; display: inline-block; padding-bottom: 2px; border-bottom: 4px solid var(--jolt); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; border: 1px solid var(--cta); background: var(--cta); color: var(--on-cta); border-radius: var(--radius-pill); padding: 7px 16px; font: 500 14px var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn:hover { background: var(--brand-text); border-color: var(--brand-text); filter: brightness(1.1); }
.btn.ghost { background: var(--surface-raised); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); filter: none; }
.btn.sm { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--danger-soft); filter: none; }
.inline { display: inline; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 2px solid var(--rule); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td a { text-decoration: none; } td a:hover { text-decoration: underline; }

.pill { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--tint); color: var(--ink); white-space: nowrap; }
.pill.ok { background: var(--success-soft); color: var(--ok); } .pill.warn { background: var(--warning-soft); color: var(--warn); } .pill.bad { background: var(--danger-soft); color: var(--bad); } .pill.jolt { background: var(--brand-soft); color: var(--brand-text); }

label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
input, select, textarea { width: 100%; font: 15px var(--font-body); color: var(--ink); background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 11px; }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
input[type=color] { padding: 2px; height: 40px; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1 1 140px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.err { color: var(--bad); font-size: 13px; margin-top: 4px; }

.flash { border-radius: var(--radius); padding: 11px 14px; margin-bottom: 18px; }
.flash.ok { background: var(--success-soft); color: var(--ok); } .flash.err { background: var(--danger-soft); color: var(--bad); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: start; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-top: 7px; }
.feed .dot.money { background: var(--ok); }
.feed .dot.wait { background: var(--warn); }
.feed .amt { font-family: var(--font-body); font-weight: 500; color: var(--ok); font-variant-numeric: tabular-nums; white-space: nowrap; }
.draft { background: var(--surface); border-left: 3px solid var(--rule); padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14px; margin: 6px 0; white-space: pre-wrap; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.day h3.today { color: var(--brand-text); }
.slot { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 10px; margin-bottom: 8px; text-decoration: none; font-size: 13px; }
.slot:hover { border-color: var(--brand); }
.slot b { display: block; font-size: 14px; font-weight: 500; }
.slot.cancelled { opacity: .5; text-decoration: line-through; }
.bar { height: 4px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--brand); }
.bar i.full { background: var(--warn); }

.inbox { display: grid; grid-template-columns: 300px 1fr; gap: 16px; min-height: 70vh; }
.threads { padding: 0; overflow: auto; max-height: 78vh; }
.threads a { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.threads a.on { background: var(--tint); }
.thread { display: flex; flex-direction: column; }
.bubbles { flex: 1; overflow: auto; max-height: 60vh; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px 14px; }
.bubble { max-width: 74%; padding: 9px 13px; border-radius: var(--radius-md); font-size: 14px; white-space: pre-wrap; word-wrap: break-word; color: var(--ink); }
.bubble.guest { background: var(--surface-raised); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: var(--radius-sm); }
.bubble.concierge { background: var(--brand-soft); align-self: flex-end; border-bottom-right-radius: var(--radius-sm); }
.bubble.host { background: var(--surface-sunken); align-self: flex-end; border-bottom-right-radius: var(--radius-sm); }
.bubble small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 5px 8px; cursor: pointer; font-weight: 400; }
.swatches i { width: 20px; height: 20px; border-radius: 5px; display: inline-block; border: 1px solid var(--line-strong); }
.preset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; cursor: pointer; }
.preset .chips { display: flex; gap: 4px; margin: 6px 0; } .preset .chips i { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); }
.preview-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); }

.auth { max-width: 440px; margin: 9vh auto; padding: 0 16px; }
.auth .logo { display: flex; justify-content: center; margin-bottom: 24px; }
.auth .logo img { height: 26px; width: auto; display: block; }
.auth .card { padding: 28px; }
.auth h2 { font-size: 28px; }
.auth .btn { min-height: 44px; padding: 10px 22px; font-size: 15px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.auth-foot a { color: var(--brand-text); }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .side .logo, .side .org { padding: 4px 10px; } .side .foot { margin: 0; }
  .main { padding: 20px 16px 50px; }
  .g2, .g3, .g4, .g-wide, .inbox { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  table { font-size: 14px; }
  .scroll-x { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
