:root { --ink: #16191f; --muted: #5b6270; --line: #e3e6eb; --accent: #1f5fd6; --bg: #f6f7f9; --panel: #ffffff; --soft: #eaf1fd; }
@media (prefers-color-scheme: dark) { :root { --ink: #ececf1; --muted: #a7acb5; --line: #33363d; --accent: #6ea8ff; --bg: #121316; --panel: #1b1d21; --soft: #1d2a40; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.page { max-width: 560px; margin: 0 auto; padding: 32px 16px; }
h1 { font-size: 1.6rem; margin: 0 0 12px; }
.card { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; margin: 16px 0; }
input { font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; }
button { font: inherit; padding: 10px 14px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; }
button.link { background: none; color: var(--accent); padding: 0; }
.hint { color: var(--muted); font-size: 0.9rem; }
.notice { padding: 10px; border-left: 3px solid var(--accent); background: rgba(31, 111, 235, 0.08); }
.qr { display: block; width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 8px; }
.codes { columns: 2; list-style: none; padding: 0; font-size: 1.1rem; }
.errorlist { color: #c62828; margin: 0; padding-left: 18px; }
h2 { font-size: 1.15rem; margin: 0 0 8px; }
.topbar { border-bottom: 1px solid var(--line); }
.nav { max-width: 760px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; }
.nav .brand { font-weight: 600; margin-right: auto; }
.nav form.inline { margin: 0; }
.banner { margin: 0; padding: 8px 16px; text-align: center; background: rgba(230, 160, 0, 0.18); font-size: 0.95rem; }
.page { max-width: 760px; }
a { color: var(--accent); }
a.button { display: inline-block; padding: 10px 14px; border-radius: 6px; background: var(--accent); color: #fff; text-decoration: none; }
a.button.secondary, button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
label.check { display: flex; gap: 8px; align-items: center; }
select, textarea { font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; }
.checks { list-style: none; padding: 0; }
.checks .ok { color: #2e7d32; }
.checks .todo { color: #b26a00; }
pre.body { white-space: pre-wrap; font: inherit; margin: 0; }
fieldset { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin: 0; min-width: 0; }
label.check { align-items: flex-start; }
input[readonly] { width: 100%; }

/* App shell: sidebar + workspace. The sidebar stacks above content on phones. */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 240px; max-width: 100%; background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.workspace { flex: 999 1 560px; min-width: 0; }
.page.wide { max-width: 1120px; padding: 28px 32px 48px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; text-decoration: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.logo { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.nav-group { margin: 14px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.nav-item svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--soft); color: var(--accent); font-weight: 600; }
.nav-item.later { color: var(--muted); }
.tag { margin-left: auto; font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.signout { margin: 16px 10px 0; }
.banner { text-align: left; padding: 10px 32px; }
@media (max-width: 820px) {
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; }
  .nav-group, .nav-item.later { display: none; }
  .brand { width: 100%; padding-bottom: 6px; }
  .page.wide { padding: 20px 16px 40px; }
  .banner { padding: 10px 16px; }
}

/* Overview */
.page-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.page-head h1 { margin: 0 0 4px; font-size: 28px; }
.page-head p { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: 28px; }
.columns { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
.columns > .panel { flex: 2 1 300px; min-width: 0; margin: 0; }
.columns > .panel.grow { flex: 3 1 480px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.panel h2 { margin: 0; font-size: 17px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.row-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.row-main > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dot { width: 10px; height: 10px; border-radius: 999px; margin-top: 7px; flex: none; background: var(--accent); }
.dot.urgent { background: #c25e00; }
.time { min-width: 64px; font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 8px; }
td { border-top: 1px solid var(--line); padding: 12px 8px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: #eef0f3; color: #3d4350; }
.pill.registered { background: #e6f4ea; color: #1e6b34; }
.pill.reviewed { background: #fde7d4; color: #8a3b00; }
.pill.authorized { background: #e3edfc; color: #1a4fa8; }
.inline-form { display: grid; gap: 8px; }
fieldset legend { font-weight: 600; padding: 0 4px; }
details summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; min-height: 32px; }
section.card h3 { margin: 0; font-size: 1.05rem; }

.chat { display: grid; gap: 8px; }
.chat-msg { max-width: 85%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.chat-msg p { margin: 2px 0 0; overflow-wrap: anywhere; }
.chat-msg.mine { justify-self: end; background: var(--soft); }
.chat-msg.theirs { justify-self: start; background: var(--panel); }
.chat-msg.unread { border-color: var(--accent); }
.calendar { border-collapse: collapse; font-size: 12px; }
.calendar th, .calendar td { border: 1px solid var(--line); padding: 4px; min-width: 26px; text-align: center; white-space: nowrap; }
.calendar tbody th { text-align: left; min-width: 140px; position: sticky; left: 0; background: var(--panel); }
.calendar .today { outline: 2px solid var(--accent); outline-offset: -2px; }
.calendar td.booked { background: var(--soft); border-left-color: transparent; border-right-color: transparent; }
.calendar td.booked.start { border-left: 3px solid var(--accent); text-align: left; overflow: visible; }
.calendar td.booked a { font-weight: 600; text-decoration: none; }
.calendar td.missing { background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 4px, transparent 4px, transparent 8px); }
.chat-msg.assistant { border-style: dashed; }
.quick-replies { display: flex; flex-wrap: wrap; gap: 8px; }
.summary .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }

/* Guest assistant page: header, six-stage tracker, chips (from Zephy's Pad). */
.guest-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.guest-head .logo { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; }
.guest-head div { display: grid; }
.stages { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--panel); margin-bottom: 12px; }
.stage-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.stage-head .owner { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.stage-head .owner.host { color: var(--muted); }
.stage-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 8px 0; }
.stage-track span { height: 6px; border-radius: 3px; background: var(--line); }
.stage-track span.done { background: var(--accent); opacity: 0.55; }
.stage-track span.current { background: var(--accent); }
.stage-task { margin: 0 0 4px; }
.stages summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.stage-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.stage-list li { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; }
.stage-list .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; border: 1px solid var(--line); }
.stage-list li.done .num, .stage-list li.current .num { background: var(--accent); color: #fff; border-color: var(--accent); }
.stage-list li.current { font-weight: 600; }
button.chip { background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 8px 14px; }
.faqs summary { list-style: none; display: inline-block; cursor: pointer; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs[open] summary { margin-bottom: 8px; }
.reminder { padding: 10px; border-left: 3px solid #b26a00; background: rgba(230, 160, 0, 0.12); margin: 0; }
.arrival { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.composer { display: grid; gap: 6px; }
.faqs summary { padding: 8px 16px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-weight: 500; }
.faqs[open] summary { background: var(--soft); }
.card label:not(.check) { display: block; }
.card input:not([type="checkbox"]):not([type="radio"]), .card select, .card textarea { width: 100%; max-width: 100%; }
.card { min-width: 0; }
.chat-msg { min-width: 0; }
.chat { grid-template-columns: minmax(0, 1fr); }
.code-big { font-size: 1.4rem; letter-spacing: 0.05em; }

/* Chat list filters and small concierge controls */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.tab { padding: 6px 12px; border: 1px solid var(--line, #d0d7de); border-radius: 999px; text-decoration: none; color: inherit; }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
details.fix { margin: -4px 0 8px; }
details.fix form { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
img.proof { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* Public pages and footer */
.public-foot { max-width: 760px; margin: 0 auto; padding: 16px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.public-foot a { margin-right: 12px; }
.nav-legal { font-size: 0.85rem; margin: 8px 12px; }
.lead { font-size: 1.15rem; }
.legal h2 { font-size: 1.2rem; margin-top: 24px; }
