/* ================= ResM — the host app's own skin =================
   Organised the way the best host stands are (a sidebar of places, a day book by shift, a
   slide-out for the one booking you're holding, a guest book with tags) but drawn in BeSmart's
   own tokens so light and dark both hold. Everything lives under .rm-app; the login screen and
   the room drawing (RM_FLOOR_CSS / Three.js) keep their own worlds. */

/* styles.css locks the till page (body overflow hidden); ResM is a long page that scrolls (owner, 7 Sep 2026:
   Setup cards below the fold only appeared after maximising). */
body { overflow: auto; }
.rm-app { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; background: var(--shell); color: var(--text); font-family: var(--ui); }
/* Terracotta theme (owner, 7 Sep 2026): serif headings, rounder cards, terracotta highlights */
:root[data-theme="terracotta"] .rm-title h1, :root[data-theme="terracotta"] .rm-card h3, :root[data-theme="terracotta"] .rm-ph h2, :root[data-theme="terracotta"] .rm-brand b { font-family: 'Fraunces', Georgia, serif; font-weight: 900; }
:root[data-theme="terracotta"] .rm-card, :root[data-theme="terracotta"] .rm-empty, :root[data-theme="terracotta"] .rm-grid-wrap, :root[data-theme="terracotta"] .rm-list { border-radius: 22px; }
:root[data-theme="terracotta"] .rm-btn.primary, :root[data-theme="terracotta"] .rm-tabs button.on { background: var(--navy); color: #fff; }
:root[data-theme="terracotta"] .rm-nav button.on { box-shadow: inset 3px 0 0 var(--navy); }
:root[data-theme="terracotta"] .rm-brand b i { color: var(--navy); }
/* Dark Solid / Light Solid (owner, 12 Sep 2026) reach ResM too, since resmaro.html loads
   styles.css first — its broad "flatten every box" rule there is a plain `*` selector and would
   also flatten these functional round/pill shapes if left alone. Re-asserted here with higher
   specificity (a class beats a universal selector, so this wins regardless of load order) so they
   stay round. Add any NEW pill/circle class here too, or Solid will silently square it. */
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-nav .rm-count,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-section > h2 small,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-pill,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-chip,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-reg,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-seg,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-seg button,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-switch i {
  border-radius: 999px !important;
}
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-pill::before,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-flagdot,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-guestrow .rm-avatar,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-gp-avatar,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-setuprail button i,
:is([data-theme="dark-solid"], [data-theme="light-solid"]) .rm-switch i:after {
  border-radius: 50% !important;
}
.rm-app[hidden] { display: none; }

/* ---------- sidebar ---------- */
.rm-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px 14px; box-sizing: border-box; }
.rm-brand { padding: 4px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.rm-brand b { display: block; font-size: 20px; letter-spacing: .3px; }
.rm-brand b i { font-style: normal; color: var(--brass); }
.rm-brand span { display: block; font-size: 11.5px; color: var(--text-dim); margin-top: 2px; letter-spacing: .6px; text-transform: uppercase; }
.rm-brand select { margin-top: 8px; width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 12.5px; }
.rm-nav { display: flex; flex-direction: column; gap: 2px; }
.rm-nav button { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: none; border: 0; color: var(--text-dim); font: inherit; font-size: 14px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background .12s, color .12s; }
.rm-nav button:hover { background: var(--panel-2); color: var(--text); }
.rm-nav button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 3px 0 0 var(--brass); }
.rm-nav button svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rm-nav .rm-count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--alert); color: #fff; font-size: 11.5px; font-weight: 700; text-align: center; }
.rm-nav .rm-count:empty { display: none; }
.rm-group { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--brass); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.rm-group span { flex: 1; color: var(--text-dim); font-size: 12.5px; }
/* Events page: one card per event on a full-width grid; the details line runs under the fields. */
.rm-events { max-width: 1100px; }
.rm-eventrow { display: grid; grid-template-columns: 160px 136px minmax(200px, 1fr) 110px 170px 34px; gap: 10px 12px; align-items: end; margin-bottom: 12px; }
.rm-eventrow.past { opacity: .6; }
.rm-eventrow .rm-evinvite { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.rm-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px -12px rgba(0,0,0,.35); overflow: hidden; margin-top: 4px; }
.rm-suggest button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; font: inherit; color: var(--text); cursor: pointer; }
.rm-suggest button:last-child { border-bottom: 0; } .rm-suggest button:hover { background: var(--panel); }
.rm-suggest button b { font-size: 13.5px; } .rm-suggest button span { font-size: 12px; color: var(--text-dim); }
.rm-radios { display: flex; flex-direction: column; gap: 6px; }
.rm-radios label, .rm-picklist label { text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 500; }
.rm-radios label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.rm-picklist { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin-top: 6px; background: var(--panel-2); }
.rm-picklist label { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; cursor: pointer; }
.rm-eventrow .rm-evdetails { grid-column: 1 / -1; }
.rm-evdel { align-self: end; height: 36px; width: 34px; background: none; border: 1px solid var(--line); color: var(--text-dim); border-radius: 8px; font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.rm-evdel:hover { color: var(--stop); border-color: var(--stop); }
@media (max-width: 860px) { .rm-eventrow { grid-template-columns: 1fr 1fr 34px; } .rm-eventrow .rm-field:nth-child(3) { grid-column: 1 / -1; } .rm-eventrow .rm-field:nth-child(5) { grid-column: 1 / 3; } }
.rm-table { width: 100%; border-collapse: collapse; font-size: 13px; } .rm-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); padding: 6px 8px; border-bottom: 1px solid var(--line); } .rm-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; } .rm-table td.mono { font-family: var(--mono); }
.rm-toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.rm-areas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.rm-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.rm-check input { width: 16px; height: 16px; accent-color: var(--navy); }
.rm-side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.rm-side-foot .rm-who { min-width: 0; flex: 1; }
.rm-side-foot b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-side-foot span { display: block; font-size: 11px; color: var(--text-dim); }
.rm-side-foot button { margin-left: auto; flex: none; white-space: nowrap; background: none; border: 1px solid var(--line); color: var(--text-dim); border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 12px; cursor: pointer; }
.rm-side-foot button:hover { color: var(--text); border-color: var(--text-dim); }

/* ---------- main column ---------- */
.rm-main { min-width: 0; padding: 22px 28px 40px; box-sizing: border-box; }
.rm-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.rm-title h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.rm-title span { display: block; font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.rm-head .rm-spacer { flex: 1; }
.rm-datenav { display: inline-flex; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rm-datenav button { background: none; border: 0; color: var(--text); font: inherit; padding: 7px 11px; cursor: pointer; }
.rm-datenav button:hover { background: var(--panel-2); }
.rm-datenav input[type=date] { background: none; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--text); font: inherit; font-family: var(--mono); font-size: 13px; padding: 7px 10px; }
.rm-datenav .rm-today { font-size: 12.5px; color: var(--brass); font-weight: 600; }
.rm-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--navy-2); border: 1px solid var(--navy-2); color: #fff; font: inherit; font-size: 12.5px; padding: 5px 12px; min-height: 30px; border-radius: 8px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.rm-btn:hover { filter: brightness(1.08); }
.rm-btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.rm-btn.primary:hover { filter: brightness(1.06); }
.rm-btn.go { background: var(--go); border-color: var(--go); color: #fff; font-weight: 600; }
.rm-btn.danger { background: transparent; border-color: var(--stop); color: var(--stop); }
.rm-btn.danger:hover { background: var(--stop); color: #fff; }
.rm-btn.sm { padding: 3px 9px; min-height: 26px; font-size: 12px; border-radius: 7px; }
.rm-btn:disabled { opacity: .5; cursor: default; }
.rm-search { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; }
.rm-search input { background: none; border: 0; color: var(--text); font: inherit; font-size: 13.5px; padding: 8px 0; width: 240px; outline: none; }
.rm-search svg { width: 15px; height: 15px; stroke: var(--text-dim); fill: none; stroke-width: 2; }
.rm-input, .rm-select, .rm-textarea { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; box-sizing: border-box; width: 100%; }
.rm-input:focus, .rm-select:focus, .rm-textarea:focus { outline: none; border-color: var(--brass); }
.rm-input.mono { font-family: var(--mono); }
/* One height for every field in a form row (owner, 7 Sep 2026: the time and date boxes towered over the guests stepper). */
.rm-input:not(textarea), .rm-select { height: 38px; padding-top: 0; padding-bottom: 0; line-height: 36px; }
.rm-input.mono, .rm-datenav input[type=date] { font-size: 13px; }
.rm-stepper { height: 38px; }
.rm-stepper input { font-size: 13.5px; }
/* Phone with a country-code picker (phone-cc.js): flag + code + country on the left, the number on the right */
.cc-phone { display: flex; gap: 6px; }
.cc-phone .cc-sel { flex: 0 1 46%; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 13.5px; padding: 8px 6px; border-radius: 8px; }
.cc-phone .cc-sel:focus { outline: none; border-color: var(--brass); }
.cc-sel.cc-flagged { background-repeat: no-repeat; background-position: 8px center; background-size: 22px 15px; padding-left: 36px !important; }
.cc-phone .cc-num { flex: 1 1 auto; min-width: 0; }

/* ---------- shift tabs + stat strip ---------- */
.rm-tabs { display: inline-flex; gap: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.rm-tabs button { background: none; border: 0; color: var(--text-dim); font: inherit; font-size: 12.5px; padding: 3px 11px; min-height: 26px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.rm-tabs button.on { background: var(--navy); color: #fff; font-weight: 600; }
.rm-tabs button.on small { color: rgba(255,255,255,.8); }
.rm-tabs button small { color: var(--text-dim); font-size: 11px; margin-left: 5px; font-family: var(--mono); }
/* One thin line per figure: number and label side by side (owner, 2026-09-05). */
.rm-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.rm-stat { display: inline-flex; align-items: baseline; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; min-height: 30px; }
.rm-stat b { display: inline; font-size: 16px; font-family: var(--mono); font-weight: 600; line-height: 1.1; }
.rm-stat span { display: inline; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.rm-stat.warn b { color: var(--alert); }
.rm-stat.go b { color: var(--go); }
.rm-statbtn { cursor: pointer; font: inherit; color: inherit; }
.rm-statbtn:hover { border-color: var(--navy); }
.rm-statbtn.on { background: var(--navy); border-color: var(--navy); }
.rm-statbtn.on b, .rm-statbtn.on span { color: #fff; }
.rm-statcovers { margin-left: auto; }

/* ---------- the day book ---------- */
.rm-section { margin-bottom: 20px; }
.rm-section > h2 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--text-dim); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.rm-section > h2 small { font-family: var(--mono); background: var(--panel-2); border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.rm-list { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rm-row { display: grid; grid-template-columns: 64px 1.5fr 90px 110px 34px 120px auto; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; transition: background .1s; }
.rm-row:first-child { border-top: 0; }
.rm-row:hover { background: var(--panel-2); }
.rm-row .rm-time { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.rm-row .rm-guest b { display: block; font-size: 14px; }
.rm-row .rm-guest span { display: block; font-size: 11.5px; color: var(--text-dim); margin-top: 1px; }
/* .rm-tag is itself a <span>, so the blanket rule above would otherwise stack it full-width in
   text-dim gray instead of its own pill badge — this wins on specificity (3 classes vs. 2 classes
   + a type selector) without touching the existing rule other rows still rely on. */
.rm-row .rm-guest .rm-tag { display: inline-block; margin-top: 0; }
.rm-row .rm-guest .rm-tag.vip { color: var(--brass); }
.rm-row .rm-pax { font-size: 13px; color: var(--text-dim); }
.rm-row .rm-pax b { color: var(--text); font-family: var(--mono); }
.rm-row .rm-table { font-size: 12.5px; }
.rm-row .rm-table i { font-style: normal; display: inline-block; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-family: var(--mono); }
.rm-row .rm-chan { font-size: 15px; text-align: center; color: var(--text-dim); }
.rm-row .rm-acts { display: flex; gap: 6px; justify-content: flex-end; }
.rm-row.done { opacity: .55; }
.rm-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.rm-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rm-pill.awaiting_payment { background: #FBE7D6; color: #9A4B1E; }
.rm-deposit { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(200,112,58,.10); font-size: 13px; }
.rm-link { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font: inherit; }
.rm-pill.requested { color: var(--alert); background: color-mix(in srgb, var(--alert) 14%, transparent); }
.rm-pill.confirmed { color: var(--brass); background: color-mix(in srgb, var(--brass) 14%, transparent); }
.rm-pill.arrived { color: #4A8BD8; background: color-mix(in srgb, #4A8BD8 14%, transparent); }
.rm-pill.seated { color: var(--go); background: color-mix(in srgb, var(--go) 16%, transparent); }
.rm-pill.finished { color: var(--text-dim); background: var(--panel-2); }
.rm-pill.cancelled, .rm-pill.noshow { color: var(--stop); background: color-mix(in srgb, var(--stop) 12%, transparent); }
/* Dashed like .rm-tag.auto elsewhere in this app — provisional, no table assigned yet, not a real
   confirmed booking (owner, 11 Sep 2026, SevenRooms-style extras: waitlist). */
.rm-pill.waitlisted { color: var(--text-dim); background: var(--panel-2); border-style: dashed; border-color: var(--line); }
.rm-tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-dim); margin-right: 4px; }
.rm-tag.vip { color: var(--brass); border-color: color-mix(in srgb, var(--brass) 50%, transparent); }
/* Auto-computed (Regular/Lapsed/Big spender/Frequent no-show) — dashed, not solid, so it never
   reads as a manually-typed tag of the same wording (owner, 11 Sep 2026: "auto-tags by rule"). */
.rm-tag.auto { border-style: dashed; font-style: italic; vertical-align: middle; }
/* Flags next to the guest's name (owner, 11 Sep 2026: "in red font") — the same warning red every
   cancelled/no-show pill already uses elsewhere in this app, not a one-off color. */
.rm-tag.flag-hero { color: var(--stop); border-color: color-mix(in srgb, var(--stop) 50%, transparent); vertical-align: middle; }
/* The Guests-list dot (owner, 11 Sep 2026: "a small circled letter i... a bubble shows up with the
   flags in it") — a fixed-position popover appended to <body> by wireFlagDots, not part of any
   row's own flow, so it never gets clipped by a scrolling list. */
.rm-flagdot { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--stop); color: #fff; font: italic 800 10px Georgia, serif; border: 0; padding: 0; cursor: pointer; vertical-align: middle; }
.rm-flagpop { position: fixed; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3); font-size: 12.5px; min-width: 130px; }
.rm-flagpop div { padding: 2px 0; }
.rm-empty { padding: 34px 20px; text-align: center; color: var(--text-dim); font-size: 13.5px; background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; }

/* ---------- timeline (tables x time) ---------- */
/* The day fits the screen, never a scrollbar (MAK, 7 Sep 2026): the hours share the width; on a
   narrow screen every other hour label steps aside so the rest stay readable. */
.rm-grid-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rm-grid { display: grid; grid-template-columns: 84px minmax(0, 1fr); width: 100%; }
@media (max-width: 1180px) { .rm-gticks span:nth-child(even) { display: none; } }
@media (max-width: 760px) { .rm-grid { grid-template-columns: 64px minmax(0, 1fr); } .rm-gticks span:nth-child(4n+3) { display: none; } }
.rm-grid .rm-gh { position: sticky; top: 0; z-index: 2; background: var(--panel); border-bottom: 1px solid var(--line); }
.rm-grid .rm-gh.rm-gl { padding: 8px 12px; font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.rm-gticks { position: relative; height: 32px; }
.rm-gticks span { position: absolute; top: 8px; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.rm-gticks span::after { content: ""; position: absolute; left: 50%; top: 16px; width: 1px; height: 6px; background: var(--line); }
.rm-gticks span:first-child { transform: none; } .rm-gticks span:first-child::after { left: 0; }
.rm-gticks span:last-child { transform: translateX(-100%); } .rm-gticks span:last-child::after { left: 100%; }
.rm-grow { display: contents; }
.rm-grow > .rm-gl { padding: 0 12px; height: 44px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 13px; font-weight: 600; }
.rm-grow > .rm-gl small { font-family: var(--ui); font-weight: 400; color: var(--text-dim); font-size: 11px; }
.rm-gtrack { position: relative; height: 44px; border-top: 1px solid var(--line); cursor: crosshair; background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / var(--cols))); background-size: 100% 100%; }
.rm-gtrack:hover { background-color: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.rm-gblock { position: absolute; top: 6px; height: 32px; border-radius: 7px; padding: 0 9px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; cursor: pointer; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.rm-gblock small { font-weight: 400; opacity: .85; font-family: var(--mono); }
.rm-gblock.requested { background: var(--alert); }
.rm-gblock.confirmed { background: var(--brass); color: #fff; }
.rm-gblock.arrived { background: #4A8BD8; }
.rm-gblock.seated { background: var(--go); }
.rm-gblock.finished { background: var(--text-dim); opacity: .7; }
/* A merged booking's OTHER joined tables (owner, 10 Sep 2026: three identical "Mak 10" blocks
   read as three separate parties, not one) — same status color, just thinner and dimmer, so it
   reads as "linked to another table" rather than a second real booking. */
.rm-gblock.rm-gblock-merged { height: 14px; top: 15px; font-size: 10px; padding: 0 6px; opacity: .55; box-shadow: none; }
.rm-gnow { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--stop); z-index: 1; pointer-events: none; }

/* ---------- requests inbox ---------- */
.rm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.rm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.rm-card .rm-when { font-family: var(--mono); font-size: 13px; color: var(--brass); font-weight: 600; }
.rm-card h3 { margin: 4px 0 2px; font-size: 16px; }
.rm-card p { margin: 4px 0; font-size: 12.5px; color: var(--text-dim); }
.rm-card .rm-acts { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- guest book ---------- */
.rm-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rm-chip { background: var(--panel); border: 1px solid var(--line); color: var(--text-dim); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.rm-chip.on { background: var(--panel-2); color: var(--text); border-color: var(--brass); }
.rm-guestrow { display: grid; grid-template-columns: 1.6fr 130px 90px 170px 1fr; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); cursor: default; user-select: none; }
.rm-guestrow .rm-gacts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.rm-reg { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; padding: 3px 8px; border-radius: 999px; border: 1px solid transparent; vertical-align: middle; }
.rm-reg.yes { color: #2F7F5B; border-color: color-mix(in srgb, #2F7F5B 45%, transparent); background: color-mix(in srgb, #2F7F5B 12%, transparent); }
.rm-reg.no { color: var(--text-dim); border-color: var(--line); background: var(--panel-2); }
.rm-filter { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.rm-filter .rm-select { width: auto; padding: 6px 28px 6px 10px; font-size: 12.5px; }
.rm-guestrow:first-child { border-top: 0; }
.rm-guestrow:hover { background: var(--panel-2); }
.rm-guestrow .rm-gname { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.rm-guestrow .rm-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-dim); flex: none; }
.rm-guestrow .rm-num { font-family: var(--mono); font-size: 13px; }
.rm-guestrow .rm-dim { font-size: 12px; color: var(--text-dim); }

/* ---------- slide-out panel ---------- */
.rm-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
.rm-scrim[hidden] { display: none; }
.rm-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--panel); border-left: 1px solid var(--line); z-index: 41; box-shadow: -14px 0 40px rgba(0,0,0,.3); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .18s ease-out; }
.rm-panel.open { transform: none; }
.rm-panel .rm-ph { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 10px; }
.rm-panel .rm-ph h2 { margin: 0; font-size: 19px; }
.rm-panel .rm-ph p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-dim); }
.rm-panel .rm-ph .rm-x { margin-left: auto; background: none; border: 0; color: var(--text-dim); font-size: 20px; cursor: pointer; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.rm-panel .rm-ph .rm-x:hover { background: var(--panel-2); color: var(--text); }
.rm-panel .rm-pb { padding: 16px 20px; overflow: auto; flex: 1; }
.rm-panel .rm-pf { padding: 12px 20px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; background: var(--panel); }
.rm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.rm-field { display: flex; flex-direction: column; gap: 4px; }
.rm-field[hidden] { display: none; }
.rm-field.wide { grid-column: 1 / -1; }
.rm-field label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); font-weight: 600; }
.rm-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.rm-stepper button { background: none; border: 0; color: var(--text); font: inherit; font-size: 16px; width: 34px; cursor: pointer; }
.rm-stepper button:hover { background: var(--panel); }
.rm-stepper input { width: 52px; text-align: center; background: none; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--text); font: inherit; font-family: var(--mono); font-size: 14px; }
.rm-kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 13px; margin: 10px 0; }
.rm-kv span { color: var(--text-dim); }
.rm-guestcard { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 14px 0; font-size: 13px; }
.rm-guestcard b { font-size: 14px; }
.rm-guestcard .rm-dim { color: var(--text-dim); font-size: 12px; }
.rm-hist { list-style: none; margin: 8px 0 0; padding: 0; }
.rm-hist li { display: flex; gap: 16px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.rm-hist li:first-child { border-top: 0; }
.rm-hist li .rm-time { font-family: var(--mono); color: var(--text-dim); min-width: 110px; flex: none; }
/* The row's middle span (pax/table/spend, plus its own item-list line) grows to fill whatever
   width the list sits in — inside the guest-profile flyover's wide Bookings card that's several
   hundred pixels, and without this every row packed to the left with a bare strip of empty card
   on the right (design review, 11 Sep 2026: "the container got wider, the list inside it did not"). */
.rm-hist li > span:nth-child(2) { flex: 1; min-width: 0; }
.rm-hist li .rm-pill { flex: none; }
.rm-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.rm-toggle input { accent-color: var(--brass); width: 16px; height: 16px; }
.rm-tagedit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.rm-tagedit .rm-tag { margin: 0; cursor: pointer; }
.rm-tagedit .rm-tag::after { content: " ×"; color: var(--text-dim); }
.rm-tagedit input { background: none; border: 0; color: var(--text); font: inherit; font-size: 13px; flex: 1; min-width: 90px; outline: none; }
/* Flags: the exact same box as Tags (owner, 11 Sep 2026: "make sure the field same as Tag"), but a
   fixed set toggled by tap rather than freely typed/removed — so no trailing "x" (that reads as
   delete) and an "on" state instead of a delete affordance. */
.rm-flagbox .rm-tag::after { content: none; }
.rm-flagbox .rm-tag.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.rm-hint { font-size: 12px; color: var(--text-dim); margin: 4px 0 0; }
.rm-err { color: var(--stop); font-size: 12.5px; margin: 8px 0 0; }

/* ---------- guest profile: full-page flyover ----------
   Same #rmPanel/openPanel machinery as booking-edit and the new-booking form (still a 440px
   drawer), but while a guest profile is open it carries this extra "full" class, added by
   openGuestPanel right after openPanel(...) and always stripped again — by openPanel() itself
   (so a panel opened next never inherits it, including Book a table firing straight back into
   openPanel from inside an open profile) and by closePanel() (owner, 11 Sep 2026: "a different
   window, maybe a fly over the whole page with a proper design and distribution"). Only
   position/chrome are overridden here — .rm-panel's own base rule is untouched. */
.rm-panel.full { width: 100vw; max-width: 100vw; border-left: 0; box-shadow: none; }
.rm-panel.full .rm-ph { background: var(--panel-2); padding: 28px 40px 24px; align-items: flex-start; }
.rm-panel.full .rm-pb { padding: 0; }
.rm-panel.full .rm-pf { padding: 14px 40px 20px; }
.rm-gp-hero { display: flex; align-items: flex-start; gap: 20px; flex: 1; min-width: 0; }
.rm-gp-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 800; flex: none; }
.rm-gp-id { min-width: 0; }
.rm-gp-id h2 { margin: 0 0 6px; font-size: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rm-gp-phone { font-family: var(--mono); color: var(--text-dim); font-size: 13px; margin: 0 0 14px; }
.rm-gp-stats { display: flex; flex-wrap: wrap; gap: 0; }
.rm-gp-stat { display: flex; flex-direction: column; gap: 2px; padding: 0 20px; }
.rm-gp-stat:first-child { padding-left: 0; }
.rm-gp-stat:not(:first-child) { border-left: 1px solid var(--line); }
.rm-gp-stat b { font-size: 18px; font-weight: 600; }
.rm-gp-stat span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); }
/* 440px cap, not 360px (design review, 11 Sep 2026): the Identity card is the one card that's
   actually a dense edit form (Name/Email/Birthday/VIP/Tags/Notes) — after its own padding, 440px
   gives .rm-fields' 2-column grid roughly the same per-field width the old 440px drawer had, so
   the busiest card doesn't end up more cramped than before the flyover existed. */
.rm-gp-body { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 24px; max-width: 1280px; margin: 0 auto; padding: 26px 40px 24px; align-items: start; }
.rm-gp-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rm-gp-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.rm-gp-card h3 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-dim); }
/* Most-ordered: a plain stacked list, no quantity badge (owner, 11 Sep 2026). */
.rm-gp-orderitem { padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.rm-gp-orderitem:first-child { border-top: 0; }
/* Bookings: search + a same-day filter, both client-side over the already-fetched list. */
.rm-gp-histfilter { display: flex; gap: 8px; margin-bottom: 10px; }
.rm-gp-histfilter #gHistQ { flex: 1; min-width: 0; }
.rm-gp-histfilter #gHistDate { flex: none; width: 150px; }
/* Charge for a request drops to its own full-width row under Save changes (owner, 11 Sep 2026:
   "should go down and save changes go up... same size as send thanks and save changes combined")
   — .rm-pf-break forces the flex-wrap footer to end its line there, so this button always spans
   the full row by itself instead of sharing space with whatever else happens to be in the footer. */
.rm-pf-break { flex-basis: 100%; height: 0; }
.rm-pf-charge { flex: 1 1 100%; justify-content: center; }
@media (max-width: 900px) {
  .rm-panel.full .rm-ph { padding: 18px 18px 16px; }
  .rm-gp-hero { flex-wrap: wrap; }
  .rm-gp-body { grid-template-columns: 1fr; padding: 18px; gap: 16px; }
  .rm-panel.full .rm-pf { padding: 12px 18px 16px; }
}

/* ---------- setup ---------- */
.rm-setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; max-width: 1100px; }
.rm-setup .rm-card h3 { margin: 0 0 12px; font-size: 15px; }
.rm-shiftrow { display: grid; grid-template-columns: 1fr 100px 24px 100px 30px; gap: 8px; align-items: center; margin-bottom: 8px; }
.rm-shiftrow button { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 16px; }

/* Keep the floor drawing headers coherent with the new shell */
.rm-main .a-report-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rm-main .a-report-head .tip-custom-in { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 7px 10px; font: inherit; font-family: var(--mono); font-size: 13px; }
.rm-main .a-report-head .btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 13px; padding: 7px 13px; border-radius: 9px; cursor: pointer; }
.rm-main .a-report-head .btn.primary { background: var(--brass); border-color: var(--brass); color: #fff; font-weight: 700; }
.rm-main .a-report-head .btn:disabled { opacity: 1; cursor: default; }
.rm-main .a-report-head .a-hint { font-size: 12px; color: var(--text-dim); }

@media (max-width: 900px) {
  /* one column: the icon bar takes only its own height, the page gets the rest */
  .rm-app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; }
  .rm-side { position: static; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; overflow-x: auto; }
  .rm-brand { border: 0; margin: 0; padding: 0 8px 0 0; }
  .rm-brand span, .rm-brand select { display: none; }
  .rm-nav { flex-direction: row; }
  .rm-nav button { padding: 8px 10px; font-size: 13px; }
  .rm-nav button span.rm-label { display: none; }
  .rm-side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .rm-side-foot b { display: none; }
  .rm-side-foot span { display: block; font-size: 10px; max-width: 90px; line-height: 1.2; }
  .rm-main { padding: 14px; }
  .rm-row { grid-template-columns: 56px 1fr 70px auto; }
  .rm-row .rm-table, .rm-row .rm-chan, .rm-row .rm-pill { display: none; }
  .rm-guestrow { grid-template-columns: 1fr 100px 50px; }
  .rm-guestrow .rm-dim:nth-child(4), .rm-guestrow > div:last-child { display: none; }
}

/* Setup, option A (owner, 8 Sep 2026): a rail of sections, one shown at a time, rows of label + control. */
.rm-setup2 { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 24px; align-items: start; }
.rm-setuprail { position: sticky; top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.rm-setuprail button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 12px; padding: 10px 14px; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--text-dim); cursor: pointer; }
.rm-setuprail button i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.rm-setuprail button .n { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--text-dim); }
.rm-setuprail button:hover { background: var(--panel-2); color: var(--text); }
.rm-setuprail button.on { background: color-mix(in srgb, var(--navy) 14%, transparent); color: var(--text); }
.rm-setuprail button.on i { background: var(--navy); }
.rm-secpos { color: var(--text-dim); font-size: 13px; margin: 6px 0 10px; }
.rm-sec { display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 6px 0 4px; }
.rm-sec.on { display: block; }
.rm-sec h2 { margin: 0; padding: 16px 22px 8px; font-size: 18px; }
.rm-sec .rm-lead { margin: 0; padding: 0 22px 10px; color: var(--text-dim); font-size: 13px; }
.rm-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; padding: 14px 22px; border-top: 1px solid var(--line); }
.rm-row > label { font-weight: 700; font-size: 13.5px; padding-top: 8px; text-transform: none; letter-spacing: 0; color: var(--text); }
.rm-row > label small { display: block; font-weight: 500; color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.rm-ctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-width: 0; }
.rm-ctl .rm-input, .rm-ctl .rm-select { width: auto; min-width: 140px; }
.rm-ctl .rm-input.xs { width: 76px; min-width: 0; text-align: center; }
.rm-ctl .rm-input#stMaps, .rm-ctl .rm-input#stOnlineNote { width: 100%; }
.rm-unit { color: var(--text-dim); font-size: 13.5px; }
.rm-rowhint { flex-basis: 100%; color: var(--text-dim); font-size: 12.5px; }
.rm-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); padding: 3px; }
.rm-seg button { border: 0; background: none; border-radius: 999px; padding: 7px 14px; font: inherit; font-weight: 600; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.rm-seg button.on { background: var(--navy); color: #fff; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-chip { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-weight: 600; font-size: 13px; background: var(--panel-2); color: var(--text-dim); cursor: pointer; text-transform: none; letter-spacing: 0; position: relative; }
.rm-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.rm-chip.on { background: color-mix(in srgb, var(--navy) 14%, transparent); border-color: var(--navy); color: var(--text); }
.rm-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rm-tbl th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.rm-tbl td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rm-tbl td .rm-input, .rm-tbl td .rm-select { width: 100%; min-width: 0; height: 34px; line-height: 32px; }
.rm-tbl td:nth-child(1) { width: 80px; } .rm-tbl td:nth-child(2) { width: 80px; } .rm-tbl td:nth-child(4) { width: 64px; } .rm-tbl td:nth-child(5) { width: 34px; }
.rm-tbl .rm-evdel { position: static; }
.rm-switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.rm-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.rm-switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.rm-switch i:after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.rm-switch input:checked + i { background: var(--navy); } .rm-switch input:checked + i:after { transform: translateX(18px); }
.rm-addbtn { margin-top: 8px; }
.rm-quote { flex-basis: 100%; background: var(--panel-2); border-left: 3px solid var(--navy); border-radius: 0 10px 10px 0; padding: 8px 12px; font-size: 13px; color: var(--text-dim); font-style: italic; }
.rm-shiftrow .rm-dim { text-align: center; }
@media (max-width: 900px) { .rm-setup2 { grid-template-columns: 1fr; } .rm-setuprail { position: static; flex-direction: row; flex-wrap: wrap; } .rm-row { grid-template-columns: 1fr; } }
.rm-ctl .rm-shiftrow .rm-input { min-width: 0; width: 100%; }
.rm-ctl #stShifts { flex-basis: 100%; }

/* Admin (standalone edition) */
.rm-adm-table td,.rm-adm-table th{vertical-align:middle;padding:10px 12px}
.rm-adm-table td small{display:block;font-weight:400}
.rm-adm-table select.rm-input{min-width:150px}
.rm-adm-actions{white-space:nowrap;text-align:right}
.rm-adm-form{margin-bottom:14px}
.rm-adm-form h2{margin:0 0 10px;font-size:16px}
.rm-adm-rcs{display:flex;flex-wrap:wrap;gap:10px 18px}
.rm-pinbanner{margin-bottom:14px;padding:14px 16px;border-left:4px solid var(--gold,#c9a24d)}
.rm-pin{font-size:22px;letter-spacing:.12em;font-family:ui-monospace,Consolas,monospace}

#pinError.info{color:var(--gold,#d8b25c)}

.rm-adm-seg{margin:0 0 14px}.rm-adm-seg .n{opacity:.7;margin-left:6px}
.rm-adm-rights{display:flex;flex-wrap:wrap;gap:8px 16px}
.rm-adm-rights .rm-check{white-space:nowrap}
.rm-adm-form .rm-check small{display:block;margin-left:22px}
