@import url("design-tokens.css");
/* ============================================================
   BETA THEME — applied when .theme-beta is on a shell ancestor
   (The alpha theme is whatever redesign.css defines unscoped.)
   Goal: more editorial, more confident, more brand-forward.
   ============================================================ */

/* XA-35e7acec37: the accent pair (--r-purple, --r-purple-soft) and every other brand colour live in design-tokens.css,
   imported above (an @import must come before the first rule), so a page that links only this file still has them. */

:root {
  /* XA-d89df261e4: THE ONE realtor page side margin. Every .rpage .wrap reads it; none writes its own px. */
  --r-page-gutter: 16px;
}

.theme-beta {
  --r-bg: #F2F6F9;
  --r-surface: #FFFFFF;
  --r-border: #E5E7EE;
  --r-border-2: #D4D8E2;
  --r-fg-1: #0B1B2B;
  --r-fg-2: #44566A;
  --r-fg-3: #44566A;
  --r-fg-4: #A2A8BD;

  /* XA-e9a776f9f5: --r-purple / --r-purple-soft are set once, in the :root block above. */
  --r-blue: #1B4066;
  --r-blue-soft: #E6EFFD;
  --r-pink: #E84E99;
  --r-pink-soft: #FCE9F2;
  --r-green: var(--success);
  --r-green-soft: #DDF1E6;
  --r-amber: #B37900;
  --r-amber-soft: #FBF0D0;
  --r-amber-ink: #8A5D00; /* amber text on --r-amber-soft: 5.07:1, where --r-amber is 3.27:1 */
  --r-red: #C43838;
  --r-red-soft: #FBE9E8;      /* XA-086efdb2a2 — Rejected/hot pill background (same family as --r-red) */

  /* 2026-09-04 — the beta restatement of the cyan added to redesign.css:root. Beta's ramp is darker
     and less neon than alpha's (compare --r-blue #1E6FEA vs #1E87F0, --r-green #0E7A51 vs #12875A), so
     the pipeline's stale alpha #0891b2 is restated in the same register. Used by ONE thing:
     LeadPipelineState.Processing, via .r-pill.cyan. */
  --r-cyan: #0E7490;
  --r-cyan-soft: #E0F3F7;

  /* --r-accent, --r-accent-soft and --r-ink live in design-tokens.css (XA-35e7acec37). */
}

/* Shell: content bg becomes soft gray so cards pop */
.theme-beta.r-app,
.theme-beta .r-app { background: var(--r-bg); }
.theme-beta .r-content { background: var(--r-bg); }
.theme-beta .r-main { background: var(--r-bg); }

/* Sidebar: darker ink bg */
.theme-beta .r-side {
  background: var(--r-ink);
  border-right: 0;
  color: #fff;
  padding: 18px 10px 14px;
}
.theme-beta .r-side .group-label { color: rgba(255,255,255,.44); }
.theme-beta .r-brand { border-bottom-color: rgba(255,255,255,.08); }
.theme-beta .r-brand img { filter: invert(1) hue-rotate(180deg) saturate(1.2) brightness(1.1); }
.theme-beta .r-nav a { color: rgba(255,255,255,.75); }
.theme-beta .r-nav a svg { fill: rgba(255,255,255,.55); }
.theme-beta .r-nav a:hover { background: rgba(255,255,255,.06); color:#fff; }
.theme-beta .r-nav a:hover svg { fill:#fff; }
.theme-beta .r-nav a.active { background: rgba(255,255,255,.1); color:#fff; box-shadow: inset 2px 0 0 var(--r-accent); border-radius: 6px; }
.theme-beta .r-nav a.active svg { fill: var(--r-accent); }
.theme-beta .r-nav a .tail { color: rgba(255,255,255,.4); }
.theme-beta .r-nav a.active .tail { color: rgba(255,255,255,.7); }
.theme-beta .r-side .footer-user { border-top-color: rgba(255,255,255,.08); }
.theme-beta .r-side .footer-user .who { color:#fff; }
.theme-beta .r-side .footer-user .role { color: rgba(255,255,255,.6); }

/* Top bar */
.theme-beta .r-top { background:#fff; border-bottom-color: var(--r-border); height: 58px; }
.theme-beta .r-top .r-search input { background: var(--r-bg); }
.theme-beta .r-top .r-search input:focus { background:#fff; border-color: var(--r-ink); }

/* Page head */
.theme-beta .r-phead .crumb { font-size: 11.5px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; color: var(--r-fg-3); }

/* Cards: stronger edge + soft lift */
.theme-beta .r-card {
  border-radius: 10px;
  border-color: var(--r-border);
  box-shadow: 0 1px 2px rgba(16,25,54,.03);
}
.theme-beta .r-card .r-chead { border-bottom-color: var(--r-border); }
.theme-beta .r-card .r-chead .t { font-size: 14px; font-weight: 700; color: var(--r-ink); letter-spacing:-.01em; }
.theme-beta .r-card .r-chead .s { font-size: 11.5px; color: var(--r-fg-3); }

/* Buttons: primary uses ink */
.theme-beta .r-btn.primary { background: var(--r-ink); border-color: var(--r-ink); color:#fff; }
.theme-beta .r-btn.primary:hover { background:#1b2549; }
.theme-beta .r-btn.accent { background: var(--r-accent); color: var(--r-ink); border-color: var(--r-accent); }
.theme-beta .r-btn.accent:hover { background: #d6a019; }
.theme-beta .r-btn.ghost { background:#fff; }

/* Table */
.theme-beta .r-table th { background:#fff; color: var(--r-fg-3); font-size: 10.5px; letter-spacing:.07em; border-bottom-color: var(--r-border); }
.theme-beta .r-table td { border-bottom-color: var(--r-border); }
.theme-beta .r-table tr:hover td { background: #FAFBFD; }
.theme-beta .r-table .avatar-sm { background: linear-gradient(135deg, var(--r-ink), var(--r-purple)); }

/* KPIs */
.theme-beta .r-kpis { border-radius: 10px; border: 1px solid var(--r-border); overflow:hidden; background:#fff; }
.theme-beta .r-kpi { background:#fff; border-right-color: var(--r-border); padding: 20px 24px 22px; }
.theme-beta .r-kpi .kl { color: var(--r-fg-3); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.theme-beta .r-kpi .kv { font-size: 34px; font-weight: 700; color: var(--r-ink); letter-spacing:-.028em; }
.theme-beta .r-kpi .kd { font-size: 11.5px; }

/* Pills */
.theme-beta .r-pill { padding: 3px 10px; font-weight: 700; font-size: 10.5px; letter-spacing:.03em; text-transform: uppercase; border-radius: 999px; }
.theme-beta .r-pill.active { background: var(--r-green-soft); color: var(--r-green); }
.theme-beta .r-pill.pending { background: var(--r-amber-soft); color: #8A5D00; }
.theme-beta .r-pill.draft { background: var(--r-bg); color: var(--r-fg-2); border: 1px solid var(--r-border); }
.theme-beta .r-pill.accent { background: var(--r-accent-soft); color: #7A5A00; }
.theme-beta .r-pill.pink { background: var(--r-pink-soft); color: var(--r-pink); }
.theme-beta .r-pill.blue { background: var(--r-blue-soft); color: var(--r-blue); }
.theme-beta .r-pill.cyan { background: var(--r-cyan-soft); color: var(--r-cyan); }
/* --r-red-soft was defined for exactly this and nothing consumed it: the unscoped .r-pill.inactive
   carries a hardcoded #FDECEC, which is the alpha family, on a shell that is always .theme-beta. */
.theme-beta .r-pill.inactive { background: var(--r-red-soft); color: var(--r-red); }

/* Feed */
.theme-beta .r-feed .it { border-bottom-color: var(--r-border); }
.theme-beta .r-feed .ic { background: var(--r-bg); }

/* Segmented */
.theme-beta .r-seg { background: var(--r-bg); border-color: var(--r-border); }
.theme-beta .r-seg button.on { background: var(--r-ink); color:#fff; }

/* Hero (V2 Dashboard) becomes editorial card */
.theme-beta.v2 .r-hero,
.theme-beta .v2 .r-hero {
  background:
    radial-gradient(1200px 220px at -10% -60%, rgba(76,58,227,.14), transparent 60%),
    radial-gradient(800px 180px at 110% 130%, rgba(233,177,28,.14), transparent 60%),
    linear-gradient(180deg,#fff,#fff);
  border-color: var(--r-border);
  border-radius: 14px;
}
.theme-beta .v2 .r-hero h1 { color: var(--r-ink); font-size: 28px; letter-spacing:-.025em; font-weight: 700; }

/* Campaign step list */
.theme-beta .r-ent-step .num.done { background: var(--r-ink); border-color: var(--r-ink); }
.theme-beta .r-ent-step .bcol .prev .tk { background: var(--r-accent-soft); color:#7A5A00; }

/* Pipeline columns */
.theme-beta .r-pipe { border-color: var(--r-border); }
.theme-beta .r-pipe-col .hd { background:#fff; border-bottom-color: var(--r-border); }
.theme-beta .r-pipe-col .list { background: var(--r-bg); }
.theme-beta .r-pipe-card { border-color: var(--r-border); }
.theme-beta .r-pipe-card:hover { border-color: var(--r-ink); box-shadow: 0 4px 12px rgba(16,25,54,.08); }
.theme-beta .r-pipe-card.hot { border-left: 2px solid var(--r-accent); }

/* Inbox */
.theme-beta .r-list li.on { background:#fff; }
.theme-beta .r-list li.on::before { background: var(--r-accent); }
.theme-beta .r-msg.me { background: var(--r-ink); }

/* Tabbar */
.theme-beta .r-tabbar button.on { color: var(--r-ink); border-bottom-color: var(--r-accent); border-bottom-width: 3px; }

/* ========== Theme switcher UI ========== */
.r-theme-switch {
  display:inline-flex; background:#fff; border:1px solid var(--r-border-2); border-radius:8px; padding:2px; font-family: inherit; height:32px;
}
.r-theme-switch button { border:0; background:transparent; font-size:11.5px; font-weight:600; color:#8A8A93; padding: 0 10px; border-radius:6px; cursor:pointer; font-family:inherit; display:inline-flex; align-items:center; gap:5px; }
.r-theme-switch button.on { background:var(--r-ink); color:#fff; }
.theme-beta .r-theme-switch { border-color: var(--r-border); }
.theme-beta .r-theme-switch button.on { background: var(--r-ink); }
.r-theme-switch .dot { width:8px; height:8px; border-radius: 2px; }
.r-theme-switch .dot.a { background: var(--r-ink); }
.r-theme-switch .dot.b { background: var(--r-accent); border:1px solid var(--r-ink); }

/* Beta Lead Details Panel */
.theme-beta .lead-details-panel,
body[data-theme="beta"] .lead-details-panel {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
}
.theme-beta .lead-profile,
body[data-theme="beta"] .lead-profile {
  padding: 18px;
  background: #FAFAFB;
  border-bottom: 1px solid #ECECEF;
}
.theme-beta .lead-profile-avatar,
body[data-theme="beta"] .lead-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--r-ink);
  font-size: 18px;
}
.theme-beta .lead-profile h3,
body[data-theme="beta"] .lead-profile h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.theme-beta .detail-section,
body[data-theme="beta"] .detail-section {
  padding: 14px 18px;
  border-bottom: 1px solid #F4F5F8;
}
.theme-beta .detail-item,
body[data-theme="beta"] .detail-item {
  font-size: 12.5px;
}
.theme-beta .detail-label,
body[data-theme="beta"] .detail-label {
  font-size: 11px;
  font-weight: 600;
  color: #8A8A93;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.theme-beta .badge-status,
body[data-theme="beta"] .badge-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ── Beta Theme Global Overrides ────────────────────────────── */

/* Sidebar */
.theme-beta .sidebar {
  background: var(--r-ink) !important;
  border-right: none !important;
}
.theme-beta .sidebar-link {
  color: rgba(255,255,255,0.75) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 7px !important;
  padding: 7px 10px !important;
}
.theme-beta .sidebar-link:hover {
  background: rgba(255,255,255,0.06) !important;
  color: white !important;
}
.theme-beta .sidebar-link.nav-selected {
  background: rgba(255,255,255,0.1) !important;
  color: white !important;
  box-shadow: inset 2px 0 0 var(--r-accent) !important;
}
.theme-beta .sidebar-brand a {
  color: white !important;
}
/* d972b — REMOVED a hardcoded `content: url('/images/emc-logo-full.png')` override here.
   CSS `content` on #logo-header replaced the rendered image with the EMC corporate logo
   for EVERY agency on the beta theme, overriding the agency-aware src set in _Layout
   (FlowAg for EMC/super-admin, agency-logo proxy for white-label tenants). It silently
   defeated every src/cache-bust fix and leaked EMC branding cross-tenant. Let the <img>
   src render. */
.theme-beta .nav-link-text {
  color: inherit !important;
}
.theme-beta .sidebar-link .nav-link-icon svg {
  fill: rgba(255,255,255,0.55) !important;
}
.theme-beta .sidebar-link.nav-selected .nav-link-icon svg {
  fill: var(--r-accent) !important;
}

/* Top bar */
.theme-beta .navbar-top {
  border-bottom: 1px solid #E5E7EE !important;
  background: white !important;
}

/* Content area */
.theme-beta .content {
  background: #F4F5F8 !important;
}

/* Cards */
.theme-beta .card-theme,
.theme-beta .card {
  border: 1px solid #E5E7EE !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.theme-beta .card-header {
  background: white !important;
  border-bottom: 1px solid #E5E7EE !important;
}

/* Tables */
.theme-beta table th {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #6E7591 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}
.theme-beta table td {
  font-size: 13px !important;
}

/* Buttons */
.theme-beta .btn-primary,
.theme-beta .btn {
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

/* Typography */
.theme-beta h4.title,
.theme-beta .title {
  font-size: 22px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
}

/* Beta Conversations Page */
.theme-beta .messaging-page {
  background: #F4F5F8;
}
.theme-beta .conversations-panel {
  background: white !important;
  border-right: 1px solid #E5E7EE !important;
}
.theme-beta .conversations-panel .search-box input {
  background: #F4F5F8 !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}
.theme-beta .conversations-panel .search-box input:focus {
  border-color: #E5E7EE !important;
  background: white !important;
}
.theme-beta .conversation-item {
  border-bottom: 1px solid #F4F5F8 !important;
  padding: 12px 14px !important;
}
.theme-beta .conversation-item:hover {
  background: #FAFAFB !important;
}
.theme-beta .conversation-item.active {
  background: var(--r-purple-soft) !important;
  border-left: 3px solid var(--r-purple) !important;
}
.theme-beta .conversation-item .lead-name {
  font-size: 13.5px !important;
  font-weight: 600 !important;
}
.theme-beta .messages-panel {
  background: #FAFAFB !important;
}
.theme-beta .messages-header {
  background: white !important;
  border-bottom: 1px solid #E5E7EE !important;
}
.theme-beta .message-bubble {
  border-radius: 12px !important;
  font-size: 13.5px !important;
}
/* ── A BUBBLE MAY NOT WEAR A SKIN IT CANNOT APPLY TO ITS OWN CONTENTS ─────────────────
   2026-09-10 (Justin — SEED: "It's globally though it's not just hers. I see this black box
   sometimes too and on different screens so I think you were guessing and assuming here."
   Right on both counts.) This rule painted #0E0E12 behind EVERY outbound bubble. For an SMS
   that is safe — the bubble holds app-owned text, so `color: white` reaches all of it. For an
   EMAIL it is not: the bubble holds third-party HTML, and the auto-signature from
   CampaignConnectorEmail.GenerateAutoSignature carries INLINE #1a1a2e on the LO's name, both
   phone numbers and their address. An inline colour on a descendant beats `color: white
   !important` on the ancestor. Measured on production 2026-09-10: the LO's own name at
   1.13:1, in 21,817 of 26,526 outbound emails across 74 senders and 4,332 threads — and
   98.9% of everything sent in the preceding 7 days. 8 of 13 text nodes failed WCAG AA; the 5
   that passed were the only parts anyone could read.

   THE INVARIANT: a container that renders HTML THE APP DID NOT AUTHOR must not impose a
   background the app cannot also impose on that HTML's foreground. Own both colours or own
   neither. This file owned exactly one, which is the only combination that guarantees a
   collision.

   Justin chose the light thread from four rendered options: sent SMS takes the FlowAg navy
   instead of near-black, and email takes the white surface it was composed against. The fix
   is render-side, so all 21,817 already-sent emails become readable too. There is no theme
   switcher to fall back on — _Layout.cshtml:499 hardcodes the beta body and the switcher is
   dead CSS — which is why Ashley could not find the setting she was asking for.
   Guarded by TheBulkBarAndTheMailSurfaceAreHonestTests.TheSentEmailBubbleIsNotDarkSkinned. */
.theme-beta .message.sent .message-bubble {
  background: var(--bb-bubble-sent) !important;
  color: var(--bb-bubble-sent-ink) !important;
}
.theme-beta .message.sent .message-bubble.email,
.theme-beta .message.sent .message-bubble.email p,
.theme-beta .message.sent .message-bubble.email div,
.theme-beta .message.sent .message-bubble.email span,
.theme-beta .message.sent .message-bubble.email td,
.theme-beta .message.sent .message-bubble.email li {
  background: #FFFFFF !important;
  color: #1A1A2E !important;
}
.theme-beta .message.sent .message-bubble.email {
  border: 1px solid #C9D2E3 !important;
}
/* XA-867a311ccc: a FAILED outbound text rendered navy like a delivered one. The rule above
   (.theme-beta .message.sent .message-bubble, 0,3,0 with !important) outranked chats.css's
   .message-bubble.failed (0,2,0 with !important), so the red never showed in beta. A failed SMS
   takes the beta danger token with white text (--r-red #C43838 on white is 5.4:1). A failed EMAIL
   keeps its white reading surface (third-party HTML owns its own ink) and takes a red border. */
.theme-beta .message.sent .message-bubble.failed:not(.email) {
  background: var(--r-red) !important;
  color: #FFFFFF !important;
  border: 1px solid #9E2B2B !important;
}
.theme-beta .message.sent .message-bubble.failed.email {
  border: 2px solid var(--r-red) !important;
}
.theme-beta .message.received .message-bubble {
  background: white !important;
  border: 1px solid #E5E7EE !important;
}
.theme-beta .message-input-area {
  background: white !important;
  border-top: 1px solid #E5E7EE !important;
}
.theme-beta #message-input {
  border-radius: 10px !important;
  border: 1px solid #E5E7EE !important;
  font-size: 13.5px !important;
}
.theme-beta .send-btn {
  background: var(--r-purple) !important;
  border-radius: 10px !important;
  color: white !important;
}

/* Beta Dialer Page */
.theme-beta .dialer-page {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
}
.theme-beta .dialer-header h2 {
  font-size: 22px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
}
.theme-beta .dialer-panel {
  border: 1px solid #E5E7EE !important;
  border-radius: 10px !important;
  background: white !important;
}
.theme-beta .dialer-panel h5 {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #6E7591 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}
.theme-beta .queue-table th {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  color: #6E7591 !important;
}
.theme-beta .queue-table td {
  font-size: 12.5px !important;
}
.theme-beta .search-result-item {
  border-bottom: 1px solid #F4F5F8 !important;
}
.theme-beta .search-result-item:hover {
  background: #FAFAFB !important;
}
.theme-beta .pulse-dot.connected {
  background: var(--bb-success) !important;
}
.theme-beta .pulse-dot.dialing {
  background: var(--r-purple) !important;
}

/* Beta Settings Page */
.theme-beta .tab-content {
  background: white !important;
  border-radius: 10px !important;
}
.theme-beta .nav-tabs .nav-link {
  font-size: 13px !important;
  font-weight: 600 !important;
}
.theme-beta .nav-tabs .nav-link.active {
  border-bottom: 2px solid var(--r-ink) !important;
  color: var(--r-ink) !important;
}

/* Beta Onboarding Wizard */
.theme-beta .ob-wizard {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
}
.theme-beta .ob-step-indicator {
  background: var(--r-purple) !important;
}
.theme-beta .ob-url-box {
  font-family: ui-monospace, monospace !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

/* Beta Proposals Gallery */
.theme-beta .card:hover {
  border-color: var(--r-purple) !important;
  transition: border-color 0.15s !important;
}

/* Beta Loan Application Dashboard */
.theme-beta .customer-card {
  border: 1px solid var(--r-border) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
.theme-beta .customer-card .card-body {
  padding: 24px !important;
}
.theme-beta .customer-card .title {
  font-size: 20px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
}
.theme-beta .customer-card .btn-light-purple {
  background: var(--r-purple-soft) !important;
  color: var(--r-purple) !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}
.theme-beta .customer-right {
  background: var(--r-bg) !important;
  border-radius: 10px !important;
  padding: 16px !important;
}
.theme-beta .customer-right .small-text {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--r-fg-3) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}
.theme-beta .la-section-card,
.theme-beta .card.mb-4,
.theme-beta .card.mt-3 {
  border: 1px solid var(--r-border) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.theme-beta .la-section-card .card-header,
.theme-beta .card .card-header {
  background: var(--r-bg) !important;
  border-bottom: 1px solid var(--r-border) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 10px 10px 0 0 !important;
}
.theme-beta .form-floating > .form-select,
.theme-beta .form-floating > .form-control {
  border-radius: 8px !important;
  border-color: var(--r-border) !important;
  font-size: 13px !important;
}
.theme-beta .form-floating > label {
  font-size: 12px !important;
  color: var(--r-fg-3) !important;
}
.theme-beta .btn-primary {
  background: var(--r-ink) !important;
  border-color: var(--r-ink) !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.theme-beta .btn-primary:hover {
  background: #2a2a32 !important;
}
.theme-beta .btn-outline-primary {
  border-color: var(--r-border-2) !important;
  color: var(--r-fg-1) !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.theme-beta .btn-warning {
  background: var(--r-amber) !important;
  border-color: var(--r-amber) !important;
  color: white !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.theme-beta .dropdown-menu {
  border: 1px solid var(--r-border) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
  padding: 6px !important;
}
.theme-beta .dropdown-item {
  border-radius: 6px !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
}
.theme-beta .dropdown-item:hover {
  background: var(--r-bg) !important;
}

/* Beta Loan App Tabs */
.theme-beta .nav-tabs {
  border-bottom: 1px solid var(--r-border) !important;
  gap: 4px !important;
}
.theme-beta .nav-tabs .nav-link {
  border: none !important;
  border-bottom: 2px solid transparent !important;
  color: var(--r-fg-3) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 10px 14px !important;
  border-radius: 0 !important;
}
.theme-beta .nav-tabs .nav-link:hover {
  color: var(--r-fg-1) !important;
  border-bottom-color: var(--r-border-2) !important;
}
.theme-beta .nav-tabs .nav-link.active {
  color: var(--r-fg-1) !important;
  border-bottom-color: var(--r-purple) !important;
  background: transparent !important;
}
.theme-beta .tab-content {
  border: 1px solid var(--r-border) !important;
  border-top: none !important;
  border-radius: 0 0 10px 10px !important;
  background: white !important;
}
.theme-beta .document-tab .card {
  border: 1px solid var(--r-border) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.theme-beta .note-card {
  border: 1px solid var(--r-border) !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
}
.theme-beta .progress-step .step-item {
  font-size: 12px !important;
}

/* Beta Footer */
.theme-beta .footer {
  border-top: 1px solid #E5E7EE !important;
  background: #F4F5F8 !important;
}

/* ── d770f — Mobile Responsive Rules ── */
@media (max-width: 768px) {
  /* Sidebar collapses */
  .theme-beta .sidebar { width: 60px !important; min-width: 60px !important; }
  .theme-beta .sidebar .nav-link-text { display: none !important; }
  .theme-beta .sidebar .sidebar-brand img { max-width: 36px !important; }
  .theme-beta .sidebar .count { display: none !important; }

  /* Content fills available space */
  .theme-beta .content { margin-left: 60px !important; --content-pad: 12px; padding: var(--content-pad) !important; }
  .theme-beta .wrapper { flex-direction: column; }

  /* Conversations: stack panels vertically */
  /* ── THE CONVERSATIONS PAGE OWNS ITS OWN MOBILE LAYOUT, IN chats.css, AND ONLY THERE. ──
     2026-09-04 (Justin: "the conversations tab is not working on mobile" - the list showed nothing).
     Five d770f rules used to live here and they were the seed:

         (max-width:768) .messaging-page .conversations-panel  ->  height 200px !important
         (max-width:480) .messaging-page .conversations-panel  ->  height 150px !important

     .conversations-panel is a flex COLUMN holding .conversations-header then .conversations-list.
     The header measures ~166px on a phone (20+20 padding, h3 21.6+15, search box 43+15, filter
     btn-group 31, 1px border) - it is the same 165 that chats.css:93 subtracts in
     `height: calc(85vh - 165px)`, because that number was measured off this header. The header
     cannot shrink below its own min-content height; .conversations-list is `flex: 1 1 auto;
     min-height: 0`, so IT absorbed the whole overflow and resolved to 0px at <=480 and ~34px at
     <=768. With `overflow-y: auto` on a zero-height box the rows are in the DOM and NOTHING PAINTS -
     including the "No conversations found" empty state, which is why the report could not say
     whether that text was there. It was not. Desktop was untouched, so this was mobile-only.

     They are DELETED rather than overridden. Two mobile designs for one page (this fixed-height
     three-panel stack, and the single-pane .show-messages design in chats.css that ships the
     back-to-list button and the d971zr iPhone composer) is the defect itself; out-!important-ing
     one from the other just leaves the loser in the file for the next editor to resurrect. The
     .messages-panel / .lead-details-panel rules went with them: chats.css sets `display: none` on
     both below 768px, so `flex: 1 !important` on a display:none panel was already dead code.
     .messaging-page is used by exactly one view (Views/Conversations/Index.cshtml) and that view is
     the only one that loads chats.css, so nothing else can be reading these.
     Pinned by TheConversationsListIsNotCrushedOnMobileTests. */

  /* Tables: horizontal scroll */
  .theme-beta .table-responsive, .theme-beta .table-main { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .theme-beta table:not(.fits) { min-width: 600px; }
  /* XA-82784695db: the ONE opt-out from the 600px floor is class="fits" (the same class _Layout's phone block-table guard
     honours). Put it on a table designed to fit a phone; no view sets its own min-width:0 for a table.
     Pinned by OneFitsOptOutForTheThemeTableFloorTests. */
  /* XA-c034295049: the 600px floor above has no scroll box of its own, so a bare table in the content area
     widened the whole page (625-638px at a 390px phone). The element that directly holds a table now
     scrolls sideways instead, so the page stays 390 wide. Skipped for a host that has a row dropdown
     inside its table (overflow-x:auto would clip the menu on the last rows); those pages keep their own
     phone layout. .table-responsive hosts already scroll. Pinned by TablesScrollInsideTheirOwnBoxOnAPhoneTests. */
  .theme-beta .main :is(div, section, form, article):has(> table):not(.table-responsive):not(:has(table .dropdown, table .dropdown-menu)) {
    overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0;
  }
  /* XA-fd7d8acaf1: the .table-stack phone rule lives in table-stack.css (one source), linked right after this sheet. */

  /* Cards: less padding */
  .theme-beta .card-body, .theme-beta .card-theme .card-body { padding: 12px !important; }

  /* Step builder: stack vertically */
  .theme-beta .step-timeline { flex-direction: column !important; }

  /* Header buttons: wrap */
  .theme-beta .customer-left { flex-direction: column !important; align-items: flex-start !important; }

  /* Hide non-essential sidebar items */
  .theme-beta .sidebar-item .sidebar-link { padding: 8px !important; justify-content: center !important; }
  .theme-beta .sidebar-item .d-flex { justify-content: center !important; }
}

@media (max-width: 480px) {
  .theme-beta .sidebar { display: none !important; }
  .theme-beta .content { margin-left: 0 !important; }

  /* Mobile drawer — slides in over content when hamburger is tapped */
  .theme-beta .sidebar.active {
    display: block !important;
    position: fixed !important;
    top: var(--ghost-banner-h, 0px) !important; /* XA-34c3a2e853: below the ghost banner, which publishes its height */
    left: 0 !important;
    height: calc(100vh - var(--ghost-banner-h, 0px)) !important;
    width: 240px !important;
    z-index: 200 !important;
    overflow-y: auto !important;
  }
  .theme-beta .sidebar.active .nav-link-text,
  .theme-beta .sidebar.active .count { display: inline !important; }
  /* XA-cbbb98a230: the 36px cap above is for the closed 60px rail; the open drawer is 240px wide, so its mark gets the
     sidebar's own size back (the product mark is a wordmark and is unreadable at 36px). */
  .theme-beta .sidebar.active .sidebar-brand img { max-width: 140px !important; }
  .theme-beta .sidebar.active .sidebar-item .d-flex { justify-content: flex-start !important; }
  .theme-beta .sidebar.active .sidebar-item .sidebar-link { padding: 12px 16px !important; justify-content: flex-start !important; }
}

/* XA-c40de19156: conversation filter chips. One wrapping strip on a computer; on the phone layout one strip that swipes sideways (XA-d1c85fbad4, below). */
.conversations-header .conv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* Bootstrap's .btn-group > .btn grows to fill the row; a chip keeps its own width. */
.conversations-header .conv-chips > .btn {
  flex: 0 0 auto;
}
.theme-beta .conversations-header .conv-chips .btn {
  border-radius: 999px !important;
  margin: 0 !important;
  border: 1px solid var(--r-border);
  background: var(--r-surface);
  color: var(--r-fg-2);
  font-size: 12px;
  line-height: 1.2;
  padding: 6px 12px;
  min-height: 32px;
  /* XA-40454cbcda: a short label ("All") with only the side padding drew a dark circle when chosen; the minimum width keeps every chip a pill, on the phone strip and the computer row. */
  min-width: 52px;
  text-align: center;
}
.theme-beta .conversations-header .conv-chips .btn:hover {
  background: var(--r-accent-soft);
  color: var(--r-fg-1);
}
/* !important because .theme-beta .btn-outline-primary (above) sets its colour !important: without it the
   selected chip drew navy text on a navy pill, unreadable. */
.theme-beta .conversations-header .conv-chips .btn.active {
  background: var(--r-ink) !important;
  border-color: var(--r-ink) !important;
  color: var(--r-surface) !important;
}
.theme-beta .conversations-header .conv-chips .btn:focus-visible {
  outline: 2px solid var(--r-ink);
  outline-offset: 2px;
}
/* XA-d1c85fbad4 (Justin card XA-eaeb3b6a6d A): on the page's phone layout (chats.css, max-width 768px) the chips are
   ONE strip that swipes sideways inside itself, instead of wrapping onto three rows above a two-row list. The page
   never scrolls sideways: only the strip does. chats.js revealTheChosenFilterChip() keeps the chosen chip in view. */
@media (max-width: 768px) {
  .conversations-header .conv-chips {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .conversations-header .conv-chips::-webkit-scrollbar { display: none; }
}

/* XA-c77c004928: a text link on a realtor page must look like a link. site.css resets every anchor to no underline,
   so plain content links (no class) and links marked r-link get it back here, once, for the whole channel.
   Buttons and nav doors carry a class, and a page rule that names the link wins (the selector here is as weak as a bare a). */
a:where(.r-realtor *):where(:not([class]):not([data-door]):not([data-rmenu])),
.r-realtor a.r-link { text-decoration: underline; text-underline-offset: 2px; }

/* XA-6c470a40fc / XA-fd456b0731 / XA-9764562358 / XA-41c6294af0: ONE shared page header and toolbar pattern.
   Title block left, actions right; at phone width the action group drops as a whole row under the title.
   Buttons never break their label over two lines; a toolbar search shrinks (min-width:0) instead of clipping. */
.bb-nowrap { white-space: nowrap; }
.bb-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.bb-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bb-page-actions > * { white-space: nowrap; flex: 0 0 auto; }
/* XA-2dae0eaa04 / XA-87f9f0b024: the Pipeline page inset and heading, as classes so Tasks and Do Not Call wear them too. */
.bb-page-body { padding: 16px; }
.bb-page-title { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--r-ink); }
.bb-page-sub { font-size: 13.5px; color: var(--r-fg-3); margin-top: 4px; }
.bb-page-head-tasks { margin-bottom: 16px; align-items: flex-end; }
.bb-toolbar-search { flex: 1 1 260px; min-width: 0; max-width: 320px; }
@media (max-width: 480px) {
  .bb-page-head > .bb-page-actions { width: 100%; }
  .bb-toolbar-search { flex-basis: 100%; max-width: none; }
}

/* XA-2c91de5217: "Re-enroll in campaign" gets its own full-width row; the hint sits under it. chats.css pins
   .btn-sm to height:28px, so the label wrapped inside a fixed pill in a 260px sidebar: auto height + nowrap. */
.conversations-header .reenroll-header-entry {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin: 8px 0;
}
.theme-beta .conversations-header .reenroll-header-btn {
  width: 100%;
  height: auto;
  min-height: 32px;
  white-space: nowrap;
  padding: 6px 12px;
  line-height: 1.2;
  background: var(--r-surface);
}
.theme-beta .conversations-header .reenroll-header-btn:disabled {
  opacity: 1;
  color: var(--r-fg-3) !important;
  background: var(--r-bg);
  cursor: not-allowed;
}
.theme-beta .conversations-header .reenroll-header-btn:not(:disabled):hover {
  background: var(--r-accent-soft);
}
.theme-beta .conversations-header .reenroll-header-btn:focus-visible {
  outline: 2px solid var(--r-ink);
  outline-offset: 2px;
}
.conversations-header .reenroll-header-hint {
  font-size: 11px;
  line-height: 1.3;
  color: var(--r-fg-3);
}
/* XA-d1c85fbad4 (Justin card XA-eaeb3b6a6d A): on the phone layout, "Re-enroll in campaign" shows only once a
   conversation is picked. The ONE source of "picked" is the button's disabled state, which _ReenrollModal.cshtml
   syncHeader() sets from the selected lead; no second flag. On a computer it shows as before (disabled + hint). */
@media (max-width: 768px) {
  .conversations-header .reenroll-header-entry:has(.reenroll-header-btn:disabled) { display: none; }
}

/* XA-c77c004928: the realtor Profile and Notifications pages. They draw no css of their own; this is the whole of it, in theme tokens.
   One readable column, the card head with an action on its right, the notification row notes and the form row inside a card. */
.theme-beta .r-settings { max-width: 760px; }
.theme-beta .r-phead h1 { font-size: 30px; letter-spacing:-.028em; font-weight:700; color: var(--r-ink); }
@media (max-width: 768px) {
  /* XA-e7fa0c7ecf: the realtor page gutter (--r-page-gutter, defined once above), on the phone the realtor shell zeroes the 12px layout pad (_RealtorAppHead), so this is the page's one left edge */
  .theme-beta .r-settings { padding-left: var(--r-page-gutter); padding-right: var(--r-page-gutter); }
}
.theme-beta .r-settings .min-w-0 { min-width: 0; }
.theme-beta .r-settings .r-card .r-chead { justify-content: space-between; }
.theme-beta .r-settings .r-field input[readonly] { background: var(--r-bg); color: var(--r-fg-3); cursor: not-allowed; }
.theme-beta .r-settings .r-field .hint { font-size: 12.5px; }
.theme-beta .r-settings .ntf-row .held { font-size: 12.5px; color: var(--r-amber-ink); background: var(--r-amber-soft); border-radius: 6px; padding: 6px 10px; margin: 6px 0 10px; }
.theme-beta .r-settings .ntf-row .desc.consent { margin-top: 8px; }
.theme-beta .r-settings .r-form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.theme-beta .r-settings #aiWalletCard .r-form-row > input { flex: 0 0 120px; }
.theme-beta .r-settings .ig-handle { max-width: 260px; }   /* was .user-profile .ig-handle in the private partial (stage) */

/* XA-c77c004928: ONE inline form row for the realtor Team page (and any page that wants fields and a button on one wrapping line).
   Fields share the line and wrap on a phone; the compact variant caps a select so a long agent name never stretches a table row. */
.theme-beta .r-form-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; text-align: left; }
.theme-beta .r-form-row > :is(input, select) { flex: 1 1 12rem; width: auto; min-width: 0; max-width: 100%; }
.theme-beta .r-form-row > .r-btn { flex: 0 0 auto; }
.theme-beta .r-form-row-compact > select { flex: 0 1 14rem; text-overflow: ellipsis; }
.theme-beta .r-card.flush .r-cbody.pad { padding: 18px; }   /* a padded section inside a flush (table) card */
@media (max-width: 768px) { .theme-beta .r-card.flush .r-cbody.pad { padding: .75rem; } }   /* same inset as the stacked rows above it */
/* XA-954566d697: the realtor Proposals row is a fixed grid so the date and pills line up on every row, one button or two (the button column is a fixed 18rem, right aligned).
   The card, badge, button and alert are the shared officer components; these rules only lay the row out. */
.theme-beta .proposals-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr) 18rem; gap: 16px; align-items: center; }
.theme-beta .proposals-who, .theme-beta .proposals-when { min-width: 0; }
.theme-beta .proposals-acts { flex-wrap: nowrap; flex-shrink: 0; justify-content: flex-end; }
@media (max-width: 700px) {
  .theme-beta .proposals-row { grid-template-columns: minmax(0,1fr); }
  .theme-beta .proposals-acts { flex-direction: column; align-items: stretch; width: 100%; }
  .theme-beta .proposals-acts .btn, .theme-beta .proposals-acts form { width: 100%; }
  .theme-beta .proposals-acts .btn { min-height: 44px; }
}

/* XA-40454cbcda: the computer layout's ONE filter row (Needs reply, Unread, All, More). The chip look comes from the
   .conv-chips rules above; this keeps the row on one line and styles the More menu from the same theme tokens. */
/* XA-fef431d3a2: the row WRAPS inside the list column (it was nowrap and the More chip spilled over the column's right
   border at 1280). Wrapping, not overflow-x, so the More menu is never clipped by a scroll box. */
.conversations-header .conv-chips-compact {
  flex-wrap: wrap;
  align-items: center;
  max-width: 100%;
  min-width: 0;
}
.conversations-header .conv-chips-compact .conv-more {
  position: relative;
  margin-left: auto;
}
.conversations-header .conv-chips-compact .dropdown-menu {
  background: var(--r-surface);
  border: 1px solid var(--r-border);
  min-width: 160px;
  font-size: 13px;
}
.conversations-header .conv-chips-compact .dropdown-item {
  color: var(--r-fg-2);
}
.conversations-header .conv-chips-compact .dropdown-item:hover {
  background: var(--r-accent-soft);
  color: var(--r-fg-1);
}
.conversations-header .conv-chips-compact .dropdown-item.active {
  background: var(--r-ink);
  color: var(--r-surface);
}
