/*
 * Contacts dark mode — production Contacts list + record detail.
 * Loaded after the list-workspace and simple/advanced record styles so the
 * color preference can win their intentionally light surface rules.
 * Light mode is untouched.
 */

/* ── Contacts list workspace ─────────────────────────────────── */
html[data-theme="dark"] {
  --lw-shell-border: rgba(240, 240, 240, 0.18);
  --lw-shell-shadow: 0 10px 28px -14px rgba(0, 0, 0, 0.7);
  --lw-text-primary: #f0f0f0;
  --lw-text-secondary: #c6c6c6;
  --lw-text-muted: #909090;
  --lw-text-header: #909090;
  --lw-surface: #1a1a1a;
  --lw-surface-muted: #1e1e1e;
  --lw-border: rgba(240, 240, 240, 0.12);
  --lw-border-subtle: rgba(240, 240, 240, 0.075);
  --lw-focus-ring: 0 0 0 2px #1a1a1a, 0 0 0 4px rgba(136, 192, 208, 0.45);
  --lw-row-hover: #242424;
  --lw-row-selected: rgba(129, 161, 193, 0.22);
  --lw-row-zebra: #1a1a1a;
  --lw-header-bg: #181818;
}

/*
 * Contact / record quick rail — Cursor-like dark chrome.
 * Secondary icons: no resting borders; hover/active soft fills.
 * Back: borderless surface control. Edit/Save/Cancel keep filled CTAs.
 */
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__head,
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__foot,
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__foot:first-child {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  border-bottom-color: transparent !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__foot {
  border-top: none !important;
  margin-top: 2px;
  padding-top: 4px;
}

/* Secondary icon buttons — borderless (exclude Back / Edit / Cancel CTAs) */
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn:not(.contact-record-quick-rail__btn--back):not(.contact-record-quick-rail__btn--edit-save):not(.contact-record-quick-rail__btn--cancel) {
  background: transparent !important;
  background-image: none !important;
  border: 1px solid transparent !important;
  color: #a8a8a8 !important;
  -webkit-text-fill-color: #a8a8a8 !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn:not(.contact-record-quick-rail__btn--back):not(.contact-record-quick-rail__btn--edit-save):not(.contact-record-quick-rail__btn--cancel) svg,
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn:not(.contact-record-quick-rail__btn--back):not(.contact-record-quick-rail__btn--edit-save):not(.contact-record-quick-rail__btn--cancel) .contact-record-quick-rail__btn-icon {
  color: inherit !important;
  stroke: currentColor !important;
  -webkit-text-fill-color: inherit !important;
  opacity: 1 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn:not(.contact-record-quick-rail__btn--back):not(.contact-record-quick-rail__btn--edit-save):not(.contact-record-quick-rail__btn--cancel):hover,
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn:not(.contact-record-quick-rail__btn--back):not(.contact-record-quick-rail__btn--edit-save):not(.contact-record-quick-rail__btn--cancel):focus-visible {
  background: rgba(240, 240, 240, 0.08) !important;
  background-image: none !important;
  border-color: transparent !important;
  color: #f0f0f0 !important;
  -webkit-text-fill-color: #f0f0f0 !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
  outline: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn:not(.contact-record-quick-rail__btn--back):not(.contact-record-quick-rail__btn--edit-save):not(.contact-record-quick-rail__btn--cancel):focus-visible {
  box-shadow: 0 0 0 2px rgba(136, 192, 208, 0.35) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn:not(.contact-record-quick-rail__btn--back):not(.contact-record-quick-rail__btn--edit-save):not(.contact-record-quick-rail__btn--cancel):active {
  background: rgba(240, 240, 240, 0.12) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  transform: none !important;
}

/* Active tab sync — soft fill, still no outline boxes */
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-active-detail-tab] .contact-record-quick-rail__btn[data-contact-rail-for-tab] {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #a8a8a8 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-active-detail-tab="email"] .contact-record-quick-rail__btn[data-contact-rail-for-tab="email"],
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-active-detail-tab="documents"] .contact-record-quick-rail__btn[data-contact-rail-for-tab="documents"],
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-active-detail-tab="tasks"] .contact-record-quick-rail__btn[data-contact-rail-for-tab="tasks"],
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-active-detail-tab="calendar"] .contact-record-quick-rail__btn[data-contact-rail-for-tab="calendar"],
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-active-detail-tab="calls"] .contact-record-quick-rail__btn[data-contact-rail-for-tab="calls"],
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-active-detail-tab="notes"] .contact-record-quick-rail__btn[data-contact-rail-for-tab="notes"],
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-active-detail-tab="deals"] .contact-record-quick-rail__btn[data-contact-rail-for-tab="deals"],
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-active-detail-tab="details"] .contact-record-quick-rail__btn[data-contact-rail-for-tab="details"] {
  background: rgba(129, 161, 193, 0.16) !important;
  background-image: none !important;
  border-color: transparent !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
  box-shadow: none !important;
}

/* Back — borderless, readable (match prior high-specificity contact detail selector) */
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back {
  background: rgba(240, 240, 240, 0.06) !important;
  background-image: none !important;
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  filter: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back .contact-record-quick-rail__btn-icon,
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back .contact-record-quick-rail__foot-label,
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back svg,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back .contact-record-quick-rail__btn-icon,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back .contact-record-quick-rail__foot-label,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back svg {
  color: #e6e6e6 !important;
  stroke: currentColor !important;
  -webkit-text-fill-color: #e6e6e6 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back:hover,
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back:focus-visible,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back:focus-visible {
  background: rgba(240, 240, 240, 0.12) !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back:active,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible .contact-record-quick-rail__btn.contact-record-quick-rail__btn--back:active {
  background: rgba(240, 240, 240, 0.16) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  transform: none !important;
}

/* Edit / Save — filled CTA, no outline box */
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-contact-rail-edit-mode="edit"] .contact-record-quick-rail__btn--edit-save {
  background: linear-gradient(150deg, #fef08a 0%, #facc15 55%, #eab308 100%) !important;
  border-color: transparent !important;
  color: #422006 !important;
  -webkit-text-fill-color: #422006 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-contact-rail-edit-mode="save"] .contact-record-quick-rail__btn--edit-save {
  background: linear-gradient(150deg, #6ee7b7 0%, #34d399 55%, #10b981 100%) !important;
  border-color: transparent !important;
  color: #022c22 !important;
  -webkit-text-fill-color: #022c22 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-contact-rail-edit-mode="edit"] .contact-record-quick-rail__btn--edit-save:hover,
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail[data-contact-rail-edit-mode="save"] .contact-record-quick-rail__btn--edit-save:hover {
  filter: brightness(1.04) !important;
  transform: none !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn.contact-record-quick-rail__btn--cancel {
  background: rgba(248, 113, 113, 0.18) !important;
  background-image: none !important;
  border-color: transparent !important;
  color: #fca5a5 !important;
  -webkit-text-fill-color: #fca5a5 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-record-quick-rail__btn.contact-record-quick-rail__btn--cancel:hover {
  background: rgba(248, 113, 113, 0.28) !important;
  filter: none !important;
  transform: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactList,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactList .contact-list-table-wrap,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap #contactList .contact-list-table-scroll {
  background: #1a1a1a !important;
  background-image: none !important;
  border-color: var(--lw-border) !important;
  color: var(--lw-text-primary) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table thead th,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table thead .contact-list-th,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table .contact-list-head-check,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table .contact-list-th {
  background: var(--lw-header-bg) !important;
  color: var(--lw-text-header) !important;
  border-color: var(--lw-border) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table thead th,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table thead th.contact-list-th[data-sort-key="name"] {
  background: var(--lw-header-bg) !important;
  background-image: none !important;
  color: var(--lw-text-header) !important;
  border-color: var(--lw-border) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table thead th.contact-list-th[data-sort-key]:hover {
  background: #242424 !important;
  color: var(--lw-text-primary) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table tbody td {
  background: #1a1a1a !important;
  color: var(--lw-text-secondary) !important;
  border-color: var(--lw-border-subtle) !important;
}

/*
 * Frozen lead cells need an opaque base paint so scrolled content cannot show
 * through. Row-state rules below repaint every cell in the record together,
 * covering both list-workspace-table--sticky-lead and the spreadsheet
 * contact-list-table--freeze-lead implementation at every density.
 */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table--sticky-lead .contact-table-check-col,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table--sticky-lead .contact-list-check-td,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table--sticky-lead .contact-list-action-td,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table--sticky-lead .contact-table-action-col,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table--sticky-lead td.contact-name-cell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table--sticky-lead td[data-sort-key="name"],
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .list-workspace-table--sticky-lead .pipe-list-name {
  background: #1a1a1a !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table tbody td.contact-table-check-col,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table tbody td.contact-list-check-td,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table tbody td.contact-name-cell {
  background: #1a1a1a !important;
  background-image: none !important;
  /* Do not set border-color here — it kills the next-action urgency left stripe
     (inline / --contact-urgency on .contact-table-check-col). */
  border-top-color: var(--lw-border-subtle) !important;
  border-right-color: var(--lw-border-subtle) !important;
  border-bottom-color: var(--lw-border-subtle) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table tbody tr.pipe-list-row.contact-row:nth-child(even):not(.selected):not(:hover):not(:focus-within) > td {
  background: var(--lw-row-zebra) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table tbody tr.pipe-list-row.contact-row:hover > td,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table tbody tr.pipe-list-row.contact-row:focus-within:not(.selected) > td {
  background: var(--lw-row-hover) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table tbody tr.pipe-list-row.contact-row.selected > td {
  background: var(--lw-row-selected) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table .pipe-list-name,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table td[data-sort-key="name"],
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table a {
  color: #e6e6e6 !important;
}

/* ---------------------------------------------------------------------------
   Spreadsheet (Attio-style grid) view. The table declares a light --ss-* token
   set; frozen lead columns, the header row, and column dividers all read those
   variables, so the sticky Name/checkbox header stayed white in dark mode.
   Re-map the whole palette so every derived surface follows the theme.
   --------------------------------------------------------------------------- */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table.contact-list-table--spreadsheet {
  --ss-canvas: #181818;
  --ss-surface: #1a1a1a;
  --ss-header-bg: #1e1e1e;
  --ss-border: rgba(240, 240, 240, 0.14);
  --ss-border-header: rgba(240, 240, 240, 0.22);
  --ss-hover-bg: #222222;
  --ss-selected-bg: #222222;
  --ss-header-text: #a8a8a8;
  --ss-header-shadow: 0 1px 0 rgba(240, 240, 240, 0.12), 0 6px 16px -10px rgba(0, 0, 0, 0.5);
  /* Virtual/spreadsheet cells resolve --text-secondary; keep them readable. */
  --text-primary: #e6e6e6;
  --text-secondary: #b0b0b0;
  --text-tertiary: #8a8a8a;
  background: var(--ss-surface) !important;
  border-color: var(--ss-border-header) !important;
  color: #c6c6c6 !important;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 10px 28px -14px rgba(0, 0, 0, 0.55) !important;
}

/* Person + company grid body: force readable cell copy and quiet dividers.
   Phone/location/email/virtual columns previously kept light-mode slate text
   (#6a6a6a / --text-secondary) and white link/hover chrome. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap {
  --text-primary: #e6e6e6;
  --text-secondary: #b0b0b0;
  --text-tertiary: #8a8a8a;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap #contactList .contact-list-table-scroll--spreadsheet {
  background: #181818 !important;
  background-image: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td.contact-cell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td.contact-email-cell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td.contact-phone-cell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td.contact-owner-cell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td.contact-company-cell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td.contact-spreadsheet-cell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td[class*="contact-virtual-col-cell"] {
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
  border-right-color: rgba(240, 240, 240, 0.14) !important;
  border-bottom-color: rgba(240, 240, 240, 0.14) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td > span,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet .contact-list-virtual-text,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet .contact-list-virtual-address-line,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet .contact-spreadsheet-cell--closed,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-virtual-text,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-virtual-address-line {
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td.contact-name-cell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td.contact-name-cell .contact-name-text,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td.contact-name-cell .contact-name-btn,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet tbody td.contact-name-cell a {
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet thead th,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet thead .contact-list-head-check {
  border-right-color: rgba(240, 240, 240, 0.18) !important;
  border-bottom-color: rgba(240, 240, 240, 0.22) !important;
}

/* Kill light-mode white glass on social/link cells + hover bands. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-virtual-link-stack {
  --virtual-link-fg: #87a6c4;
  --virtual-link-accent: #87a6c4;
  --virtual-link-bg: rgba(36, 36, 36, 0.92);
  --virtual-link-border: rgba(240, 240, 240, 0.22);
  --virtual-link-icon-bg: rgba(96, 165, 250, 0.14);
  --virtual-link-icon-fg: #87a6c4;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-virtual-link {
  background: #222222 !important;
  background-image: none !important;
  color: #87a6c4 !important;
  -webkit-text-fill-color: #87a6c4 !important;
  border-color: rgba(240, 240, 240, 0.22) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap tr.pipe-list-row.contact-row:hover .contact-virtual-col-cell--hyperlink {
  background: transparent !important;
  background-image: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table--spreadsheet-editable tbody td.contact-spreadsheet-cell--can-edit:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table--spreadsheet-editable tbody td.contact-spreadsheet-cell--can-edit:focus-within {
  background: rgba(136, 192, 208, 0.1) !important;
  box-shadow: inset 0 0 0 1px rgba(136, 192, 208, 0.28) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-spreadsheet-edit-affordance {
  background: #242424 !important;
  color: #c6c6c6 !important;
  box-shadow: 0 0 0 1px rgba(240, 240, 240, 0.22) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-spreadsheet-cell--editing {
  background: #1e1e1e !important;
}

/* A late gmail rule repaints the spreadsheet header via `var(--ss-header-bg)
   !important` with #contactListWrap in the selector — beat it explicitly so the
   frozen check/name header no longer shows white. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet thead .contact-list-th,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet thead .contact-list-head-check,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet thead th.contact-list-th-actions,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet.contact-list-table--freeze-lead thead th.contact-list-head-check,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet.contact-list-table--freeze-lead thead th.contact-list-th-actions,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-list-table.contact-list-table--spreadsheet.contact-list-table--freeze-lead thead th.contact-list-th[data-sort-key="name"] {
  background: #1e1e1e !important;
  background-image: none !important;
  border-color: rgba(240, 240, 240, 0.26) !important;
}

/* Header label + column filter/sort glyphs (the dim "NAME" text). */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table--spreadsheet thead th,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table--spreadsheet .contact-list-th-inner,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table--spreadsheet .contact-list-th-label {
  color: #a8a8a8 !important;
  -webkit-text-fill-color: #a8a8a8 !important;
}

/* Grid-resize variant hardcodes a light gradient on the frozen HEADER cells
   instead of the --ss-* tokens (body cells already follow the shared row-parity
   rules below). Repaint just the header. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table--grid-resize thead th.contact-table-check-col,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table--grid-resize thead th.contact-list-head-check,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table--grid-resize thead th.contact-list-th-actions,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-table--grid-resize thead th.contact-list-th[data-sort-key="name"] {
  background: #1e1e1e !important;
  background-image: none !important;
  box-shadow: 6px 0 14px -8px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .list-workspace-scroll-fade--right {
  background: linear-gradient(270deg, rgba(24, 24, 24, 0.98), rgba(24, 24, 24, 0.7) 45%, transparent) !important;
}
html[data-theme="dark"] .list-workspace-scroll-fade--left {
  background: linear-gradient(90deg, rgba(24, 24, 24, 0.98), rgba(24, 24, 24, 0.7) 45%, transparent) !important;
}
html[data-theme="dark"] .list-workspace-scroll-cue {
  background: #242424 !important;
  color: #c6c6c6 !important;
  border-color: var(--lw-border) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-company-pill,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-primary-person-pill,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-new-badge {
  background: #242424 !important;
  color: #e6e6e6 !important;
  border-color: rgba(240, 240, 240, 0.24) !important;
}

/* Quiet bright list controls and badges without losing their semantic color. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-company-pill,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-primary-person-pill {
  background: #242424 !important;
  background-image: none !important;
  color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.32) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-company-pill:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-primary-person-pill:hover {
  background: #2e2e2e !important;
  border-color: rgba(135, 166, 196, 0.5) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-status-pill,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-lead-status-pill,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-new-badge,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-stale-badge {
  background: #2a2a2a !important;
  color: #dcdcdc !important;
  border: 1px solid rgba(240, 240, 240, 0.25) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-status-pill[style*="--danger-50"] {
  background: #3a2028 !important;
  color: #fca5a5 !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-status-pill[style*="--success-50"] {
  background: #242424 !important;
  color: #86efac !important;
  border-color: rgba(74, 222, 128, 0.28) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-status-pill[style*="--primary-50"] {
  background: #2a2a2a !important;
  color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.3) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-next-task-pill {
  background: #1e1e1e !important;
  background-image: none !important;
  color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.28) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-next-task-pill[style*="danger"],
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-next-task-pill[style*="rose"],
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-next-task-pill[style*="red"] {
  background: #3a2028 !important;
  color: #fecaca !important;
  border-color: rgba(248, 113, 113, 0.32) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-next-task-pill[style*="warning"],
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-next-task-pill[style*="amber"],
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #contactListWrap .contact-next-task-pill[style*="yellow"] {
  background: #3b301c !important;
  color: #fde68a !important;
  border-color: rgba(250, 204, 21, 0.3) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-th-actions-icon,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-row-quick-action-btn__glyph {
  background: #1e1e1e !important;
  color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.28) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-row-quick-action-btn:hover .contact-row-quick-action-btn__glyph {
  background: #2e2e2e !important;
  color: #2a2a2a !important;
  border-color: rgba(136, 192, 208, 0.42) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #priorityLegend #contactListLayoutToggle {
  background: #222222 !important;
  border-color: rgba(240, 240, 240, 0.25) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #priorityLegend #contactListLayoutToggle .contact-layout-btn {
  background: transparent !important;
  color: #87a6c4 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #priorityLegend #contactListLayoutToggle .contact-layout-btn.contact-layout-btn--active {
  background: #1e1e1e !important;
  color: #e6e6e6 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .gmail-tab-count {
  background: #2e2e2e !important;
  color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.24) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #filtersSection #addContactQuickBtn,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #filtersSection #addDealQuickBtn {
  background: #242424 !important;
  background-image: none !important;
  color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.3) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view[data-view="contacts"] #filtersSection.filters-modern.list-toolbar-strip #addContactQuickBtn.filter-add-btn.filter-add-btn--toolbar.filter-add-btn--contact-quick,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view[data-view="contacts"] #filtersSection.filters-modern.list-toolbar-strip #addDealQuickBtn.filter-add-btn.filter-add-btn--toolbar {
  background: #242424 !important;
  background-image: none !important;
  color: #dcdcdc !important;
  -webkit-text-fill-color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.3) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view input.row-check {
  color-scheme: dark;
  accent-color: #87a6c4 !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card.contact-has-deal-surface {
  background: rgba(24, 24, 24, 0.9) !important;
  border-color: rgba(240, 240, 240, 0.18) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-deal-pill {
  --deal-pill-bg: linear-gradient(180deg, #1e1e1e 0%, #181818 100%) !important;
  --deal-pill-border: rgba(125, 211, 252, 0.38) !important;
  background: #1e1e1e !important;
  background-image: none !important;
  border-color: var(--deal-pill-border) !important;
  color: #e6e6e6 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-deal-pill::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-deal-pill-stage {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.22) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view :is(
  .contact-deal-pill-title,
  .contact-deal-pill-amount
) {
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-deal-pill-pct {
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
}

/* Card-grid deal/project column pill: a light momentum rule
   (.contact-list-card-field[data-col="deal"] .contact-deal-pill:not(--closed))
   outranks the generic dark override above and leaves the pill white. Match its
   specificity here so the card's deal surface stays dark. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-field[data-col="deal"] .contact-deal-pill,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-field[data-col="project"] .contact-deal-pill,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-field[data-col="deal"] .contact-deal-pill:not(.contact-deal-pill--closed),
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-field[data-col="project"] .contact-deal-pill:not(.contact-deal-pill--closed) {
  background: #1e1e1e !important;
  background-image: none !important;
  border-color: rgba(125, 211, 252, 0.3) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-field[data-col="deal"] .contact-deal-pill:not(.contact-deal-pill--closed)::before,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-field[data-col="project"] .contact-deal-pill:not(.contact-deal-pill--closed)::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-field[data-col="deal"] .contact-deal-pill:not(.contact-deal-pill--closed) .contact-deal-pill-title,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-field[data-col="project"] .contact-deal-pill:not(.contact-deal-pill--closed) .contact-deal-pill-title {
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view :is(
  .priority-legend-chip-text,
  .td-ai-badge,
  .td-ai-badge__label
) {
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .td-ai-badge svg {
  color: #c6c6c6 !important;
  fill: currentColor !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view[data-view="contacts"] :is(
  #listOptionsCriteriaSummaryBtn.list-options-criteria-summary-btn,
  #priorityLegendTimingHelpBtn.priority-legend-timing-help-btn
) {
  background: #2a2a2a !important;
  background-image: none !important;
  color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.28) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view[data-view="contacts"] .gmail-tabs .gmail-tab .gmail-tab-count {
  background: #2e2e2e !important;
  background-image: none !important;
  color: #dcdcdc !important;
  -webkit-text-fill-color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.22) !important;
  box-shadow: none !important;
}

/* ── Contact record shell + header ───────────────────────────── */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel #detailContent,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-record-shell,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-record-main,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-tab-panel,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-overview-layout {
  background: var(--mm-bg, #181818) !important;
  background-image: none !important;
  color: var(--mm-text-primary, #f0f0f0) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailHeader.contact-detail-header-new {
  background: transparent !important;
  background-image: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailHeader.contact-detail-header-new .contact-detail-header-wrap,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .metaWrap.contact-detail-header-wrap {
  background: var(--mm-surface, #1a1a1a) !important;
  background-image: none !important;
  border-color: var(--mm-border, rgba(240, 240, 240, 0.22)) !important;
  color: var(--mm-text-primary, #f0f0f0) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .detailHeader.contact-detail-header-new .metaWrap.contact-detail-header-wrap {
  background: var(--mm-surface, #1a1a1a) !important;
  background-image: none !important;
  border-color: var(--mm-border, rgba(240, 240, 240, 0.22)) !important;
  color: var(--mm-text-primary, #f0f0f0) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contactName,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-name-heading,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-header-wrap h1,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-header-wrap h2 {
  color: var(--mm-text-primary, #f0f0f0) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-header-wrap .muted,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-header-wrap .contact-detail-subline {
  color: var(--mm-text-muted, #8a8a8a) !important;
}

/* Tabs — target the actual deal-section-tab/contact-detail-tab-btn classes. */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-tabs-card,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-tabs-header,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-tabs-nav.deal-section-tabs {
  background: var(--mm-surface, #1a1a1a) !important;
  background-image: none !important;
  border-color: var(--mm-border, rgba(240, 240, 240, 0.22)) !important;
  color: var(--mm-text-secondary, #c6c6c6) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .deal-section-tab.contact-detail-tab-btn {
  background: transparent !important;
  color: var(--mm-text-muted, #8a8a8a) !important;
  border-color: transparent !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .deal-section-tab.contact-detail-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--mm-text-secondary, #c6c6c6) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .deal-section-tab.contact-detail-tab-btn.is-active,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .deal-section-tab.contact-detail-tab-btn.active,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-tab-btn.is-active,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-tab-btn.active {
  background: #242424 !important;
  color: #f0f0f0 !important;
  border-color: rgba(240, 240, 240, 0.2) !important;
  box-shadow: none !important;
}

/* Overview cards, section groups, notes composer, and activity feed. */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-details-card,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .crm-contact-overview-fields.contact-details-card,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .crm-contact-overview-notes.contact-details-card,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-field-group,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-overview-right > .detailSection,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .overview-note-composer,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-activity-feed {
  background: var(--mm-surface, #1a1a1a) !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  color: var(--mm-text-primary, #f0f0f0) !important;
  box-shadow: none !important;
  outline: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-field-group-title,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-overview-right .related-section-header,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .crm-contact-overview-notes .related-section-header {
  background: #1e1e1e !important;
  color: var(--mm-text-secondary, #c6c6c6) !important;
  border-color: var(--mm-border-subtle, rgba(240, 240, 240, 0.12)) !important;
}

/* ── WHO header (first-fields group title) — kill the last white bar ──
   styles-momentum.css paints the FIRST field group's title bar light via
   a very specific `#detailPanel[data-contact-overview-mode="advanced"]
   .contact-detail-tab-panel--details ...
   .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title`
   rule (≈(1,8,1) + !important) that outranks the generic dark title rule.
   Mirror that exact selector set with an html[data-theme="dark"] prefix so
   the dark background always wins. */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel[data-contact-overview-mode="advanced"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel[data-contact-overview-mode="advanced"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card.project-overview-record-field-layout .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel[data-contact-overview-mode="advanced"] .contact-detail-tab-panel--details .crm-contact-overview-notes.contact-details-card > .related-section-header,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .crm-contact-overview-fields.project-overview-record-field-layout .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title {
  background: #1e1e1e !important;
  background-image: none !important;
  border-bottom-color: rgba(240, 240, 240, 0.12) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel[data-contact-overview-mode="advanced"] .contact-detail-tab-panel--details .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title .contact-field-group-title-text,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-tab-panel--details .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title .contact-field-group-title-text {
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel[data-contact-overview-mode="advanced"] .contact-detail-tab-panel--details .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title svg,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-tab-panel--details .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title svg {
  color: #8a8a8a !important;
}

/* ── Header "Sequence active · Step N of M" pill (+ drip badge) ──────
   Momentum ships this as a light lavender pill (#222222 / #81a1c1),
   which washes out to near-invisible text on the dark header. Recolor
   to an on-brand indigo tint with bright, readable text. */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-active-sequence-indicator,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-outbound-drip-badge {
  background: rgba(136, 192, 208, 0.16) !important;
  background-image: none !important;
  border-color: rgba(136, 192, 208, 0.42) !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-active-sequence-indicator:hover,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-outbound-drip-badge:hover {
  background: rgba(136, 192, 208, 0.26) !important;
  border-color: rgba(136, 192, 208, 0.6) !important;
  color: #2a2a2a !important;
  -webkit-text-fill-color: #2a2a2a !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-field-row {
  background: transparent !important;
  border-color: var(--mm-border-subtle, rgba(240, 240, 240, 0.12)) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow:hover,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-field-row:hover {
  background: rgba(255, 255, 255, 0.035) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow .label {
  color: var(--mm-text-muted, #8a8a8a) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow .value,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow .value a {
  color: var(--mm-text-primary, #f0f0f0) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel input,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel textarea,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel select,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-input,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .overview-note-composer textarea {
  background: #1e1e1e !important;
  background-color: #1e1e1e !important;
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
  border-color: rgba(240, 240, 240, 0.28) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel input::placeholder,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel textarea::placeholder {
  color: #6a6a6a !important;
  -webkit-text-fill-color: #6a6a6a !important;
}

/* ── Interaction states: never flash white on hover/focus/select ──
   Momentum loads later with rules like `.detailRow:focus-within`,
   `.detailRow:hover .inline-input[readonly]`, `.inline-input:focus`,
   `.detailRow[data-mm-clickable]:hover`, and select focus/hover that
   all paint light. Match/beat their specificity so dark always wins. */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow:hover,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-field-row:hover,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow:focus-within,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-field-row:focus-within,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow[data-mm-clickable]:hover,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow[data-mm-clickable]:focus {
  background: rgba(136, 192, 208, 0.08) !important;
  background-image: none !important;
  border-radius: 8px !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow .inline-input,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow:hover .inline-input,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow:hover .inline-input[readonly],
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow .inline-input:focus,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow .inline-input:not([readonly]):focus,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow select,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow:hover select,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow select:focus,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow select.inline-input,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow select[data-key] {
  background: #1e1e1e !important;
  background-color: #1e1e1e !important;
  background-image: none !important;
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
  border-color: rgba(240, 240, 240, 0.28) !important;
  color-scheme: dark !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow .inline-input:focus,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow .inline-input:not([readonly]):focus,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow select:focus {
  border-color: rgba(136, 192, 208, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(129, 161, 193, 0.18) !important;
}

/* Saved-field flash should be a dark green, not near-white */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow.mm-field-saved {
  background: rgba(34, 197, 94, 0.12) !important;
  background-image: none !important;
}

/* Text selection inside fields — readable, not a white block */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow ::selection,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-input::selection,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .value::selection {
  background: rgba(136, 192, 208, 0.45) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-overview-right .overview-note-composer [data-ov-type] {
  background: transparent !important;
  color: #8a8a8a !important;
  border: 1px solid transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-overview-right .overview-note-composer [data-ov-type].active,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-overview-right .overview-note-composer [data-ov-type][aria-pressed="true"] {
  background: rgba(129, 161, 193, 0.16) !important;
  color: #88c0d0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .activityItem.contact-activity-item,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-activity-item {
  background: #1e1e1e !important;
  color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.16) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .activityItem.contact-activity-item:hover,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-activity-item:hover {
  background: #242424 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .mm-activity-bubble {
  border-color: var(--mm-surface, #1a1a1a) !important;
}

/* ── Focused/simple contact mode (loaded styles force #fff) ───── */
html[data-theme="dark"] #detailPanel[data-contact-overview-mode="simple"],
html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] {
  --co-page-bg: var(--mm-bg, #181818);
  --co-form-bg: var(--mm-surface, #1a1a1a);
  --co-input-bg: #1e1e1e;
  --co-input-readonly-bg: #1e1e1e;
  --co-border: rgba(240, 240, 240, 0.22);
  --co-section-color: #a8a8a8;
  --co-value-color: #e6e6e6;
  --co-label-color: #909090;
  --ro-border: rgba(240, 240, 240, 0.22);
  --ro-input-border: rgba(240, 240, 240, 0.28);
  --ro-card-shadow: none;
  background: var(--mm-bg, #181818) !important;
  color: #e6e6e6 !important;
}

html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tabs-header,
html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-details-card,
html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-notes.contact-details-card,
html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-group,
html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .overview-note-composer,
html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-activity-item {
  background: #1a1a1a !important;
  background-color: #1a1a1a !important;
  background-image: none !important;
  color: #e6e6e6 !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-notes .related-section-header {
  background: #1e1e1e !important;
  color: #c6c6c6 !important;
  border-color: var(--ro-border) !important;
}

html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-notes.contact-details-card .overview-note-composer,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-notes.contact-details-card .overview-note-composer {
  background: #1a1a1a !important;
  background-image: none !important;
  border-color: var(--ro-border) !important;
  color: #e6e6e6 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-notes .activityItem.contact-activity-item,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-notes .activityItem.contact-activity-item {
  background: #1e1e1e !important;
  border-color: rgba(240, 240, 240, 0.16) !important;
  color: #c6c6c6 !important;
}

html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .detailRow + .detailRow,
html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .multi-field-detail-row + .multi-field-detail-row,
html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-row + .contact-field-row {
  border-top-color: rgba(240, 240, 240, 0.12) !important;
}

html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.editing .inline-input:focus,
html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.editing select:focus,
html[data-theme="dark"] body.contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.editing textarea:focus {
  background: #1e1e1e !important;
  color: #f0f0f0 !important;
}

/* ── Contact record: full tab-system dark pass ─────────────────
   The production contact chrome intentionally mirrors Projects with high-
   specificity light rules. Keep these selectors equally specific so every
   tab follows the user's color preference. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel {
  --contact-dark-canvas: #181818;
  --contact-dark-surface: #1a1a1a;
  --contact-dark-surface-2: #1e1e1e;
  --contact-dark-surface-3: #222222;
  --contact-dark-hover: #2a2a2a;
  --contact-dark-border: rgba(240, 240, 240, 0.22);
  --contact-dark-border-soft: rgba(240, 240, 240, 0.13);
  --contact-dark-text: #f0f0f0;
  --contact-dark-text-2: #c6c6c6;
  --contact-dark-muted: #8a8a8a;
  background: var(--contact-dark-canvas) !important;
  color: var(--contact-dark-text) !important;
}

/* Record identity header. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detailHeader.contact-detail-header-new.project-detail-header-new {
  background: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detailHeader.contact-detail-header-new.project-detail-header-new > .metaWrap.contact-detail-header-wrap,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detailHeader.contact-detail-header-new.project-detail-header-new .contact-detail-header-wrap,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detailHeader.contact-detail-header-new.project-detail-header-new .detailHeaderMain.contact-detail-header-main {
  background: transparent !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detailHeader.contact-detail-header-new.project-detail-header-new .contactName {
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detailHeader.contact-detail-header-new.project-detail-header-new .mm-meta-line,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detailHeader .contact-detail-subline,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detailHeader .muted {
  color: var(--contact-dark-muted) !important;
  -webkit-text-fill-color: var(--contact-dark-muted) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel #detailTopRightButtons .btn,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel #detailTopRightButtons button,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-header-action-strip .btn,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel #detailHeaderActions button,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel #contactOverviewHeaderModeMount button {
  background: transparent !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border: 1px solid transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel #detailTopRightButtons .btn:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel #detailTopRightButtons button:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel #detailHeaderActions button:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel #contactOverviewHeaderModeMount button:hover {
  background: rgba(240, 240, 240, 0.08) !important;
  color: var(--contact-dark-text) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .contact-overview-mode-toggle,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-mode-toggle {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  gap: 2px !important;
  padding: 2px !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .contact-overview-mode-btn.contact-overview-mode-btn--active,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-mode-btn.contact-overview-mode-btn--active {
  background: rgba(240, 240, 240, 0.1) !important;
  color: var(--contact-dark-text) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Header controls — toolbar ghosts (no pill chrome / shadow). */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailHeader.contact-detail-header-new #detailHeaderActions .contact-snapshot-header-btn,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailHeader.contact-detail-header-new #detailHeaderActions .detailTopActions .detail-compose-dropdown > .btn,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailHeader.contact-detail-header-new #detailHeaderActions .detailTopActions .detail-actions-dropdown > .btn,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailHeader.contact-detail-header-new #detailHeaderActions .td-contact-header-kebab-btn {
  background: transparent !important;
  background-image: none !important;
  color: #dcdcdc !important;
  -webkit-text-fill-color: #dcdcdc !important;
  border: 1px solid transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailHeader.contact-detail-header-new #detailHeaderActions .contact-snapshot-header-btn:hover,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailHeader.contact-detail-header-new #detailHeaderActions .detailTopActions .detail-compose-dropdown > .btn:hover,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailHeader.contact-detail-header-new #detailHeaderActions .detailTopActions .detail-actions-dropdown > .btn:hover,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailHeader.contact-detail-header-new #detailHeaderActions .td-contact-header-kebab-btn:hover {
  background: rgba(240, 240, 240, 0.08) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-header-center .contact-overview-mode-toggle {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  gap: 2px !important;
  padding: 2px !important;
  overflow: visible !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-header-center .contact-overview-mode-btn {
  background: transparent !important;
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
  border: 1px solid transparent !important;
  border-color: transparent !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-header-center .contact-overview-mode-btn:hover {
  background: rgba(240, 240, 240, 0.08) !important;
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-detail-header-center .contact-overview-mode-btn.contact-overview-mode-btn--active {
  background: rgba(240, 240, 240, 0.1) !important;
  background-image: none !important;
  color: #f0f0f0 !important;
  -webkit-text-fill-color: #f0f0f0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Details tab / Focused mode: neutralize the late light form treatment. */
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-group {
  background: #1a1a1a !important;
  background-color: #1a1a1a !important;
  background-image: none !important;
  color: #c6c6c6 !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-group-title,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title {
  background: #1e1e1e !important;
  background-color: #1e1e1e !important;
  background-image: none !important;
  color: #a0a0a0 !important;
  -webkit-text-fill-color: #a0a0a0 !important;
  border-color: rgba(240, 240, 240, 0.16) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-group-title-text,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-group-title svg {
  color: #a0a0a0 !important;
  -webkit-text-fill-color: #a0a0a0 !important;
}
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .detailRow,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .multi-field-detail-row,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-row {
  background: transparent !important;
  background-image: none !important;
  color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.12) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .detailRow .label,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .multi-field-detail-row .label {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
}
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .detailRow .value,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-overview-record-card .value {
  color: #dcdcdc !important;
  -webkit-text-fill-color: #dcdcdc !important;
}
/* Edit mode only — view mode uses borderless values below */
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.editing .inline-input,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.editing select,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.editing textarea,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.editing .detail-multi-type-select,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.editing .detail-multi-value-input,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.editing .detail-multi-label-input,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.editing .detail-multi-ext-input,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .multi-field-detail-row[data-section-editing="1"] .detail-multi-type-select,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .multi-field-detail-row[data-section-editing="1"] .detail-multi-value-input,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .multi-field-detail-row[data-section-editing="1"] .detail-multi-label-input,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .multi-field-detail-row[data-section-editing="1"] .detail-multi-ext-input {
  background: #222222 !important;
  background-color: #222222 !important;
  background-image: none !important;
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
  border-color: rgba(240, 240, 240, 0.26) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-simple-fields .detail-multi-field-list,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-simple-fields .detail-multi-field-entry,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-simple-fields .phone-entry-fields {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-progressive-section {
  background: #1e1e1e !important;
  background-color: #1e1e1e !important;
  background-image: none !important;
  color: #c6c6c6 !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-progressive-section__summary .contact-field-group-title {
  background: transparent !important;
  background-image: none !important;
  color: #a0a0a0 !important;
  border-color: rgba(240, 240, 240, 0.16) !important;
}
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-progressive-section__summary .contact-field-group-title::after {
  background: #2a2a2a !important;
  background-image: none !important;
  color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.3) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-progressive-section__summary:hover .contact-field-group-title::after {
  background: #2e2e2e !important;
  color: #ffffff !important;
  border-color: rgba(135, 166, 196, 0.48) !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title.contact-field-group-title--split {
  background: #1e1e1e !important;
  background-color: #1e1e1e !important;
  background-image: none !important;
  color: #a0a0a0 !important;
  -webkit-text-fill-color: #a0a0a0 !important;
  border-bottom-color: rgba(240, 240, 240, 0.18) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-field-group[data-contact-overview-first-fields] .contact-field-group-title-text,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-field-group[data-contact-overview-first-fields] .contact-field-hint-btn {
  color: #a0a0a0 !important;
  -webkit-text-fill-color: #a0a0a0 !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-focused-full-affordance {
  background: #222222 !important;
  background-color: #222222 !important;
  background-image: none !important;
  color: #c6c6c6 !important;
  border-color: rgba(136, 192, 208, 0.28) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-focused-full-affordance__copy {
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-focused-full-affordance__btn {
  background: #2a2a2a !important;
  background-color: #2a2a2a !important;
  background-image: none !important;
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
  border-color: rgba(240, 240, 240, 0.3) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-focused-full-affordance__btn:hover {
  background: #2e2e2e !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: rgba(135, 166, 196, 0.5) !important;
}

/* Segmented tab rail and active tab. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tabs-header.project-detail-tabs-header,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .project-detail-tabs-header {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--contact-dark-border-soft) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tabs-nav.deal-section-tabs,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tabs-nav.project-detail-tabs-nav {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-btn.project-tab,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .project-tab.contact-detail-tab-btn {
  background: transparent !important;
  color: var(--contact-dark-muted) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-btn.project-tab:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .project-tab.contact-detail-tab-btn:hover {
  background: rgba(255, 255, 255, 0.055) !important;
  color: var(--contact-dark-text-2) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-btn.project-tab.is-active,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-btn.project-tab.active,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .project-tab.contact-detail-tab-btn.is-active,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .project-tab.contact-detail-tab-btn.active {
  background: var(--contact-dark-surface-3) !important;
  color: var(--contact-dark-text) !important;
  box-shadow: 0 0 0 1px rgba(240, 240, 240, 0.2) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-count,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .deal-section-tab__count,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .related-section-count {
  background: #2e2e2e !important;
  color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.2) !important;
  box-shadow: none !important;
}

/* Every tab body and shared section shell. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel #detailContent,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tabs-body,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel > .detailSection {
  background: var(--contact-dark-canvas) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tab-shell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-details-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-record-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-field-group,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .relationshipsSection,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tasks-section,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .activityLog {
  background: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}

/* Details tab fields: display controls must not remain white. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields.contact-overview-simple-fields {
  --ro-form-bg: var(--contact-dark-surface);
  --ro-input-bg: var(--contact-dark-surface-2);
  --ro-input-readonly-bg: var(--contact-dark-surface-2);
  --ro-input-border: rgba(240, 240, 240, 0.3);
  --ro-border: var(--contact-dark-border);
  --ro-label-color: var(--contact-dark-muted);
  --ro-value-color: var(--contact-dark-text);
  --ro-section-color: var(--contact-dark-text-2);
  --co-input-bg: var(--contact-dark-surface-2);
  --co-input-readonly-bg: var(--contact-dark-surface-2);
  --co-input-border: rgba(240, 240, 240, 0.3);
  --co-value-color: var(--contact-dark-text);
  --co-label-color: var(--contact-dark-muted);
  --co-border: var(--contact-dark-border);
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields.contact-overview-simple-fields .contact-field-group {
  background: var(--contact-dark-surface) !important;
  background-image: none !important;
  border-color: var(--contact-dark-border-soft) !important;
}
/* Text/color for all detail fields; bordered chrome only while editing (see .editing rules). */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields .inline-input,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields input.inline-input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields textarea.inline-input,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields select.inline-input {
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields.editing .inline-input,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields.editing input.inline-input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields.editing textarea.inline-input,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields.editing select.inline-input {
  background: var(--contact-dark-surface-2) !important;
  background-color: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  border-color: rgba(240, 240, 240, 0.3) !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields.editing .inline-input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields.editing select.inline-input,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields.editing textarea.inline-input {
  background: var(--contact-dark-surface-2) !important;
  background-color: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
  border-color: rgba(240, 240, 240, 0.3) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields button:not(.primary):not(.btn-primary) {
  background: var(--contact-dark-surface-3) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields .inline-input:placeholder-shown,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields textarea::placeholder {
  color: #6a6a6a !important;
  -webkit-text-fill-color: #6a6a6a !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-field-group-title,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-record-card__head,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .related-section-header {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detailRow .label,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-panel-subtitle,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .text-muted,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .muted {
  color: var(--contact-dark-muted) !important;
  -webkit-text-fill-color: var(--contact-dark-muted) !important;
}

/* Notes composer has its own high-specificity simple-mode light controls. */
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-notes.contact-details-card,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-notes .overview-note-composer {
  background: #1e1e1e !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .overview-note-composer textarea,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-notes .overview-note-composer textarea.textarea {
  background: #181818 !important;
  background-color: #181818 !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
  border: 1px solid transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .overview-note-composer textarea::placeholder {
  color: #6a6a6a !important;
  -webkit-text-fill-color: #6a6a6a !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .mm-overview-composer-typebar {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .mm-overview-composer-typebar > button,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .mm-overview-composer-typebar > button:hover,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .mm-overview-composer-typebar > button.is-active,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .mm-overview-composer-typebar > button[aria-pressed="true"] {
  background: transparent !important;
  color: var(--contact-dark-muted) !important;
  border: 1px solid transparent !important;
  border-right: 1px solid transparent !important;
  border-color: transparent !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .mm-overview-composer-typebar > button.is-active,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .mm-overview-composer-typebar > button[aria-pressed="true"] {
  background: rgba(129, 161, 193, 0.16) !important;
  color: #88c0d0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .overview-note-composer-actions,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .mm-overview-note-actions-row {
  background: transparent !important;
  color: var(--contact-dark-muted) !important;
  border-color: transparent !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .overview-note-composer .btn.ghost,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .overview-note-voice-btn {
  background: transparent !important;
  color: #a8a8a8 !important;
  border: 1px solid transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Overview command surface, KPI cards, and live client path. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-top .crm-overview-hero.crm-overview-hero--contact-command {
  background:
    radial-gradient(circle at 12% 0%, rgba(129, 161, 193, 0.14), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(16, 185, 129, 0.08), transparent 28%),
    linear-gradient(180deg, #1e1e1e 0%, #1a1a1a 100%) !important;
  color: var(--contact-dark-text) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-top .crm-overview-hero.crm-overview-hero--contact-command::before,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-top .crm-overview-hero.crm-overview-hero--contact-command::after {
  background:
    radial-gradient(circle at 92% 20%, rgba(71, 85, 105, 0.18), transparent 34%),
    linear-gradient(120deg, rgba(129, 161, 193, 0.05), transparent 40%) !important;
  opacity: 1 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__status-card-shell {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__status-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__status-card-hit {
  background: transparent !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__status-label,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__status-meta,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__deals-split-k,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__subtitle,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__context-chip {
  color: var(--contact-dark-muted) !important;
  -webkit-text-fill-color: var(--contact-dark-muted) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__eyebrow,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__context-chip {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__status-value,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__deals-split-v {
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero__kpi-add-btn,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-action-deck__help {
  background: #242424 !important;
  color: #c6c6c6 !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}

/*
 * Hold KPI cells invisible until JS clears data-contact-kpi-pending (same paint as
 * freeze reveal). Prevents empty divider shells from painting mid-switch.
 */
#detailPanel .contact-overview-top[data-contact-kpi-pending] .crm-overview-hero__status,
#detailPanel .contact-overview-top[data-contact-kpi-pending] .crm-overview-hero__status--dense {
  opacity: 0 !important;
  visibility: hidden !important;
  min-height: 64px !important;
  border-bottom-color: transparent !important;
  pointer-events: none !important;
}
#detailPanel .contact-overview-top[data-contact-kpi-pending] .crm-overview-hero__status-card-shell,
#detailPanel .contact-overview-top[data-contact-kpi-pending] .crm-overview-hero__status-card-shell + .crm-overview-hero__status-card-shell {
  border-color: transparent !important;
  border-left-color: transparent !important;
}

/*
 * KPI strip first paint — do not depend on contact-detail-visible / overview tab
 * classes. Base styles.css uses #0f172a values; without these, dark mode briefly
 * shows empty shells + purple "+" until the long scoped rules match.
 */
html[data-theme="dark"] #detailPanel .crm-overview-hero__status-label,
html[data-theme="dark"] #detailPanel .crm-overview-hero__deals-split-k {
  color: #909090 !important;
  -webkit-text-fill-color: #909090 !important;
}
html[data-theme="dark"] #detailPanel .crm-overview-hero__status-value,
html[data-theme="dark"] #detailPanel .crm-overview-hero__deals-split-v,
html[data-theme="dark"] #detailPanel .crm-overview-hero__deals-split-v--text,
html[data-theme="dark"] #detailPanel .crm-overview-hero__status-meta {
  color: #f0f0f0 !important;
  -webkit-text-fill-color: #f0f0f0 !important;
}
html[data-theme="dark"] #detailPanel .crm-overview-hero__status-meta {
  color: #909090 !important;
  -webkit-text-fill-color: #909090 !important;
}
html[data-theme="dark"] #detailPanel .crm-overview-hero__status-card-shell > .crm-overview-hero__kpi-add-btn {
  opacity: 0 !important;
  pointer-events: none !important;
  background: #242424 !important;
  border-color: rgba(240, 240, 240, 0.12) !important;
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] #detailPanel .crm-overview-hero__status-card-shell:hover > .crm-overview-hero__kpi-add-btn,
html[data-theme="dark"] #detailPanel .crm-overview-hero__status-card-shell:focus-within > .crm-overview-hero__kpi-add-btn {
  opacity: 0.9 !important;
  pointer-events: auto !important;
}
html[data-theme="dark"] #detailPanel .contact-overview-top--kpi-first {
  margin: 0 0 8px !important;
}

/* Persistent action deck host + expanded shortcut buttons (all contact tabs). */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-action-deck-host {
  background: var(--contact-dark-surface) !important;
  border-bottom-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero--contact-command .crm-overview-hero__actions--action-deck.is-expanded > button.btn.ghost.contact-action-deck__flyout {
  background: var(--contact-dark-surface-3) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  -webkit-text-fill-color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero--contact-command .crm-overview-hero__actions--action-deck.is-expanded > button.btn.ghost.contact-action-deck__flyout:hover:not(:disabled) {
  background: var(--contact-dark-hover) !important;
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
  border-color: rgba(240, 240, 240, 0.35) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero--contact-command .crm-overview-hero__actions--action-deck .contact-action-deck__flyout-chevron {
  opacity: 0.72 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero--contact-command .crm-overview-hero__actions--action-deck.is-expanded .contact-action-deck__close {
  color: var(--contact-dark-muted) !important;
  -webkit-text-fill-color: var(--contact-dark-muted) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-overview-hero--contact-command .crm-overview-hero__actions--action-deck.is-expanded .contact-action-deck__close:hover {
  color: var(--contact-dark-text-2) !important;
  -webkit-text-fill-color: var(--contact-dark-text-2) !important;
  background: rgba(240, 240, 240, 0.14) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-action-deck__more-menu {
  background: #1e1e1e !important;
  border-color: rgba(240, 240, 240, 0.22) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-action-deck__more-menu .actions-menu-item {
  color: #c6c6c6 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .contact-action-deck__more-menu .actions-menu-item:hover {
  background: #2a2a2a !important;
  color: #f0f0f0 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .staff-client-open-steps {
  background: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .staff-client-open-steps__step {
  background: var(--contact-dark-surface-2) !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .staff-client-open-steps__step.is-primary {
  background: #222222 !important;
  border-color: rgba(96, 165, 250, 0.5) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .staff-client-open-steps__title,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .staff-client-open-steps__label {
  color: var(--contact-dark-text-2) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .staff-client-open-steps__sub,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .staff-client-open-steps__hint {
  color: var(--contact-dark-muted) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .staff-client-open-steps__btn {
  background: var(--contact-dark-surface-3) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}

/* Overview Client Room promo strip. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-top .contact-portal-hero-strip,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-top .contact-portal-hero-strip--active {
  background: #222222 !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-top .contact-portal-hero-strip__copy,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-top .contact-portal-hero-strip__meta,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-top .contact-portal-hero-strip__copy strong {
  color: var(--contact-dark-text-2) !important;
  -webkit-text-fill-color: var(--contact-dark-text-2) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-top .contact-portal-hero-strip__dismiss {
  background: var(--contact-dark-surface-3) !important;
  color: var(--contact-dark-muted) !important;
  border-color: var(--contact-dark-border) !important;
}

/* Overview compact Notes & Activity card. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes.contact-details-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .overview-note-composer {
  background: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .related-section-header {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .mm-overview-composer-typebar {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .mm-overview-composer-typebar > button {
  background: transparent !important;
  color: var(--contact-dark-muted) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .mm-overview-composer-typebar > button.is-active,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .mm-overview-composer-typebar > button[aria-pressed="true"] {
  background: var(--contact-dark-surface-3) !important;
  color: #88c0d0 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .overview-note-composer textarea,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .overview-note-composer textarea.textarea {
  background: var(--contact-dark-surface-2) !important;
  background-color: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
  border-color: rgba(240, 240, 240, 0.3) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .overview-note-composer-actions,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .mm-overview-note-actions-row {
  background: transparent !important;
  color: var(--contact-dark-muted) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--overview .contact-overview-quick-notes .contact-overview-quick-notes__view-all {
  background: var(--contact-dark-surface-2) !important;
  color: var(--contact-dark-muted) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-sequence-overview {
  background: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-sequence-overview__item {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-sequence-overview__name {
  color: var(--contact-dark-text) !important;
}

/* Tasks, deals and Activity metrics/rows. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-summary-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tab-metric-card {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-summary-card.is-risk,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tab-metric-card.is-attention {
  background: #34212a !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-summary-k,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tab-metric-label,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tab-metric-meta {
  color: var(--contact-dark-muted) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-summary-v,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tab-metric-value {
  color: var(--contact-dark-text) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tasks-section .task-row,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tasks-section .mm-task-row,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deal-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-related-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .activityItem.contact-activity-item {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
  box-shadow: none !important;
}

/* Deals tab: card internals and semantic surfaces. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-card {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-card::before {
  background: linear-gradient(90deg, #87a6c4, #87a6c4, #909090) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-title {
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .mm-deal-inline-value {
  color: #6ee7b7 !important;
  -webkit-text-fill-color: #6ee7b7 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-icon {
  background: #1e1e1e !important;
  background-image: none !important;
  color: #88c0d0 !important;
  border: 1px solid rgba(136, 192, 208, 0.3) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-health-badge.level-low {
  background: #242424 !important;
  background-image: none !important;
  color: #86efac !important;
  border-color: rgba(74, 222, 128, 0.28) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-health-badge.level-medium {
  background: #3b301c !important;
  background-image: none !important;
  color: #fde68a !important;
  border-color: rgba(250, 204, 21, 0.3) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-health-badge.level-high {
  background: #3a2028 !important;
  background-image: none !important;
  color: #fca5a5 !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-stage-pill {
  background: #1e1e1e !important;
  background-image: none !important;
  color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.3) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-person-pill,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-company-pill,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-meta-pill {
  background: #1e1e1e !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .mm-deal-next-row,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-next-action-pill {
  background: #3b301c !important;
  background-image: none !important;
  color: #fde68a !important;
  border-color: rgba(250, 204, 21, 0.3) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .mm-deal-next-label {
  color: #fbbf24 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .mm-deal-next-text {
  color: #fde68a !important;
  -webkit-text-fill-color: #fde68a !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-metrics {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-metric {
  background: var(--contact-dark-surface-3) !important;
  background-image: none !important;
  border-color: var(--contact-dark-border-soft) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-metric:hover {
  background: var(--contact-dark-hover) !important;
  border-color: rgba(136, 192, 208, 0.3) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-metric .k {
  color: var(--contact-dark-muted) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-metric .v {
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-footer {
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-footer-pill {
  background: rgba(240, 240, 240, 0.08) !important;
  color: var(--contact-dark-muted) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-delete-btn,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deal-edit-btn {
  background: var(--contact-dark-surface-3) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deals-empty {
  background: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-muted) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deals-section[data-mm-deals-tab="true"] .contact-deals-empty h3 {
  color: var(--contact-dark-text) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tasks-section .task-row:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tasks-section .mm-task-row:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-deal-card:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-related-card:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .activityLog[data-mm-activity-tab="true"] .activityItem.contact-activity-item:hover {
  background: var(--contact-dark-hover) !important;
  background-image: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-activity-body > div,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .mm-task-title,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .mm-rel-name {
  color: var(--contact-dark-text-2) !important;
  -webkit-text-fill-color: var(--contact-dark-text-2) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-activity-item .mm-pin-btn,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-activity-item button[data-pin],
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-activity-item button[data-unpin] {
  background: #2a2a2a !important;
  background-image: none !important;
  color: #fca5a5 !important;
  border-color: rgba(248, 113, 113, 0.28) !important;
  box-shadow: none !important;
}

/* Relationships empty state. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .relationshipsSection .contact-related-list,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .relationshipsSection .related-section-empty {
  background: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-muted) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .related-section-empty-text {
  color: var(--contact-dark-muted) !important;
  -webkit-text-fill-color: var(--contact-dark-muted) !important;
}

/* ── Tasks & Events tab ──────────────────────────────────────────
   Empty state ships a dark→#fff gradient, and completed rows use
   hardcoded light inline colors (#f9fafb / #e5e7eb / #909090) on
   classless divs. Neutralize both so the tab reads as true dark. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tasks-section .related-section-empty,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .related-section-empty {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-muted) !important;
  border: 1px solid var(--contact-dark-border-soft) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .related-section-empty-icon {
  background: rgba(136, 192, 208, 0.14) !important;
  background-image: none !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.3) !important;
  box-shadow: none !important;
}
/* "No tasks or events yet" empty state ships an inline navy heading and
   paragraph that vanish on the dark panel. Force readable text. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .related-section-empty h3 {
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .related-section-empty p {
  color: var(--contact-dark-muted) !important;
  -webkit-text-fill-color: var(--contact-dark-muted) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .related-section-empty .empty-add-event-btn {
  background: rgba(136, 192, 208, 0.12) !important;
  background-image: none !important;
  color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.35) !important;
}

/* ── Documents tab ───────────────────────────────────────────────
   The contact documents table renders inline styles bound to light
   theme tokens (--gray-50/-100/-500, --surface-1, --text-primary,
   --border, --accent-soft ...). Remap those tokens to dark values
   within the workspace so the header, cells, pills, selects and
   created dates all read correctly, then patch the few hardcoded
   light chips/buttons explicitly. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace {
  --gray-50: #1a1a1a;
  --gray-100: #2a2a2a;
  --gray-200: rgba(240, 240, 240, 0.16);
  --gray-300: rgba(240, 240, 240, 0.28);
  --gray-400: #6a6a6a;
  --gray-500: #909090;
  --surface-1: #1e1e1e;
  --surface-2: #222222;
  --border: rgba(240, 240, 240, 0.18);
  --border-subtle: rgba(240, 240, 240, 0.14);
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --text-tertiary: #8a8a8a;
  --accent-soft: rgba(136, 192, 208, 0.18);
  --primary-200: rgba(136, 192, 208, 0.42);
}
/* Header row + header cells */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-documents-table thead tr {
  background: #1a1a1a !important;
  border-bottom-color: rgba(240, 240, 240, 0.2) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-documents-table thead th {
  color: #9a9a9a !important;
  -webkit-text-fill-color: #9a9a9a !important;
  border-bottom-color: rgba(240, 240, 240, 0.2) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-th-actions-mark,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-th-actions-quick {
  color: #9a9a9a !important;
  -webkit-text-fill-color: #9a9a9a !important;
}
/* Rows */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-row {
  background: transparent !important;
  border-bottom-color: rgba(240, 240, 240, 0.14) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-row:hover {
  background: rgba(136, 192, 208, 0.07) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-title {
  color: #f0f0f0 !important;
  -webkit-text-fill-color: #f0f0f0 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-created-mobile,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-meta {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
}
/* Row action buttons (View / Edit / Share) */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-row-action,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-kebab-btn {
  background: #222222 !important;
  background-image: none !important;
  color: #dcdcdc !important;
  -webkit-text-fill-color: #dcdcdc !important;
  border: 1px solid rgba(240, 240, 240, 0.22) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-row-action:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-kebab-btn:hover {
  background: #1e1e1e !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: rgba(136, 192, 208, 0.45) !important;
}
/* Category trigger select */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .contact-doc-category-trigger {
  background: #1e1e1e !important;
  background-image: none !important;
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
  border-color: rgba(240, 240, 240, 0.24) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .contact-doc-category-trigger:hover {
  border-color: rgba(136, 192, 208, 0.42) !important;
  background: #222222 !important;
}
/* Selection tray + bulk buttons */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .contact-doc-selection-tray {
  background: #1a1a1a !important;
  background-image: none !important;
  border-color: rgba(240, 240, 240, 0.18) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .contact-doc-selection-count {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .contact-doc-bulk-btn {
  background: #222222 !important;
  background-image: none !important;
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.22) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .contact-doc-bulk-btn:disabled {
  background: #1e1e1e !important;
  color: #81a1c1 !important;
  -webkit-text-fill-color: #81a1c1 !important;
  border-color: rgba(240, 240, 240, 0.14) !important;
}
/* Linked-to chips (hardcoded light) */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-link-chip--deal,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .contact-doc-link-chip.mm-doc-link-chip--deal {
  background: #2a2a2a !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.4) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-link-chip--project,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .contact-doc-link-chip.mm-doc-link-chip--project {
  background: #242424 !important;
  color: #86efac !important;
  -webkit-text-fill-color: #86efac !important;
  border-color: rgba(74, 222, 128, 0.32) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-link-chip--neutral {
  background: #222222 !important;
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.22) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-linked-entity > span {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
}
/* Status "draft/shared" default badge (uses --gray-100 / --text-primary) */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-status-badges .badge {
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
}
/* Version pill */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-version-pill {
  background: rgba(136, 192, 208, 0.18) !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.4) !important;
}
/* Thumbnail chip */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-thumb {
  background: #222222 !important;
}
/* View Portal button (hardcoded light indigo) */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .contact-doc-toolbar-btn--portal {
  background: #2a2a2a !important;
  background-image: none !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.42) !important;
}
/* Empty state ("No documents yet" heading is hardcoded navy) */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-detail-tab-panel--documents h3,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace ~ * h3 {
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
}
/* Flyout / kebab menu */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-actions-menu {
  background: #1e1e1e !important;
  background-image: none !important;
  color: #dcdcdc !important;
  border: 1px solid rgba(240, 240, 240, 0.2) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-menu-secondary-head {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-menu-secondary-item {
  color: #dcdcdc !important;
  -webkit-text-fill-color: #dcdcdc !important;
  background: transparent !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-documents-workspace .mm-doc-menu-secondary-item:hover {
  background: #242424 !important;
}

/* ── Documents tab: beat the light "PHASE 27" pass ────────────────
   styles-momentum.css styles this tab via
   `body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] ...`
   (two IDs when it targets #docSelectionActions/#btnViewPortal etc.),
   which outranks workspace-scoped rules. Mirror that exact scope with
   an `html[data-theme="dark"]` prefix so dark always wins. */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] #docSelectionActions,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .contact-doc-selection-tray {
  background: #1a1a1a !important;
  background-image: none !important;
  border-color: rgba(240, 240, 240, 0.18) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] #docSelectionCount,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .contact-doc-selection-count {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] #docSelectionHint {
  background: #1e1e1e !important;
  border-color: rgba(136, 192, 208, 0.35) !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
}
/* Toolbar card + table wrapper — a later "premium" pass paints these with
   white gradients (linear-gradient(#fff,#f8fbff)); neutralize to dark. */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .contact-doc-toolbar {
  background: #1e1e1e !important;
  background-image: none !important;
  border-color: rgba(240, 240, 240, 0.12) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-documents-table-wrap,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .contact-doc-table-wrap {
  background: transparent !important;
  background-image: none !important;
  border-color: rgba(240, 240, 240, 0.14) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-documents-table thead tr {
  background: #1a1a1a !important;
  background-image: none !important;
}
/* Header cells: the premium pass paints each th with a light gradient
   background-image (kept the color transparent), so a color-only override
   left them light. Force a dark solid + kill the gradient. */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-documents-table th,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .pipe-list-table th,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .contact-doc-table-wrap thead th,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-documents-table thead th {
  background: #1a1a1a !important;
  background-image: none !important;
  color: #9a9a9a !important;
  -webkit-text-fill-color: #9a9a9a !important;
  border-bottom-color: rgba(240, 240, 240, 0.2) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-documents-table tbody tr.mm-doc-row td,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .pipe-list-table td {
  border-bottom-color: rgba(240, 240, 240, 0.12) !important;
  color: #c6c6c6 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-documents-table tbody tr.mm-doc-row:hover td,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .pipe-list-table tbody tr:hover td {
  background: rgba(136, 192, 208, 0.07) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-title {
  color: #f0f0f0 !important;
  -webkit-text-fill-color: #f0f0f0 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-created-mobile {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-meta {
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
  background: rgba(240, 240, 240, 0.12) !important;
  border-color: rgba(240, 240, 240, 0.22) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-meta--empty {
  color: #6a6a6a !important;
  -webkit-text-fill-color: #6a6a6a !important;
  background: transparent !important;
  border-color: transparent !important;
}
/* Category trigger */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .contact-doc-category-trigger {
  background: #1e1e1e !important;
  background-image: none !important;
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
  border-color: rgba(240, 240, 240, 0.24) !important;
}
/* Kebab + row action buttons */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-kebab-btn.doc-actions-trigger,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-row-action {
  background: #222222 !important;
  background-image: none !important;
  color: #dcdcdc !important;
  -webkit-text-fill-color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.22) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-kebab-btn.doc-actions-trigger:hover,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-row-action:hover {
  background: #1e1e1e !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: rgba(136, 192, 208, 0.45) !important;
}
/* Bulk buttons (non-primary) */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .contact-doc-bulk-btn {
  background: #222222 !important;
  background-image: none !important;
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.22) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .contact-doc-bulk-btn:disabled {
  background: #1e1e1e !important;
  color: #81a1c1 !important;
  -webkit-text-fill-color: #81a1c1 !important;
  border-color: rgba(240, 240, 240, 0.14) !important;
}
/* View Portal button */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] #btnViewPortal {
  background: #2a2a2a !important;
  background-image: none !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.42) !important;
}
/* Linked chips */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-link-chip--deal {
  background: #2a2a2a !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.4) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-link-chip--project {
  background: #242424 !important;
  color: #86efac !important;
  -webkit-text-fill-color: #86efac !important;
  border-color: rgba(74, 222, 128, 0.32) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-link-chip--neutral {
  background: #222222 !important;
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.22) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-linked-entity > span {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
}
/* Default status badge (draft/shared) */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-doc-status-badges .badge {
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
}
/* Flyout menu */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .doc-actions-menu.mm-doc-actions-menu {
  background: #1e1e1e !important;
  background-image: none !important;
  color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.2) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5) !important;
}
/* Table wrap dark surface behind rows */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] .mm-documents-table {
  background: transparent !important;
}
/* Empty-state heading (hardcoded navy) */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .attachmentsSection[data-mm-docs-tab="true"] h3 {
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
}

/* Completed-task cards */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .task-row--completed {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--contact-dark-border-soft) !important;
  opacity: 1 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .task-row-completed__icon {
  background: #222222 !important;
  background-image: none !important;
  color: #6ee7b7 !important;
  -webkit-text-fill-color: #6ee7b7 !important;
  border: 1px solid rgba(110, 231, 183, 0.24) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .task-row--completed .task-row-completed__title {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .task-row--completed .task-row-completed__date {
  color: #81a1c1 !important;
  -webkit-text-fill-color: #81a1c1 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .tasks-completed-header {
  color: var(--contact-dark-muted) !important;
  -webkit-text-fill-color: var(--contact-dark-muted) !important;
  border-top-color: rgba(240, 240, 240, 0.22) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .task-row--completed .pill {
  background: rgba(240, 240, 240, 0.12) !important;
  background-image: none !important;
  color: var(--contact-dark-muted) !important;
  -webkit-text-fill-color: var(--contact-dark-muted) !important;
  border-color: var(--contact-dark-border-soft) !important;
  opacity: 1 !important;
}

/* Invoicing/Projects table workspaces and empty states. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-invoicing-section[data-mm-invoicing-tab="true"] .contact-tab-shell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-projects-section[data-mm-projects-tab="true"] .contact-tab-shell,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-tab-table-shell {
  background: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-invoicing-section[data-mm-invoicing-tab="true"] .pipe-list-table,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-projects-section[data-mm-projects-tab="true"] .pipe-list-table,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-invoicing-section[data-mm-invoicing-tab="true"] .pipe-list-table thead tr,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-projects-section[data-mm-projects-tab="true"] .pipe-list-table thead tr {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-invoicing-section[data-mm-invoicing-tab="true"] .pipe-list-table th,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-projects-section[data-mm-projects-tab="true"] .pipe-list-table th {
  background: var(--contact-dark-surface-2) !important;
  color: var(--contact-dark-muted) !important;
  border-color: var(--contact-dark-border) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-invoicing-section[data-mm-invoicing-tab="true"] .pipe-list-table td,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-projects-section[data-mm-projects-tab="true"] .pipe-list-table td {
  background: var(--contact-dark-surface) !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-invoicing-section[data-mm-invoicing-tab="true"] .invoice-row:hover td,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-invoicing-section[data-mm-invoicing-tab="true"] .quote-row:hover td,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-projects-section[data-mm-projects-tab="true"] .project-row:hover td {
  background: var(--contact-dark-hover) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-invoicing-section .empty-state,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-invoicing-section .pipe-list-empty,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-invoicing-section [class*="empty"],
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-projects-section [class*="empty"] {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-muted) !important;
  border-color: var(--contact-dark-border-soft) !important;
}

/* Embedded Email tab. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-email-section,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__head,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__split,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__list-col,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__conv-col,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__conv-toolbar,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__empty {
  background: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__row {
  background: var(--contact-dark-surface-2) !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__row:hover,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__row.is-active {
  background: var(--contact-dark-hover) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__title,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__row-subj {
  color: var(--contact-dark-text) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__sub,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__row-meta {
  color: var(--contact-dark-muted) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__send-btn,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__inbox-btn,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .td-record-email__conv-close {
  background: var(--contact-dark-surface-3) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}

/* Final responsive/contact editor pass. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card--selected,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-bar,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-stack {
  background: #1a1a1a !important;
  background-image: none !important;
  color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.2) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card--selected {
  background: #2a2a2a !important;
  border-color: rgba(136, 192, 208, 0.48) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view :is(
  .contact-list-card-name,
  .contact-list-card-field-value
) {
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view .contact-list-card-field-label {
  color: #8a8a8a !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel :is(
  input:not([type="checkbox"]):not([type="radio"]),
  textarea,
  select,
  .activity-input,
  .note-input-field,
  .contact-note-input
) {
  background: #1e1e1e !important;
  background-image: none !important;
  color: #e6e6e6 !important;
  -webkit-text-fill-color: #e6e6e6 !important;
  border-color: rgba(240, 240, 240, 0.28) !important;
  box-shadow: none !important;
  color-scheme: dark;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel :is(
  .mm-overview-seg,
  .mm-mobile-bar,
  .mm-stat-chips,
  .fme-action-dock
) {
  background: #1a1a1a !important;
  background-image: none !important;
  color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.2) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel :is(
  .mm-overview-seg__btn,
  .mm-chip,
  .fme-action-dock__btn
) {
  background: #2a2a2a !important;
  background-image: none !important;
  color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.24) !important;
}

/* Less-common data-backed contact tabs: Documents, Client Room, Projects. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .attachmentsSection,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-portal-tab-section,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-projects-section {
  background: var(--contact-dark-canvas) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-doc-record-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .attachmentsSection [class*="card"],
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-portal-tab-section [class*="card"] {
  background: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
  box-shadow: none !important;
}

/* Authoritative static-surface pass.
   Full contact mode removes .contact-overview-simple-page from <body>, so the
   simple-mode dark overrides above do not win against the legacy light rules. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane :is(
  .contact-detail-tab-panel--details .contact-overview-progressive-section,
  .contact-detail-tab-panel--details .contact-method-chip,
  .contact-detail-tab-panel--details .detail-multi-field-entry,
  .contact-detail-tab-panel--details .contact-consent-group,
  .contact-detail-tab-panel--details .contact-detail-consent-group,
  .contact-detail-tab-panel--details .contact-focused-full-affordance,
  .crm-contact-overview-notes .overview-note-composer
) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane .contact-detail-tab-panel--details .overview-note-composer .mm-overview-composer-typebar {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane .contact-detail-tab-panel--details :is(
  .overview-note-composer textarea,
  .contact-method-chip .chip-ext-input,
  .contact-method-chip .phone-ext-input,
  .contact-method-chip input,
  .contact-method-chip select,
  .contact-method-chip textarea
) {
  background: var(--contact-dark-surface-3) !important;
  background-color: var(--contact-dark-surface-3) !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
  border-color: rgba(240, 240, 240, 0.3) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane .contact-detail-tab-panel--details .overview-note-composer textarea {
  background: #181818 !important;
  background-color: #181818 !important;
  border: 1px solid transparent !important;
  border-color: transparent !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane .crm-contact-overview-notes :is(
  .mm-overview-composer-typebar
) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane .crm-contact-overview-notes :is(
  .overview-note-composer textarea
) {
  background: #181818 !important;
  background-color: #181818 !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
  border: 1px solid transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane .contact-detail-tab-panel--details .contact-focused-full-affordance__btn {
  background: var(--contact-dark-surface-3) !important;
  background-color: var(--contact-dark-surface-3) !important;
  background-image: none !important;
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
  border-color: rgba(136, 192, 208, 0.38) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane .contact-detail-tab-panel--details .contact-overview-progressive-section__summary .contact-field-group-title::after {
  background: #2e2e2e !important;
  background-color: #2e2e2e !important;
  background-image: none !important;
  color: #dcdcdc !important;
  -webkit-text-fill-color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.3) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane .contact-detail-tab-panel--details :is(
  .contact-method-chip .chip-label,
  .crm-contact-overview-notes .related-section-count,
  .crm-contact-overview-notes .mm-activity-copy-btn
) {
  background: #2e2e2e !important;
  background-color: #2e2e2e !important;
  background-image: none !important;
  color: #dcdcdc !important;
  -webkit-text-fill-color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.24) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane .contact-header-ai-assistant-trigger {
  background: #2a2a2a !important;
  background-color: #2a2a2a !important;
  background-image: none !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.42) !important;
  box-shadow: none !important;
}

/* Field VALUE text legibility.
   Styled-select values (STATUS/PLAYBOOK/LEAD FROM/TOUCH TYPE) and contact
   method chip values (emails/phones) ship a dark `-webkit-text-fill-color`
   that overrides their light `color`, rendering near-black on the dark band.
   Force a bright fill so the value text is readable. Broad #detailPanel scope
   so it applies on every tab, not just Details. */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .mm-styled-select__value,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .mm-styled-select__trigger .mm-styled-select__value,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .contact-method-chip .chip-value,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .chip-value,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .detailRow .value .chip-value {
  color: #f0f0f0 !important;
  -webkit-text-fill-color: #f0f0f0 !important;
}

html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .mm-styled-select__chevron,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .mm-styled-select__trigger .mm-styled-select__chevron {
  color: #8a8a8a !important;
  -webkit-text-fill-color: #8a8a8a !important;
  opacity: 0.9 !important;
}

/* Placeholder styled-select values stay muted but still legible */
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .mm-styled-select__value.is-placeholder,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .mm-styled-select__value[data-placeholder="true"] {
  color: #81a1c1 !important;
  -webkit-text-fill-color: #81a1c1 !important;
}

/* Contact Overview static checklist.
   The production playbook markup is not a .contact-details-card, so it must
   explicitly beat the light #fff surface and text rules in styles.css and
   styles-momentum.css. Keep this independent of hover and simple/full mode. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--overview .contact-overview-playbook {
  background: var(--contact-dark-surface) !important;
  background-color: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--overview .contact-overview-playbook__head {
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--overview :is(
  .contact-overview-playbook__title,
  .contact-overview-playbook__step-label,
  .playbook-step-row--next .contact-overview-playbook__step-label
) {
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--overview :is(
  .contact-overview-playbook__progress,
  .contact-overview-playbook__status,
  .contact-overview-playbook__step,
  .contact-overview-playbook__step-num,
  .playbook-step-row--next .contact-overview-playbook__step-num
) {
  color: var(--contact-dark-muted) !important;
  -webkit-text-fill-color: var(--contact-dark-muted) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--overview .contact-overview-playbook__check {
  color-scheme: dark !important;
  accent-color: #87a6c4 !important;
  background-color: var(--contact-dark-surface-3) !important;
  border-color: rgba(135, 166, 196, 0.58) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--overview .contact-overview-playbook__step:has(.contact-overview-playbook__check:not(:disabled)):hover {
  background-color: rgba(136, 192, 208, 0.14) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--overview .contact-overview-playbook__step:has(.contact-overview-playbook__check:not(:disabled)):hover :is(
  .contact-overview-playbook__step-label,
  .contact-overview-playbook__step-num
) {
  color: #222222 !important;
  -webkit-text-fill-color: #222222 !important;
}

/* Keep the adjacent quick-notes surface dark even before the record-visible
   class settles and regardless of the active Overview display mode. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--overview .contact-overview-quick-notes.contact-details-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--overview .contact-overview-quick-notes .overview-note-composer {
  background: var(--contact-dark-surface) !important;
  background-color: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
}

/* Contact Email tab conversation.
   email-inbox.css is deferred and is appended after this stylesheet, so every
   light, static message surface needs an explicit dark override. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--email :is(
  .td-record-email,
  .td-record-email__head,
  .td-record-email__split,
  .td-record-email__list-col,
  .td-record-email__conv-col,
  .td-record-email__conv-toolbar,
  .td-record-email__thread-mount,
  .td-record-email__thread-inner,
  .td-inbox,
  .td-inbox__message-list,
  .td-inbox__placeholder
) {
  background: var(--contact-dark-surface) !important;
  background-color: var(--contact-dark-surface) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border) !important;
  box-shadow: none !important;
  color-scheme: dark;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--email :is(
  .td-record-email__row,
  .td-inbox__msg-bubble,
  .td-inbox__msg--out .td-inbox__msg-bubble,
  .td-inbox__msg--in .td-inbox__msg-bubble,
  .td-inbox__attachments
) {
  background: var(--contact-dark-surface-2) !important;
  background-color: var(--contact-dark-surface-2) !important;
  background-image: none !important;
  color: var(--contact-dark-text-2) !important;
  border-color: var(--contact-dark-border-soft) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--email .td-record-email__row:is(:hover, .is-active) {
  background: var(--contact-dark-hover) !important;
  background-color: var(--contact-dark-hover) !important;
  border-color: rgba(136, 192, 208, 0.42) !important;
  box-shadow: inset 2px 0 0 rgba(136, 192, 208, 0.62) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--email :is(
  .td-record-email__title,
  .td-record-email__row-subj,
  .td-record-email__thread-title,
  .td-inbox__msg-body,
  .td-inbox__msg-html,
  .td-inbox__att-name
) {
  color: var(--contact-dark-text) !important;
  -webkit-text-fill-color: var(--contact-dark-text) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--email :is(
  .td-record-email__sub,
  .td-record-email__row-meta,
  .td-record-email__conv-hint,
  .td-record-email__thread-participants,
  .td-inbox__msg-meta,
  .td-inbox__att-note
) {
  color: var(--contact-dark-muted) !important;
  -webkit-text-fill-color: var(--contact-dark-muted) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--email :is(
  .td-record-email__inbox-btn,
  .td-record-email__conv-close,
  .td-record-email__thread-inbox-btn,
  .td-inbox__msg-toggle,
  .td-inbox__att-action
) {
  background: var(--contact-dark-surface-3) !important;
  background-color: var(--contact-dark-surface-3) !important;
  background-image: none !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
  border-color: rgba(136, 192, 208, 0.34) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--email :is(
  .td-record-email__send-btn,
  .td-record-email__thread-reply-btn,
  .td-record-email__thread-btn
) {
  background: #1e1e1e !important;
  background-color: #1e1e1e !important;
  background-image: none !important;
  color: #222222 !important;
  -webkit-text-fill-color: #222222 !important;
  border-color: rgba(135, 166, 196, 0.44) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane .contact-detail-tab-panel--email :is(
  .td-record-email__ctx-tag,
  .td-record-email__unread-badge
) {
  background: #2e2e2e !important;
  background-color: #2e2e2e !important;
  background-image: none !important;
  color: #dcdcdc !important;
  -webkit-text-fill-color: #dcdcdc !important;
  border-color: rgba(240, 240, 240, 0.24) !important;
  box-shadow: none !important;
}

/* The active Email tab and its count should read as selected, not illuminated. */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane #contact-detail-tab-email:is(.active, .is-active) {
  background: #222222 !important;
  border-color: rgba(136, 192, 208, 0.3) !important;
  box-shadow: inset 0 0 0 1px rgba(136, 192, 208, 0.12) !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane #contact-detail-tab-email:is(.active, .is-active) :is(
  .deal-section-tab__icon,
  .deal-section-tab__label
) {
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view #detailPanel.detailPane #contact-detail-tab-email:is(.active, .is-active) .contact-detail-tab-count {
  background: #1e1e1e !important;
  color: #c6c6c6 !important;
  border-color: rgba(240, 240, 240, 0.18) !important;
  box-shadow: none !important;
}

/* Contact Details view mode: plain text values (no field boxes). Edit mode keeps chrome. */
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .inline-input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) select.inline-input,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) textarea.inline-input,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) select,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .mm-styled-select.mm-styled-select--disabled .mm-styled-select__trigger,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .multi-field-detail-row:not([data-section-editing="1"]) .detail-multi-type-select,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .multi-field-detail-row:not([data-section-editing="1"]) .detail-multi-value-input,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .multi-field-detail-row:not([data-section-editing="1"]) .detail-multi-label-input,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .multi-field-detail-row:not([data-section-editing="1"]) .detail-multi-ext-input,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .multi-field-detail-row:not([data-section-editing="1"]) .detail-address-input,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .inline-input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) select,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) textarea.inline-input,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-simple-fields:not(.editing) .detail-multi-type-select,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-simple-fields:not(.editing) .detail-multi-value-input,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-simple-fields:not(.editing) .detail-multi-label-input,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-simple-fields:not(.editing) .detail-multi-ext-input {
  border: 1px solid transparent !important;
  border-color: transparent !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .detailRow:hover .inline-input,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .detailRow:hover select,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .detailRow:hover .mm-styled-select.mm-styled-select--disabled .mm-styled-select__trigger,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .multi-field-detail-row:not([data-section-editing="1"]):hover .detail-multi-type-select,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .multi-field-detail-row:not([data-section-editing="1"]):hover .detail-multi-value-input {
  border-color: transparent !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Phone/email/social rows: kill entry + chip capsules in view mode (beats authoritative surface pass). */
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .multi-field-detail-row:not([data-section-editing="1"]) .detail-multi-field-entry,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .multi-field-detail-row:not([data-section-editing="1"]) .detail-address-entry,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .contact-method-chip,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields:not(.editing) .detail-multi-field-entry,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields:not(.editing) .contact-method-chip {
  border: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Address block, website link, consent group — borderless in view mode */
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .contact-address-view-block,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .contact-overview-website-link,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .contact-detail-consent-group,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .contact-consent-group,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields:not(.editing) .contact-address-view-block,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields:not(.editing) .contact-overview-website-link,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields:not(.editing) .contact-detail-consent-group,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields:not(.editing) .contact-consent-group,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields:not(.editing) .contact-consent-option {
  border: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .contact-overview-website-link {
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  color: #87a6c4 !important;
  -webkit-text-fill-color: #87a6c4 !important;
}

html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .contact-address-view-block {
  padding: 0 !important;
  gap: 2px !important;
}

html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .contact-address-view-line--type {
  color: #e6e6e6 !important;
}

html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .crm-contact-overview-fields.contact-overview-simple-fields:not(.editing) .contact-address-view-line--country {
  color: #8a8a8a !important;
}

/* “Address same as company” banner — dark surface (beats light #222222 hardcodes) */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detail-person-same-company-line,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .detail-person-same-company-line,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .detail-person-same-company-line {
  background: rgba(129, 161, 193, 0.12) !important;
  background-color: rgba(129, 161, 193, 0.12) !important;
  background-image: none !important;
  border: 1px solid rgba(96, 165, 250, 0.35) !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detail-person-same-company-line__label,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detail-person-same-company-line__title,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .detail-person-same-company-line__label,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .detail-person-same-company-line__title {
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .detail-person-same-company-line__hint,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .detail-person-same-company-line__hint {
  color: #87a6c4 !important;
  -webkit-text-fill-color: #87a6c4 !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .btn-open-company-for-address,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .btn-open-company-for-address {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #87a6c4 !important;
  -webkit-text-fill-color: #87a6c4 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .btn-open-company-for-address:hover,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .btn-open-company-for-address:hover {
  color: #88c0d0 !important;
  -webkit-text-fill-color: #88c0d0 !important;
}

/* Location & links (progressive): one border on <details>, not also on the outer field-group */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .crm-contact-overview-fields .contact-field-group.contact-field-group--progressive,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-group.contact-field-group--progressive,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-group.contact-field-group--progressive {
  border: none !important;
  border-color: transparent !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 10px !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-progressive-section,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .contact-overview-progressive-section,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-progressive-section {
  border: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  background: var(--contact-dark-surface, #1a1a1a) !important;
  background-color: var(--contact-dark-surface, #1a1a1a) !important;
  box-shadow: none !important;
  outline: none !important;
  overflow: visible !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-progressive-section__summary .contact-field-group-title,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .contact-overview-progressive-section__summary .contact-field-group-title,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .contact-overview-progressive-section__summary .contact-field-group-title {
  border: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Primary company row controls — borderless ghosts (hover wash only) */
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .btn-link-primary-company-detail,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .btn-change-primary-company,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .btn-add-relationship-overview,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .btn-link-primary-company-detail,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .btn-change-primary-company,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .btn-add-relationship-overview {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-color: transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  color: #a8a8a8 !important;
  -webkit-text-fill-color: #a8a8a8 !important;
}
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .btn-link-primary-company-detail:hover,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .btn-change-primary-company:hover,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .btn-add-relationship-overview:hover,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .btn-link-primary-company-detail:hover,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .btn-change-primary-company:hover,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .btn-add-relationship-overview:hover {
  background: rgba(240, 240, 240, 0.08) !important;
  border-color: transparent !important;
  color: #f0f0f0 !important;
  -webkit-text-fill-color: #f0f0f0 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .primary-company-role,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .primary-company-role {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--contact-dark-muted, #8a8a8a) !important;
  -webkit-text-fill-color: var(--contact-dark-muted, #8a8a8a) !important;
}

/* Section labels: same surface as the section (no contrasting header strip) */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-field-group-title,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .related-section-header,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .contact-overview-record-card__head,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .contact-field-group-title,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel.detailPane[data-contact-overview-mode="simple"] .contact-detail-tab-panel--details .crm-contact-overview-fields.contact-details-card .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-group-title,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-fields .contact-field-group[data-contact-overview-first-fields] > .contact-field-group-title,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .crm-contact-overview-notes .related-section-header {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body[data-theme="momentum"] .mm-timeline-group,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .mm-timeline-group {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Primary company/contact row — no highlight strip */
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .primary-contact-row,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .primary-company-card,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .primary-contact-card,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .primary-contact-row,
html[data-theme="dark"] body[data-theme="momentum"].contact-overview-simple-page .app-shell.contacts-v2-view.contact-detail-visible #detailPanel[data-contact-overview-mode="simple"] .primary-company-card,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .primary-contact-row,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel[data-contact-overview-mode="simple"] .primary-company-card {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Company/person primary editor — beat light-blue !important form chrome */
html[data-theme="dark"] .inline-primary-contact-form,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form,
html[data-theme="dark"] body[data-theme="momentum"] .app-shell.contacts-v2-view.contact-detail-visible #detailPanel .inline-primary-contact-form,
html[data-theme="dark"] body.contact-overview-simple-page[data-theme="momentum"] #detailPanel .inline-primary-contact-form {
  background: #1a1a1a !important;
  background-color: #1a1a1a !important;
  background-image: none !important;
  border: 1px solid rgba(240, 240, 240, 0.14) !important;
  border-color: rgba(240, 240, 240, 0.14) !important;
  color: #f0f0f0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .inline-primary-contact-form .inline-rel-section-label,
html[data-theme="dark"] .inline-primary-contact-form .label-text,
html[data-theme="dark"] .inline-primary-contact-form #inlineRelNewPersonSection > div:first-child,
html[data-theme="dark"] .inline-primary-contact-form #inlineRelNewCompanySection > div:first-child,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form .inline-rel-section-label,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form .label-text,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form #inlineRelNewPersonSection > div:first-child,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form #inlineRelNewCompanySection > div:first-child {
  color: #c6c6c6 !important;
  -webkit-text-fill-color: #c6c6c6 !important;
}
html[data-theme="dark"] .inline-primary-contact-form .label-text,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form .label-text {
  color: #d4d4d4 !important;
  -webkit-text-fill-color: #d4d4d4 !important;
}
html[data-theme="dark"] .inline-primary-contact-form #inlineRelNewPersonSection,
html[data-theme="dark"] .inline-primary-contact-form #inlineRelNewCompanySection,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form #inlineRelNewPersonSection,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form #inlineRelNewCompanySection {
  background: #141414 !important;
  background-color: #141414 !important;
  background-image: none !important;
  border: 1px solid rgba(240, 240, 240, 0.12) !important;
  color: #f0f0f0 !important;
}
html[data-theme="dark"] .inline-primary-contact-form .input,
html[data-theme="dark"] .inline-primary-contact-form input.input,
html[data-theme="dark"] .inline-primary-contact-form select.input,
html[data-theme="dark"] .inline-primary-contact-form .inline-rel-input-shell .input,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form :is(.input, input.input, select.input),
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form .inline-rel-input-shell .input {
  background: #1e1e1e !important;
  background-color: #1e1e1e !important;
  border: 1px solid rgba(240, 240, 240, 0.18) !important;
  color: #f0f0f0 !important;
  -webkit-text-fill-color: #f0f0f0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .inline-primary-contact-form .input::placeholder,
html[data-theme="dark"] .inline-primary-contact-form input.input::placeholder,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form .input::placeholder {
  color: #909090 !important;
  -webkit-text-fill-color: #909090 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .inline-primary-contact-form .input:focus,
html[data-theme="dark"] .inline-primary-contact-form input.input:focus,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form .input:focus {
  border-color: #81a1c1 !important;
  box-shadow: 0 0 0 2px rgba(129, 161, 193, 0.22) !important;
}
html[data-theme="dark"] .inline-primary-contact-form p.inline-new-company-note,
html[data-theme="dark"] .inline-primary-contact-form p.inline-new-person-note,
html[data-theme="dark"] .inline-primary-contact-form .inline-primary-company-optional-hint,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form p.inline-new-company-note {
  background: rgba(129, 161, 193, 0.12) !important;
  background-color: rgba(129, 161, 193, 0.12) !important;
  border-color: rgba(129, 161, 193, 0.28) !important;
  color: #c6c6c6 !important;
}
html[data-theme="dark"] .inline-primary-contact-form p.inline-new-company-note svg,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form p.inline-new-company-note svg {
  color: #81a1c1 !important;
}
html[data-theme="dark"] .inline-primary-contact-form .inline-rel-actions .btn-inline-primary-cancel,
html[data-theme="dark"] .inline-primary-contact-form .inline-rel-actions .btn-inline-primary-company-cancel,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form .inline-rel-actions .btn-inline-primary-cancel,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form .inline-rel-actions .btn-inline-primary-company-cancel {
  background: #1e1e1e !important;
  border: 1px solid rgba(240, 240, 240, 0.18) !important;
  color: #c6c6c6 !important;
}
html[data-theme="dark"] .inline-primary-contact-form .inline-rel-actions .btn-inline-primary-cancel:hover,
html[data-theme="dark"] .inline-primary-contact-form .inline-rel-actions .btn-inline-primary-company-cancel:hover {
  background: #242424 !important;
  color: #f0f0f0 !important;
}
html[data-theme="dark"] .primary-contact-empty-row.inline-primary-form-host,
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .primary-contact-empty-row.inline-primary-form-host {
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .inline-rel-contact-results,
html[data-theme="dark"] .inline-rel-contact-results-portal,
html[data-theme="dark"] body[data-theme="momentum"] .inline-rel-contact-results,
html[data-theme="dark"] body[data-theme="momentum"] .inline-rel-contact-results-portal {
  background: #1a1a1a !important;
  background-color: #1a1a1a !important;
  border: 1px solid rgba(240, 240, 240, 0.16) !important;
  color: #f0f0f0 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55) !important;
}
html[data-theme="dark"] .inline-rel-contact-results .inline-rel-result-item,
html[data-theme="dark"] .inline-rel-contact-results-portal .inline-rel-result-item {
  border-bottom-color: rgba(240, 240, 240, 0.08) !important;
  color: #f0f0f0 !important;
}
html[data-theme="dark"] .inline-rel-contact-results .inline-rel-result-item:hover,
html[data-theme="dark"] .inline-rel-contact-results-portal .inline-rel-result-item:hover {
  background: rgba(129, 161, 193, 0.16) !important;
}
html[data-theme="dark"] body[data-theme="momentum"] #detailPanel .inline-primary-contact-form .input.inline-rel-search-picked,
html[data-theme="dark"] .inline-primary-contact-form .input.inline-rel-search-picked,
html[data-theme="dark"] .inline-rel-input-shell .input.inline-rel-search-picked {
  background: rgba(129, 161, 193, 0.18) !important;
  background-color: rgba(129, 161, 193, 0.18) !important;
  border-color: #81a1c1 !important;
  color: #f0f0f0 !important;
}

html[data-theme="dark"] .inline-rel-contact-results .inline-rel-result-name,
html[data-theme="dark"] .inline-rel-contact-results-portal .inline-rel-result-name {
  color: #f0f0f0 !important;
}
html[data-theme="dark"] .inline-rel-contact-results .inline-rel-result-meta,
html[data-theme="dark"] .inline-rel-contact-results-portal .inline-rel-result-meta {
  color: #909090 !important;
}

/* Sales simplicity mode surfaces */
body.td-sales-simple [data-sales-mode="full"] {
  display: none !important;
}
body:not(.td-sales-simple) [data-sales-mode="simple"] {
  display: none !important;
}
body.td-sales-simple .app-shell.contacts-v2-view #filtersSection #addContactQuickBtn,
body.td-sales-simple #addContactQuickBtn[data-sales-mode="full"] {
  display: none !important;
}

/* Sales Simple: Overview keeps Tasks / Deals / Communications. Park delivery KPIs. */
body.td-sales-simple #detailPanel .crm-overview-hero--contact-command .crm-overview-hero__status-card-shell--financials,
body.td-sales-simple #detailPanel .crm-overview-hero--contact-command .crm-overview-hero__status-card-shell--client-room,
body.td-sales-simple #detailPanel .crm-overview-hero--contact-command .crm-overview-hero__status-card-shell--projects,
body.td-sales-simple #detailPanel .crm-overview-hero__room-strip {
  display: none !important;
}

.td-sales-training-card__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 8px 0 12px;
}
.td-sales-training-card__table th,
.td-sales-training-card__table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  vertical-align: top;
}
.td-sales-training-card__rules {
  margin: 0 0 12px;
  padding-left: 1.25rem;
  line-height: 1.45;
}
.contact-simple-status-pill {
  vertical-align: middle;
}

.contact-detail-header-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px;
  max-width: 100%;
}

.contact-detail-header-status-row .contact-simple-status-pill {
  font-size: 12px;
  padding: 5px 10px;
}

.contact-detail-header-status-row .btn.small {
  font-size: 11px;
  padding: 4px 10px;
}

.contact-status-detail-row--secondary .contact-simple-status-row--detail {
  opacity: 0.92;
}

.sales-simple-people-hint {
  margin: 0 16px 8px;
  padding: 0;
  font-size: 12px;
  font-weight: 550;
  color: var(--text-tertiary, #64748b);
  letter-spacing: 0.01em;
}

.contact-simple-status-pill--deal,
.contact-simple-status-pill--customer-deal,
.contact-simple-status-pill--tried[data-contact-status-tries-glance] {
  cursor: pointer;
  border: none;
  background: inherit;
  font: inherit;
  padding: 0;
}

button.contact-simple-status-pill--tried {
  font: inherit;
}

.contact-status-deal-glance {
  position: relative;
  min-width: 220px;
  max-width: min(92vw, 320px);
  padding: 12px 14px 10px;
  border-radius: 12px;
  background: var(--surface-1, #fff);
  border: 1px solid var(--border-light, #e2e8f0);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  color: var(--text-primary, #0f172a);
  font-size: 12px;
  line-height: 1.4;
}

.contact-status-deal-glance__title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
  padding-right: 20px;
}

.contact-status-deal-glance__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-top: 1px solid var(--border-light, #e2e8f0);
}

.contact-status-deal-glance__row:first-of-type {
  border-top: none;
}

.contact-status-deal-glance__label {
  color: var(--text-tertiary, #64748b);
  flex-shrink: 0;
}

.contact-status-deal-glance__value {
  text-align: right;
  font-weight: 600;
}

.contact-status-deal-glance__close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  color: var(--text-tertiary, #64748b);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.contact-status-tries-glance .contact-status-deal-glance__list {
  margin: 8px 0 0;
  padding: 0 0 0 1.1rem;
  max-height: 180px;
  overflow: auto;
}

.contact-status-tries-glance .contact-status-deal-glance__list li {
  margin: 0 0 6px;
  color: var(--text-secondary, #475569);
}

.contact-status-tries-glance .contact-status-deal-glance__kind {
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.contact-status-tries-glance .contact-status-deal-glance__tip {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border-light, #e2e8f0);
  color: var(--text-secondary, #475569);
  font-weight: 550;
}

.contact-status-tries-glance__replied {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #15803d;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.28);
  white-space: nowrap;
}

html[data-theme="dark"] .contact-status-tries-glance__replied {
  color: #86efac;
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.35);
}

/* Desktop: wide enough for long “Email … · MM/DD/YYYY” lines on one row */
@media (min-width: 768px) {
  .contact-status-tries-glance.contact-status-deal-glance {
    min-width: min(92vw, 520px);
    max-width: min(94vw, 640px);
    width: max-content;
  }

  .contact-status-tries-glance .contact-status-deal-glance__list li {
    white-space: nowrap;
  }
}

.crm-toast--action__btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-toast--action__primary,
.crm-toast--action__secondary {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.crm-toast--action__primary {
  background: rgba(255, 255, 255, 0.95);
  color: #1d4ed8;
}

.crm-toast--action__secondary {
  background: transparent;
}
