/* Guests Page Styles */

.guests_page {
  min-height: 100vh;
  background: var(--canvas);
}

.guests_container {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guests_header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.guests_header h1 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.1;
  color: var(--ink);
}

.guests_header p {
  font-size: 13px;
  color: var(--stone);
  margin-top: 4px;
}

.guests_actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.guests_button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 0.5px solid var(--border-strong);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.guests_button:hover {
  background: var(--canvas);
}

.guests_button svg {
  width: 16px;
  height: 16px;
}

/* Primary action buttons (Add Guest, Edit Guest, Save Guest) — orange full pill */
.guests_button.bg-primary,
.guests_button.bg-vibrant-blue {
  background: var(--brand-fill);
  color: var(--on-media);
  border: none;
}

.guests_button.bg-primary:hover,
.guests_button.bg-vibrant-blue:hover {
  background: var(--brand-fill-hover);
}

.guests_notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.875rem;
  border: 0.5px solid var(--border);
  border-left: 4px solid var(--orange);
  background: var(--white);
  box-shadow: var(--shadow-1);
}

.guests_notice_text {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.guests_notice_icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid rgba(232, 115, 42, 0.30);
  color: var(--orange-dark);
  display: grid;
  place-items: center;
  flex: none;
}

.guests_notice_icon svg {
  width: 22px;
  height: 22px;
}

.guests_notice_title {
  font-weight: 700;
  color: var(--ink);
}

.guests_notice_subtitle {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.guests_notice_actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

.guests_notice_dismiss {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: var(--stone);
  border-radius: 8px;
  cursor: pointer;
}

.guests_notice_dismiss:hover {
  color: var(--ink);
  background: var(--canvas);
}

.guests_notice_dismiss svg {
  width: 18px;
  height: 18px;
}

.guests_filters {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.guests_filters_card {
  border: 0.5px solid var(--border);
  background: var(--white);
  border-radius: 16px;
  padding: 0.75rem;
  box-shadow: var(--shadow-1);
}

.guests_filters select,
.guests_filters input {
  width: 100%;
  border: 0.5px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  background: var(--white);
  color: var(--ink);
}

.guests_filters select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23807A72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1,1 6,7 11,1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.guests_filter_select {
  width: 180px;
}

.guests_search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: 0.5px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  background: var(--white);
}

.guests_search svg {
  width: 16px;
  height: 16px;
  color: var(--stone);
}

.guests_search input {
  width: 100%;
  border: none;
  padding: 0.4rem 0;
  outline: none;
  box-shadow: none;
}

.guests_search input:focus {
  outline: none;
  box-shadow: none;
}

.guests_list {
  margin-top: 1rem;
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.guest_list_header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 140px 140px 160px 24px;
  gap: 1.25rem;
  align-items: center;
  padding: 0.65rem 1.25rem;
  border-bottom: 0.5px solid var(--border);
  background: var(--canvas);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guest_list_header span:first-child {
  grid-column: 1 / 3;
}

.guest_row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 140px 140px 160px 24px;
  gap: 1.25rem;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}

.guest_row:last-child {
  border-bottom: none;
}

.guest_row:hover,
.guest_row:focus-visible {
  background: var(--canvas);
  outline: none;
}

.guest_avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-fill), var(--brand-fill-hover));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--on-media);
  font-weight: 600;
}

.guest_info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.guest_name {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}

.guest_careflow_note {
  font-size: 0.75rem;
  color: var(--stone);
  font-weight: 400;
}

.guest_email {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest_phone,
.guest_date {
  font-size: 0.875rem;
  color: var(--stone);
  font-variant-numeric: tabular-nums;
}

.guest_chevron {
  color: var(--stone);
  display: flex;
  align-items: center;
}

.guest_chevron svg {
  width: 18px;
  height: 18px;
}

.guests_footer {
  text-align: center;
  color: var(--stone);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.guests_form_view {
  margin: 1rem auto 0;
  /* slightly wider form to better match design */
  max-width: 880px !important;
  width: 100%;
}

.guests_form_header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.guests_form_header h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ink);
}

/* Circular icon back — matches the detail/profile headers */
.guests_back {
  width: 36px;
  height: 36px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--stone);
  cursor: pointer;
  padding: 0;
}

.guests_back:hover {
  background: var(--canvas);
  color: var(--ink);
}

.guests_back svg {
  width: 20px;
  height: 20px;
}

.guest_form_card {
  border: 0.5px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  padding: 1.75rem;
  margin-top: 1rem;
  box-shadow: var(--shadow-1);
  max-width: 100%;
}

.guest_form_grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.guest_form_field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.guest_form_field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.guest_form_field input,
.guest_form_field select,
.guest_form_field textarea {
  border: 0.5px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--white);
}

/* Date input wrapper and custom calendar button */
.date_input_wrap {
  position: relative;
  display: inline-block;
  width: 220px;
  max-width: 100%;
}
.date_input_wrap input[type="date"] {
  width: 100%;
  padding-right: 44px; /* space for the button inside */
  -webkit-appearance: none;
  appearance: none;
}
.date_button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--ink); /* make the icon black */
}
.date_button svg {
  width: 18px;
  height: 18px;
}

/* Hide native calendar picker in WebKit browsers so our custom button is visible */
input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
}

.guest_form_tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border: 0.5px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  background: var(--white);
}

.guest_form_tags input {
  border: none;
  flex: 1 1 180px;
  min-width: 160px;
  padding: 0.35rem 0.25rem;
}

.guest_form_tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(232, 115, 42, 0.1);
  color: var(--orange-dark);
  font-size: 0.75rem;
  font-weight: 600;
}

.guest_form_tag_remove {
  border: none;
  background: transparent;
  color: var(--orange-dark);
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
}

.guest_form_field small {
  color: var(--stone);
  font-size: 0.75rem;
}

.guest_form_field--full {
  grid-column: 1 / -1;
}

.guest_form_section {
  margin-top: 1.5rem;
}

.guest_form_section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
}

.guest_form_actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
}

.guest_form_actions .guests_button {
  flex: 1 1 0;
  justify-content: center;
  min-height: 38px;
}

.guests_detail_view {
  margin: 1rem 0 0;
  width: 100%;
}

/* Detail view header */
.guests_detail_header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.guests_detail_title_row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}
.guests_detail_title {
  min-width: 0;
}
.guests_detail_title h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.3;
}
.guests_detail_title p {
  font-size: 0.8125rem;
  color: var(--stone);
  margin: 0.125rem 0 0 0;
}

/* Status pill in heading — same color tokens as chip, slightly larger and uppercase */
.guests_detail_status_pill {
  display: inline-block;
  margin-left: 0.75rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
  line-height: 1.4;
}
/* Pill colors: reuse the same palette as the list-view chip */
.guests_detail_status_pill.guest_status_chip--initial   { background: var(--info-tint); color: var(--info); }
.guests_detail_status_pill.guest_status_chip--waiting   { background: var(--warning-tint); color: var(--warning); }
.guests_detail_status_pill.guest_status_chip--active    { background: var(--success-tint); color: var(--success); }
.guests_detail_status_pill.guest_status_chip--inactive  { background: var(--error-tint); color: var(--error); }
.guests_detail_status_pill.guest_status_chip--complete  { background: var(--neutral-tint); color: var(--text-secondary); }

/* Detail section cards */
.guests_detail_section {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 1.125rem 1.25rem;
  box-shadow: var(--shadow-1);
}
.guests_detail_section_header {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 0.5px solid var(--border);
}
.guests_detail_section_meta {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--stone);
}

/* Detail values (rail cards) */
.guests_detail_value {
  font-size: 0.875rem;
  color: var(--ink);
  word-break: break-word;
}
.guests_detail_value--muted {
  color: var(--stone);
  font-style: italic;
}

/* Empty states */
.guests_detail_empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--stone);
  font-size: 0.8125rem;
  background: var(--canvas);
  border-radius: 8px;
  border: 1px dashed var(--border);
}

/* Status chip — interaction_status from latest connect card */
.guest_status_chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    width: fit-content;
}
.guest_status_chip:not(:empty)::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.guest_status_chip--initial   { background: var(--info-tint); color: var(--info); }
.guest_status_chip--waiting   { background: var(--warning-tint); color: var(--warning); }
.guest_status_chip--active    { background: var(--success-tint); color: var(--success); }
.guest_status_chip--inactive  { background: var(--error-tint); color: var(--error); }
.guest_status_chip--complete  { background: var(--neutral-tint); color: var(--text-secondary); }
.guest_status_line { display: none; }
.guest_status_chip--none      { background: transparent; color: var(--stone); font-weight: 400; }
.guest_status_chip--none::before { display: none; }

/* Conversation history (F5) — read-only chat thread */
.conversation_thread {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  max-height: 26rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.conversation_msg {
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.conversation_msg--in {
  align-self: flex-start;
  align-items: flex-start;
}
.conversation_msg--out {
  align-self: flex-end;
  align-items: flex-end;
}
.conversation_bubble {
  padding: 0.625rem 0.875rem;
  border-radius: 14px;
  font-size: 0.8125rem;
  line-height: 1.5;
  word-break: break-word;
}
.conversation_msg--in .conversation_bubble {
  background: var(--canvas);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.conversation_msg--out .conversation_bubble {
  background: var(--brand-fill);
  color: var(--on-media);
  border-bottom-right-radius: 4px;
}
.conversation_meta {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.conversation_note {
  background: var(--canvas);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.625rem 0.75rem;
}
.conversation_note_head {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--orange-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.conversation_note_text {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.5;
  word-break: break-word;
}
.conversation_loading {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.conversation_loading span {
  height: 2.25rem;
  width: 72%;
  border-radius: 12px;
  background: var(--canvas);
  animation: conversation_pulse 1.2s ease-in-out infinite;
}
.conversation_loading span:nth-child(2) {
  width: 60%;
  align-self: flex-end;
}
@keyframes conversation_pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@media (max-width: 1024px) {
  .guest_list_header {
    display: none;
  }

  .guest_row {
    grid-template-columns: 36px minmax(0, 1fr) 24px;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .guest_phone,
  .guest_date {
    display: none;
  }

  /* No room for a chip column on a phone, so the status reads under the name instead —
     a list with no statuses at all was worse than either. */
  .guest_row .guest_status_chip {
    display: none;
  }
  /* Same pill as desktop, sized for a row: colour carries the meaning, so no label word. */
  .guest_status_line {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.1875rem 0.5rem;
    border-radius: 999px;
    margin-top: 0.25rem;
  }

  .guests_filters select,
  .guests_filters input {
    font-size: 1rem;
  }

  .guests_detail_header {
    flex-wrap: wrap;
  }
}

@media (max-width: 850px) {
  /* Conversation: let the page scroll on mobile instead of a nested box */
  .conversation_thread {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .guests_header {
    flex-direction: column;
  }

  .guests_header h1 {
    font-size: 24px;
  }

  .guests_filters {
    grid-template-columns: 1fr;
  }

  .guest_form_grid {
    grid-template-columns: 1fr;
  }

  .guests_detail_header {
    align-items: flex-start;
    flex-direction: column;
  }

  .guests_detail_edit {
    align-self: flex-end;
  }
}

/* "Select a guest" fallback when no guest is selected */
.guest_detail_empty {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--stone);
  background: var(--canvas);
}

.guest_detail_empty h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0.5rem 0;
}

/* ── Bento detail: header subline + guest-details fact grid ── */
.guests_detail_subline {
  font-size: 0.8125rem;
  color: var(--stone);
  margin: 0.125rem 0 0 0;
}
/* Plain-English read on the guest, directly under the name. */
.guests_detail_sentence {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0.25rem 0 0 0;
}
/* Setting where a follow-up stands by hand. */
.cf_status_set {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.cf_status_set_label {
  font-size: 0.75rem;
  color: var(--stone);
  font-weight: 600;
}
.cf_status_select {
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--ink);
}
.cf_status_saving { font-size: 0.75rem; color: var(--stone); }
.cf_status_error  { font-size: 0.75rem; color: var(--orange-dark); }
/* Finished follow-ups stay reachable but stop competing with live work. */
.cf_tab--finished,
.cf_flowrow--finished { opacity: 0.55; }
.guests_facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 1.5rem;
}
.guests_fact {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.guests_fact_label {
  font-size: 0.6875rem;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.guests_fact_value {
  font-size: 0.875rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.guests_verif { font-size: 0.6875rem; font-weight: 600; color: var(--success); }
.guests_unverif { font-size: 0.6875rem; font-weight: 600; color: var(--warning); }

/* ── Two-pane split ── */
.guests_detail_split {
  display: grid;
  grid-template-columns: 1.95fr 1fr;
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}
.guests_detail_rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.guests_flow_card {
  padding: 0;
  overflow: hidden;
}

/* ── CareFlow tabs (desktop) ── */
.cf_tabs {
  display: flex;
  gap: 2px;
  border-bottom: 0.5px solid var(--border);
  padding: 0 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.cf_tabs::-webkit-scrollbar {
  display: none;
}
.cf_tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.875rem;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.cf_tab--active {
  color: var(--ink);
  border-bottom-color: var(--orange);
}
.cf_tab_av {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--navy) 12%, transparent);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 700;
  flex: none;
}
.cf_tab_warn {
  color: var(--error);
  font-size: 0.75rem;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.dot--active { background: var(--success); }
.dot--quiet { background: var(--error); }
.dot--complete { background: var(--stone); }
.dot--initial { background: var(--stone); }

/* ── Conversation panel (reuses .conversation_* for the thread) ── */
.guests_flow_conversation {
  padding: 1.125rem 1.25rem;
}
.cf_owner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 0.5px solid var(--border);
}
.cf_owner b {
  color: var(--ink);
  font-weight: 600;
}
.cf_owner_av {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--navy) 12%, transparent);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  flex: none;
}
.guests_flow_conversation .conversation_thread {
  max-height: 30rem;
}

/* ── Mobile flow-list + conversation header (hidden on desktop) ── */
.cf_flowlist { display: none; }
.cf_mobile_conv_header { display: none; }
.cf_flowlist_head {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding: 0 0.25rem 0.5rem;
}
.cf_flowlist_hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--stone);
}
.cf_flowrow {
  display: flex;
  align-items: center;
  gap: 0.6875rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.8125rem;
  margin-bottom: 0.5625rem;
  border: 0.5px solid var(--border);
  border-radius: 11px;
  background: var(--white);
  box-shadow: var(--shadow-1);
  font-family: var(--font-body);
  cursor: pointer;
}
.cf_flowrow:last-child { margin-bottom: 0; }
.cf_flowrow:active { background: var(--canvas); }
.cf_flowrow_mid {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cf_flowrow_name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
}
.cf_flowrow_meta {
  font-size: 0.71875rem;
  color: var(--text-secondary);
  margin-top: 1px;
}
.cf_flowrow_meta--quiet {
  color: var(--error);
  font-weight: 600;
}
.cf_flowrow_chev {
  color: var(--orange-dark);
  font-size: 1.3125rem;
  font-weight: 700;
  flex: none;
}

/* ── Rail card body bits ── */
.guests_pray_text {
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.guests_intake_row {
  padding: 0.5rem 0;
  border-top: 1px dashed var(--border);
}
.guests_intake_row:first-of-type {
  border-top: none;
  padding-top: 0;
}
.guests_intake_main {
  font-size: 0.8125rem;
  color: var(--ink);
}
.guests_intake_meta {
  font-size: 0.75rem;
  color: var(--stone);
  margin-top: 0.125rem;
}

/* ── Bento → mobile flow-list drill-in ── */
@media (max-width: 850px) {
  .guests_detail_split {
    grid-template-columns: 1fr;
  }
  .cf_tabs {
    display: none;
  }
  .cf_flowlist {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.125rem;
  }
  .guests_flow_conversation {
    display: none;
  }
  .cf_mobile_conv_header {
    display: none;
  }
  /* Drill-in: a flow is open → show its conversation full-width, hide overview chrome */
  .guests_detail_view--flow-open .gd_head_overview,
  .guests_detail_view--flow-open .guests_facts_card,
  .guests_detail_view--flow-open .guests_detail_rail,
  .guests_detail_view--flow-open .cf_flowlist {
    display: none;
  }
  .guests_detail_view--flow-open .guests_flow_conversation {
    display: block;
  }
  .guests_detail_view--flow-open .cf_mobile_conv_header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.125rem;
    margin-top: 0.75rem;
  }
  .guests_flow_conversation .conversation_thread {
    max-height: 58vh;
  }
}

