/* Hotel Operations' own layout on the shared console kit (UX-007, UX-008). The kit (/kit/chai-ui.css, loaded first)
 * owns every colour, both themes, the three faces and the header chrome; this file declares no colour and names only
 * the kit's tokens. tests/test_ux_identity.py fails on a literal colour here or in any page script. */
* { box-sizing: border-box; }
body { font-size: 16px; line-height: 1.5; }

/* the header is the kit's sticky topbar; the brand is a link home with its two lines stacked */
a.brand { text-decoration: none; color: var(--ink); min-height: var(--target); display: flex; align-items: center; }
a.brand > span { display: grid; }
.who { color: var(--ink2); font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

main { max-width: 960px; margin: 0 auto; padding: 16px; }
main:focus { outline: none; }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 19px; margin: 24px 0 8px; }
.muted { color: var(--ink2); }

.alert { max-width: 960px; margin: 12px auto 0; padding: 0 16px; }

/* the staff page's frame (R1, work-1343): the kit's shell — left navigation, full-width content, and a right rail when a
 * screen draws one. Outside a chain (sign-in, the workspace list) there is no navigation and the content is centred. The
 * guest pages have no .shell and keep their single centred column. */
.shell { max-width: 1680px; }
.shell:not(.in-workspace) { grid-template-columns: minmax(0, 1fr); }
.shell.in-workspace.with-rail { grid-template-columns: 220px minmax(0, 1fr) 280px; }
.shell > .viewport > main { max-width: none; margin: 0; padding: 0; }
.shell:not(.in-workspace) > .viewport > main { max-width: 960px; margin: 0 auto; }
.shell > .viewport > .alert { max-width: none; margin: 0 0 8px; padding: 0; }
.rail { border-left: 1px solid var(--line); padding: 29px 14px 24px;   /* its first line level with the navigation's (founder, 2026-10-16) */ position: sticky; top: 60px; align-self: start;
  max-height: calc(100vh - 60px); overflow-y: auto; background: var(--surface-2); }
.rail h2 { font: 600 13px/1.3 var(--head); margin: 0 0 10px; }
/* the rail and the navigation run the viewport's full height (founder, 2026-10-17, work-1390): a panel that stopped where
 * its content did read as broken. The rail is the screen's context panel, its cards or its form (Rates' quote), never more. */
@media (min-width: 1101px) {
  .rail { min-height: calc(100vh - 60px); }
  .shell.in-workspace > .leftnav { min-height: calc(100vh - 64px); }
}
/* the toolbar row under a screen's heading (work-1390): the screen's own controls at its start, its actions at its end, all
 * on one baseline; a screen's actions never sit in its title's row */
.page-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 12px; }
.page-tools-start, .page-tools-end { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.page-tools-end { margin-left: auto; }
.page-tools-start > label { margin: 0; }
/* the standard icons (screen.js icon()): beside words, or the whole of a 44 px control named for a screen reader */
.icon { flex: none; }
.shell .with-icon, .with-icon { display: inline-flex; align-items: center; gap: 7px; }
.shell button.icon-only, button.icon-only { display: inline-grid; place-items: center; width: var(--target); min-width: var(--target);
  height: var(--target); padding: 0; }
/* the topbar here is two lines of controls, about 63 px: the navigation fits under it, so a screen one viewport tall stays one (R5) */
@media (min-width: 1101px) { .shell.in-workspace > .leftnav { max-height: calc(100vh - 64px); } }
.prop-switch { display: flex; align-items: center; gap: 8px; font: 400 12px var(--mono); color: var(--ink2); }
.prop-switch select { width: auto; min-width: 180px; }
/* below 1100 px the navigation is one scrolling strip above the content (the kit's .leftnav strip, for every
 * workspace screen, with or without a rail), and the rail follows the content */
@media (max-width: 1100px) {
  .shell.in-workspace, .shell.in-workspace.with-rail { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
}
.alert { color: var(--bad-ink); font-weight: 600; }
/* a refusal stays in view under the kit's sticky header (60px), wherever the person has scrolled to (work-1339) */
.alert:not([hidden]) { position: sticky; top: 60px; z-index: 45; background: var(--bg); padding-top: 8px; padding-bottom: 8px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.alert:focus { outline: none; }

.card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; margin: 12px 0;
}

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.step {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--bg2);
}
.step[aria-current="step"] { border-color: var(--accent); }
.step > span:first-child { flex: 1 1 auto; }
/* a step's state is the kit's chip (UX-008 rule 5) */
.state { display: inline-flex; }

form { display: grid; gap: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
label[hidden] { display: none; }        /* `display: grid` above would otherwise show a hidden field */
input, select {
  font: inherit; color: var(--ink); background: var(--bg2);
  border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; min-height: var(--target); width: 100%;
}
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 600; padding: 0 4px; }
.row { display: grid; gap: 8px; grid-template-columns: 1fr 2fr 1fr 1fr; align-items: end; }
.row-space { grid-template-columns: 1fr 2fr 1fr; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
button, .button {
  font: inherit; font-weight: 600; cursor: pointer; min-height: var(--target); padding: 8px 14px;
  border-radius: var(--r); border: 0; background: linear-gradient(105deg, var(--accent), var(--accent2)); color: var(--button-ink);
  text-decoration: none; display: inline-flex; align-items: center;
}
/* the kit's theme control is radios in labels; nothing above reaches it, and its own rules stay in force */
button.secondary { background: transparent; color: var(--accent-ink); border: 1px solid var(--line); }
button.danger { background: var(--bad-bg); color: var(--bad-ink); border: 1px solid var(--bad); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }
.once { word-break: break-all; font-family: var(--mono); font-size: 13px; }

@media (max-width: 600px) {
  .row, .row-space { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 21px; }
}

/* floor map (M2a): the map's names, each a kit token, so both themes follow the kit */
:root { --map-bg: var(--surface-2); --shape: var(--accent-bg); --shape-venue: var(--accent2-bg); --shape-line: var(--accent);
        --shape-oos: var(--mute-bg); --select: var(--warn); }
.map-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg2); }
.map { display: block; width: 100%; height: auto; max-height: 70vh; touch-action: none; }
.map-floor { fill: var(--map-bg); }
.shape { cursor: pointer; }
.shape rect { fill: var(--shape); stroke: var(--shape-line); stroke-width: 2; }
.shape.venue rect { fill: var(--shape-venue); }
.shape.oos rect { fill: var(--shape-oos); stroke-dasharray: 8 6; }
.shape text { fill: var(--ink); font-size: 24px; font-weight: 600; pointer-events: none; }
.shape.selected rect { stroke: var(--select); stroke-width: 6; }
.shape:focus { outline: none; }
.shape:focus-visible rect { stroke: var(--accent-ink); stroke-width: 6; }
tr.selected td { background: var(--map-bg); font-weight: 600; }
.warn { color: var(--warn-ink); font-weight: 600; }
li.error { color: var(--bad-ink); }
li.warning { color: var(--warn-ink); }
h3 { font-size: 16px; margin: 0 0 8px; }

/* booking workspace (M2b) */
.booking-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.booking-layout.with-drawer { grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); }
/* minmax(0, …) and min-width: 0, or a track grows to its widest table and the page scrolls sideways on a phone */
.booking-layout > * { min-width: 0; }
@media (max-width: 860px) { .booking-layout { grid-template-columns: minmax(0, 1fr); } }
#bk-drawer { position: sticky; top: 12px; }
.shape.avail-booked rect { fill: var(--map-bg); stroke-dasharray: 10 6; }
.shape.avail-out_of_service rect { fill: var(--shape-oos); stroke: var(--ink2); }
.shape.avail-available rect { fill: var(--shape); }
.legend { font-size: 13px; }
.tl-booked { background: var(--shape); font-size: 12px; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }

/* folios and finance (M3a) */
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.balance { font-size: 20px; font-weight: 700; }
tr.reversed td { color: var(--ink2); text-decoration: line-through; }
tr.reversed td:last-child { text-decoration: none; }
a.button.secondary { background: transparent; color: var(--accent-ink); border: 1px solid var(--line); }
@media print {
  /* paper is light whatever the screen's theme: the system's own page colours, not a brand colour */
  :root { color-scheme: light; }
  .bar, .no-print, #alert, .ui-toasts, form, button { display: none !important; }
  body { background: Canvas; color: CanvasText; }
  main { max-width: none; padding: 0; }
}

/* channel (M3b) */
tr.attention td { background: var(--map-bg); }
button[disabled] { opacity: 0.55; cursor: not-allowed; }

/* rosters (M4a) */
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; margin: 2px 4px 2px 0; }
.chip button { min-height: var(--target); min-width: var(--target); padding: 0 8px; justify-content: center; }
.shift-cards { gap: 12px; }
.shift-when { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.swap-form { display: grid; gap: 8px; }
@media (max-width: 600px) {
  .actions button, .actions .button { flex: 1 1 auto; justify-content: center; }
  .shift-cards .card { padding: 12px; }
}

/* procedures and modules (M4b) */
/* the whole label is the target (44 px), the box inside it is easy to see */
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; min-height: var(--target); cursor: pointer; }
label.check input { width: 22px; height: 22px; min-height: 0; flex: none; }
/* the Accept page's details (work-1336): label and value side by side */
.inv-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
.inv-details dt { color: var(--ink2); }
.inv-details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
textarea { min-height: 88px; font: inherit; color: var(--ink); background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; width: 100%; }
details summary { cursor: pointer; font-weight: 600; }

/* the guest pages (work-1119): a booking's details as a two-column list, and the privacy link under the page */
dl.card, dl.facts { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 16px; }
dl.card dt, dl.facts dt { color: var(--ink2); }
dl.card dd, dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.guest-foot { max-width: 960px; margin: 24px auto; padding: 0 16px; font-size: 14px; }
.guest-foot a { display: inline-flex; align-items: center; min-height: var(--target); }   /* a 44 px target (work-1202) */

/* links that act as controls are 44 px targets (UX-008 rule 7): a property's name and its sections */
a.target, .links a { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 6px; }
.links { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -6px; }
.ui-head .ui-actions .button { white-space: nowrap; }

/* A grid list's one column never grows past the screen (work-1195, measured in a browser at 390 px): without a column
 * template its track is as wide as its widest content (a table in the staff step, a long API path in a module's
 * manifest), and the page scrolled sideways. The track is minmax(0, 1fr), its items may shrink, and long words wrap. */
.steps, ul.plain, form, label, a.brand > span { grid-template-columns: minmax(0, 1fr); }
.steps > li, ul.plain > li { min-width: 0; }
.card { overflow-wrap: anywhere; }

/* the Inbox thread's media (W4e): an image fits the column and never overflows it */
.ib-media { margin: 0; }
.ib-media img { display: block; max-width: 100%; max-height: 360px; height: auto; border-radius: var(--r); }

/* console density on the staff page (R2, work-1344; founder ruling 2026-10-16): the kit's screen wrapper at its 13.5 px
 * body, its table look with compact rows, and its button look — secondary unless a screen marks the one primary.
 * Scoped to the staff frame (.shell); the guest pages keep 16 px and their own buttons. 44 px targets stay (UX-008
 * rule 7): a row is as tall as its button, not the button plus padding. */
.shell .ui-screen label { font-size: 12.5px; }
.shell .ui-screen input, .shell .ui-screen select, .shell .ui-screen textarea { font-size: 13.5px; }
.shell .ui-screen h3 { font-size: 14px; }
.shell table { font-size: 14.5px; }
.shell th, .shell td { padding-top: 0; padding-bottom: 0; padding-left: 12px; padding-right: 12px; height: var(--target); vertical-align: middle; }
.shell thead th { font: 400 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); background: var(--surface-2); }
.shell tbody tr:hover { background: var(--surface-2); }
.shell .table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg2); }
.shell .table-wrap tbody tr:last-child td { border-bottom: 0; }
.shell td > button, .shell td > .button, .shell td > a.button { padding: 0 11px; }
.shell button, .shell .button { font: 500 14px/1.2 var(--sans); padding: 7px 13px; border: 1px solid var(--line);
  background-image: none; background-color: var(--bg2); color: var(--ink); white-space: nowrap; }
.shell button:hover, .shell .button:hover { border-color: var(--accent2); }
.shell button.primary, .shell .button.primary { background-image: linear-gradient(105deg, var(--accent), var(--accent2));
  background-color: var(--accent); color: var(--button-ink); border: 0; }   /* the colour under the gradient is what contrast is measured on */
.shell button.danger { background-image: none; background-color: var(--bad-bg); color: var(--bad-ink); border-color: var(--bad); }
.shell button.secondary, .shell a.button.secondary { background-image: none; background-color: var(--bg2); color: var(--accent-ink); }
.shell .card { padding: 12px 14px; margin: 10px 0; }
.shell .ui-head { margin: 8px 0 12px; }

/* Today (R3, work-1345): arrivals and departures side by side; the rail's cards are links to where each is dealt with */
.today-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.today-grid .card { margin: 0; }
.today-grid h2 { margin-top: 0; }
@media (max-width: 860px) { .today-grid { grid-template-columns: minmax(0, 1fr); } }
#td-stats { margin-top: 4px; grid-template-columns: repeat(8, minmax(0, 1fr)); }
/* the Bookings card (work-1391): two columns wide, its label and + on one line, then confirmed | unconfirmed */
#td-stats .td-bookings { grid-column: span 2; position: relative; }
/* the + in the card's corner, so its label and numbers sit on the same lines as the other cards' */
.td-bookings-head .icon-only { position: absolute; top: 6px; right: 6px; }
.td-bookings-split { display: grid; grid-template-columns: 1fr 1fr; }
.td-bookings-half { display: grid; color: inherit; text-decoration: none; padding-right: 10px; }
.td-bookings-half + .td-bookings-half { border-left: 1px solid var(--line); padding-left: 12px; }
.td-bookings-half:hover .ui-stat-value { color: var(--accent-ink); }
#td-stats .ui-stat { padding: 10px 12px; }
@media (max-width: 1100px) { #td-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rail-card { display: grid; gap: 2px; border: 1px solid var(--line); background: var(--bg2); border-radius: var(--r); padding: 10px 12px;
  margin: 0 0 8px; color: inherit; text-decoration: none; min-height: var(--target); }
.rail-card b { font-size: 13px; }
.rail-card span { font-size: 12.5px; color: var(--ink2); }
a.rail-card:hover { border-color: var(--accent2); }

/* setup as a stepper and Settings as a section (R4, work-1346) */
.stepper { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.stepper li a { display: flex; align-items: center; gap: 8px; min-height: var(--target); padding: 6px 10px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--bg2); color: var(--ink2); text-decoration: none; }
.stepper li[aria-current="step"] a { border-color: var(--accent); color: var(--ink); font-weight: 600; background: var(--glow); }
.stepper li[data-state="done"] a, .stepper li[data-state="skipped"] a { color: var(--ink); }
.stepper-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font: 12px var(--mono); }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.step-head h2 { margin: 0 0 8px; }
.step-nav { margin-top: 12px; justify-content: space-between; }
.rail .stepper { grid-template-columns: 1fr; margin: 10px 0; } .rail .stepper li a { font-size: 13px; }   /* in the rail the steps run down, one per line */
.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-layout .ui-subnav { display: grid; border-bottom: 0; margin: 0; }
.settings-layout .ui-subnav a { border-bottom: 0; border-left: 3px solid transparent; border-radius: 0 var(--r) var(--r) 0; }
.settings-layout .ui-subnav a[aria-current="page"] { border-left-color: var(--accent); }
@media (max-width: 860px) { .settings-layout { grid-template-columns: minmax(0, 1fr); } .settings-layout .ui-subnav { display: flex; overflow-x: auto; } }
#team-tabs { margin-top: 4px; }

/* Bookings (R5, work-1347; the wireframe's Bookings): the filter bar, the view switch, the week grid that scrolls in its own
 * panel so the page stays one screen tall, and the booking drawer beside it */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.page-tools #bk-search { display: block; margin: 0; }
.page-tools #bk-search .grid { grid-template-columns: minmax(140px, 200px) minmax(140px, 200px) auto; }
.bk-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; align-self: end; }
.bk-chips-h { flex-basis: 100%; font-weight: 600; font-size: 12.5px; }   /* as the .shell labels beside it */
.shell .bk-chips .bk-chip { min-height: var(--target); padding-left: 12px; padding-right: 12px; border-radius: 999px; background-color: var(--bg2); color: var(--ink2); font-weight: 500; }
.shell .bk-chips .bk-chip[aria-pressed="true"] { border-color: var(--accent); background-color: var(--glow); color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .page-tools #bk-search, .page-tools #bk-search .grid { width: 100%; } .page-tools #bk-search .grid { grid-template-columns: 1fr 1fr; } .page-tools #bk-search .bk-chips { grid-column: 1 / -1; } }
.bk-views { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.bk-views a { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 14px; color: var(--ink2); text-decoration: none; border-right: 1px solid var(--line); }
.bk-views a:last-child { border-right: 0; }
.bk-views a[aria-current="page"] { background: var(--glow); color: var(--ink); font-weight: 600; }
/* 360px: the header, the heading with its breadcrumb (work-1387, ~50px) and the bar above the grid */
.bk-grid-wrap { overflow-x: auto; overflow-y: auto; max-height: calc(100vh - 360px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg2); }
.shell table.bk-grid { border-collapse: separate; border-spacing: 0; }
.shell .bk-grid th, .shell .bk-grid td { height: 40px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding-left: 4px; padding-right: 4px; }
.bk-grid thead th { position: sticky; top: 0; z-index: 2; }
.bk-grid .bk-unit { position: sticky; left: 0; z-index: 1; background: var(--bg2); white-space: nowrap; padding-left: 10px; text-align: left; }
.bk-grid thead th:first-child { left: 0; z-index: 3; }
.shell .bk-grid button { width: 100%; min-height: var(--target); padding: 0 8px; justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; }
.shell .bk-grid button.bk-free { color: var(--ink2); border-style: dashed; justify-content: center; background-color: transparent; }
.shell .bk-grid button.bk-bar-stay { background-color: var(--accent-bg); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.shell .bk-grid button.tone-warn { background-color: var(--warn-bg); border-color: var(--warn); }
.shell .bk-grid button.tone-accent { background-color: var(--accent2-bg); border-color: var(--accent2); }
.shell .bk-grid button.tone-muted { background-color: var(--surface-2); border-color: var(--line); color: var(--ink2); }
.bk-grid small { font-weight: 400; color: var(--ink2); white-space: pre; }   /* a flex item keeps the space before " · 2" */
.bk-drawer-col { position: sticky; top: 72px; max-height: calc(100vh - 84px); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--bg2); padding: 10px 12px; }
.bk-drawer-col > .card { border: 0; padding: 0; margin: 0; background: none; }
.bk-drawer-col .bk-close { float: right; }
#bk-drawer { position: static; }
@media (max-width: 860px) { .booking-layout.with-drawer { grid-template-columns: minmax(0, 1fr); } .bk-drawer-col { position: static; max-height: none; } }


/* the floor plan (R6, work-1348): the map beside the selected space and what is not placed yet; the rail says whether
 * the map is ready; set-up opens in drawers */
.page-tools .fp-floor { min-width: 220px; }
/* the map and, beside it, the selected space: both columns start at the map's own top (work-1390) */
.fp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.fp-side { display: grid; gap: 12px; }
.fp-side .card { margin: 0; }
.fp-side h2 { font-size: 15px; margin: 0 0 8px; }
.fp-sel-name { margin: 0 0 8px; font-size: 15px; }
.fp-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: 13px; }
.fp-facts dt { color: var(--ink2); }
.fp-facts dd { margin: 0; }
.fp-pos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fp-unplaced-list { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 1100px) { .fp-layout { grid-template-columns: minmax(0, 1fr); } }
/* the roster and procedures (R7, work-1349): the week as people × days with the gaps in a row of their own and an
 * assign popup beside the cell; the day's procedures as three numbers and a grid of checklists */
.page-tools #ro-week, .page-tools #hb-day { margin: 0; }
.ro-grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg2); }
.shell table.ro-grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 680px; table-layout: fixed; }   /* seven equal days */
.ro-grid thead th:first-child { width: 140px; }
.shell .ro-grid th, .shell .ro-grid td { vertical-align: top; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  padding-top: 6px; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; position: relative; }
.ro-grid tbody th { white-space: nowrap; text-align: left; min-width: 120px; }
.ro-grid tbody th .muted { display: block; font-weight: 400; font-size: 12px; }
.ro-grid td { min-width: 80px; }
#rail #ro-staff li, #rail #ro-issues li { font-size: 12.5px; line-height: 1.4; }
.ro-grid td.ro-off { background: var(--surface-2); }
.ro-grid .ro-gaps th, .ro-grid .ro-gaps td { background: var(--warn-bg); }
.shell .ro-grid button.ro-gap, .shell .ro-grid button.ro-shift { display: flex; flex-direction: column; align-items: flex-start; width: 100%;
  min-height: var(--target); margin-bottom: 4px; padding-left: 8px; padding-right: 8px; font-size: 12.5px; text-align: left; }
.shell .ro-grid button.ro-gap { border-style: dashed; border-color: var(--warn); background-color: transparent; color: var(--ink); }
.shell .ro-grid button.ro-shift { border-color: var(--accent); background-color: var(--accent-bg); color: var(--ink); font-weight: 600; }
.ro-grid button small { font-weight: 400; color: var(--ink2); white-space: pre; }
.ro-pop { position: absolute; z-index: 30; top: 100%; left: 0; width: 280px; display: grid; gap: 8px; padding: 12px; margin-top: 4px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 18%, transparent); }
.ro-pop p { margin: 0; }
.ro-pop .ro-pop-assign { display: grid; gap: 8px; }
.ro-pop-people li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
ul.plain.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }   /* over ul.plain's one column */
.hb-grid > li.card { margin: 0; }
#hb-stats { margin-bottom: 12px; }

/* the console screens (R8, work-1350): a table, with the selected item's detail docked beside it or in a drawer */
.rail-section { margin-bottom: 16px; }
.rail-section h2 { font: 600 13px/1.3 var(--head); margin: 0 0 8px; }
.rail-section form .actions { margin-top: 8px; }
/* an open conversation (work-1390): the conversations and the messages, each column opening with its own heading on one
 * line; no list numbers on messages or notes; the rail's chips wrap inside it and its stay link reads at the rail's size */
ol.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.ib-layout .section-head > h2 { font-size: 15px; }
.ib-mini { gap: 8px; }
/* the conversation as a chat (founder, 2026-10-17, work-1393): the guest on the left, the hotel on the right, each
 * message at most three quarters of the column, its corner pointing at its writer */
ol.ib-chat { display: flex; flex-direction: column; gap: 10px; }
.rail .ib-channel { font-size: 13px; margin: 0; }
.ib-mini-channel { font-size: 12.5px; }
.ib-channel-cell { white-space: nowrap; font-size: 13.5px; }
.shell .ib-chat .ib-bubble { margin: 0; max-width: 75%; border-radius: 14px; }
.shell .ib-chat .ib-in { align-self: flex-start; border-bottom-left-radius: 4px; background: var(--bg2); }
.shell .ib-chat .ib-out { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--accent-bg);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ib-bubble > p:first-child { margin-top: 0; }
.ib-bubble > p:last-child { margin-bottom: 0; }
/* both columns' header rows are one control tall, so their titles sit on one line whether or not a row has controls */
.ib-layout .section-head { min-height: var(--target); margin: 0 0 10px; }
.ib-mini-item { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg2); }
.ib-mini-item[aria-current="true"] { border-color: var(--accent); background: var(--accent-bg); }
.ib-mini-item .ib-last { font-size: 12.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a row of chips that wraps: the side list's and the rail's. Never the wide table's cell, which stays a table cell (a
 * flex cell breaks the table's rows into each other, as work-1390 did on the Inbox list) */
div.ib-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
td.ib-chips > * { margin: 2px 4px 2px 0; }
.ib-linked { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rail .ui-chip { white-space: normal; max-width: 100%; flex-shrink: 1; }
.rail a.target { font-size: 13px; }
.rail-section + .rail-section, .rail > section + section { margin-top: 18px; }
.rail #ib-about [data-reservation] { display: block; margin-top: 10px; font-size: 13px; line-height: 1.45; min-height: 0; }
.ib-table td { vertical-align: top; }
/* a + that adds to what a row of tabs or a table's header lists (work-1391): at that row's far right, not under the heading */
.tabs-row { display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid var(--line); margin: 0 0 15px; }
.tabs-row > .ui-tabs { flex: 1; border-bottom: 0; margin: 0; }
.tabs-row > .icon-only { margin-bottom: 4px; }
.shell th.ra-add-col { width: 1%; text-align: right; padding-right: 6px; }
/* the Inbox side list keeps every chip and its last message inside its card, however long (work-1391) */
.ib-mini-item, .ib-mini-item > * { min-width: 0; }
.ib-mini-item .ui-chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; flex-shrink: 1; }
.ib-table .ib-last { max-width: 420px; font-size: 13px; }
.ib-table tr[aria-current="true"] td { background: var(--glow); }
.ib-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .ib-layout { grid-template-columns: minmax(0, 1fr); } .ib-list-col { order: 2; } }
.ra-layout { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
#ra-plans tr[aria-current="true"] td { background: var(--glow); }
#ra-detail { margin: 0; }
#ra-detail h2 { font-size: 15px; margin: 16px 0 6px; }
#rail #ra-quote .grid { grid-template-columns: minmax(0, 1fr); }
#rail #ra-quote h2 { font: 600 13px/1.3 var(--head); margin: 0 0 6px; }
@media (max-width: 1100px) { .ra-layout { grid-template-columns: minmax(0, 1fr); } }
#rail #ch-status, #rail #ch-outbound, #rail #ch-reconcile, #rail #ch-live { margin-bottom: 16px; }
#rail #ch-outbound h2, #rail #ch-reconcile h2, #rail #ch-live h2, #rail #ch-status h2 { font: 600 13px/1.3 var(--head); margin: 0 0 6px; }
#rail .facts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; font-size: 12.5px; margin: 6px 0; }
#rail .facts dd { margin: 0; text-align: right; }
#rail #ch-live ul { font-size: 12.5px; padding-left: 18px; }
#rail p { font-size: 12.5px; }
.ui-drawer #ch-preview-out .table-wrap { max-width: 100%; }
td.nowrap { white-space: nowrap; }
/* a day or week between its Previous and Next buttons sits on their centre line (founder, 2026-10-16) */
#hb-day, #ro-week { align-items: center; }
.day-label { padding-left: 6px; padding-right: 6px; }
/* a section's own header row (work-1381; founder, 2026-10-16): its title on the left and the controls that act on that
   section on the right, every one on the title's centre line, below the page's heading and never rising into it */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: 24px 0 8px; }
.section-head > h2 { margin: 0; }
.section-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* the map section opens straight under the toolbar row, its title row first */
#map-section > .section-head:first-child { margin-top: 0; }
