/* Admin portal (admin/app.js). One product with the chat widget: the same Urbanist type at the same sizes, the
   Utah Grown green on neutral grays, flat surfaces with 1px borders. The review and conversation pages are the
   widget's own review.css and team/log.css rules (the .rv-* and .tl-* classes below), carried over so the pages
   look exactly as they did; the chat's components that draw an answer come from vendor/widget/widget.css. */

:root {
  --ad-bg: #f4f5f6;
  --ad-surface: #ffffff;
  --ad-text: #111827;
  --ad-text-2: #4b5563;
  --ad-text-3: #6b7280; /* the widget's #9ca3af reads too faint for small admin text on white */
  --ad-border: #e5e7eb;
  --ad-border-strong: #d1d5db;
  --ad-brand: #1f6b3b;
  --ad-brand-hover: #18572f;
  --ad-tint: #eef6f1;
  --ad-danger: #c0362c;
  --ad-danger-tint: #fbe9e7;
  --ad-amber: #b7791f;
  --ad-info: #1d4ed8;
  --ad-info-tint: #e7f0fd;
  --ad-line: #c7cdd4;
  --ad-radius: 14px;
  --ad-font: 'Urbanist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* the names review.css and log.css were written with */
  --rv-bg: var(--ad-bg);
  --rv-surface: var(--ad-surface);
  --rv-text: var(--ad-text);
  --rv-text-2: var(--ad-text-2);
  --rv-text-3: var(--ad-text-3);
  --rv-border: var(--ad-border);
  --rv-brand: var(--ad-brand);
  --rv-tint: var(--ad-tint);
  --rv-danger: var(--ad-danger);
  --rv-amber: var(--ad-amber);
  --rv-line: var(--ad-line);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--ad-bg);
  color: var(--ad-text);
  font-family: var(--ad-font);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
:focus-visible {
  outline: 2px solid var(--ad-brand);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.rv-sr,
.ad-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* --- Header: mark, pages, brand, who --- */
.ad-top {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  padding: 10px 16px;
  background: var(--ad-surface);
  border-bottom: 1px solid var(--ad-border);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.ad-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ad-text);
  text-decoration: none;
}
.ad-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ad-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.ad-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.ad-nav-link {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ad-text-2);
  text-decoration: none;
}
.ad-nav-link:hover {
  background: var(--ad-bg);
}
.ad-nav-link[aria-current='page'] {
  background: var(--ad-tint);
  color: var(--ad-brand);
}
.ad-who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ad-name {
  font-weight: 600;
  color: var(--ad-text-2);
}
.ad-account {
  position: relative;
}
.ad-account > summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 10px;
  border-radius: 10px;
}
.ad-account > summary::-webkit-details-marker {
  display: none;
}
.ad-account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;
  padding: 10px;
  background: var(--ad-surface);
  border: 1px solid var(--ad-border-strong);
  border-radius: 12px;
}
.ad-account-note {
  margin: 0;
  font-size: 13px;
  color: var(--ad-text-2);
}
.ad-account-note:empty {
  display: none;
}
.ad-brand select {
  font: inherit;
  font-weight: 600;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--ad-border-strong);
  border-radius: 10px;
  background: var(--ad-surface);
  color: var(--ad-text);
}
.ad-brand-pill {
  background: var(--ad-tint);
  color: var(--ad-brand);
}
.ad-live-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ad-live {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ad-brand);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--ad-brand);
  border-radius: 10px;
}
.ad-live:hover {
  background: var(--ad-tint);
}
.ad-live-note {
  font-size: 12.5px;
  color: var(--ad-text-2);
}
.ad-live-note.is-error {
  color: var(--ad-danger);
}

/* --- Main --- */
.ad-main {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.ad-main.is-split {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rv-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ad-loading {
  padding: 24px 16px;
  color: var(--ad-text-3);
}
.ad-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}
.ad-page.is-narrow {
  max-width: 460px;
  padding-top: 8vh;
}
.ad-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ad-h1 {
  margin: 0 0 14px;
  font-size: 22px;
}
.ad-page-head .ad-h1 {
  margin: 0;
}
.ad-h2 {
  margin: 0;
  font-size: 15px;
}
.ad-bar-title {
  margin: 0;
  font-size: 16px;
}
.ad-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.ad-card {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius);
  padding: 14px 16px;
}
.ad-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.ad-card-body > * + * {
  margin-top: 8px;
}
.ad-muted {
  margin: 0;
  color: var(--ad-text-2);
  font-size: 13.5px;
}
.ad-error {
  margin: 0;
  color: var(--ad-danger);
}
.ad-notice {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--ad-tint);
  color: var(--ad-brand);
  font-weight: 600;
}
.ad-status {
  margin: 0;
  font-size: 13px;
  color: var(--ad-text-2);
}
.ad-status.is-error {
  color: var(--ad-danger);
}
.ad-link {
  color: var(--ad-brand);
  font-weight: 600;
  text-decoration: none;
}
.ad-link:hover {
  text-decoration: underline;
}
.ad-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e8eaed;
  color: var(--ad-text);
}
.ad-pill.is-good {
  background: var(--ad-tint);
  color: var(--ad-brand);
}
.ad-pill.is-warn {
  background: var(--ad-danger-tint);
  color: var(--ad-danger);
}
.ad-pill.is-info {
  background: var(--ad-info-tint);
  color: var(--ad-info);
}

/* --- Buttons --- */
.ad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--ad-border-strong);
  border-radius: 10px;
  background: var(--ad-surface);
  color: var(--ad-text);
  text-decoration: none;
  cursor: pointer;
}
.ad-btn:hover {
  background: var(--ad-bg);
}
.ad-btn.is-primary {
  background: var(--ad-brand);
  border-color: var(--ad-brand);
  color: #fff;
}
.ad-btn.is-primary:hover {
  background: var(--ad-brand-hover);
  border-color: var(--ad-brand-hover);
}
.ad-btn.is-danger {
  background: var(--ad-surface);
  border-color: var(--ad-danger);
  color: var(--ad-danger);
}
.ad-btn.is-danger:hover {
  background: var(--ad-danger-tint);
}
.ad-btn.is-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--ad-text-2);
}
.ad-btn.is-small {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 13px;
}
.ad-btn.is-big {
  width: 100%;
  min-height: 46px;
  font-size: 15.5px;
}
.ad-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
@media (pointer: coarse) {
  .ad-btn {
    min-height: 44px;
  }
  .ad-btn.is-small {
    min-height: 38px;
  }
}

/* --- Forms and dialogs --- */
.ad-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ad-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ad-field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ad-text-2);
}
.ad-hint {
  font-size: 12.5px;
  color: var(--ad-text-3);
}
.ad-field input[type='text'],
.ad-field input[type='number'],
.ad-field select,
.ad-field textarea,
.ad-link-box {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--ad-border-strong);
  border-radius: 10px;
  background: var(--ad-surface);
  color: var(--ad-text);
  width: 100%;
}
.ad-field input:focus,
.ad-field select:focus,
.ad-link-box:focus {
  outline: none;
  border-color: var(--ad-brand);
  box-shadow: 0 0 0 3px rgba(31, 107, 59, 0.18);
}
.ad-fieldset {
  border: 1px solid var(--ad-border);
  border-radius: 10px;
  padding: 8px 12px 10px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ad-check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-inline-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.ad-inline-form .ad-field {
  width: 180px;
}
.ad-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 18px 18px 16px;
  border: 1px solid var(--ad-border);
  border-radius: 16px;
  background: var(--ad-surface);
  color: var(--ad-text);
  box-shadow: 0 24px 48px -16px rgba(17, 24, 39, 0.35);
}
.ad-dialog.is-wide {
  width: min(560px, calc(100vw - 32px));
}
.ad-dialog::backdrop {
  background: rgba(17, 24, 39, 0.4);
}
.ad-dialog-title {
  margin: 0 0 10px;
  font-size: 17px;
}
.ad-dialog-text {
  margin: 0 0 14px;
  color: var(--ad-text-2);
}
.ad-dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.ad-auth {
  padding: 22px 20px;
}
.ad-auth .ad-muted {
  margin-bottom: 16px;
}
.ad-auth .ad-status {
  margin-top: 12px;
}

/* --- Dashboard --- */
.db-stats {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.db-stat {
  display: flex;
  flex-direction: column;
}
.db-stat-n {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}
.db-stat-label {
  font-size: 12.5px;
  color: var(--ad-text-2);
}
.db-state {
  margin: 0;
}
.db-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- Spend --- */
.sp-big {
  margin: 0 0 8px;
}
.sp-usd {
  font-size: 28px;
  font-weight: 700;
}
.sp-of {
  color: var(--ad-text-2);
}
.sp-track {
  height: 10px;
  border-radius: 999px;
  background: #e8eaed;
  overflow: hidden;
  margin-bottom: 8px;
}
.sp-fill {
  height: 100%;
  background: var(--ad-brand);
  border-radius: 999px;
}
.sp-fill.is-high {
  background: var(--ad-amber);
}
.sp-fill.is-full {
  background: var(--ad-danger);
}
.ch-host {
  max-width: 720px;
}
.ch {
  width: 100%;
  height: auto;
  display: block;
}
.ch-base {
  stroke: var(--ad-border-strong);
  stroke-width: 1;
}
.ch-bar {
  fill: #c9d6cd;
}
.ch-bar.is-now {
  fill: var(--ad-brand);
}
.ch-value {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ad-text);
}
.ch-label {
  font-size: 12px;
  fill: var(--ad-text-2);
}
.ch-limit {
  stroke: var(--ad-danger);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}
.ch-limit-label {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ad-danger);
}

/* --- Users --- */
.us-card.is-disabled {
  background: var(--ad-bg);
}
.us-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.us-rows {
  margin: 0;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 6px 12px;
}
.us-rows dt {
  color: var(--ad-text-3);
  font-weight: 600;
}
.us-rows dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.us-inline {
  display: inline-flex;
  gap: 6px;
  margin-left: 10px;
}
.us-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.us-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.us-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ad-border);
}
.us-role {
  font: inherit;
  padding: 7px 10px;
  border: 1px solid var(--ad-border-strong);
  border-radius: 10px;
  background: var(--ad-surface);
  max-width: 100%;
}
.us-codes li {
  padding: 4px 0;
}

/* --- Review and conversations: the widget's review.css and team/log.css, carried over --- */
.rv-bar {
  flex-shrink: 0;
}
.rv-badge {
  display: inline-flex;
}
.rv-problem,
.rv-status.is-error,
.rv-empty.is-error {
  color: var(--ad-danger);
}
.rv-problem {
  font-size: 12.5px;
  padding: 0 2px;
}
.rv-status {
  font-size: 13px;
  color: var(--ad-text-2);
}
.rv-change {
  margin-top: 8px;
}
.rv-change-open {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  background: none;
  padding: 2px 0;
  color: var(--ad-text-2);
  cursor: pointer;
  text-decoration: underline;
}
.rv-change-open:hover {
  color: var(--ad-danger);
}
.rv-change-form {
  max-width: 520px;
  margin: 8px auto 0;
  text-align: left;
}
.rv-change-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ad-text-2);
}
.rv-change-label textarea {
  font: inherit;
  min-height: 70px;
  padding: 8px 10px;
  border: 1px solid var(--ad-border-strong);
  border-radius: 10px;
  resize: vertical;
}
.rv-change-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.tl-more {
  display: block;
  width: calc(100% - 16px);
  margin: 10px 8px 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 10px;
  border: 1px solid var(--ad-border-strong);
  border-radius: 10px;
  background: var(--ad-surface);
  color: var(--ad-text-2);
  cursor: pointer;
}
.tl-notice {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ad-amber);
}
.fu-address {
  margin: 4px 0;
  font-size: 15px;
}
.tl-send.is-quiet {
  background: none;
}

/* ===== From widget/review.css (the page frame, flow and nodes) ===== */

/* --- Top bar --- */
.rv-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--rv-surface);
  border-bottom: 1px solid var(--rv-border);
  flex-wrap: wrap;
}
.rv-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--rv-text);
  text-decoration: none;
}
.rv-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--rv-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.rv-find input {
  width: 240px;
  max-width: 60vw;
  font: inherit;
  padding: 7px 12px;
  border: 1px solid var(--rv-border);
  border-radius: 10px;
  background: var(--rv-bg);
}
.rv-find input:focus {
  outline: none;
  border-color: var(--rv-brand);
  background: var(--rv-surface);
}
.rv-filters {
  display: flex;
  gap: 4px;
}
.rv-filters button,
.rv-nav button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid var(--rv-border);
  border-radius: 999px;
  background: var(--rv-surface);
  color: var(--rv-text-2);
  cursor: pointer;
}
.rv-filters button.is-on {
  background: var(--rv-tint);
  border-color: var(--rv-brand);
  color: var(--rv-brand);
}
.rv-progress {
  margin-left: auto;
  font-weight: 600;
  color: var(--rv-text-2);
}
.rv-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  color: var(--rv-text-2);
}
.rv-nav button {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}
.rv-me {
  font-size: 13px;
  color: var(--rv-text-3);
}

/* --- Body: list + flow --- */
.rv-body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.rv-list {
  width: 260px;
  flex-shrink: 0;
  overflow-y: auto;
  background: var(--rv-surface);
  border-right: 1px solid var(--rv-border);
  padding: 8px 8px 24px;
}
.rv-branch {
  margin: 14px 8px 4px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rv-text-3);
}
.rv-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rv-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font: inherit;
  font-size: 13.5px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--rv-text);
  cursor: pointer;
}
.rv-item:hover {
  background: var(--rv-bg);
}
.rv-item.is-current {
  background: var(--rv-tint);
  color: var(--rv-brand);
  font-weight: 600;
}
.rv-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rv-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--rv-line);
}
.rv-dot.is-beta {
  background: #3b82f6;
}
.rv-dot.is-production {
  background: var(--rv-brand);
}
.rv-dot.is-changes {
  background: var(--rv-danger);
}
.rv-empty,
.rv-loading {
  color: var(--rv-text-3);
  padding: 16px;
}

.rv-flow {
  flex: 1;
  overflow: auto;
  position: relative;
  padding: 20px 28px 60px;
}
/* One connector into each row after the first: questions → answer → what's next. */
.rv-row + .rv-row::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  height: 30px;
  border-left: 2px solid var(--rv-line);
}
.rv-row + .rv-row::after {
  content: '';
  position: absolute;
  top: 12px;
  left: calc(50% - 5px);
  border: 6px solid transparent;
  border-top: 7px solid var(--rv-line);
  border-bottom: 0;
}
.rv-head {
  max-width: 1100px;
  margin: 0 auto 8px;
  text-align: center;
}
.rv-h1 {
  margin: 0;
  font-size: 22px;
}
.rv-id {
  font-size: 12px;
  color: var(--rv-text-3);
}
.rv-group {
  margin: 6px auto 0;
  max-width: 720px;
  font-size: 13px;
  color: var(--rv-text-2);
}
.rv-row {
  position: relative;
  margin: 0 auto;
  max-width: 1400px;
  padding: 22px 0 30px;
}
.rv-row-label {
  margin: 0 0 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rv-text-3);
}
.rv-siblings {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
}

/* --- Nodes --- */
.rv-node {
  position: relative;
  z-index: 1;
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: 14px;
  font: inherit;
  color: var(--rv-text);
  text-align: left;
}
button.rv-node {
  cursor: pointer;
}
button.rv-node:hover {
  border-color: var(--rv-brand);
}
.rv-kind {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rv-text-3);
  margin-bottom: 4px;
}
.rv-q {
  padding: 8px 10px;
  max-width: 260px;
}
.rv-said.bloom-bubble {
  display: inline-block;
  font-size: 13.5px;
  padding: 7px 12px;
  background: var(--rv-brand);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.rv-q.is-typed .rv-said {
  background: #e8eaed;
  color: var(--rv-text);
}
.rv-a {
  width: 364px;
  padding: 12px;
  background: var(--rv-surface);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}
.rv-a-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.rv-fit {
  font-size: 11.5px;
  color: var(--rv-brand);
  font-weight: 600;
}
.rv-fit.is-over {
  color: var(--rv-danger);
}
.rv-next {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 240px;
}
.rv-next-prompt {
  font-size: 12.5px;
  font-style: italic;
  color: var(--rv-text-2);
}
.rv-next-label {
  font-weight: 600;
}
.rv-next-to {
  font-size: 12.5px;
  color: var(--rv-text-2);
}
.rv-next .rv-dot {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* --- The chat inside a node: the widget's tokens, so its components look exactly as in the chat --- */
.rv-a {
  --bloom-font: 'Urbanist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bloom-brand: #1f6b3b;
  --bloom-brand-hover: #18572f;
  --bloom-brand-tint: #eef6f1;
  --bloom-brand-ring: rgba(31, 107, 59, 0.18);
  --bloom-text: #111827;
  --bloom-text-2: #4b5563;
  --bloom-text-3: #9ca3af;
  --bloom-surface: #ffffff;
  --bloom-surface-2: #f6f7f8;
  --bloom-surface-3: #eff1f3;
  --bloom-border: #e5e7eb;
  --bloom-border-strong: #d1d5db;
  --bloom-danger: #c0362c;
  --bloom-radius: 20px;
}
.rv-chat {
  background: var(--bloom-surface-2);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}
.rv-chat :where(button, input, textarea) {
  font: inherit;
  color: inherit;
}
.rv-turn.bloom-turn-bot {
  width: 100%;
  max-width: 100%;
}
.rv-feedback {
  padding: 0 2px;
}

@media (max-width: 760px) {
  .rv-body {
    flex-direction: column;
  }
  .rv-list {
    width: auto;
    max-height: 30vh;
    border-right: 0;
    border-bottom: 1px solid var(--rv-border);
  }
  .rv-flow {
    padding: 16px;
  }
  .rv-a {
    width: 100%;
  }
  .rv-progress {
    margin-left: 0;
  }
}

/* A chip or choice button and its own thumbs. */
.rv-next-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 300px;
}
.rv-next-wrap .rv-feedback {
  align-items: flex-start;
}
.rv-stage {
  white-space: normal;
}

/* "Page reviewed. Next up: …" */
.rv-advance {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.25);
}
.rv-advance button {
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 0;
  cursor: pointer;
}
.rv-advance-go {
  background: #fff;
  color: #111827;
}
.rv-advance-stay {
  background: transparent;
  color: #d1d5db;
}

/* Grouped "what leads here" boxes. */
.rv-q.is-link {
  cursor: pointer;
}
.rv-q.is-link:hover {
  border-color: var(--rv-brand);
}
.rv-q.is-typed {
  max-width: 560px;
}
.rv-typed {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rv-from {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--rv-text-2);
}
.rv-from summary {
  cursor: pointer;
  font-weight: 600;
}
.rv-from ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}
.rv-from-link {
  font: inherit;
  border: 0;
  background: none;
  padding: 3px 0;
  color: var(--rv-brand);
  cursor: pointer;
  text-align: left;
}
.rv-from-link:hover {
  text-decoration: underline;
}

/* Text message and RCS versions. */
.rv-sms-phone {
  background: #fff;
  border: 1px solid var(--rv-border);
  border-radius: 12px;
  padding: 14px 12px;
  margin-bottom: 8px;
}
.rv-sms {
  display: inline-block;
  max-width: 92%;
  background: #e9e9eb;
  color: #111;
  border-radius: 18px 18px 18px 4px;
  padding: 9px 13px;
  font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  white-space: pre-wrap;
}
.rv-rcs-phone {
  background: #fff;
  border: 1px solid var(--rv-border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}
.rv-channel-note {
  margin: 14px auto 0;
  max-width: 720px;
  text-align: center;
  font-size: 12.5px;
  color: var(--rv-text-3);
}

/* A wording's box: the web version, then (only when it differs) the text message below a divider. */
.rv-divider {
  border: 0;
  border-top: 1px dashed var(--rv-border);
  margin: 12px 0 10px;
}
.rv-sms-head {
  margin-bottom: 6px;
}

/* Thumbs and the stage badge on one line. */
.rv-feedback .bloom-feedback-row {
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.rv-feedback .bloom-feedback-row .bloom-approval {
  margin-left: 6px;
}

/* Typed alternatives under a next-step box. */
.rv-next {
  max-width: 300px;
}
.rv-typed-next {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--rv-border);
  cursor: default;
}
.rv-typed-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--rv-text-3);
  margin-bottom: 4px;
}
.rv-typed-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rv-typed-pill {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8eaed;
  color: var(--rv-text);
}


/* ===== From widget/team/log.css (the transcript) ===== */

.tl-refresh {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid var(--rv-border);
  border-radius: 999px;
  background: var(--rv-surface);
  color: var(--rv-text-2);
  cursor: pointer;
}
.tl-refresh:hover {
  border-color: var(--rv-brand);
}

/* --- List --- */
.tl-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tl-item-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--rv-text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rv-item.is-current .tl-item-sub {
  color: var(--rv-text-2);
}
.rv-item {
  align-items: flex-start;
}
.rv-item .rv-dot {
  margin-top: 6px;
}

/* --- Detail --- */
.tl-detail > * {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.tl-head h1,
.tl-head .tl-title {
  margin: 0 0 2px;
  font-size: 18px;
}
.tl-id {
  font-size: 12px;
  color: var(--rv-text-3);
  word-break: break-all;
}
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  margin-bottom: 18px;
}
.tl-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e8eaed;
  color: var(--rv-text);
}
.tl-tag.is-warn {
  background: #fbe9e7;
  color: var(--rv-danger);
}
.tl-tag.is-info {
  background: #e7f0fd;
  color: #1d4ed8;
}
.tl-tag.is-good {
  background: var(--rv-tint);
  color: var(--rv-brand);
}

.tl-turn {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.tl-turn.is-user {
  align-items: flex-end;
}
.tl-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--rv-border);
  background: var(--rv-surface);
}
.is-user .tl-bubble {
  background: var(--rv-brand);
  border-color: var(--rv-brand);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.is-team .tl-bubble {
  background: var(--rv-tint);
  border-color: var(--rv-brand);
}
.is-bot .tl-bubble {
  border-radius: 14px 14px 14px 4px;
}
.tl-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--rv-text-3);
}
.tl-meta code {
  font-size: 12px;
  color: var(--rv-text-2);
}
.tl-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rv-text-3);
  margin-bottom: 3px;
}

.tl-call {
  margin-top: 6px;
  max-width: 85%;
  border: 1px dashed var(--rv-line);
  border-radius: 10px;
  background: var(--rv-surface);
  font-size: 13px;
}
.tl-call summary {
  cursor: pointer;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--rv-text-2);
}
.tl-call dl {
  margin: 0;
  padding: 2px 10px 10px;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 4px 10px;
}
.tl-call dt {
  color: var(--rv-text-3);
  font-weight: 600;
}
.tl-call dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.tl-call ul {
  margin: 0;
  padding-left: 16px;
}

.tl-thumb {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--rv-text-2);
}
.tl-thumb.is-down {
  color: var(--rv-danger);
}

.tl-section {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--rv-border);
}
.tl-section h2 {
  margin: 0 0 8px;
  font-size: 14px;
}
.tl-followup {
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.tl-followup p {
  margin: 4px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tl-reply textarea {
  width: 100%;
  min-height: 84px;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--rv-border);
  border-radius: 10px;
  resize: vertical;
}
.tl-reply textarea:focus {
  outline: none;
  border-color: var(--rv-brand);
}
.tl-reply-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.tl-send {
  font: inherit;
  font-weight: 600;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--rv-brand);
  color: #fff;
  cursor: pointer;
}
.tl-send:disabled {
  opacity: 0.5;
  cursor: default;
}
.tl-status {
  font-size: 13px;
  color: var(--rv-text-2);
}
.tl-status.is-error {
  color: var(--rv-danger);
}

@media (max-width: 760px) {
  .tl-bubble,
  .tl-call {
    max-width: 100%;
  }
}

/* ===== Phones: the pages scroll as a whole, the nav is one scrolling row ===== */

@media (max-width: 760px) {
  .ad-top {
    padding: 8px 12px;
    gap: 6px 12px;
  }
  /* Row 1: the mark and Sign out. Row 2: the brand and the live-chat link. Row 3: the pages, scrolling sideways. */
  .ad-who {
    display: contents;
  }
  .ad-title {
    order: 1;
    margin-right: auto;
  }
  .ad-who > .ad-btn,
  .ad-who > .ad-account {
    order: 2;
  }
  .ad-brand,
  .ad-brand-pill {
    order: 3;
  }
  .ad-live-wrap {
    order: 4;
  }
  .ad-nav {
    order: 5;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .ad-nav-link {
    white-space: nowrap;
  }
  .ad-account > summary {
    padding: 4px 8px;
  }
  .ad-live {
    font-size: 13px;
    padding: 5px 9px;
  }
  .ad-main.is-split {
    display: block;
    overflow: auto;
  }
  .rv-shell,
  .rv-body {
    display: block;
  }
  .rv-flow {
    overflow: visible;
  }
  .rv-list {
    max-height: 34vh;
  }
  .rv-top {
    padding: 8px 12px;
  }
  .rv-find {
    flex: 1 1 100%;
  }
  .rv-find input {
    width: 100%;
    max-width: none;
  }
  .rv-filters {
    flex-wrap: wrap;
  }
  .ad-page {
    padding: 16px 12px 48px;
  }
  .ad-page.is-narrow {
    padding-top: 24px;
  }
  .us-rows {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .us-rows dd {
    margin-bottom: 8px;
  }
  .us-list li {
    flex-wrap: wrap;
  }
  .ad-inline-form .ad-field {
    width: 100%;
  }
}

/* ===== Feedback ===== */

.fb-bar {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.fb-toggle {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--ad-border);
  border-radius: 999px;
  background: var(--ad-surface);
  color: var(--ad-text-2);
  cursor: pointer;
}
.fb-toggle.is-on {
  background: var(--ad-tint);
  border-color: var(--ad-brand);
  color: var(--ad-brand);
}
.fb-brand select {
  font: inherit;
  font-weight: 600;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--ad-border-strong);
  border-radius: 10px;
  background: var(--ad-surface);
}
.fb-count {
  margin-left: auto;
  font-weight: 600;
  color: var(--ad-text-2);
}
.fb-row.is-down {
  border-left: 3px solid var(--ad-danger);
}
.fb-top {
  display: flex;
  align-items: center;
  gap: 6px 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.fb-who {
  font-weight: 600;
}
.fb-when,
.fb-convo {
  font-size: 13px;
  color: var(--ad-text-3);
}
.fb-convo {
  margin-left: auto;
  color: var(--ad-brand);
}
.fb-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ad-text-3);
}
.fb-question {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.fb-shown {
  margin-bottom: 8px;
}
.fb-ids {
  font-size: 12.5px;
  color: var(--ad-text-2);
  overflow-wrap: anywhere;
}
.fb-answer {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ad-text-2);
}
.fb-answer summary {
  cursor: pointer;
}
.fb-answer-text {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--ad-bg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.fb-field {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--ad-bg);
}
.fb-field.is-suggestion {
  background: var(--ad-tint);
}
.fb-text {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .fb-count {
    margin-left: 0;
  }
}
.fb-fallback {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 8px 10px;
  border: 1px solid var(--ad-border-strong);
  border-radius: 10px;
  background: var(--ad-surface);
  color: var(--ad-text);
}
