/* ============================================================================
   BLANK Sales · agent front — layout glue only. Every colour, radius, shadow and font is a CORE token from styles.css;
   nothing here adds a new one. Keep this file small: a new look belongs in styles.css for both apps.
   ============================================================================ */

/* booking rows: the whole row opens the booking with CORE's boxed-row lift (no underline: CORE titles have none) */
.rowi[data-href] { cursor: pointer; transition: transform 160ms var(--ease); }
.rows.boxed .rowi[data-href]:hover { transform: translateY(-1px); }
.rowi a.t { display: block; }
/* the short line beside a status (Since 27 OCT, RM … to collect, 3 left): CORE's grey end text, red when it is an alert */
.hint { font-size: 12px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.hint.bad-t { color: var(--bad); }
.bk-tools { align-items: center; }
.bk-tools .search.inline { margin-left: auto; }

/* the three steps: CORE's tabs inside a card (icon · Owner / Deal / Handover · count); a red "n left" chip, or a tick when
   done. The chip's "left" is in its text (no gap before it), so a screen reader hears "5 left" */
.wiz-tabs { gap: 4px; }
.wiz-tabs .ws { white-space: nowrap; }
.wiz-tabs .chip.bad { gap: 0; }
.wiz-tabs .cnt svg.ic { width: 14px; height: 14px; vertical-align: -2px; }
/* read by a screen reader, never seen */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* a locked or unavailable choice (CORE's disabled look): the picked one stays readable, the others fade */
.tick[disabled] { cursor: not-allowed; }
.tick[disabled]:not([aria-pressed="true"]) { opacity: .45; border-style: dashed; }
.tick[disabled][aria-pressed="true"] { opacity: 1; cursor: default; }
/* the booking form on a computer (Calvin 2026-11-02: use the whole width): form left, summary + gaps on the right */
.wiz-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.wiz-main { min-width: 0; }
.wiz-rail { display: none; }
.wiz-rail .rail-step + .rail-step { margin-top: 4px; }
.wiz-rail .rail-step .lbl { display: block; font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 6px; }
@media (min-width: 1180px) {
  .wiz-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .wiz-rail { display: grid; gap: 16px; position: sticky; top: 16px; }
}
@media (min-width: 1500px) { .wiz-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
/* CORE's .more is a link; as a button it loses the browser's border */
button.more { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.wiz-foot { padding-top: 16px; padding-bottom: 16px; }
.wiz .field .lbl, .wiz .field label { flex-wrap: wrap; }

/* a status line in lemon (the PTAA waits for the owner's signature): CORE's accent pair */
.rs-status.lemon-box { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1px var(--accent-edge); }
.rs-status > span { min-width: 0; }
.nw { white-space: nowrap; }

/* expected rent: CORE's room row with three parts (name, rent, remove) */
.room-row.rent-row { grid-template-columns: minmax(0, 1fr) 120px 32px; }

/* keys: four counters */
.kc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kc { padding: 12px; border-radius: var(--r-tile); background: var(--sunken); }
.kc-ctl { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kc-ctl b { font-size: 20px; font-weight: 800; }
.kc-ctl .btn.ghost { background: var(--card); }
.app-row { display: grid; gap: 12px; padding: 12px; border-radius: var(--r-tile); background: var(--sunken); }
.app-row .field input, .app-row .field select { background-color: var(--card); }
/* a building-app password with Show / Hide beside it, the button as tall as the box */
.pw-row { display: flex; gap: 8px; align-items: center; }
.pw-row input { flex: 1 1 auto; min-width: 0; }
.pw-row .btn { flex: none; height: 42px; }
/* a cabinet colour chip shows its colour (prototype KCOL); the grey edge keeps the light KC2 visible on a light card and on
   the yellow of a picked chip in dark mode (CORE's --accent-edge is transparent there) */
.tick .sw { width: 14px; height: 14px; border-radius: var(--r-pill); border: 1px solid var(--text-3); flex: none; }
.up-done .chip { max-width: 60%; }

/* the booking page: two columns like CORE's case page. CORE's .grid.side also picks up the sidebar's .side rule
   (sticky, 100dvh, 12px padding), so Sales uses its own name for the same columns */
.grid.sides { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1180px) { .grid.sides { grid-template-columns: minmax(0, 1fr); } }
.fact.wide { grid-column: 1 / -1; }
/* a shown email or phone breaks inside its box on a phone instead of pushing the page sideways */
.facts .masked .v, .facts .fact.pii .v { min-width: 0; overflow-wrap: anywhere; }
.stages .tl.later .s { color: var(--text-3); }
.stages .tl.later .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--text-3); }
.stages .tl .s .chip { margin-left: 6px; vertical-align: 1px; }
.ta-list.docs { padding: 0; }
.next-card .rs-acts .btn { min-width: 0; }

@media (max-width: 1024px) {
  .kc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* phones: every tap target is at least 44 px (agents book on their phones); the rest stays CORE */
@media (max-width: 560px) {
  .card.wiz-steps { padding: 6px; }
  .wiz-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wiz-tabs button { height: 44px; padding: 0 4px; justify-content: center; gap: 4px; font-size: 12px; min-width: 0; }
  .wiz-tabs button > svg.ic { display: none; }
  .wiz-tabs .chip { height: 20px; padding: 0 6px; }
  /* the number only on a phone; "left" is still read out */
  .wiz-tabs .chip .cl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* buttons, icon buttons, the To do / All / Opened switch, small links, Show, checkboxes, boxes */
  .main .btn, .main .btn.small, .sheet .btn { height: 44px; }
  .main .btn.icon, .main .btn.icon.small, .sheet .btn.icon { width: 44px; }
  .main .seg button, .main .seg a { height: 44px; min-width: 44px; justify-content: center; }
  .main .more, .sheet .more { min-height: 44px; }
  .main .linkish { min-height: 44px; min-width: 44px; }
  .main .masked button { height: 44px; }
  .main .check, .sheet .check { min-height: 44px; }
  .main .tick, .sheet .tick { min-height: 44px; min-width: 44px; justify-content: center; }
  .main .pill-select, .main .search input { height: 44px; }
  .main .pill { height: 44px; }
  .main .field input:not([type="checkbox"]):not([type="radio"]), .main .field select,
  .sheet .field input:not([type="checkbox"]):not([type="radio"]), .sheet .field select { min-height: 44px; }
  .sheet-head [data-close] { width: 44px; height: 44px; }
  /* the top bar: the B mark and the search box */
  .side .brand-link { min-height: 44px; }
  .side .search input { height: 44px; }
  /* the (i) and the breadcrumb keep CORE's look; an invisible 44 px box around them takes the tap */
  .info, .main .crumbs a { position: relative; }
  .info::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -55%); }
  .main .crumbs a::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  .bk-tools .search.inline { margin-left: 0; width: 100%; flex: 1 1 100%; }
  .room-row.rent-row { grid-template-columns: minmax(0, 1fr) 104px 44px; }
  .room-row.rent-row .btn.icon.small { height: 44px; }
  .pw-row .btn { height: 44px; }
  .next-card .rs-acts .btn { flex: 1 1 auto; }
}

/* the Money card: CORE's money strip with three figures (Owner pays · Received · Still to collect). In a narrow card (a phone,
   or the side column on a computer) the third takes its own row, so an amount with sen never breaks or spills out of its box */
.money-box { container-type: inline-size; }
.rs-money.m3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.rs-money.m3 b { display: block; white-space: nowrap; }
@container (max-width: 420px) { .rs-money.m3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rs-money.m3 > span:last-child { grid-column: 1 / -1; } }
/* a locked box (the signed quote once a payment is recorded): the same dimmed look CORE gives a disabled select */
.wiz .field input:disabled { opacity: .55; cursor: not-allowed; }
.fb-drop.up-done > .muted > svg.ic { width: 15px; height: 15px; vertical-align: -3px; }

/* gaps are warnings (Calvin 2026-11-02: an alert reads in red): CORE's bad pair, the same red as "Ending this week" */
.pill[data-gap] { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.pill[data-gap]:hover, .pill[data-gap]:focus-visible { border-color: var(--bad); color: var(--bad); }
/* red text ("3 left", Out of date) is CORE's .bad-t, set to CORE's --bad: one red for every alert word, the same as the
   chips and pills (CORE's .bad-t is a fixed #B3261E in light mode; dark --bad is its #FF8A80). A .help line stays red too */
.bad-t, .field .help.bad-t { color: var(--bad); }

/* With admin and Pending approval: CORE's warn pair on the chip, the same amber as their status line and Continue box */
.chip.tone-warn { background: var(--tone-bg); color: var(--tone-fg); }

/* v0.5 · after Submit: the payment plan in Money, Quote & package (history), VOs, the Which VO pick, Approvals items.
   CORE rows, chips and status lines; only the spacing is set here */
.money-box .plan-h { margin-top: 4px; }
.rows.plan .pref, .rows.qh .pref { padding: 10px 0; }
.rows.plan .pv, .rows.qh .pv { gap: 8px; align-items: center; flex-wrap: wrap; }
.rows.plan .pv b, .rows.qh .pv b { font-size: 14px; font-weight: 800; white-space: nowrap; }
.rows.plan .k b, .rows.qh .k b, .rows.plan .k small, .rows.qh .k small { overflow-wrap: anywhere; }
.vo-list { display: grid; }
.vo-item { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.vo-item:first-child { border-top: 0; padding-top: 2px; }
.vo-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.vo-top .k { display: grid; gap: 2px; min-width: 0; }
.vo-top .k b { font-size: 14px; overflow-wrap: anywhere; }
.vo-top .k small { font-size: 12px; color: var(--text-3); }
.vo-top > b { font-size: 15px; font-weight: 800; white-space: nowrap; }
/* the profile in the menu when previewing as the sales director: his role, not a name, on up to two lines */
.side-profile .who b.role-only { white-space: normal; }
/* "Go to it" lands on the item without a ring: the page scrolls it to the middle */
.vo-item:focus, .chg-box:focus { outline: none; }
.vo-pick { display: grid; gap: 8px; }
.vo-pick .tick { justify-content: space-between; width: 100%; min-height: 44px; text-align: left; }
.vo-pick .tick .vn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vo-pick .tick b { flex: none; }

/* the bell (prototype v22): how many are new in CORE's red badge (.badge.hot), on the corner of the top bar's bell on a phone or
   tablet, beside the name on a computer */
.nbell { position: relative; }
.nbell .badge { position: absolute; top: -6px; right: -4px; pointer-events: none; }
.nbell-row .badge { margin-left: auto; }

/* v0.7.2 · the notification panel (Calvin 2026-11-05, his reference 5.png: its structure, CORE's look). A computer: a popover under
   the bell (CORE's search-results card: card, line, 20 px corners, the pop shadow), the list scrolling inside. A phone or tablet: CORE's
   sheet, nearly full height, the same content. Rows: the avatar (the role dark, a person grey) with the badge of what happened in its
   corner, the sentence, the time; an unread row has CORE's info-blue dot (red stays for alerts) */
.ntf-pop { position: fixed; z-index: 45; top: 72px; left: 12px; width: 400px; max-height: 70vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-pop); overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { .ntf-pop:not([hidden]) { animation: ntfIn 180ms var(--ease) both; } }
@keyframes ntfIn { from { opacity: 0; transform: translateY(-6px); } }
.ntf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 12px 6px 20px; flex: none; }
.ntf-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; min-width: 0; }
.ntf-all { border: 0; background: transparent; cursor: pointer; white-space: nowrap; flex: none; }
.ntf-bar { display: flex; align-items: center; gap: 8px; padding: 4px 12px 10px 16px; border-bottom: 1px solid var(--line); flex: none; }
.ntf-tabs { flex: 1; min-width: 0; flex-wrap: nowrap; }
.ntf-tabs button { cursor: pointer; }
.ntf-fwrap { position: relative; flex: none; }
.ntf-fbtn.on { background: var(--text-1); color: var(--card); border-color: var(--text-1); }
.ntf-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 3; width: 248px; max-width: calc(100vw - 48px); padding: 6px; display: grid; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-tile); box-shadow: var(--shadow-pop); }
.ntf-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: var(--r-ctl); background: transparent; text-align: left; cursor: pointer; }
.ntf-menu button:hover, .ntf-menu button[aria-checked="true"] { background: var(--sunken); }
.ntf-menu button > span { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.ntf-menu b { font-size: 14px; }
.ntf-menu small { font-size: 12px; color: var(--text-3); }
.ntf-menu svg.ic { color: var(--text-2); }
.ntf-menu svg.ic.ntf-on { color: var(--text-1); }
.ntf-fon { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0 20px; flex: none; }
.ntf-list { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 2px 8px 12px; }
.ntf-list > .empty { margin: 12px 8px 4px; }
.ntf-gh { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 8px 12px 0; }
.ntf-rows { display: grid; gap: 2px; }
.ntf-row { border-radius: var(--r-tile); cursor: pointer; transition: background 120ms var(--ease); }
.ntf-row:hover { background: var(--sunken); }
.ntf-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-tile); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.ntf-av { position: relative; display: block; width: 40px; height: 40px; }
.ntf-av .avatar { width: 40px; height: 40px; font-size: 13px; }
.ntf-av .avatar.ntf-role { background: var(--text-1); color: var(--card); }
/* a role shows its icon (the role switch's), a person their initials */
.ntf-av .avatar.ntf-role svg.ic { width: 18px; height: 18px; vertical-align: 0; }
.ntf-badge { position: absolute; right: -6px; bottom: -5px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: var(--tone); color: var(--on-inverse); box-shadow: 0 0 0 2px var(--card); }
.ntf-row:hover .ntf-badge { box-shadow: 0 0 0 2px var(--sunken); }
.ntf-badge svg.ic { width: 12px; height: 12px; stroke-width: 2.5; vertical-align: 0; }
.ntf-badge.tone-warn { color: var(--ink); }
.ntf-badge.lemon { background: var(--accent); color: var(--on-accent); }
.ntf-txt { display: grid; gap: 3px; min-width: 0; padding-top: 1px; }
.ntf-s { font-size: 14px; line-height: 1.4; color: var(--text-2); }
.ntf-s b { color: var(--text-1); font-weight: 700; }
.ntf-row.un .ntf-s { color: var(--text-1); }
.ntf-tail { font-size: 12px; font-weight: 600; color: var(--text-3); }
.ntf-tail.bad-t { color: var(--bad); }
.ntf-tail.tone-good, .ntf-tail.tone-warn { color: var(--tone-fg); }
.ntf-end { display: grid; justify-items: end; gap: 8px; padding-top: 2px; }
.ntf-end time { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.ntf-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tone); }
/* the one button of a row that waits for you, under its sentence */
.ntf-act { margin: -4px 12px 10px 64px; }
/* a phone or tablet: CORE's sheet, nearly full height; only the list scrolls (the tabs stay under the title) */
.sheet.ntf-sheet { overflow: hidden; grid-template-rows: auto minmax(0, 1fr); }
.ntf-sheet .sheet-head { padding-bottom: 4px; }
.ntf-sheet .sheet-body { display: flex; flex-direction: column; gap: 0; min-height: 0; padding: 0; }
.ntf-sheet .ntf-bar { padding: 4px 12px 10px 16px; }
.ntf-sheet .ntf-list { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 768px) { .sheet.ntf-sheet { top: max(28px, env(safe-area-inset-top, 0px)); max-height: none; } }
@media (min-width: 769px) and (max-width: 1024px) { .sheet.ntf-sheet { width: min(560px, calc(100vw - 64px)); height: calc(100dvh - 64px); } }
/* phones: 44 px taps (the tabs, the filter, Mark all as read, the row's button; CORE's sheet rules give .btn and .more theirs) */
@media (max-width: 767.98px), (pointer: coarse) {
  /* min-width: the short All still reads as a pill, not a disc like the dark role avatars */
  .ntf-tabs button { height: 44px; min-width: 64px; justify-content: center; }
  .ntf-fbtn { width: 44px; height: 44px; }
  .ntf-all, .ntf-fon .more { min-height: 44px; }
  .ntf-act { height: 44px; padding: 0 16px; }
  .ntf-gh { min-height: 44px; padding-top: 4px; }
}
@media (max-width: 359.98px) { .ntf-act { margin-left: 12px; } .ntf-main { gap: 10px; padding: 10px; } }

/* the Renovation row on a booking, read only: stage chip · batch date · % meter (one row, no card padding of its own) */
.rn-card .rowi { margin: 0; width: 100%; padding: 0; }
.rn-pct { display: inline-flex; align-items: center; gap: 8px; }
.rn-pct .meter { width: 96px; }
.rn-pct b { font-size: 14px; font-weight: 800; }

/* v0.6.0 · Approvals (C5): ONE list of everything waiting for the sales director (CORE tabs + rows), and a review page per item:
   Check first (its lines jump to their card), the cards, then "Approve or return" at the end (never sticky). CORE tokens only */
.ap-tabs { margin: 0 0 6px; }
.ap-rows .rowi .t { white-space: normal; }
.ap-rows .rowi .end b.num { font-size: 15px; font-weight: 800; white-space: nowrap; }
/* phones: the list right under the head, then the three numbers, then Recently decided (the same cards, only their order) */
@media (max-width: 767.98px) {
  .main[data-page="approvals"] > .grid.sides { display: contents; }
  .main[data-page="approvals"] > .kpis { order: 1; }
  .main[data-page="approvals"] > .grid.sides > .ap-done { order: 2; }
}
button.rs-status.ap-go { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
.ap-go > svg.ic:last-child { margin-left: auto; flex: none; }
/* an amber "Waiting for you" line keeps its Review at the end */
.rs-status > .btn { margin-left: auto; flex: none; }
.ap-was { color: var(--text-3); white-space: nowrap; }
.rows.plan .pv > svg.ic { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.vo-item.ap-one { border-top: 0; padding-top: 0; }
/* a chip that may take two lines on a phone ("v1 BQ-… goes to Quote history") */
.chip.ap-wrap { white-space: normal; height: auto; min-height: 24px; padding: 3px 10px; line-height: 1.3; }
/* a card Check first jumps to lands without a ring (the page scrolls it into view) */
.main [id^="aps-"]:focus, #ap-check:focus, #ap-decide:focus, .main [id^="money-"]:focus { outline: none; }
.ap-in { display: grid; gap: 16px; }
.ap-fig { display: grid; gap: 8px; min-width: 0; }
.ap-line { color: var(--text-2); font-size: 13px; margin: 0; }
.ap-acts { display: flex; gap: 8px; align-items: center; justify-content: flex-end; min-width: 0; }
.main .ap-dec .ap-acts .btn { height: 52px; padding: 0 24px; font-size: 15px; }
.ap-dec .ap-acts .btn.accent { min-width: 220px; }
/* the card's own column never grows past the card (CORE .card is a grid with an auto column: a long nowrap label pushed it out) */
.ap-dec { grid-template-columns: minmax(0, 1fr); }
/* figures left, buttons right, from 768 px, when the card itself is wide enough: the quote's card sits in the narrow column beside the
   A4 page, so it stays one column there */
.ap-dec { container-type: inline-size; }
@media (min-width: 768px) { @container (min-width: 600px) { .ap-in { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } } }
@media (max-width: 767.98px) { .ap-dec .ap-acts .btn.accent { flex: 1 1 auto; min-width: 0; } }
@container (max-width: 599.98px) { .ap-dec .ap-acts .btn.accent { flex: 1 1 auto; min-width: 0; } }
@media (max-width: 560px) { .main .ap-go { min-height: 44px; } }
/* 360-413 px: slimmer padding, and "Approve & open unit" / "Approve new quote" may take two lines inside the 52 px button */
@media (max-width: 413.98px) {
  .main .ap-dec .ap-acts .btn { padding: 0 14px; }
  .ap-dec .ap-acts .btn.accent { white-space: normal; line-height: 1.2; text-align: center; }
}
@media (max-width: 359.98px) {
  .main .ap-dec .ap-acts .btn { padding: 0 12px; font-size: 14px; }
  .ap-dec .ap-acts .btn.ghost .nl { display: none; }
  .ap-dec .ap-acts .btn.ghost { width: 52px; padding: 0; justify-content: center; }
  .ap-dec .ap-acts .btn.accent { white-space: normal; line-height: 1.2; }
}

/* ============================================================================
   v0.7.0 (Calvin 2026-11-04) · the shell as CR Desk, New booking first, My bookings in sections, Settings. CORE tokens only
   ============================================================================ */
/* the bell beside the name: CR Desk's foot has none, so Sales' foot is CR Desk's own (Settings + profile). On a phone or tablet the top
   bar keeps its own bell (sales.js boot), so this row dissolves there and the top bar is unchanged */
.brand-row { display: flex; align-items: center; gap: 8px; }
.brand-row .brand-link { flex: 1; min-width: 0; }
.brand-bell { flex: none; position: relative; }
/* New booking, the app's first job: its own button above the menu. Dark with the plus in the accent; it turns yellow only while you
   are on it, because yellow already means "you are here" (CORE's active menu item) */
.side-cta { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 10px 0 8px; border-radius: var(--r-pill); background: var(--text-1); color: var(--card); font-size: 15px; font-weight: 700; flex: none; transition: background 140ms var(--ease), transform 140ms var(--ease); }
.side-cta .nic { width: 32px; height: 32px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.side-cta .nic svg.ic { width: 18px; height: 18px; }
.side-cta:hover { background: var(--text-2); }
.side-cta:active { transform: scale(.985); }
.side-cta.active { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1px var(--accent-edge); }
.side-cta.active .nic { background: var(--on-accent); color: var(--accent); }
@media (max-width: 1024px) {
  .brand-row { display: contents; }
  .brand-row .brand-link { flex: 0 1 auto; }
  .brand-bell, .side-cta { display: none; }
  /* the first tab is New booking: its plus in an accent pill; the tab keeps CORE's 49 px (2 px less padding for the taller pill) */
  .tabbar a.tab-cta { color: var(--on-inverse); padding-top: 5px; padding-bottom: 3px; }
  .tabbar a.tab-cta .tic { width: 44px; height: 24px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
  .tabbar a.tab-cta .tic svg.ic { width: 18px; height: 18px; }
  .tabbar a.tab-cta.active { color: var(--on-accent); }
  .tabbar a.tab-cta.active .tic { background: var(--on-accent); color: var(--accent); }
}

/* My bookings (Calvin: "把他们分类好"): the tiles filter (CR Desk Cases), each section has its colour dot, name and count, each row its
   status colour: tile, icon and a 4 px edge. The edge is a ::before, not a box-shadow list: in dark mode --shadow is none, which
   would void the whole declaration */
.kpis.bk-sum .kpi { min-height: 104px; }
.kpis.bk-sum .kpi-cap .bad-t { font-weight: 600; }
.bk-group, .bk-fold { display: grid; gap: 10px; }
.bk-sec { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 4px 0; }
.bk-sec .badge { height: 20px; min-width: 22px; }
.bk-sec-sub { font-size: 12px; color: var(--text-3); }
.bk-fold > summary { min-height: 44px; list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; border-radius: var(--r-tile); }
.bk-fold > summary::-webkit-details-marker { display: none; }
.bk-fold > summary .bk-sec { padding-top: 0; }
.bk-fold > summary .chev { display: inline-flex; color: var(--text-3); transition: transform 160ms var(--ease); }
.bk-fold[open] > summary .chev { transform: rotate(180deg); }
.rows.boxed .rowi.bk { position: relative; overflow: hidden; }
.rows.boxed .rowi.bk::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone, transparent); }
.rowi.bk.lemon { --tone: var(--accent); }
.rowi.bk.faded { opacity: .72; }
.tile-ic.tone-bad, .tile-ic.tone-warn, .tile-ic.tone-good, .tile-ic.tone-info, .tile-ic.tone-neutral { background: var(--tone-bg); color: var(--tone-fg); }
.tile-ic.lemon { background: var(--accent); color: var(--on-accent); }
/* phones: the four tiles in two rows, label and number on one 52 px row */
@media (max-width: 560px) {
  .kpis.bk-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis.bk-sum .kpi { min-height: 52px; padding: 8px 14px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto; gap: 2px 8px; align-items: center; }
  .kpis.bk-sum .kpi-top { grid-column: 1; grid-row: 1; }
  .kpis.bk-sum .kpi-ic, .kpis.bk-sum .kpi > span:nth-child(3) { display: none; }
  .kpis.bk-sum .kpi-val { grid-column: 2; grid-row: 1; font-size: 24px; }
  .kpis.bk-sum .kpi-cap { grid-column: 1 / -1; min-height: 0; }
  .kpis.bk-sum .kpi-cap:empty { display: none; }
}

/* Settings (CR Desk's pages). CORE's own list puts the chevron under the title on a phone: here it stays at the end of the row */
.set-list .rowi { grid-template-columns: auto minmax(0, 1fr) auto; }
.set-list .rowi .end { grid-column: auto; }
.note-box.fb-note { display: flex; gap: 10px; align-items: flex-start; white-space: normal; }
.note-box.fb-note > svg.ic { flex: none; width: 16px; height: 16px; margin-top: 2px; }
/* the PTAA card's "Still needed" pills: red, like every gap */
.pill[data-rgap] { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.pill[data-rgap]:hover, .pill[data-rgap]:focus-visible { border-color: var(--bad); color: var(--bad); }

/* ============================================================================
   v0.7.0 (Calvin 2026-11-04) · the three stages: the tracker (1 Booking → 2 Collect & Handover → 3 Approved), the bar of what is done,
   the tabs per stage, a section the last Return ticked, Review's cards and its big button, the booking folded in stage 2. CORE tokens only
   ============================================================================ */
.stg-card { padding-top: 10px; padding-bottom: 10px; }
.stg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stg-i { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding: 6px 8px; border-radius: var(--r-tile); color: var(--text-3); font-size: 13px; font-weight: 600; }
.stg-n { flex: none; width: 26px; height: 26px; border-radius: var(--r-pill); display: grid; place-items: center; font-size: 12px; font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--line); }
.stg-n svg.ic { width: 14px; height: 14px; }
.stg-l { min-width: 0; line-height: 1.25; text-wrap: balance; overflow-wrap: normal; word-break: normal; }
.stg-i.done { color: var(--text-2); }
.stg-i.done .stg-n { background: var(--good-bg); color: var(--good); box-shadow: none; }
.stg-i.now { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1px var(--accent-edge); }
.stg-i.now .stg-n { background: var(--on-accent); color: var(--accent); box-shadow: none; }
@media (max-width: 413.98px) { .stg-i { gap: 6px; padding: 6px; font-size: 12px; } .stg-n { width: 22px; height: 22px; font-size: 11px; } }
/* under 360 px a third of the card is too narrow for the circle and a whole word side by side: the number sits above its name */
@media (max-width: 359.98px) { .stg-i { flex-direction: column; justify-content: center; gap: 4px; padding: 6px 2px; text-align: center; } }
/* the bar over the tabs: "12 of 20 done" and the percent, CORE's meter */
.wiz-prog { display: grid; gap: 6px; padding: 4px 6px 10px; }
.wp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--text-3); }
.wp-t b { color: var(--text-1); font-size: 13px; }
.wp-p { font-weight: 700; color: var(--text-2); }
/* the tabs: their full names on a computer, the short ones on a phone; as many columns as the stage has tabs */
.wiz-tabs .wsh { display: none; }
@media (max-width: 560px) {
  .wiz-tabs { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
  .wiz-tabs .wl { display: none; }
  .wiz-tabs .wsh { display: inline; }
  .wiz-tabs button { gap: 3px; padding: 0 2px; }
}
/* a section the last Return ticked: CORE's red edge and its red line on top */
.card.flagged { box-shadow: inset 0 0 0 1.5px var(--bad); }
/* Review: each part with Edit, and the big button at the end */
.rv-go { display: grid; gap: 12px; }
.main .btn.big-cta, .btn.big-cta { height: 56px; width: 100%; justify-content: center; font-size: 16px; padding: 0 24px; }
@media (min-width: 768px) { .rv-go { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .btn.big-cta { width: auto; min-width: 260px; } }
/* stage 2: the booking itself, folded and read only */
.bk-det > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; cursor: pointer; }
.bk-det > summary::-webkit-details-marker { display: none; }
.bk-det-t { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.bk-det-t small { color: var(--text-3); font-size: 12px; }
.bk-det .chev { color: var(--text-3); display: inline-flex; transition: transform 160ms var(--ease); }
.bk-det[open] .chev { transform: rotate(180deg); }
.bk-det[open] > summary { margin-bottom: 8px; }
/* closed: the card gap under the summary goes (it framed nothing), so the fold is as tall as its summary and the padding */
.bk-det:not([open]), .bk-fold:not([open]) { row-gap: 0; }
/* Payment: what came in against the down payment, and what is still to collect */
.pay-bar { display: grid; gap: 8px; }
.pay-fig { display: flex; justify-content: space-between; gap: 12px; }
.pay-fig span { display: grid; gap: 2px; min-width: 0; }
.pay-fig span:last-child { text-align: right; }
.pay-fig small { font-size: 12px; color: var(--text-3); }
.pay-fig b { font-size: 18px; font-weight: 800; white-space: nowrap; }
.pay-left { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-tile); background: var(--sunken); font-size: 13px; color: var(--text-2); }
.pay-left b { font-size: 15px; font-weight: 800; color: var(--text-1); white-space: nowrap; }
/* the Collect & Handover section's dot: the accent, with its edge so it shows on a light card */
.bk-sec.lemon { --tone: var(--accent); }
.bk-sec.lemon .tone-dot { box-shadow: inset 0 0 0 1px var(--accent-edge); }
/* the sales director's Return: the ticks wrap */
.ret-ticks { flex-wrap: wrap; }

/* ============================================================================
   v0.7.0 repair round 1 · CORE tokens only
   ============================================================================ */
/* Expected rent under 360 px: the room name takes the whole row, the rent and Remove sit under it (no name or "RM / month" cut) */
@media (max-width: 359.98px) {
  .room-row.rent-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .room-row.rent-row > input:first-child { grid-column: 1 / -1; }
}
/* a tab that waits for the booking type: a grey dash, not a Done tick */
.wiz-tabs .cnt.pend { color: var(--text-3); }
/* the Return sheets: the note's red edge when Other has no note, and the buttons kept in view at the bottom of the sheet */
textarea.phone-warn { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
#sheet form .row.ret-acts { position: sticky; bottom: 0; z-index: 2; margin-top: 0; padding: 12px 0 4px; background: var(--card); box-shadow: 0 -1px 0 var(--line); }
/* phone summary tiles: every tile starts at the top, so the labels and the numbers line up across a row whether or not a tile has a
   caption under them ("2 returned", Showing) */
@media (max-width: 560px) {
  .kpis.bk-sum .kpi { align-content: start; }
  .kpis.bk-sum .kpi-top, .kpis.bk-sum .kpi-val { align-self: first baseline; }
}

/* ============================================================================
   v0.7.1 · CORE tokens only
   ============================================================================ */
/* a ticked detail of the admin's Return on the form (Calvin answer 2): its name and state (Changed / Kept / Change it or say why) on one
   row, the reason box under it until the detail is changed */
.keep-list { display: grid; gap: 8px; }
.keep-row { display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--r-tile); background: var(--sunken); min-width: 0; }
.keep-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-width: 0; }
.keep-top > b { font-size: 13px; }
.keep-row .field { gap: 6px; }
.keep-row .field label { font-size: 12px; color: var(--text-3); font-weight: 600; }
/* the sales director's Return (Calvin answer 1): Collect & Handover (back to the agent) and Booking details (back to the admin first),
   each in its own box, then Other */
.ret-sec { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-tile); background: var(--sunken); min-width: 0; }
.ret-sec + .ret-sec, .ret-sec + .ret-grp { margin-top: 10px; }
.ret-sec .ret-grp + .ret-grp { margin-top: 4px; }
.ret-sh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.ret-sh > svg.ic { width: 15px; height: 15px; color: var(--text-3); }
.ret-sh small { color: var(--text-3); font-size: 12px; }
[data-br-s1] { margin-top: 10px; }
/* a gap pill can be long now ("Unit & owner · Address & bank: change or say why"): it wraps inside the screen instead of widening it,
   and keeps its 44 px tap height on a phone */
.pill[data-gap] { white-space: normal; height: auto; min-height: 32px; max-width: 100%; text-align: left; padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 560px) { .main .pill[data-gap] { height: auto; min-height: 44px; } }

/* ============================================================================
   v0.7.1 round 2 · CORE tokens only, except inside .sig-paper: the paper a signature is drawn and shown on is white with dark ink in
   both themes, as it prints on the PTAA (the same rule as the PTAA's own .pt-paper)
   ============================================================================ */
/* Settings › Signature: the saved signature on its paper; the pad (finger or mouse) with the line to sign above */
.sig-paper { position: relative; display: grid; place-items: center; min-height: 120px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-tile); background: #FFFFFF; color: #111111; overflow: hidden; min-width: 0; }
.sig-paper .sig-img { display: block; max-width: 100%; max-height: 140px; height: auto; }
/* about the size it is signed on paper (the PTAA prints it up to 5 cm wide), so it never needs shrinking to a hairline */
.sig-card .sig-paper { max-width: 560px; }
.sig-paper.sig-pad { display: block; padding: 0; height: 180px; cursor: crosshair; }
.sig-pad canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.sig-pad .sig-base { position: absolute; left: 16px; right: 16px; bottom: 44px; border-bottom: 1px dashed #8A9196; pointer-events: none; }
/* the sales director's ticks on the admin's review (Calvin answer B): the name goes to its card, the state beside it, the line under it */
.keep-top .dr-go { padding-left: 0; color: var(--text-1); font-size: 13px; text-align: left; min-width: 0; }
.keep-row .dr-sub { font-size: 12px; color: var(--text-3); white-space: normal; }
.keep-row .dr-sub.pt-why { color: var(--text-2); font-size: 13px; }
/* his re-review: what came of each tick; a reason reads in full */
.rows.ap-since .pref .k small { white-space: normal; }
.rows.ap-since .pref .k small.ap-why { color: var(--text-2); font-size: 13px; }
/* the quote no. and the total side by side: a red line under one (the quote check, or the floor of what was received) never stretches
   the other field, so both labels and both boxes stay level (one column on a phone: nothing changes there) */
.form-row:has([data-qmatch]) { align-items: start; }

/* ============================================================================
   v0.7.3 · CORE tokens only (Calvin 2026-11-06 "too much of sorting"): the bookings list's four cards are the only filter
   ============================================================================ */
/* a stage's number in a ring, as on the booking page's stage bar (.stg-n): on its card's label and on its section's head. On the
   picked (lemon) card it takes CORE's own on-accent fill, like the card's icon */
.bk-n { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 11px; font-weight: 800; line-height: 1; color: var(--text-1); font-variant-numeric: tabular-nums; }
.bk-sec .bk-n { width: 22px; height: 22px; font-size: 12px; }
.kpis.bk-sum .kpi-label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.kpis.bk-sum .kpi-label > span:last-child { min-width: 0; }
.kpi.accent .bk-n { background: rgba(11, 11, 12, .1); box-shadow: none; color: var(--on-accent); }
/* Needs you: its label in CORE's red while something waits for you (on the picked card it reads as the card's own text) */
.kpis.bk-sum .kpi.needs:not(.accent) .kpi-label { color: var(--bad); }
/* the sub-chips under a picked card: CORE's pills, wrapping; the search keeps its place at the end of the row */
.bk-subs { min-width: 0; }
/* their counts at full strength (CORE's pill count is .7 opacity: under 4.5:1 on white) */
.bk-subs .pill b { opacity: 1; }
/* phones: a card's stage no. is plain text before its name ("2 Collect & Handover"), so the name flows on the whole label width and a
   2- or 3-digit count never splits a word (the section heads keep their rings). A picked card drops its Showing
   chip (the lemon fill and aria-pressed say it), and its caption row when Showing was all it held, so a tap never makes a row taller */
@media (max-width: 560px) {
  .kpis.bk-sum .kpi-label { display: block; }
  .kpis.bk-sum .kpi-label .bk-n, .kpis.bk-sum .kpi.accent .kpi-label .bk-n { display: inline; width: auto; height: auto; box-shadow: none; background: none; font-size: inherit; font-weight: inherit; color: inherit; }
  .kpis.bk-sum .kpi.accent .kpi-cap .chip.dark { display: none; }
  .kpis.bk-sum .kpi.accent .kpi-cap:has(> .chip.dark:only-child) { display: none; }
}
