/* =========================================================================
   ReplaCRM's own components.

   `rp-` and `--rp-` are reserved for things shared by all five Repla products
   and live in repla.css. Anything only this product has takes the `rcrm-`
   prefix, which is what the family brand brief settled on 11 September 2026.

   The rule is worth keeping even though it costs a second file: when a fix
   goes back to ReplaMail or ReplaChat, `rp-` says "this is ours to share" and
   `rcrm-` says "leave it here".

   Everything below is built from the shared tokens. No colour is written out
   by hand, so re-skinning still means changing four lines in repla.css.
   ========================================================================= */

/* ---------- the deal board ---------------------------------------------- */

.rcrm-board {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 18px; padding-bottom: 10px;
  overflow-x: auto;
}

.rcrm-column {
  flex: 0 0 265px; min-width: 265px;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius, 12px);
}

.rcrm-column-head {
  padding: 12px 14px; border-bottom: 1px solid var(--rp-border);
}

.rcrm-cards {
  padding: 10px; min-height: 90px;
  display: flex; flex-direction: column; gap: 9px;
  border-radius: 0 0 12px 12px;
  transition: background .12s;
}
/* Where the card will land. A drop target with no feedback is one people drop
   into the wrong column twice before they stop trusting the board. */
.rcrm-cards.is-over { background: var(--rp-accent-soft); }

.rcrm-card {
  display: block; padding: 11px 12px;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border-2);
  border-radius: 9px;
  color: var(--rp-text); text-decoration: none;
  cursor: grab;
  transition: border-color .12s, box-shadow .12s, transform .06s;
}
.rcrm-card:hover {
  text-decoration: none;
  border-color: var(--rp-accent-line);
  box-shadow: 0 1px 3px rgba(20, 22, 43, .08);
}
.rcrm-card:active { cursor: grabbing; }
.rcrm-card.is-dragging { opacity: .45; }

.rcrm-card-title { font-weight: 600; line-height: 1.35; }
/* The money is the one thing read at a glance down a column, so it takes the
   strong accent step — words touch it. */
.rcrm-card-money {
  font-size: 13.5px; font-weight: 700; margin-top: 3px;
  color: var(--rp-accent-strong);
}

.rcrm-empty-column {
  padding: 16px 4px; text-align: center;
  font-size: 12.5px; color: var(--rp-text-3);
}

/* ---------- the booking page -------------------------------------------- */

/* Used on the public page, which is opened on a phone far more often than on
   a laptop. Slots are laid out so a thumb can hit one. */
.rcrm-slots {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  margin-top: 10px;
}

.rcrm-slot {
  padding: 11px 6px; text-align: center;
  font-size: 14px; font-weight: 600;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border-2); border-radius: 8px;
  color: var(--rp-accent-strong); cursor: pointer;
  font-family: inherit;
  transition: border-color .12s, background .12s;
}
.rcrm-slot:hover { border-color: var(--rp-accent); background: var(--rp-accent-soft); }
.rcrm-slot.is-chosen {
  background: var(--rp-accent-strong); border-color: var(--rp-accent-strong);
  color: #fff;
}

.rcrm-day { padding: 14px 0; border-top: 1px solid var(--rp-border); }
.rcrm-day:first-child { border-top: 0; }
.rcrm-day-name { font-weight: 600; }
.rcrm-day-shut { font-size: 13px; color: var(--rp-text-3); margin-top: 4px; }

/* The public shell. No sidebar, no navigation — there is nothing out there a
   stranger may go to. */
.rcrm-public {
  max-width: 620px; margin: 0 auto; padding: 28px 18px 60px;
}
/* Room for the sticky bar below, so it never covers the last row of slots. */
.rcrm-public.has-picked { padding-bottom: 110px; }

/* WHAT THIS SOLVES. The details form sits under a fortnight of slot buttons.
   Picking a time and then being left looking at the same wall of buttons is
   how a booking gets abandoned on a phone — the customer has no idea anything
   happened. Scrolling them there was tried first and is not enough: a smooth
   scroll can be interrupted, and on a short list there is nowhere to scroll to.

   So the confirmation is always on screen instead. It says what they picked,
   which is also the answer to "did that click do anything". */
.rcrm-picked {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--rp-surface);
  border-top: 1px solid var(--rp-border-2);
  box-shadow: 0 -2px 12px rgba(20, 22, 43, .10);
  padding: 12px 18px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.rcrm-picked-inner {
  max-width: 620px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.rcrm-picked-when { flex: 1 1 180px; min-width: 0; font-weight: 600; }
.rcrm-picked-when small {
  display: block; font-weight: 400; font-size: 12.5px;
  color: var(--rp-text-2);
}
.rcrm-public-head { margin-bottom: 20px; }
.rcrm-public-head h1 { font-size: 24px; margin: 0 0 4px; }
/* Pictures on top (logo left, who you meet right), the words straight under. */
.rcrm-public-head { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; }
.rcrm-public-head > * { grid-column: 1 / -1; }
.rcrm-public-head > h1 { grid-column: 1; grid-row: 1; margin: 0; }
.rcrm-public-head > .rcrm-host { grid-column: 2; grid-row: 1; margin: 0; justify-self: end; }
.rcrm-public-head .rcrm-host-photo { width: 56px; height: 56px; }
.rcrm-public-head .rcrm-host strong { font-size: 15px; }
.rcrm-pub-title { font-size: 21px; line-height: 1.2; margin: 14px 0 8px; color: var(--rp-text); }
.rcrm-pub-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rcrm-pub-meta span { background: rgba(255, 255, 255, .75); border: 1px solid var(--rp-border); border-radius: 999px;
  padding: 3px 11px; font-size: 13px; color: var(--rp-text-2); }
.rcrm-pub-desc { margin: 10px 0 0; color: var(--rp-text-2); line-height: 1.5; }
.rcrm-pub-note { margin: 6px 0 0; font-size: 13px; color: var(--rp-text-3); }
@media (max-width: 460px) { .rcrm-public-head .rcrm-host-photo { width: 44px; height: 44px; } .rcrm-public-head .rcrm-host strong { display: none; } }

/* ---------- the inbox ---------------------------------------------------- */

/* A line in a conversation. Three kinds, and telling them apart at a glance is
   the entire job: what the customer said, what we said, and a note nobody
   outside this office will ever see.

   The internal note is the one that must be unmistakable. Somebody typing
   where they think a customer will read it, or the reverse, is the mistake
   this styling exists to prevent — so it gets the warning tint and says so in
   words as well, because colour alone is not enough for everyone. */
.rcrm-line { padding: 10px 0; border-top: 1px solid var(--rp-border); }
.rcrm-line:first-child { border-top: 0; }
.rcrm-line-who {
  font-size: 12.5px; font-weight: 600; color: var(--rp-text-2);
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.rcrm-line-body { margin-top: 3px; white-space: pre-wrap; line-height: 1.5; }

.rcrm-line-out .rcrm-line-body {
  border-left: 3px solid var(--rp-accent-line);
  padding-left: 11px;
}
.rcrm-line-note {
  background: var(--rp-warning-soft);
  border-radius: 8px; padding: 10px 12px; margin: 8px 0;
  border-top: 0;
}
.rcrm-line-note .rcrm-line-who { color: var(--rp-warning); }

/* ---------- reports ------------------------------------------------------ */

/* A bar drawn in CSS rather than by a chart library. Two numbers side by side
   in a table answer most of what a business owner asks; the bar is there to
   make the shape visible at a glance, not to be read off. */
.rcrm-bar {
  height: 8px; border-radius: 999px;
  background: var(--rp-accent); min-width: 2px;
}
.rcrm-bar-track {
  background: var(--rp-border); border-radius: 999px; overflow: hidden;
  margin-top: 6px;
}

/* Says a figure came from too few cases to lean on. It is a warning about the
   number, so it takes the warning colour and its own tint rather than being
   left to a footnote nobody reads. */
.rcrm-thin {
  font-size: 11.5px; font-weight: 600;
  color: var(--rp-warning); background: var(--rp-warning-soft);
  border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}

@media (max-width: 700px) {
  .rcrm-column { flex-basis: 82vw; min-width: 82vw; }
}

/* =========================================================================
   The person page
   ========================================================================= */

/* A value that cannot wrap must still be able to stop. An id pushed in by
   another product can be 40 characters of hex — `white-space:nowrap` alone
   sent it straight out through the side of the card, over the column next
   to it. Truncate instead, and keep the whole value in the tooltip. */
.rcrm-id-value {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}

/* Label-above-value, because this sits in a third of the screen. The shared
   .rp-kv is a two-column grid, which is right on a wide settings page and
   wrong here: "Account number" against "AUR-2291" left each of them about
   nine characters and broke both across two lines. */
.rcrm-facts { display: block; margin: 0; }
.rcrm-facts dt {
  color: var(--rp-text-2); font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; margin-top: 12px;
}
.rcrm-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.rcrm-facts dt:first-child { margin-top: 0; }

/* The identity header. On a wide screen the name sits left and the actions
   right; on a phone they must stack, or the buttons squeeze the name into a
   one-word-per-line column and clip the tags beside it. */
.rcrm-person-head { display: flex; align-items: flex-start; gap: 14px; }
.rcrm-person-who { flex: 1; min-width: 0; }
.rcrm-person-acts { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .rcrm-person-head { flex-wrap: wrap; }
  /* Full width so the buttons sit on their own line under the name rather
     than stealing room from it. */
  .rcrm-person-acts { width: 100%; }
}

/* ---------- tags ----------
   A real chip: a pale wash of the tag's own colour, text darkened until it
   measures 4.5:1 against that wash, and a remove button that only shows its
   own edges on hover. The colour comes from `Tag.swatch` through the `pill`
   filter — never from this file, because the buyer picks it. */
.rcrm-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.rcrm-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 4px 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.5;
  max-width: 100%;
}
/* No remove button on it — the header, where tags are shown and not edited. */
.rcrm-tag-plain { padding: 3px 10px; }

.rcrm-tag-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rcrm-tag-x {
  display: grid; place-items: center; flex: 0 0 18px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background: transparent; color: inherit; opacity: .55;
}
.rcrm-tag-x:hover { opacity: 1; background: rgba(0, 0, 0, .10); }
.rcrm-tag-x:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }

/* The add box. Sits on the same line as the chips so it reads as "and one
   more", rather than as a separate form somewhere underneath them. */
.rcrm-tag-add { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.rcrm-tag-add .rp-input { height: 32px; font-size: 13px; }

/* Smaller chips for a table row, where they sit under a name rather than
   being the thing you are looking at. */
.rcrm-tag-sm { font-size: 11.5px; padding: 1px 8px; }

/* =========================================================================
   The assistant
   ========================================================================= */

.rcrm-chat {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 320px; max-height: 58vh; overflow-y: auto;
  padding-right: 4px;
}

.rcrm-msg {
  max-width: 82%; padding: 9px 13px; border-radius: 14px;
  font-size: 14px; line-height: 1.55; white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* What you said sits right, what it said sits left — the arrangement every
   chat has used for twenty years. Fighting that costs nothing to follow and
   confuses everybody to break. */
.rcrm-msg-user {
  align-self: flex-end;
  background: var(--rp-accent-soft); color: var(--rp-accent-strong);
  border-bottom-right-radius: 4px;
}
.rcrm-msg-assistant {
  align-self: flex-start;
  background: var(--rp-surface-2); color: var(--rp-text);
  border: 1px solid var(--rp-border);
  border-bottom-left-radius: 4px;
}

/* =========================================================================
   1.3 — the customer card, bookings, identities, arranging, settings
   ========================================================================= */

.rcrm-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- avatar ---------- */
.rcrm-avatar { object-fit: cover; flex: 0 0 auto; display: inline-grid;
  place-items: center; background: var(--rp-accent-soft); }
img.rcrm-avatar { border: 1px solid var(--rp-border); background: var(--rp-surface-2); }
.rcrm-name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* ---------- the person header ---------- */
.rcrm-person-card .rp-card-pad { padding: 22px; }
.rcrm-person-name { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.rcrm-person-chips { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rcrm-glance { gap: 14px; }
/* Each email and phone in the header, with its own Email / Call / Text. */
.rcrm-glance-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px;
  padding: 3px 0; min-width: 0; }
.rcrm-glance-row .rcrm-id-value { overflow-wrap: anywhere; }
.rcrm-glance-acts { display: inline-flex; gap: 2px; }
.rp-btn.rp-btn-xs { padding: 2px 7px; font-size: 12px; min-height: 0; gap: 4px; }
.rcrm-person-card .rp-grid-4.rcrm-glance { grid-template-columns: 1.3fr 1.3fr 1fr 1fr; }
@media (max-width: 900px) { .rcrm-person-card .rp-grid-4.rcrm-glance { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .rcrm-person-card .rp-grid-4.rcrm-glance { grid-template-columns: 1fr; } }
/* The email and text pop-ups. */
.rcrm-dialog { border: 0; padding: 0; border-radius: 14px; width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); background: transparent; overflow: visible; }
.rcrm-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.rcrm-dialog > .rp-card { margin: 0; max-height: calc(100vh - 48px); overflow-y: auto; }
.rcrm-dialog-close { position: absolute; top: 10px; right: 10px; z-index: 1; }
.rcrm-unlinked { font-size: 12px; margin-left: 6px; color: var(--rp-text-2);
  text-decoration: underline dotted; }
.rcrm-photo-controls { margin-top: 12px; }
.rcrm-photo-panel { display: flex; flex-direction: column; gap: 10px; margin-top: 10px;
  padding: 14px; border: 1px dashed var(--rp-border-2); border-radius: 10px;
  background: var(--rp-surface-2); max-width: 560px; }
.rcrm-photo-preview { width: 96px; height: 96px; object-fit: cover; border-radius: 14px;
  border: 1px solid var(--rp-border); margin-top: 8px; }

/* ---------- the arrangement ---------- */
.rcrm-person-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
  gap: 16px; align-items: start; }
.rcrm-person-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rcrm-section:empty { display: none; }
@media (max-width: 980px) { .rcrm-person-grid { grid-template-columns: 1fr; } }

/* ---------- ways to reach them ---------- */
.rcrm-reach-group + .rcrm-reach-group { margin-top: 14px; }
.rcrm-reach-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0;
  border-top: 1px solid var(--rp-border); }
.rcrm-reach-group .rp-stat-label + .rcrm-reach-row { border-top: 0; }
.rcrm-reach-row.is-primary .rcrm-id-value { font-weight: 600; }
.rcrm-reach-icon { color: var(--rp-text-3); padding-top: 2px; flex: 0 0 auto; }
.rcrm-reach-main { flex: 1; min-width: 0; }
.rcrm-reach-acts { display: flex; gap: 2px; align-items: flex-start; flex-wrap: wrap; }
.rcrm-primary-chip { display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 650; color: var(--rp-accent-strong);
  background: var(--rp-accent-soft); border: 1px solid var(--rp-accent-line);
  border-radius: 999px; padding: 0 7px; }
.rcrm-inline-edit { position: relative; }
.rcrm-inline-edit[open] > .rcrm-inline-form {
  position: absolute; right: 0; top: 36px; z-index: 20; width: min(300px, 80vw);
  background: var(--rp-surface); border: 1px solid var(--rp-border-2);
  border-radius: 12px; box-shadow: var(--rp-shadow-lg); padding: 14px; }
.rcrm-inline-form { display: flex; flex-direction: column; gap: 6px; }
.rcrm-inline-form .rp-label { margin-bottom: 0; }
.rcrm-add-reach { margin-top: 14px; }
.rcrm-add-reach[open] > .rcrm-inline-form { margin-top: 12px; padding: 14px;
  border: 1px solid var(--rp-border); border-radius: 10px; background: var(--rp-surface-2); }

/* ---------- social ---------- */
.rcrm-social-row { display: grid; grid-template-columns: 96px 1fr; gap: 4px 10px;
  padding: 7px 0; align-items: baseline; }
.rcrm-social-row + .rcrm-social-row { border-top: 1px solid var(--rp-border); }
.rcrm-social-name { font-size: 12.5px; font-weight: 650; color: var(--rp-text-2); }
.rcrm-social-row .rp-stat-sub { grid-column: 2; }

/* ---------- addresses ---------- */
.rcrm-addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 14px; }
.rcrm-address { margin: 3px 0 0; }

/* ---------- grouped forms ---------- */
.rcrm-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center;
  gap: 8px; padding: 4px 0; }
.rcrm-group > summary::-webkit-details-marker { display: none; }
.rcrm-group > summary::before { content: "▸"; color: var(--rp-text-3); transition: transform .15s; }
.rcrm-group[open] > summary::before { transform: rotate(90deg); }
.rcrm-group > summary h4 { margin: 0; font-size: 15px; }
.rcrm-group[open] > summary { margin-bottom: 10px; }
.rcrm-fieldset { border: 1px solid var(--rp-border); border-radius: 10px; padding: 12px 14px 4px;
  margin: 0 0 12px; min-width: 0; }
.rcrm-fieldset > legend { font-size: 12.5px; font-weight: 650; color: var(--rp-text-2); padding: 0 6px; }
.rcrm-inline-fieldset { padding: 6px 12px; display: flex; gap: 6px 12px; flex-wrap: wrap;
  align-items: center; margin: 0; max-width: 100%; }
.rcrm-inline-fieldset .rp-check { flex-wrap: wrap; }
/* Where a booking type happens: a written place, or a Jitsi room per booking. */
.rcrm-where { padding: 8px 14px 10px; }
.rcrm-where .rp-check { align-items: center; margin-bottom: 8px; }
.rcrm-where-row { flex-wrap: wrap; }
.rcrm-where-row .rp-input { flex: 1 1 260px; min-width: 0; }
.rcrm-req { color: var(--rp-danger); }

/* A three-way choice that is obviously three ways. */
.rcrm-segmented { display: inline-flex; border: 1px solid var(--rp-border-2); border-radius: 10px;
  overflow: hidden; flex-wrap: wrap; }
.rcrm-segmented label { position: relative; cursor: pointer; }
.rcrm-segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.rcrm-segmented span { display: block; padding: 7px 13px; font-size: 13px; font-weight: 600;
  color: var(--rp-text-2); border-right: 1px solid var(--rp-border); }
.rcrm-segmented label:last-child span { border-right: 0; }
.rcrm-segmented input:checked + span { background: var(--rp-accent-strong); color: #fff; }
.rcrm-segmented input:focus-visible + span { outline: 2px solid var(--rp-accent-strong); outline-offset: -3px; }

/* ---------- company picker ---------- */
.rcrm-company-pick { position: relative; }
.rcrm-suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 4px; list-style: none; background: var(--rp-surface);
  border: 1px solid var(--rp-border-2); border-radius: 10px; box-shadow: var(--rp-shadow-lg);
  max-height: 260px; overflow-y: auto; }
.rcrm-suggest li { padding: 8px 10px; border-radius: 7px; cursor: pointer; display: flex;
  justify-content: space-between; gap: 10px; }
.rcrm-suggest li[aria-selected="true"], .rcrm-suggest li:hover { background: var(--rp-accent-soft); }
.rcrm-suggest li.is-new { color: var(--rp-accent-strong); font-weight: 600;
  border-top: 1px solid var(--rp-border); margin-top: 4px; }
.rcrm-choice-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- uploads ---------- */
.rcrm-upload { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rp-border); }
.rcrm-upload-problem { color: var(--rp-danger); font-size: 13px; margin-top: 6px; }
input[type="file"].rp-input { padding: 6px; }
.rcrm-contract-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 13px; }
.rcrm-contract-links a { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- bookings ---------- */
.rcrm-booking-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr);
  gap: 16px; align-items: start; }
@media (max-width: 980px) { .rcrm-booking-grid { grid-template-columns: 1fr; } }
.rcrm-booking-cover { display: block; width: 100%; max-height: 300px; object-fit: cover;
  border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--rp-border); }
.rcrm-booking-when { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  flex-wrap: wrap; }
.rcrm-booking-time { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.rcrm-price { font-size: 17px; font-weight: 650; }
.rcrm-gallery { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.rcrm-gallery-item { border: 1px solid var(--rp-border); border-radius: 12px; overflow: hidden;
  background: var(--rp-surface-2); display: flex; flex-direction: column; }
.rcrm-gallery-item.is-cover { border-color: var(--rp-accent); box-shadow: 0 0 0 2px var(--rp-accent-line); }
.rcrm-gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.rcrm-gallery-meta { padding: 6px 9px 0; display: flex; flex-direction: column; gap: 2px; }
.rcrm-gallery-acts { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 4px 6px; align-items: center; }
.rcrm-reminder-summary { line-height: 1.5; }

/* ---------- identities ---------- */
.rcrm-identities { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 16px; align-items: start; }
@media (max-width: 980px) { .rcrm-identities { grid-template-columns: 1fr; } }
.rcrm-identity { border: 1px solid var(--rp-border); border-radius: 12px; padding: 14px 16px;
  margin-top: 12px; }
.rcrm-identity.is-ready { border-left: 3px solid var(--rp-success); }
.rcrm-identity.is-new { background: var(--rp-surface-2); }
.rcrm-identity-top { display: flex; gap: 12px; align-items: flex-start; }
.rcrm-identity-from { overflow-wrap: anywhere; }
.rcrm-identity-why { display: flex; gap: 8px; margin-top: 10px; padding: 10px 12px;
  background: var(--rp-warning-soft); border: 1px solid #fde68a; color: #92400e;
  border-radius: 9px; font-size: 13.5px; }
.rcrm-identity-why svg { flex: 0 0 auto; margin-top: 2px; }
.rcrm-identity-acts { margin-top: 10px; }
.rcrm-steps { padding-left: 20px; margin: 0 0 12px; }
.rcrm-steps li { margin-bottom: 8px; }
.rcrm-signature-preview { margin: -4px 0 12px; padding: 10px 12px; border-left: 3px solid var(--rp-border-2);
  background: var(--rp-surface-2); border-radius: 0 8px 8px 0; }
.rcrm-signature-preview pre { margin: 0; font: inherit; font-size: 13px; white-space: pre-wrap;
  color: var(--rp-text-2); }

/* ---------- arranging ---------- */
.rcrm-arrange-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .rcrm-arrange-cols { grid-template-columns: 1fr; } }
.rcrm-arrange-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--rp-text-3); margin-bottom: 8px; }
.rcrm-arrange-list { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column;
  gap: 6px; min-height: 60px; border: 1px dashed var(--rp-border-2); border-radius: 12px;
  background: var(--rp-surface-2); }
.rcrm-arrange-list.is-over { border-color: var(--rp-accent); background: var(--rp-accent-soft); }
.rcrm-arrange-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  background: var(--rp-surface); border: 1px solid var(--rp-border); border-radius: 10px; }
.rcrm-arrange-item.is-off .rcrm-arrange-label strong { color: var(--rp-text-3);
  text-decoration: line-through; }
.rcrm-arrange-item.is-dragging { opacity: .45; }
.rcrm-arrange-label { display: flex; gap: 10px; align-items: flex-start; flex: 1; min-width: 0;
  cursor: pointer; }
.rcrm-arrange-label input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--rp-accent-strong); }
.rcrm-arrange-label strong { display: block; font-size: 14px; }
.rcrm-arrange-moves { display: flex; gap: 2px; }
.rcrm-arrange-moves .rp-btn { min-width: 32px; padding: 4px 8px; font-size: 15px; }
.rcrm-drag { cursor: grab; color: var(--rp-text-3); letter-spacing: -2px; user-select: none;
  touch-action: none; padding: 0 2px; }
.rcrm-arrange-empty { color: var(--rp-text-3); font-size: 13px; padding: 10px; text-align: center; }

/* ---------- dashboard ---------- */
.rcrm-dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rcrm-dash-full { grid-column: 1 / -1; }
@media (max-width: 860px) { .rcrm-dash { grid-template-columns: 1fr; } }

/* ---------- settings overview ---------- */
.rcrm-settings-groups { display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.rcrm-settings-group { display: flex; flex-direction: column; gap: 8px; }
.rcrm-settings-heading { display: flex; align-items: center; gap: 8px; font-size: 13px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--rp-text-2); margin: 0 0 2px; }
.rcrm-tile { display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  background: var(--rp-surface); border: 1px solid var(--rp-border); border-radius: 12px;
  color: var(--rp-text); text-decoration: none; transition: border-color .14s, box-shadow .14s; }
a.rcrm-tile:hover { border-color: var(--rp-accent); box-shadow: var(--rp-shadow); text-decoration: none; }
.rcrm-tile.is-locked { background: var(--rp-surface-2); color: var(--rp-text-2); }
.rcrm-tile-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--rp-accent-soft); color: var(--rp-accent-strong); flex: 0 0 auto; }
.rcrm-tile.is-locked .rcrm-tile-icon { background: var(--rp-border); color: var(--rp-text-3); }
.rcrm-tile-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rcrm-tile-go { color: var(--rp-text-3); transform: rotate(-90deg); }

/* The narrow column cannot fit a long address AND three buttons on one line:
   the actions drop below the value instead of sitting on top of it. */
.rcrm-reach-row { flex-wrap: wrap; }
.rcrm-reach-main { flex: 1 1 160px; }
.rcrm-reach-main .rcrm-id-value, .rcrm-social-row .rcrm-id-value { display: block; }
.rcrm-reach-acts { margin-left: auto; }

/* 21 Oct 2026: tags edited in the top card; address and social fold under the numbers. */
.rcrm-tag-add-inline { margin-top: 0; gap: 2px; }
.rcrm-tag-add-inline .rp-input { height: 26px; width: 120px; font-size: 12.5px; padding: 0 8px; border-radius: 999px; }
.rcrm-person-more { margin-top: 12px; border-top: 1px solid var(--rp-border); }
.rcrm-person-more > .rcrm-group { padding: 10px 0; border-bottom: 1px solid var(--rp-border); }
.rcrm-person-more > .rcrm-group > summary .rp-stat-sub { margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rcrm-person-more .rcrm-addresses { margin-bottom: 8px; }
.rcrm-person-chips .rcrm-tag { flex: 0 0 auto; }

/* 21 Oct 2026: an automation drawn as a flowchart, top to bottom. */
.rcrm-when-edit { margin-top: 12px; }
.rcrm-when-edit > summary { list-style: none; }
.rcrm-when-edit > summary::-webkit-details-marker { display: none; }
.rcrm-flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; }
.rcrm-flow > li { width: min(620px, 100%); }
.rcrm-flow-node { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  background: var(--rp-surface); border: 1px solid var(--rp-border); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.rcrm-flow-start { background: var(--rp-accent-soft); border-color: var(--rp-accent-line); }
.rcrm-flow-num { flex: 0 0 26px; height: 26px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600;
  background: var(--rp-surface-2); color: var(--rp-text-2); border: 1px solid var(--rp-border); }
.rcrm-flow-start .rcrm-flow-num { background: var(--rp-surface); color: var(--rp-accent-strong); }
.rcrm-flow-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rcrm-flow-acts { display: flex; gap: 2px; flex: 0 0 auto; }
.rcrm-flow-gap { display: flex; flex-direction: column; align-items: center; padding: 0; }
.rcrm-flow-gap::before, .rcrm-flow-gap::after { content: ""; width: 2px; height: 10px; background: var(--rp-border-2, var(--rp-border)); }
.rcrm-flow-add { display: flex; flex-direction: column; align-items: center; width: 100%; }
.rcrm-flow-add > summary { list-style: none; cursor: pointer; width: 28px; height: 28px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--rp-text-2);
  background: var(--rp-surface); border: 1px dashed var(--rp-border-2, var(--rp-border)); }
.rcrm-flow-add > summary::-webkit-details-marker, .rcrm-flow-edit > summary::-webkit-details-marker { display: none; }
.rcrm-flow-add > summary:hover, .rcrm-flow-add[open] > summary { color: var(--rp-accent-strong); border-color: var(--rp-accent-strong); border-style: solid; }
.rcrm-flow-add[open] .rcrm-flow-form { align-self: stretch; margin-top: 8px; padding: 14px;
  background: var(--rp-surface); border: 1px solid var(--rp-accent-line); border-radius: 12px; }
.rcrm-flow-edit { margin-top: 6px; }
.rcrm-flow-edit > summary { list-style: none; }
.rcrm-flow-edit[open] .rcrm-flow-form { margin-top: 10px; }
.rcrm-flow-end { text-align: center; color: var(--rp-text-3); font-size: 13px; padding: 4px 0; }

/* =========================================================================
   The customer record, two panes (22 Nov 2026)
   Modelled on Attio's and Bigin's record pages: the person as a panel of
   labelled facts on the left, what is happening on the right under three
   highlights. Flat surfaces: one 1px line, no resting shadow.

   The DOM is panel, then .rcrm-person-grid (the arranged sections). The grid
   is display:contents, so its two columns become cells of .rcrm-record:
     side  | main        row 1 is the panel's height (auto);
     left  | main        row 2 is 1fr, so the right pane's height lands there
   and never pushes a gap between the panel and the left column.
   ========================================================================= */
.rcrm-crumb { color: var(--rp-text-2); font-weight: 500; text-decoration: none; }
.rcrm-crumb:hover { color: var(--rp-text); text-decoration: underline; }
.rcrm-crumb-sep { margin: 0 8px; color: var(--rp-text-3); font-weight: 400; }

.rcrm-record {
  display: grid; grid-template-columns: 380px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "side main" "left main";
  gap: 16px 20px; align-items: start;
}
.rcrm-record > .rcrm-person-grid { display: contents; }
.rcrm-record .rcrm-record-side { grid-area: side; }
.rcrm-record .rcrm-person-col-left { grid-area: left; }
.rcrm-record .rcrm-person-col-right { grid-area: main; }
.rcrm-record .rp-card { box-shadow: none; }

/* ---------- the panel ---------- */
.rcrm-record-side {
  background: var(--rp-surface); border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius); padding: 20px 20px 14px; min-width: 0;
}
.rcrm-record-side .rcrm-person-head { align-items: center; gap: 14px; }
.rcrm-record-side .rcrm-person-name { font-size: 20px; font-weight: 650; }
.rcrm-person-role { margin: 3px 0 0; font-size: 13.5px; color: var(--rp-text-2);
  overflow-wrap: anywhere; }
.rcrm-record-side .rcrm-person-chips { margin-top: 14px; }
.rcrm-record-side .rcrm-tag-add-inline { margin-top: 0; }
.rcrm-record-side .rcrm-tag-add-inline .rp-input { width: 110px; height: 28px; }

.rcrm-record-side .rcrm-person-acts { display: flex; gap: 6px; margin: 16px 0 6px;
  flex-wrap: nowrap; width: auto; }
.rcrm-act-main { flex: 1 1 auto; min-width: 0; height: 34px; }
.rcrm-act-main svg, .rp-btn.rcrm-act-icon svg { flex: 0 0 auto; }
.rp-btn.rcrm-act-icon { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; }
.rp-btn.rcrm-act-icon svg { width: 15px; height: 15px; }

.rcrm-side-group { border-top: 1px solid var(--rp-border); padding: 10px 0; }
.rcrm-side-group:first-of-type { margin-top: 10px; }
.rcrm-side-group > summary { min-height: 28px; }
.rcrm-side-group > summary h4 { font-size: 13px; font-weight: 600; color: var(--rp-text-2); }
.rcrm-side-group > summary .rp-stat-sub { margin: 0 0 0 auto; max-width: 55%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcrm-side-group[open] > summary { margin-bottom: 4px; }
.rcrm-side-group[open] > summary .rp-stat-sub { display: none; }

.rcrm-props { margin: 0; }
.rcrm-prop { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 10px;
  padding: 5px 0; align-items: baseline; }
.rcrm-prop > dt { display: flex; align-items: center; gap: 8px; color: var(--rp-text-2);
  font-size: 13px; min-width: 0; }
.rcrm-prop > dt svg { color: var(--rp-text-3); flex: 0 0 auto; position: relative; top: 2px; }
.rcrm-prop > dd { margin: 0; font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.rcrm-prop .rcrm-glance-row { padding: 0; gap: 0 6px; flex-wrap: nowrap; }
.rcrm-prop .rcrm-glance-row .rcrm-id-value { flex: 0 1 auto; min-width: 0; }
.rcrm-prop .rcrm-glance-row .rp-stat-sub { flex: 0 0 auto; }
.rcrm-prop .rcrm-glance-acts { margin-left: auto; flex: 0 0 auto; display: inline-flex; }
.rcrm-prop .rcrm-glance-row + .rcrm-glance-row { margin-top: 4px; }
.rcrm-prop .rcrm-glance-row .rp-stat-sub { margin: 0; }
.rcrm-prop .rcrm-glance-acts .rp-btn-xs { padding: 3px 5px; }
/* The row's own Email / Call / Text stay visible but quiet, and come up
   fully under the pointer or the keyboard. */
.rcrm-prop .rcrm-glance-acts { opacity: .6; transition: opacity .12s; }
.rcrm-prop .rcrm-glance-row:hover .rcrm-glance-acts,
.rcrm-prop .rcrm-glance-row:focus-within .rcrm-glance-acts { opacity: 1; }
.rcrm-prop .rcrm-address { margin: 0; }
.rcrm-empty { color: var(--rp-text-3); }
.rcrm-side-note { margin: 2px 0 6px; font-size: 13.5px; }
.rcrm-side-link { margin: 2px 0 0 -11px; }

/* About them sits in the panel as one more group, not a card in a card. */
.rcrm-side-about .rp-card { border: 0; border-top: 1px solid var(--rp-border);
  border-radius: 0; background: transparent; }
.rcrm-side-about .rp-card-head { padding: 10px 0; min-height: 0; border-bottom: 0;
  border-radius: 0; }
.rcrm-side-about .rp-card-head:hover { background: transparent; }
.rcrm-side-about .rp-card-head h3 { font-size: 13px; font-weight: 600; color: var(--rp-text-2); }
.rcrm-side-about .rp-card-pad { padding: 0 0 10px; font-size: 13.5px; }
.rcrm-side-about .rp-card.is-folded > .rp-card-head { border-radius: 0; }
.rcrm-record-side .rcrm-photo-controls { margin-top: 4px; border-top: 1px solid var(--rp-border);
  padding-top: 8px; }
.rcrm-record-side .rcrm-photo-controls > summary { margin-left: -11px; }

.rcrm-side-about .rp-card-head h3 svg { display: none; }

/* ---------- history as a timeline ----------
   Bigin's dated rail: each entry's icon in a small disc on one thin line.
   Pure CSS over the History section's own rows, so the section stays the
   same markup wherever somebody arranges it. */
.rcrm-record [data-section="history"] .rp-row { position: relative; border-top: 0;
  align-items: flex-start; gap: 12px; padding: 7px 0; }
.rcrm-record [data-section="history"] .rp-row::before { content: ""; position: absolute;
  left: 13px; top: 0; bottom: 0; width: 1px; background: var(--rp-border); }
.rcrm-record [data-section="history"] .rp-row:first-child::before { top: 20px; }
.rcrm-record [data-section="history"] .rp-row:last-child::before { bottom: calc(100% - 20px); }
.rcrm-record [data-section="history"] .rp-row:only-child::before { display: none; }
.rcrm-record [data-section="history"] .rp-row > span:first-child {
  position: relative; z-index: 1; flex: 0 0 27px; width: 27px; height: 27px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--rp-surface-2); border: 1px solid var(--rp-border); }
.rcrm-record [data-section="history"] .rp-row > span:first-child svg { width: 13px; height: 13px; }
.rcrm-record [data-section="history"] .rp-row > div { padding-top: 3px; }

/* ---------- highlights ---------- */
.rcrm-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rcrm-highlight { background: var(--rp-surface); border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius); padding: 14px 16px; min-width: 0; }
.rcrm-highlight-label { display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--rp-text-2); }
.rcrm-highlight-label svg { color: var(--rp-text-3); }
.rcrm-highlight-value { margin-top: 8px; font-size: 14.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcrm-highlight-figure { font-size: 22px; line-height: 1.1; font-weight: 650;
  font-variant-numeric: tabular-nums; }
.rcrm-highlight-sub { margin-top: 3px; font-size: 12.5px; color: var(--rp-text-2); }
.rcrm-highlight-sub.is-late { color: var(--rp-danger); font-weight: 600; }

@media (max-width: 980px) {
  .rcrm-record { grid-template-columns: minmax(0, 1fr); grid-template-rows: none;
    grid-template-areas: "side" "main" "left"; }
}
@media (max-width: 560px) {
  .rcrm-highlights { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rcrm-highlight { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px;
    align-items: baseline; padding: 10px 14px; }
  .rcrm-highlight-value { margin-top: 0; text-align: right; }
  .rcrm-highlight-sub { grid-column: 1 / -1; text-align: right; margin-top: 0; }
}

/* ---------- the sections as tabs (22 Nov 2026) ----------
   One card, a row of tabs across its top, the open section under it —
   Bigin's record tabs. The section's own card is flattened into this one,
   and its heading is dropped where the tab already says it; a heading that
   also holds a button (All contracts) keeps the button. */
.rcrm-tabs { background: var(--rp-surface); border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius); min-width: 0; }
.rcrm-tabbar { display: flex; gap: 4px; padding: 0 12px; overflow-x: auto;
  border-bottom: 1px solid var(--rp-border); scrollbar-width: none; }
/* On a phone the row scrolls sideways; its scrollbar would sit under the tabs
   and read as a second underline. */
.rcrm-tabbar::-webkit-scrollbar { display: none; }
.rcrm-tab { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  padding: 13px 10px 11px; margin-bottom: -1px; border-bottom: 2px solid transparent;
  font-size: 14px; font-weight: 550; color: var(--rp-text-2); text-decoration: none;
  white-space: nowrap; transition: color .12s, border-color .12s; }
.rcrm-tab:hover { color: var(--rp-text); text-decoration: none; }
.rcrm-tab[aria-selected="true"] { color: var(--rp-text); border-bottom-color: var(--rp-accent); }
.rcrm-tab:focus-visible { outline: 2px solid var(--rp-accent-strong); outline-offset: -4px;
  border-radius: 8px; }
.rcrm-tab-count { min-width: 20px; padding: 0 6px; border-radius: 999px; text-align: center;
  font-size: 11.5px; font-weight: 650; line-height: 19px; font-variant-numeric: tabular-nums;
  background: var(--rp-surface-2); color: var(--rp-text-2); border: 1px solid var(--rp-border); }
.rcrm-tab[aria-selected="true"] .rcrm-tab-count { background: var(--rp-accent-soft);
  color: var(--rp-accent-strong); border-color: var(--rp-accent-line); }

.rcrm-tabpanel > .rp-card { border: 0; border-radius: 0; background: transparent; }
.rcrm-tabpanel > .rp-card > .rp-card-head { border-bottom: 0; justify-content: flex-end;
  min-height: 0; padding: 12px 20px 0; }
.rcrm-tabpanel > .rp-card > .rp-card-head h3 { display: none; }
.rcrm-tabpanel > .rp-card > .rp-card-head:not(:has(> :not(h3))) { display: none; }
/* With no script every section shows; keep them apart. */
.rcrm-tabpanel + .rcrm-tabpanel:not([hidden]) { border-top: 1px solid var(--rp-border); }

/* Arrange: why a ticked row will not show (e.g. What they bought on a brand without licences). */
.rcrm-arrange-note { display: block; margin-top: 4px; }

/* Whether a key or password is stored. Password boxes are always drawn
   empty, so this line is the only way to tell a saved key from none. */
.rcrm-saved { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px;
  font-size: 12.5px; color: var(--rp-text-2); }
.rcrm-saved.is-saved { color: var(--rp-success, #15803d); font-weight: 600; }
.rcrm-saved code { font-weight: 600; }

/* The picture and name at the top of a booking page (1.3.15). */
.rcrm-host { display: flex; align-items: center; gap: 12px; margin: 12px 0 10px; }
.rcrm-host strong { font-size: 16px; color: var(--brand-text, inherit); }
.rcrm-host-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 50%;
  border: 2px solid var(--brand-accent, var(--rp-border)); background: #fff; flex: none; }

/* ---------- bookable things: one folded card each (24 Nov 2026) ---------- */
.rcrm-type { margin-bottom: 12px; }
.rcrm-type-meta { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcrm-type > .rcrm-tabs { border: 0; border-top: 1px solid var(--rp-border); border-radius: 0; background: transparent; }
.rcrm-type .rcrm-tabpanel > .rp-card-pad { padding-top: 16px; }
.rcrm-danger { color: var(--rp-danger); }
.rcrm-tab[aria-current="page"] { color: var(--rp-text); border-bottom-color: var(--rp-accent); }
.rcrm-subnav { margin-bottom: 16px; }

/* Signature editor: a box that keeps what is pasted into it. */
.rcrm-sig-editor { min-height: 120px; max-height: 320px; overflow: auto; background: #fff; color: #222; }
.rcrm-sig-editor:empty::before { content: attr(data-placeholder); color: var(--rp-text-3); }
.rcrm-sig-editor img { max-width: 100%; height: auto; }

/* Compact fields: short inputs side by side, long ones only where the content is long. */
.rcrm-fields { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.rcrm-f { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 12.5px; font-weight: 550; color: var(--rp-text-2); }
.rcrm-f > .rp-input, .rcrm-f > .rp-select { width: 104px; }
.rcrm-f > input[type=time] { width: 124px; }
.rcrm-f-mid > .rp-select, .rcrm-f-mid > .rp-input { width: 190px; }
.rcrm-f-wide > .rp-input { width: 220px; }
.rcrm-f-grow { flex: 1 1 260px; }
.rcrm-f-grow > .rp-input { width: 100%; }
.rcrm-f-check { align-self: flex-end; margin: 0 0 8px; }
.rcrm-checks { gap: 8px 22px; }
.rcrm-sect { padding: 14px 0; border-top: 1px solid var(--rp-border); }
.rcrm-sect:first-child { border-top: 0; padding-top: 0; }
.rcrm-sect > h4 { margin: 0 0 10px; font-size: 13px; font-weight: 650; }
.rcrm-sect .rp-help { margin-top: 8px; }
.rcrm-pagetabs > .rcrm-tabpanel > .rp-card > .rp-card-pad { padding-top: 16px; }

/* Booking page picture and name: short fields on the left, the picture on the right. */
.rcrm-hostform { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; margin-top: 8px; }
.rcrm-hostform .rcrm-fields { flex: 1 1 auto; min-width: 0; }
.rcrm-f-host > .rp-input { width: 280px; max-width: 100%; }
.rcrm-hostform .rcrm-host-photo { flex: 0 0 auto; margin-left: auto; }

/* Teams, saved hours, deposits: same compact look. */
.rcrm-grouphead { margin: 22px 0 10px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--rp-text-3); }
.rcrm-f-long > .rp-input { width: 440px; max-width: 100%; }
.rcrm-f-wide > .rp-select { width: 260px; max-width: 100%; }
.rcrm-weekrow { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
.rcrm-weekrow .rcrm-weekday { width: 130px; margin: 0; }
.rcrm-weekrow .rp-input { width: 124px; }

/* ---------- booking picker: a day as a strip, a month as a calendar ---------- */
.rcrm-daybar, .rcrm-cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.rcrm-daybar .rp-input { width: 160px; }
.rcrm-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--rp-text-2); }
.rcrm-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; border: 1px solid var(--rp-border); }
.rcrm-legend .lg-free { background: #fff; }
.rcrm-legend .lg-busy { background: #f3b6b6; border-color: #e58f8f; }
.rcrm-legend .lg-shut { background: repeating-linear-gradient(45deg, #eceef2, #eceef2 3px, #f6f7f9 3px, #f6f7f9 6px); }
.rcrm-tl { position: relative; padding-bottom: 20px; user-select: none; }
.rcrm-tl-track { position: relative; height: 64px; border: 1px solid var(--rp-border); border-radius: 10px; background: #fff;
  overflow: hidden; cursor: crosshair; touch-action: none;
  background-image: linear-gradient(to right, rgba(0,0,0,.07) 1px, transparent 1px); background-size: calc(100% / var(--hours, 12)) 100%; }
.rcrm-tl-shut { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #eceef2, #eceef2 4px, #f6f7f9 4px, #f6f7f9 8px); cursor: not-allowed; }
.rcrm-tl-busy { position: absolute; top: 0; bottom: 0; background: #f3b6b6; border-left: 2px solid #e58f8f; border-right: 2px solid #e58f8f; cursor: not-allowed; }
.rcrm-tl-sel { position: absolute; top: 6px; bottom: 6px; border-radius: 8px; background: var(--rp-accent); color: #fff; font-size: 12.5px; font-weight: 650;
  display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.2); pointer-events: none; }
.rcrm-tl-hours { position: relative; height: 16px; margin-top: 4px; }
.rcrm-tl-hours span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--rp-text-3); }
.rcrm-picksum { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--rp-surface-2, #f6f7f9); font-size: 14px; }
.rcrm-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 420px; }
.rcrm-cal-dow { text-align: center; font-size: 11px; font-weight: 650; color: var(--rp-text-3); padding: 2px 0; }
.rcrm-cal-day { border: 1px solid var(--rp-border); background: #fff; border-radius: 8px; padding: 9px 0; font: inherit; cursor: pointer; }
.rcrm-cal-day:hover:not(:disabled) { border-color: var(--rp-accent); }
.rcrm-cal-day.is-booked { background: #f3b6b6; border-color: #e58f8f; text-decoration: line-through; color: #7a2d2d; cursor: not-allowed; }
.rcrm-cal-day.is-off { background: #f6f7f9; color: #b4b8c2; cursor: not-allowed; }
.rcrm-cal-pub { max-width: none; }
.rcrm-cal-head strong { min-width: 140px; text-align: center; }
.rcrm-cal-day.is-free { background: var(--rp-accent-soft); border-color: var(--rp-border-2); color: var(--rp-accent-strong); font-weight: 600; }
.rcrm-cal-day.is-edge:hover { border-color: var(--rp-accent); }
.rcrm-cal-day.is-in { background: var(--rp-accent-soft, #e8f0e0); border-color: var(--rp-accent-line, #b9cf9f); }
.rcrm-cal-day.is-edge { background: var(--rp-accent); border-color: var(--rp-accent); color: #fff; font-weight: 650; }

/* Week grid on a thing's booking page: seven day columns, time runs down. */
.rcrm-wk { display: flex; gap: 6px; user-select: none; margin-bottom: 4px; }
.rcrm-wk-axis { width: 42px; flex: none; }
.rcrm-wk-ruler { position: relative; }
.rcrm-wk-ruler span { position: absolute; right: 4px; transform: translateY(-50%); font-size: 11px; color: var(--rp-text-3); }
.rcrm-wk-ruler span:first-child { transform: none; }
.rcrm-wk-cols { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.rcrm-wk-head { border: 0; background: none; padding: 0 2px; font: inherit; font-size: 12px; line-height: 1.25; color: var(--rp-text-2);
  cursor: pointer; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rcrm-wk-head b { font-size: 12.5px; color: var(--rp-text); }
.rcrm-wk-head.is-sel { background: var(--rp-accent); color: #fff; }
.rcrm-wk-head.is-sel b { color: #fff; }
.rcrm-wk-track { position: relative; border: 1px solid var(--rp-border); border-radius: 8px; background: #fff; overflow: hidden;
  cursor: crosshair; touch-action: none;
  background-image: linear-gradient(to bottom, rgba(0,0,0,.07) 1px, transparent 1px); background-size: 100% calc(100% / var(--hours, 12)); }
.rcrm-wk-track .rcrm-tl-shut, .rcrm-wk-track .rcrm-tl-busy { left: 0; right: 0; top: auto; bottom: auto; border-left: 0; border-right: 0; }
.rcrm-wk-track .rcrm-tl-busy { border-top: 2px solid #e58f8f; border-bottom: 2px solid #e58f8f; }
.rcrm-wk-track .rcrm-tl-sel { left: 2px; right: 2px; top: auto; bottom: auto; border-radius: 6px; font-size: 11px; white-space: normal;
  text-align: center; line-height: 1.15; padding: 0 1px; }
.rcrm-wk-title { margin-left: 6px; }
.rcrm-seg { display: inline-flex; border: 1px solid var(--rp-border); border-radius: 8px; overflow: hidden; }
.rcrm-seg button { border: 0; background: #fff; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--rp-text-2); }
.rcrm-seg button.is-on { background: var(--rp-accent); color: #fff; }
.rcrm-mo { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
.rcrm-mo[hidden], .rcrm-wk[hidden] { display: none; }
.rcrm-mo-day { border: 1px solid var(--rp-border); border-radius: 8px; background: #fff; padding: 6px 2px; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; min-height: 54px; }
.rcrm-mo-day b { font-size: 14px; color: var(--rp-text); }
.rcrm-mo-day small { font-size: 10.5px; color: var(--rp-text-3); }
.rcrm-mo-day.is-part { background: #fff7e6; border-color: #f0d9a8; }
.rcrm-mo-day.is-free { background: #eefaf0; border-color: #bfe3c6; }
.rcrm-mo-day.is-full { background: #f3b6b6; border-color: #e58f8f; cursor: not-allowed; }
.rcrm-mo-day.is-shut { background: repeating-linear-gradient(45deg, #eceef2, #eceef2 4px, #f6f7f9 4px, #f6f7f9 8px); cursor: not-allowed; }
.rcrm-mo-day.is-sel { outline: 2px solid var(--rp-accent); }
@media (max-width: 520px) { .rcrm-wk-title { display: none; } .rcrm-wk-head { font-size: 10.5px; } .rcrm-wk-axis { width: 34px; } }
