/* ================================================================
   Discovery Explorer — reuses the Interceptors panel shell (ipd-*,
   interceptor-panel.css) and the biz events tab version pill
   (be-target-ver-pill, biz-events-tab.css); only the explorer's own
   controls (multi-selects, time range picker) and cells live here.
   ================================================================ */

.dex-dialog .dex-controls-row--secondary {
  border-top: 1px solid var(--bm-border-subtle) !important;
  padding-top: 10px !important;
}

/* ── Multi-selects: shaped like .ipd-select ─────────────────────── */

.dex-dialog md-select.dex-multi {
  margin: 0 !important;
  height: 34px;
  min-width: 160px;
  max-width: 220px;
  padding: 0 6px 0 10px;
  background: var(--bm-surface-2);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-r-md);
  transition: var(--bm-t);
}

.dex-dialog md-select.dex-multi:not([disabled]):hover {
  background: var(--bm-surface-3);
  border-color: var(--bm-border-strong);
}

.dex-dialog md-select.dex-multi:focus {
  background: var(--bm-surface);
  border-color: var(--bm-teal-500);
  box-shadow: 0 0 0 3px rgba(0, 191, 165, .10);
}

.dex-dialog md-select.dex-multi--active {
  background: var(--bm-teal-50);
  border-color: var(--bm-teal-200);
}

.dex-dialog md-select.dex-multi[disabled] {
  opacity: .55;
}

.dex-dialog md-select.dex-multi .md-select-value {
  border-bottom: 0 !important;
  min-height: 32px;
  padding: 0;
  font-family: var(--bm-font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--bm-text-primary);
}

.dex-dialog md-select.dex-multi .md-select-value.md-select-placeholder {
  color: var(--bm-text-primary);
}

.dex-dialog md-select.dex-multi--active .md-select-value {
  color: var(--bm-teal-600);
  font-weight: 600;
}

/* Options panel. The checkbox of each md-option is absolutely positioned
   against .md-container (Angular Material quirk, same fix as the Metrics
   Explorer's .mex-dropdown-panel): the label needs room on its left. */
.dex-multi-panel md-select-menu,
.dex-multi-panel md-select-menu md-content {
  max-height: 320px;
  min-width: 260px;
}

.dex-multi-panel md-option {
  height: auto !important;
  min-height: 44px;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  transition: var(--bm-t);
}

.dex-multi-panel md-option .md-text {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  padding-left: 44px !important;
  font-family: var(--bm-font-body) !important;
  font-size: 13px;
  line-height: 1.3;
}

/* Checkbox: the app's checked style (as in the Clients dialogs' md-checkbox and the
   Client Types multi-select) — solid brand fill, white check. */
.dex-multi-panel md-option[selected] .md-icon {
  background-color: var(--bm-teal-500) !important;
  border-color: var(--bm-teal-500) !important;
}

.dex-multi-panel md-option[selected] .md-icon:after {
  border-color: #fff !important;
}

.dex-multi-panel md-option:hover {
  background-color: var(--bm-surface-2) !important;
}

.dex-multi-panel md-option[selected] {
  background-color: var(--bm-teal-50) !important;
}

.dex-multi-panel md-option .md-ripple-container {
  display: none !important;
}

.dex-multi-panel .dex-option-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.dex-multi-panel .dex-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--bm-text-primary);
  font-weight: 500;
}

.dex-multi-panel .dex-option-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  color: var(--bm-text-muted);
  font-size: 11px;
  font-weight: 400;
}

.dex-multi-panel md-option[selected] .dex-option-name {
  color: var(--bm-teal-600);
  font-weight: 600;
}

.dex-ver-pill {
  padding: 1px 6px;
  border-radius: var(--bm-r-pill);
  background: var(--bm-navy-50, #F4F5FA);
  color: var(--bm-text-secondary);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Time range picker ─────────────────────────────────────────── */

.dex-dialog .dex-time-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  min-width: 170px;
  max-width: 340px;
  padding: 0 6px 0 10px;
  font-family: var(--bm-font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--bm-text-primary);
  background: var(--bm-surface-2);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-r-md);
  cursor: pointer;
  transition: var(--bm-t);
}

.dex-dialog .dex-time-trigger:hover {
  background: var(--bm-surface-3);
  border-color: var(--bm-border-strong);
}

.dex-dialog .dex-time-trigger--active {
  background: var(--bm-teal-50);
  border-color: var(--bm-teal-200);
  color: var(--bm-teal-600);
  font-weight: 600;
}

.dex-dialog .dex-time-trigger md-icon {
  font-size: 17px;
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  color: currentColor;
}

.dex-dialog .dex-time-trigger__label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.dex-time-menu {
  padding: 12px 14px !important;
  max-height: none !important;
  font-family: var(--bm-font-body);
}

.dex-time-menu .dex-time-section-label {
  margin: 2px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bm-text-muted);
}

.dex-time-menu .dex-time-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.dex-time-menu .dex-preset-btn {
  padding: 5px 10px;
  font-family: var(--bm-font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--bm-text-secondary);
  background: var(--bm-surface-2);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-r-pill);
  cursor: pointer;
  transition: var(--bm-t);
}

.dex-time-menu .dex-preset-btn:hover {
  border-color: var(--bm-border-strong);
  color: var(--bm-text-primary);
}

.dex-time-menu .dex-preset-btn--active {
  background: var(--bm-teal-50);
  border-color: var(--bm-teal-200);
  color: var(--bm-teal-600);
}

.dex-time-menu .dex-time-custom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dex-time-menu .dex-time-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dex-time-menu .dex-time-input {
  width: 100%;
  min-width: 0 !important;
  padding: 0 10px !important;
  box-sizing: border-box;
}

.dex-time-menu .dex-time-error {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--bm-error-text);
  background: var(--bm-error-bg);
  border: 1px solid var(--bm-error-border);
  border-radius: var(--bm-r-sm);
}

.dex-time-menu .dex-time-error md-icon {
  font-size: 16px;
  width: 16px;
  height: 16px;
  min-height: 16px;
  color: currentColor;
}

.dex-time-menu .dex-time-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dex-time-menu .dex-apply-btn {
  background: var(--bm-teal-500) !important;
  color: var(--bm-text-inverse) !important;
}

.dex-time-menu .dex-apply-btn:hover {
  background: var(--bm-teal-600) !important;
}

/* ── Sortable headers (Consolidated Stats' click-to-sort pattern) ── */

.dex-dialog .dex-th-sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--bm-t);
}

.dex-dialog .dex-th-sortable:hover {
  color: var(--bm-teal-600) !important;
}

.dex-dialog .dex-th-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.dex-dialog .dex-sort-icon {
  font-size: 13px !important;
  width: 13px !important;
  height: 13px !important;
  min-width: 13px !important;
  min-height: 13px !important;
  margin: 0 !important;
  color: var(--bm-teal-600) !important;
}

/* ── Table cells ───────────────────────────────────────────────────
   The count pill, biz event / application lines and "Not classified" pill are
   shared with the Transaction Details dialog (.dtx-dialog). */

.dex-dialog .dex-table .ipd-td {
  vertical-align: top;
}

.dex-dialog .dex-tx-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dex-dialog .dex-tx-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-left: 24px;
}

.dex-dialog .dex-tx-service {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--bm-text-muted);
}

.dex-dialog .dex-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
/* The environment under the profile in the TX list / Biz Events list: the badge inherits the cell's typography, which made it
   larger than the profile name above it; same size as that line */
.dex-dialog .dex-stack .bm-env--compact { font-size: 12px; line-height: 1.3; }


.dex-dialog .dex-facet {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  font-size: 12px;
  color: var(--bm-text-primary);
}

.dex-dialog .dex-facet__icon {
  font-size: 14px;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  color: var(--bm-text-muted);
}

.dex-dialog .dex-facet--biz-event .dex-facet__icon {
  color: var(--bm-teal-600);
}

.dex-dialog .dex-facet__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.dex-dialog .dex-facet__sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--bm-text-muted);
}

.dex-dialog .dex-facet--muted .dex-facet__name {
  color: var(--bm-text-secondary);
  font-style: italic;
  font-weight: 400;
}

/* Biz event: its application (line 1, prominent), then the biz event and its
   version (line 2). Both wrap rather than being cut. */
.dex-dialog .dex-biz-event,
.dtx-dialog .dex-biz-event {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}

.dex-dialog .dex-biz-event + .dex-biz-event,
.dtx-dialog .dex-biz-event + .dex-biz-event {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--bm-border-subtle);
}

.dex-dialog .dex-biz-event__app,
.dtx-dialog .dex-biz-event__app {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--bm-text-primary);
  overflow-wrap: anywhere;
}

.dex-dialog .dex-biz-event__event,
.dtx-dialog .dex-biz-event__event {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 5px;
  padding-left: 19px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--bm-text-secondary);
}

.dex-dialog .dex-biz-event__name,
.dtx-dialog .dex-biz-event__name {
  overflow-wrap: anywhere;
}

.dex-dialog .dex-biz-event__app-icon,
.dex-dialog .dex-biz-event__icon,
.dtx-dialog .dex-biz-event__app-icon,
.dtx-dialog .dex-biz-event__icon {
  font-size: 14px !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  /* md-icon's own margin: auto would push the text away in this flex row */
  margin: 1px 0 0 0 !important;
}

.dex-dialog .dex-biz-event__app-icon,
.dtx-dialog .dex-biz-event__app-icon {
  color: var(--bm-text-muted) !important;
}

.dex-dialog .dex-biz-event__icon,
.dtx-dialog .dex-biz-event__icon {
  color: var(--bm-teal-600) !important;
  margin: 0 !important;
}

.dex-dialog .dex-unclassified,
.dtx-dialog .dex-unclassified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bm-warning-text);
  background: var(--bm-warning-bg);
  border: 1px solid var(--bm-warning-border);
  border-radius: var(--bm-r-pill);
}

.dex-dialog .dex-unclassified md-icon,
.dtx-dialog .dex-unclassified md-icon {
  font-size: 13px;
  width: 13px;
  height: 13px;
  min-height: 13px;
  color: currentColor;
}

.dex-dialog .dex-count-pill,
.dtx-dialog .dex-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bm-text-secondary);
  background: var(--bm-navy-50, #F4F5FA);
  border: 1px solid var(--bm-border-subtle);
  border-radius: var(--bm-r-pill);
}

.dex-dialog .dex-count-pill md-icon,
.dtx-dialog .dex-count-pill md-icon {
  font-size: 13px;
  width: 13px;
  height: 13px;
  min-height: 13px;
  color: currentColor;
}

/* TX Viewer: the DAG size opens the transaction's graph (DAG Viewer) */
.dex-dialog .dex-count-pill--action {
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.dex-dialog .dex-count-pill--action:hover,
.dex-dialog .dex-count-pill--action:focus-visible {
  color: var(--bm-primary, #1F2A6B);
  border-color: var(--bm-primary, #1F2A6B);
  background: var(--bm-navy-100, #E6E8F3);
  outline: none;
}
.dex-dialog .dex-count-pill--loading {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 960px) {
  .dex-dialog md-select.dex-multi,
  .dex-dialog .dex-time-trigger {
    max-width: none;
    width: 100%;
  }
}

/* ── Stores: Discovery / Staging / Live — first-level tabs (the sections below are second-level) ── */

.dex-dialog .dex-stores {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 4px 24px 0;
  background: var(--bm-surface);
  border-bottom: 1px solid var(--bm-border);
}

.dex-dialog .dex-store {
  --dex-store-accent: var(--bm-teal-600);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 -1px;
  padding: 16px 24px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  font-family: var(--bm-font-heading, var(--bm-font-body));
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--bm-text-secondary);
  cursor: pointer;
  transition: var(--bm-t);
}
.dex-dialog .dex-store--staging { --dex-store-accent: #B45309; }
.dex-dialog .dex-store--live    { --dex-store-accent: #15803D; }

.dex-dialog .dex-store md-icon {
  width: 20px; height: 20px; min-width: 20px; min-height: 20px; font-size: 20px;
  margin: 0; color: currentColor;
}
.dex-dialog .dex-store:hover { color: var(--bm-text-primary); background: var(--bm-surface-2); }
.dex-dialog .dex-store:focus-visible { outline: 2px solid var(--bm-teal-500); outline-offset: -2px; }
.dex-dialog .dex-store--active,
.dex-dialog .dex-store--active:hover {
  color: var(--dex-store-accent);
  border-bottom-color: var(--dex-store-accent);
  background: transparent;
}

.dex-dialog .dex-stores__hint {
  align-self: center;
  font-family: var(--bm-font-body);
  font-size: 12px;
  color: var(--bm-text-muted);
}

/* Second level under the store tabs: the sections as a segmented control on a light band, with room around */
.dex-dialog .dex-stores + .dex-tabs {
  align-items: center;
  gap: 4px;
  padding: 14px 24px 6px;
  background: transparent;
  border-bottom: 0;
}
.dex-dialog .dex-stores + .dex-tabs .dex-tab {
  margin: 0;
  padding: 7px 16px;
  font-size: 12.5px;
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-r-pill, 999px);
  background: var(--bm-surface);
  color: var(--bm-text-secondary);
}
.dex-dialog .dex-stores + .dex-tabs .dex-tab md-icon { width: 16px; height: 16px; min-width: 16px; min-height: 16px; font-size: 16px; }
.dex-dialog .dex-stores + .dex-tabs .dex-tab:hover { color: var(--bm-text-primary); border-color: var(--bm-border-strong); }
.dex-dialog .dex-stores + .dex-tabs .dex-tab--active,
.dex-dialog .dex-stores + .dex-tabs .dex-tab--active:hover {
  color: var(--bm-teal-700, var(--bm-teal-600));
  background: var(--bm-teal-50, #ECFDF8);
  border-color: var(--bm-teal-500);
}

/* A click leaves no focus box; the keyboard still shows it */
.dex-dialog .dex-store:focus:not(:focus-visible),
.dex-dialog .dex-tab:focus:not(:focus-visible) { outline: none; box-shadow: none; }

/* ── Sections: TX Viewer / Biz Event Viewer tabs ────────────────── */

.dex-dialog .dex-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 0 24px;
  background: var(--bm-surface);
  border-bottom: 1px solid var(--bm-border-subtle);
}

.dex-dialog .dex-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 -1px;
  padding: 13px 20px;
  font-family: var(--bm-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--bm-text-secondary);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--bm-t);
}

.dex-dialog .dex-tab:hover {
  color: var(--bm-text-primary);
  background: var(--bm-surface-2);
}

.dex-dialog .dex-tab:focus-visible {
  outline: 2px solid var(--bm-teal-500);
  outline-offset: -2px;
}

.dex-dialog .dex-tab--active,
.dex-dialog .dex-tab--active:hover {
  color: var(--bm-teal-600);
  border-bottom-color: var(--bm-teal-500);
  background: transparent;
}

.dex-dialog .dex-tab md-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  font-size: 18px;
  color: currentColor;
}

/* ── A biz event: link to its instance, ID and status ───────────── */

.dex-dialog a.dex-link {
  color: var(--bm-teal-600);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.dex-dialog a.dex-link:hover,
.dex-dialog a.dex-link:focus {
  text-decoration: underline;
}

.dex-dialog .dex-biz-event__ids {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 22px;
  margin-top: 2px;
}

.dex-dialog .dex-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--bm-r-pill);
  border: 1px solid transparent;
}

.dex-dialog .dex-status-pill--complete {
  color: var(--bm-teal-600);
  background: var(--bm-teal-50);
  border-color: var(--bm-teal-200);
}

.dex-dialog .dex-status-pill--open {
  color: var(--bm-warning-text);
  background: var(--bm-warning-bg);
  border-color: var(--bm-warning-border);
}

.dex-dialog .dex-meta-icon {
  font-size: 13px;
  width: 13px;
  height: 13px;
  min-height: 13px;
  color: var(--bm-text-muted);
}

.dex-dialog .dex-corr {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--bm-font-mono, monospace);
  font-size: 11px;
  color: var(--bm-text-muted);
}

/* ── The biz event navigated to from a transaction ──────────────── */

.dex-dialog .dex-focus {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  text-align: left;
  margin: 0 24px 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--bm-text-secondary);
  background: var(--bm-teal-50);
  border: 1px solid var(--bm-teal-200);
  border-radius: var(--bm-r-md);
}

/* md-icon is margin: auto: in a flex line that would swallow the free space and float the icon mid-banner */
.dex-dialog .dex-focus > md-icon {
  flex: 0 0 auto;
  margin: 0;
  color: var(--bm-teal-600);
}

.dex-dialog .dex-focus > span,
.dex-dialog .dex-focus > strong,
.dex-dialog .dex-focus > bm-id {
  margin: 0;
}

.dex-dialog .dex-focus strong {
  color: var(--bm-text-primary);
}

.dex-dialog .dex-focus__clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bm-text-secondary);
  background: var(--bm-surface);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-r-pill);
  cursor: pointer;
}

.dex-dialog .dex-focus__clear:hover {
  background: var(--bm-surface-3);
}

.dex-dialog .dex-focus__clear md-icon {
  margin: 0;
  font-size: 14px;
  width: 14px;
  height: 14px;
  min-height: 14px;
}

/* ── A classified biz event (Biz Events view): aligned lines ────── */

.dex-dialog .dex-inst {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  min-width: 0;
  max-width: 100%;
}

.dex-dialog .dex-inst__line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.dex-dialog .dex-inst__title {
  gap: 8px;
}

.dex-dialog .dex-inst__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--bm-text-primary);
}

.dex-dialog .dex-inst__icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  font-size: 16px;
  line-height: 18px;
  margin: 0;
  color: var(--bm-text-muted);
}

.dex-dialog .dex-inst__icon--event {
  color: var(--bm-teal-600);
}

.dex-dialog .dex-inst__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--bm-text-secondary);
}

.dex-dialog .dex-inst__mono {
  font-family: var(--bm-font-mono, monospace);
  font-size: 11px;
  color: var(--bm-text-muted);
}

.dex-dialog .dex-inst__ids {
  flex-wrap: wrap;
}

/* ── A biz event's transactions: one tidy line each — shape name (a link), version, DAG size ── */

.dex-dialog .dex-txlist {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 4px 0;
  min-width: 0;
}

.dex-dialog .dex-txitem {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 8px;
  border-radius: var(--bm-r-md);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: var(--bm-t);
}

.dex-dialog .dex-txitem:hover,
.dex-dialog .dex-txitem:focus-visible {
  background: var(--bm-teal-50);
  outline: none;
}

.dex-dialog .dex-txitem__name {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--bm-primary, #1F2A6B);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dex-dialog .dex-txitem:hover .dex-txitem__name { text-decoration: underline; }
.dex-dialog .dex-txitem__name--unshaped { font-weight: 500; color: var(--bm-text-secondary); }
.dex-dialog .dex-txitem .tsh-ver-pill,
.dex-dialog .dex-txitem__id { flex-shrink: 0; display: inline-flex; }
/* Biz event and transaction IDs: the whole fingerprint pill, never cut */
.dex-dialog .dex-table--instances .bm-id { max-width: none; white-space: nowrap; }

/* ── Biz Events view: nothing is cut but the correlation ID (its tooltip has it whole) ── */

.dex-dialog .dex-table--instances .dex-inst__name,
.dex-dialog .dex-table--instances .dex-inst__text:not(.dex-inst__mono),
.dex-dialog .dex-table--instances .dex-facet__name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.dex-dialog .dex-table--instances .dex-inst__title {
  flex-wrap: wrap;
}

.dex-dialog .dex-row--instance:hover {
  background: transparent;
}

.dex-dialog .dex-corr-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

/* Correlation ID inside the biz event cell: one compact muted line */
.dex-dialog .dex-inst__corr {
  gap: 6px;
}

.dex-dialog .dex-inst__icon--sm {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  font-size: 13px;
  line-height: 14px;
}

.dex-dialog .dex-inst__mono--compact {
  font-size: 10.5px;
  letter-spacing: -.1px;
}


/* ── Termination ribbon: how the transaction ended (its entry call), on the row's left edge ── */
.dex-td-ribbon { position: relative; }
.dex-ribbon {
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: transparent;
}
.dex-row--success .dex-ribbon { background: var(--bm-success, #16A34A); }
.dex-row--error .dex-ribbon   { background: var(--bm-error, #DC2626); }

/* ── "New API": a call discovery didn't identify against any API collection (list, details, DAG Viewer) ── */
.bm-new-api {
  display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 8px;
  border-radius: 999px; border: 1px solid #E2E5EE; background: #F1F3F8; color: #6B7280;
  font-family: var(--bm-font-body, Inter, sans-serif); font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  line-height: 16px; white-space: nowrap; vertical-align: middle;
}
.bm-new-api--on-dark { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .3); color: #fff; }
.ddv-tooltip .bm-new-api { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .85); }


/* ── Classification toggle: Classified ⟵ ⟶ Unclassified (the active side highlighted) ── */
.dex-class-toggle { display: inline-flex; align-items: center; gap: 6px; }
.dex-class-toggle md-switch { margin: 0 2px; }
.dex-class-toggle__side {
  border: 0; background: transparent; padding: 2px 2px; cursor: pointer;
  font: 500 12px var(--bm-font-body, Inter, sans-serif); color: var(--bm-text-muted, #8E97B4);
}
.dex-class-toggle__side--on { color: var(--bm-text-primary, #111827); font-weight: 700; }
.dex-class-toggle__side:focus-visible { outline: 2px solid var(--bm-teal-500, #00BFA5); outline-offset: 2px; border-radius: 4px; }

/* ── Import (unclassified view): a labelled button; once the transaction has a shape, its name ── */
.dex-import-btn { margin: 0; min-width: 0; height: 28px; min-height: 28px; line-height: 28px; padding: 0 12px;
  font-size: 12px; text-transform: none; }
.dex-import-btn[disabled] { opacity: .7; }
.dex-import-spinner { display: inline-block; vertical-align: middle; margin: -2px 6px 0 0; }
.dex-import-spinner svg path { stroke: currentColor; }
.dex-shape { max-width: 100%; }
/* A shape's thumbnail before its name: spaced as <bm-tx-shape> spaces them (6px), everywhere a shape is shown */
.dex-dialog .dex-facet.dex-shape { gap: 6px; }

/* The similarity of a transaction to its TX shape, in the tooltip of the shape's name: its full name (it wraps onto more lines when it is
   long), and a bar in a light red with the organization's minimum marked on it, and its percentage. The popup has the tooltip's own
   width: nothing here sets one, so the content always fits the box it is in */
.dex-sim-tip { box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; min-width: 210px; white-space: normal; text-overflow: clip; }
.dex-sim-tip > * { min-width: 0; }
.dex-sim-tip__caption { font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
.dex-sim-tip__name { font-weight: 600; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.dex-sim-tip__description { font-size: 11px; line-height: 1.4; opacity: .9; white-space: normal; max-width: 320px; }
.dex-sim { display: flex; align-items: center; gap: 8px; width: 100%; }
.dex-sim__label { flex: none; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
.dex-sim__track { position: relative; flex: 1 1 0; min-width: 40px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .20); }
.dex-sim__fill { display: block; height: 100%; border-radius: 3px; background: #f4a3a3; }
/* the organization's minimum: a tick across the bar */
.dex-sim__min { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: #fff; }
.dex-sim__value { flex: none; min-width: 38px; text-align: right; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.dex-sim-tip__min { display: flex; align-items: center; gap: 6px; font-size: 10px; opacity: .8; }
.dex-sim-tip__min-mark { flex: none; width: 2px; height: 9px; border-radius: 1px; background: #fff; }
.dex-shape .dex-facet__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Rename a TX shape inline: a pencil on the name, an input while editing ── */
.dex-shape-edit { margin: 0 0 0 2px; width: 24px; height: 24px; min-height: 24px; padding: 2px; opacity: 0; transition: opacity .12s; flex: none; }
/* Angular Material's md-icon-button is 40px wide with a 6px margin each side: closer, so the pencil and the eye sit together */
.dex-shape .md-icon-button.dex-shape-edit { width: 24px; height: 24px; min-height: 24px; line-height: 20px; margin: 0; padding: 2px; }
.dex-shape .md-icon-button.dex-shape-edit:first-of-type { margin-left: 6px; }
.dex-shape-edit md-icon { font-size: 15px; width: 15px; height: 15px; min-height: 15px; }
.dex-row--clickable:hover .dex-shape-edit, .ipd-row:hover .dex-shape-edit, .dex-shape-edit:focus { opacity: .8; }
/* TX Viewer: rename / delete take no room until the row is hovered (the shape's name gets it) */
.dex-table--tx .dex-shape .md-icon-button.dex-shape-edit { display: none; }
.dex-table--tx .ipd-row:hover .dex-shape .md-icon-button.dex-shape-edit,
.dex-table--tx .dex-shape .md-icon-button.dex-shape-edit:focus,
.dex-table--tx .dex-shape .md-icon-button.dex-shape-edit.dex-shape-delete--armed { display: inline-flex; align-items: center; justify-content: center; }
/* Delete: the second click confirms. Armed it is red and always visible (the edit icons only show on hover) */
.dex-shape-delete--armed, .dex-row--clickable:hover .dex-shape-delete--armed, .ipd-row:hover .dex-shape-delete--armed { opacity: 1 !important; }
.dex-shape-delete--armed md-icon { color: var(--bm-error, #d32f2f) !important; animation: dexShapeDeletePulse 1s ease-in-out infinite; }
@keyframes dexShapeDeletePulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.dex-shape-editor { display: inline-flex; align-items: center; gap: 6px; width: 100%; }
.dex-shape-input {
  flex: 1; min-width: 0; height: 28px; padding: 0 8px; font: inherit; font-size: 13px;
  border: 1px solid var(--bm-primary, #0F766E); border-radius: 6px; outline: none; background: #fff; color: inherit;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, .15);
}
.dex-shape-input:disabled { opacity: .7; }

/* ── The TX Shape filter: hide / show a shape from its option; a hidden one is muted and can't be selected ── */
.dex-shape-option { display: flex; align-items: center; gap: 6px; width: 100%; }
.dex-shape-option .dex-option-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dex-shape-option__btn { margin: 0; width: 28px; height: 28px; min-height: 28px; padding: 2px; flex: none; pointer-events: auto; }
.dex-shape-option__btn md-icon { font-size: 18px; width: 18px; height: 18px; min-height: 18px; }
.dex-shape-option__tag {
  flex: none; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; line-height: 16px;
  background: #F1F3F8; border: 1px solid #E2E5EE; color: #6B7280;
}
/* A hidden shape's option is greyed out: its checkbox (ticked or not) and its name; the eye stays dark, it is what shows it again */
.dex-shape-option--hidden { opacity: 1; color: #9CA3AF !important; }
.dex-shape-option--hidden .md-container .md-icon { border-color: #9CA3AF !important; }
.dex-shape-option--hidden[aria-selected="true"] .md-container .md-icon { background-color: #9CA3AF !important; }
.dex-shape-option--hidden .dex-option-name { text-decoration: line-through; color: #9CA3AF; }
.dex-shape-option--hidden .dex-shape-option__btn { color: #475569; }

/* ── Live Refresh switch (TX Viewer), as the agent logs' Live Tail: its label inline, the thumb in the primary colour ── */
.dex-live-switch { margin: 0 !important; }
.dex-live-switch.md-checked .md-thumb { background-color: var(--bm-primary, #00BFA5) !important; }
.dex-live-switch.md-checked .md-bar { background-color: rgba(0, 191, 165, 0.4) !important; }

/* ── Row 2 of the controls, in two lines: sort / classification / live refresh ... per page / paging, then the search.
      Every control under its label, bottoms aligned, the same gaps ── */
.dex-dialog .dex-controls-row--secondary { flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 14px !important; }
/* Full width: in a wrapping column the lines are only as wide as their content, which broke the search line in two */
.dex-dialog .dex-ctrl-line { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 28px; width: 100%; box-sizing: border-box; }
.dex-dialog .dex-ctrl-line--search { gap: 14px; }
.dex-dialog .dex-ctrl-spacer { flex: 1 1 0; min-width: 0; }
.dex-dialog .dex-search-group { flex: 1 1 280px; max-width: 480px; }
.dex-dialog .dex-search-group .ipd-search-wrap { min-width: 0 !important; max-width: none !important; width: 100%; flex: none !important; }
/* The controls of a line are all 34px tall, so their bottoms line up */
.dex-dialog .dex-class-toggle { height: 34px; }
.dex-dialog .dex-live-switch { margin: 0 !important; height: 34px; display: flex; align-items: center; }
.dex-dialog .ipd-pagination-group { height: 34px; align-items: center; }

/* The Live Refresh toggle and, to its right while it is on, its spinner pill */
.dex-dialog .dex-live-control { display: flex; align-items: center; gap: 10px; height: 34px; }
.dex-dialog .dex-live-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: rgba(0, 191, 165, 0.10); border: 1px solid rgba(0, 191, 165, 0.35); color: #0F766E;
}
.dex-dialog .dex-live-pill__spinner { flex: none; }
.dex-dialog .dex-live-pill__spinner svg path { stroke: #0F766E; }


/* ID of the TX shape under its name */
.dex-shape-id { margin-top: 2px; }

/* Minimum DAG size slider (TX Viewer) */
.dex-dagsize { min-width: 220px; }
.dex-dagsize__value { margin-left: 6px; font-weight: 600; color: #0F766E; letter-spacing: 0; }
.dex-dagsize__row { display: flex; align-items: center; gap: 8px; height: 36px; }
.dex-dagsize__bound { font-size: 12px; color: #6B7280; min-width: 14px; text-align: center; }
.dex-dagsize__slider { flex: 1; margin: 0; min-width: 130px; }
.dex-dagsize__step,
.dex-dagsize__step:hover,
.dex-dagsize__step:focus,
.dex-dagsize__step.md-focused,
.dex-dagsize__step[disabled],
.dex-dagsize__step[disabled]:hover {
  width: 22px !important; height: 22px !important; min-width: 22px !important; min-height: 22px !important;
  line-height: 22px !important; margin: 0 !important; padding: 0 !important; flex: 0 0 22px;
  border-radius: 4px !important; background: transparent !important; box-shadow: none !important;
}
.dex-dagsize__step:hover:not([disabled]) { background: rgba(15, 118, 110, 0.08) !important; }
.dex-dagsize__step md-icon { font-size: 16px !important; width: 16px !important; height: 16px !important; min-height: 16px !important; line-height: 16px !important; margin: 0 !important; color: #0F766E !important; }
.dex-dagsize__step[disabled] md-icon { color: #9CA3AF !important; }
.dex-dagsize__step .md-ripple-container { display: none; }

/* TX shape icon before the name of a transaction in the Biz Event Viewer */
.dex-txitem__shape-icon { flex-shrink: 0; font-size: 15px !important; width: 15px !important; height: 15px !important; min-width: 15px !important; min-height: 15px !important; margin: 0 !important; line-height: 15px !important; color: #6B7280 !important; }


/* ── Filters panel: a header that collapses it (the table gets the room) ── */
.dex-dialog .dex-controls-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 6px 4px 8px; margin: 0; border: 0; background: transparent;
  font: inherit; color: var(--bm-text-secondary); cursor: pointer; text-align: left;
}
.dex-dialog .dex-controls--collapsed .dex-controls-head { padding-bottom: 6px; }
.dex-dialog .dex-controls-head:focus-visible { outline: 2px solid var(--bm-teal-500, #00BFA5); outline-offset: 2px; border-radius: 6px; }
.dex-dialog .dex-controls-head__icon,
.dex-dialog .dex-controls-head__chevron {
  font-size: 18px !important; width: 18px !important; height: 18px !important; min-width: 18px !important; min-height: 18px !important;
  margin: 0 !important; color: var(--bm-text-muted) !important;
}
.dex-dialog .dex-controls-head__title { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.dex-dialog .dex-controls-head__count {
  padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: var(--bm-teal-700, #0f766e); background: var(--bm-teal-50, #E6FAF7); border: 1px solid var(--bm-teal-200, #99E6D8);
}
.dex-dialog .dex-controls-head__hint { font-size: 12px; color: var(--bm-text-muted); }
.dex-dialog .dex-controls-head__action { font-size: 12px; font-weight: 600; color: var(--bm-teal-700, #0f766e); }
.dex-dialog .dex-controls-head:hover .dex-controls-head__action { text-decoration: underline; }

/* The TX shape dropdown: each shape's version right beside its name */
.dex-shape-option .dex-option-name { flex: 0 1 auto; }
.dex-shape-option .dex-shape-option__ver { flex-shrink: 0; }
.dex-shape-option .dex-shape-option__tag { margin-left: auto; }

/* ── TX Viewer table: compact cells, the TX shape column gets the room left ── */
.dex-dialog .ipd-table.dex-table--tx { min-width: 1440px !important; }
.dex-dialog .dex-table--tx .ipd-th { padding: 10px 8px !important; }
.dex-dialog .dex-table--tx .ipd-td { padding: 8px 8px !important; }
.dex-dialog .dex-table--tx .ipd-td:first-child,
.dex-dialog .dex-table--tx .ipd-th:first-child { padding-left: 14px !important; }
.dex-dialog .dex-table--tx .dex-facet__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Biz Event Viewer table: compact cells; Transactions gets the room left ── */
.dex-dialog .dex-table--instances .ipd-th { padding: 10px 8px !important; }
.dex-dialog .dex-table--instances .ipd-td { padding: 8px 8px !important; }
.dex-dialog .dex-table--instances .ipd-td:first-child,
.dex-dialog .dex-table--instances .ipd-th:first-child { padding-left: 14px !important; }
/* the client is cut (whole on hover); the transactions' lines tighter */
.dex-dialog .dex-table--instances td:nth-child(5) .dex-facet__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dex-dialog .dex-table--instances .dex-txitem { gap: 6px; padding: 3px 6px; }
.dex-dialog .dex-table--instances .dex-txitem .bm-id { padding: 4px 8px; }
.dex-dialog .dex-table--instances td:nth-child(5) .dex-facet { max-width: 100%; min-width: 0; }
