/* BrokerInABox — reZEN-style agent dashboard (home) */

.dash-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f4f5f7;
  color: #111827;
}

.dash {
  flex: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
}

/* Transactions menu → Main Street Pending/Active/Closed: company-wide list view only */
.dash--list-only .dash-profile,
.dash-profile[hidden] {
  display: none !important;
}

.dash--list-only {
  padding-top: 0.35rem;
}

.dash--list-only .dash-tabs {
  margin-top: 0;
}

/* Hide Tools + personal My * tabs; only Main Street company tabs remain */
.dash--list-only .dash-tab:not(.dash-tab--ms),
.dash--list-only .dash-tabs__divider,
.dash--list-only .dash-tab[data-dash-tab="tools"],
.dash--list-only .dash-tab[data-dash-tab="pending"],
.dash--list-only .dash-tab[data-dash-tab="active"],
.dash--list-only .dash-tab[data-dash-tab="closed"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.dash--list-only .dash-crumbs {
  display: none !important;
}

/* Actions column on list-only views — keep buttons spaced, not squeezed */
.dash--list-only .dash-txn-actions {
  white-space: normal;
  min-width: 12.5rem;
  max-width: none;
  width: auto;
}

.dash-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 0.9rem;
}

.dash-crumbs a {
  color: #6b7280;
  text-decoration: none;
}

.dash-crumbs a:hover {
  color: #3b82f6;
}

.dash-crumbs span:last-child {
  color: #111827;
  font-weight: 500;
}

/* ── Dark profile hero (reZEN-like) ── */
/* Top: identity + contact. Bottom: Your numbers full width. */
.dash-profile {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-items: stretch;
  background: #14171c;
  color: #e8eaed;
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  margin-bottom: 0;
}

.dash-profile__main {
  display: flex;
  gap: 1.1rem 1.35rem;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
  flex-wrap: wrap;
}

.dash-profile__info {
  flex: 1 1 12rem;
  min-width: 0;
}

.dash-profile__avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  width: 7.25rem;
}

.dash-profile__avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(145deg, #3b82f6, #1e3a5f);
  border: 3px solid #374151;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font-family: inherit;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}

.dash-profile__avatar:hover {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
  transform: scale(1.02);
}

.dash-profile__avatar:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

.dash-profile__avatar.has-photo {
  font-size: 0;
  color: transparent;
  background-color: #1a1e25;
}

.dash-profile__photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.dash-profile__photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: 1px solid #2563eb;
  background: #3b82f6;
  color: #fff !important;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.12s, background 0.12s, border-color 0.12s;
  text-decoration: none !important;
  font-family: inherit;
}

.dash-profile__photo-btn--under-avatar {
  width: 100%;
  max-width: 7.25rem;
  padding: 0.45rem 0.5rem;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.dash-profile__photo-btn:hover {
  filter: brightness(1.08);
  border-color: #60a5fa;
  background: #2563eb;
}

.dash-profile__photo-btn[aria-busy="true"],
.dash-profile__photo-btn:disabled {
  opacity: 0.7;
  pointer-events: none;
}

.dash-profile__photo-status {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #9ca3af;
  text-align: center;
  max-width: 7.5rem;
}

.dash-profile__photo-status.is-error {
  color: #fca5a5;
}

.dash-profile__photo-status.is-ok {
  color: #86efac;
}

.dash-profile__name {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.dash-profile__meta {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.dash-profile__status {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  background: #1e3a5f;
  color: #93c5fd;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(37, 99, 235, 0.35);
  margin-bottom: 0.65rem;
}

.dash-profile__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-bottom: 0.55rem;
}

.dash-profile__links a {
  color: #3b82f6;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.dash-profile__links a:hover {
  text-decoration: underline;
}

.dash-profile__email {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.dash-profile__email strong {
  color: #e5e7eb;
  font-weight: 500;
}

.dash-profile__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 0.85rem;
}

.dash-profile__flags .badge-yes {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
}

/* Contact card — upper right of the profile hero */
.dash-contact {
  background: #1a1e25;
  border: 1px solid #2a303c;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.dash-contact--top-right {
  margin-left: auto;
  flex: 0 1 17.5rem;
  max-width: 20rem;
  min-width: 14rem;
  align-self: flex-start;
}

@media (max-width: 720px) {
  .dash-contact--top-right {
    margin-left: 0;
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
    width: 100%;
  }
}

.dash-contact--under-name {
  /* Legacy: contact under name (no longer used on home dashboard) */
  margin-top: 0.15rem;
  max-width: 22rem;
}

.dash-contact h3 {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #93c5fd;
}

.dash-contact__row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #e5e7eb;
  margin-bottom: 0.38rem;
  line-height: 1.35;
  word-break: break-word;
}

.dash-contact__row:last-child {
  margin-bottom: 0;
}

.dash-contact__ico {
  opacity: 0.7;
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
}

/* Admin "Switch user" — locked to upper-right of dashboard profile only */
.dash-contact--top-right {
  position: relative;
}

.dash-view-as-host {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid #2a303c;
  width: 100%;
  max-width: 18rem;
  margin-left: auto;
}

.dash-view-as {
  display: grid;
  gap: 0.35rem;
  justify-items: stretch;
}

.dash-view-as__label {
  display: grid;
  gap: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fbbf24;
  text-align: right;
}

.dash-view-as__hint {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #9ca3af;
  text-align: right;
}

.dash-view-as__select {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #3b4558;
  background: #0f131a;
  color: #f3f4f6;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.dash-view-as__select:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
  border-color: #3b82f6;
}

.dash-view-as__select:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Right column (legacy / unused when stats are footer) */
.dash-profile__side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.dash-stats-block {
  margin-top: 0;
}

.dash-stats-block--mine {
  padding-bottom: 0.15rem;
}

/* Your numbers sit at the bottom of the black profile card */
.dash-stats-block--footer {
  width: 100%;
  margin-top: 0.15rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.dash-stats-block--footer .dash-stats-block__head {
  margin-bottom: 0.55rem;
}

.dash-stats-block--footer .dash-mine-stats-row {
  max-width: 100%;
  width: 100%;
}

.dash-stats-block--footer .dash-stat b {
  font-size: 1.05rem;
}

.dash-stats-block--footer .dash-cap-panel {
  min-width: 5.75rem;
}

.dash-stats-block--team {
  padding-top: 0.15rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

/* Main Street brokerage-wide shortcuts (right column — dark profile card only) */
.dash-stats-block--main-street {
  padding-top: 0.15rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

/* Scoped so Tools-tab light cards are not blacked out */
.dash-stats-block--main-street .dash-ms-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-stats-block--main-street .dash-ms-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--tm-border, #2a303c);
  background: rgba(26, 30, 37, 0.9);
  color: var(--tm-text, #e8eaed);
  text-decoration: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.dash-stats-block--main-street .dash-ms-link:hover {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(30, 58, 95, 0.55);
  text-decoration: none;
  color: #fff;
}

.dash-stats-block--main-street .dash-ms-link__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dash-stats-block--main-street .dash-ms-link__count {
  font-size: 1rem;
  font-weight: 700;
  color: #93c5fd;
  min-width: 1.5rem;
  text-align: right;
}

.dash-stats-block__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e8eaed;
}

.dash-stats-block__head a {
  color: #3b82f6;
  font-weight: 500;
  font-size: 0.75rem;
  text-decoration: none;
}

.dash-stats-block__head a:hover {
  text-decoration: underline;
}

.dash-stats-block__links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  justify-content: flex-end;
}

.dash-stat--link {
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  transition: background-color 0.12s ease;
}

.dash-stat--link:hover {
  background: rgba(59, 130, 246, 0.12);
  text-decoration: none;
}

.dash-stat--link:hover b {
  color: #93c5fd;
}

/* Single row of Your numbers — Gross sales stays last (far right) */
.dash-mine-stats-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.15rem;
  background: #1a1e25;
  border: 1px solid #2a303c;
  border-radius: 8px;
  padding: 0.55rem 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dash-mine-stats-row > .dash-stat {
  flex: 1 1 0;
  min-width: 4.5rem;
}

.dash-mine-stats-row > .dash-cap-panel {
  flex: 0 0 auto;
  align-self: stretch;
  margin: 0 0.15rem;
}

/* Push gross sales to the far right of the same line */
.dash-mine-stats-row > .dash-stat--gross {
  flex: 0 0 auto;
  min-width: 6.5rem;
  margin-left: auto;
  padding: 0.15rem 0.55rem;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.dash-mine-stats-row > .dash-stat--gross b {
  color: #86efac;
  font-size: 1.02rem;
}

.dash-mine-stats-row > .dash-stat--gross span {
  color: #86efac;
  opacity: 0.9;
}

.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  background: #1a1e25;
  border: 1px solid #2a303c;
  border-radius: 8px;
  padding: 0.6rem 0.4rem;
}

.dash-stat-grid--mine {
  min-width: 0;
}

.dash-stat-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dash-stat-grid--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .dash-stat-grid--5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .dash-stat-grid--4,
  .dash-stat-grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dash-stat--money b {
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.dash-stat {
  text-align: center;
  min-width: 0;
  padding: 0 0.15rem;
}

.dash-stat b {
  display: block;
  font-size: 1.02rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.dash-stat span {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.62rem;
  color: #9ca3af;
  text-transform: none;
  line-height: 1.25;
}

/* Cap tile on the same row, left of Gross sales */
.dash-cap-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 5.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: linear-gradient(160deg, rgba(30, 58, 95, 0.85), #14171c 70%);
  text-align: center;
}

.dash-cap-panel__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93c5fd;
}

.dash-cap-panel__value {
  margin: 0.15rem 0 0.05rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.dash-cap-panel__sub {
  font-size: 0.6rem;
  color: #9ca3af;
  line-height: 1.2;
  max-width: 6.5rem;
}

.dash-mine-stats-source {
  margin-left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: #93c5fd;
  letter-spacing: 0.02em;
}

.dash-agent-team {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
}

.dash-agent-team__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
  color: #e5e7eb;
  font-size: 0.85rem;
}

.dash-agent-team__mode {
  font-size: 0.72rem;
  color: #9ca3af;
}

.dash-agent-team__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-agent-team__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: #d1d5db;
}

.dash-agent-team__row--breakout {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.dash-agent-team__name {
  font-weight: 600;
  color: #f3f4f6;
}

.dash-agent-team__meta {
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

/* ── Tabs (white bar under profile) ── */
.dash-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.1rem 0.15rem;
  border-bottom: 1px solid #e5e7eb;
  margin: 1.15rem 0 0;
  background: #fff;
  border-radius: 12px 12px 0 0;
  padding: 0 0.5rem;
}

.dash-tabs__divider {
  width: 1px;
  align-self: center;
  height: 1.4rem;
  margin: 0 0.35rem;
  background: #e5e7eb;
  flex-shrink: 0;
}

.dash-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.dash-tab:hover {
  color: #111827;
}

.dash-tab.is-active {
  color: #111827;
  font-weight: 600;
  border-bottom-color: #3b82f6;
}

/* Main Street tabs sit to the right of Closed on the white menu */
.dash-tab--ms {
  font-size: 0.8rem;
  color: #1e3a5f;
}

/* Agents never see Main Street company tabs (Pending / Active / Closed) */
.dash-tab[hidden],
.dash-tabs__divider[hidden],
body.dash-agent-only .dash-tab--ms,
body.dash-agent-only .dash-tabs__divider,
body.dash-agent-only [data-dash-tab^="ms-"] {
  display: none !important;
}

.dash-tab--ms:hover {
  color: #1e40af;
}

.dash-tab--ms.is-active {
  color: #1e3a5f;
  border-bottom-color: #1e3a5f;
}

.dash-tab__count {
  display: inline-flex;
  min-width: 1.25rem;
  justify-content: center;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a5f;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.dash-tab--ms.is-active .dash-tab__count {
  background: #dbeafe;
}

@media (max-width: 900px) {
  .dash-tabs__divider {
    display: none;
  }

  .dash-tab--ms {
    font-size: 0.75rem;
    padding: 0.7rem 0.55rem;
  }
}

.dash-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  padding: 1.15rem 1.25rem 1.5rem;
}

.dash-panel[hidden] {
  display: none !important;
}

.dash-overview-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

@media (max-width: 800px) {
  .dash-overview-grid {
    grid-template-columns: 1fr;
  }
}

.dash-card h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.dash-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.dash-card__head h2 {
  margin: 0;
}

.dash-card__head a {
  font-size: 0.8rem;
  font-weight: 600;
  color: #3b82f6;
  text-decoration: none;
}

.dash-card__head a:hover {
  text-decoration: underline;
}

.dash-card__head-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
}

.dash-year-select {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
}

.dash-year-select select {
  font: inherit;
  font-weight: 600;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.28rem 0.45rem;
  background: #fff;
}

.dash-year-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #1e3a5f;
  font-size: 0.78rem;
  font-weight: 700;
}

.dash-panel-meta {
  margin: -0.15rem 0 0.45rem;
  font-size: 0.78rem;
  color: #6b7280;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.25rem 0.4rem;
  overflow-x: auto;
  white-space: nowrap;
  line-height: 1.25;
  max-width: 100%;
}

.dash-panel-meta .dash-panel-stat,
.dash-panel-meta .dash-panel-stat-sep {
  flex: 0 0 auto;
  white-space: nowrap;
}

.dash-panel-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}

.dash-panel-stat-sep {
  color: #9ca3af;
}

.dash-panel-stat--volume {
  color: #374151;
}

.dash-panel-stat--volume strong {
  color: #111827;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dash-panel-stat--ytd strong {
  color: #1e3a5f;
}

.dash-panel-stat--closed strong {
  color: #166534;
  font-size: 0.95rem;
  font-weight: 700;
}

.dash-txn-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem 0.45rem;
  max-width: none;
  min-width: 12.5rem;
  width: auto;
  vertical-align: middle;
  padding: 0.28rem 0.4rem;
  white-space: normal;
  box-sizing: border-box;
}

.dash-table th:last-child,
.dash-table td.dash-txn-actions {
  width: auto;
  min-width: 12.5rem;
  white-space: normal;
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
  padding-left: 0.4rem;
  padding-right: 0.45rem;
}

.dash-txn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #111827;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
  min-height: 1.75rem;
  height: auto;
  margin: 0;
  box-sizing: border-box;
  text-decoration: none;
}

.dash-txn-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.dash-txn-btn--edit {
  color: #1e3a5f;
  border-color: rgba(30, 58, 95, 0.25);
  background: rgba(30, 58, 95, 0.06);
}

/* Deal Home hub (status + Contract Writer + docs) */
.dash-txn-btn--deal {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.1);
}

.dash-txn-btn--deal:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.18);
}

.dash-txn-btn--ghost {
  color: #4b5563;
  border-color: #e5e7eb;
  background: #fff;
}

.dash-txn-btn--pay {
  color: #92400e;
  border-color: rgba(146, 64, 14, 0.28);
  background: rgba(251, 191, 36, 0.12);
}

.dash-txn-btn--pay:hover {
  border-color: #b45309;
  background: rgba(251, 191, 36, 0.22);
}

.dash-txn-btn--audit {
  color: #5b21b6;
  border-color: rgba(91, 33, 182, 0.28);
  background: rgba(167, 139, 250, 0.12);
}

.dash-txn-btn--audit:hover {
  border-color: #6d28d9;
  background: rgba(167, 139, 250, 0.22);
}

.dash-txn-btn--close {
  color: #166534;
  border-color: rgba(22, 101, 52, 0.3);
  background: rgba(22, 101, 52, 0.08);
}

.dash-txn-btn--close:hover {
  border-color: #166534;
  background: rgba(22, 101, 52, 0.14);
}

/* Pay at Close result (same close dialog shell) */
.txn-close-dialog--pay-at-close {
  /* slightly wider for form + PDF preview */
  max-width: min(720px, calc(100vw - 1.5rem));
}

.txn-close-dialog.txn-esign-dialog.txn-close-dialog--pay-at-close,
dialog.txn-close-dialog--pay-at-close {
  width: min(720px, calc(100vw - 1.5rem));
}

.txn-close-pac-result {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid #fde68a;
  background: #fffbeb;
}

.txn-close-pac-result__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.txn-close-pac-result__head strong {
  font-size: 0.9rem;
  color: #92400e;
}

.txn-close-pac-result__frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

/* Close / edit dialogs (shared with transactions page) */
.txn-esign-dialog {
  border: none;
  border-radius: 0.85rem;
  padding: 0;
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.txn-esign-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.txn-esign-dialog__panel {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.txn-esign-dialog__head,
.txn-esign-dialog__body,
.txn-esign-dialog__foot {
  padding: 1rem 1.15rem;
}

.txn-esign-dialog__head {
  border-bottom: 1px solid #e5e7eb;
}

.txn-esign-dialog__head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.txn-esign-dialog__head-row h2 {
  flex: 1 1 auto;
  min-width: 0;
}

.txn-esign-dialog__head-row .txn-close-cancel {
  flex: 0 0 auto;
  margin-top: 0.05rem;
}

.txn-esign-dialog__head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.txn-esign-dialog__sub {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.txn-esign-dialog__body {
  overflow: auto;
}

.txn-esign-dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid #e5e7eb;
}

.txn-close-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.txn-close-field--full,
.txn-close-sale-fields {
  grid-column: 1 / -1;
}

.txn-close-sale-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.txn-folder-email__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}

.txn-folder-email__field input,
.txn-folder-email__field select,
.txn-folder-email__field textarea {
  font: inherit;
  font-weight: 500;
  padding: 0.45rem 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
}

.txn-close-required {
  font-style: normal;
  font-size: 0.72rem;
  color: #b45309;
  font-weight: 600;
}

.txn-folder-note {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
}

.txn-doc-detail__completed {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
}

.txn-close-preview {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.txn-close-preview strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.txn-settlement-waterfall {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.txn-settlement-waterfall__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.txn-settlement-waterfall__row dt {
  color: #6b7280;
  font-weight: 500;
}

.txn-settlement-waterfall__row dd {
  margin: 0;
  font-weight: 700;
  color: #111827;
}

.txn-settlement-waterfall__divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0.25rem 0;
}

.txn-close-commission-calc,
.txn-close-fmls-calc {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
  color: #1e3a5f;
  font-weight: 600;
}

.txn-close-commission-calc.is-muted,
.txn-close-fmls-calc.is-muted {
  color: #6b7280;
  font-weight: 500;
}

#txn-close-fmls-fee {
  background: #f3f4f6;
  color: #111827;
  font-weight: 700;
}

.txn-close-admin-badge {
  margin: 0.35rem 0 0;
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #1e3a5f;
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.txn-close-breakout {
  margin-top: 0.35rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
}

.txn-close-breakout__title {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
  color: #1e3a5f;
}

.txn-close-breakout__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .txn-close-breakout__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.txn-close-breakout__card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  min-width: 0;
}

.txn-close-breakout__card--agent {
  border-color: #86efac;
  background: #f0fdf4;
}

.txn-close-breakout__card--brokerage {
  border-color: #93c5fd;
  background: #eff6ff;
}

.txn-close-breakout__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.25;
}

.txn-close-breakout__card b {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.txn-settlement-waterfall__section {
  display: block;
  margin: 0.75rem 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1e3a5f;
}

.txn-settlement-waterfall__total--agent dd {
  color: #15803d;
}

.txn-settlement-cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
  margin: 0.35rem 0 0;
  padding: 0.65rem 0.7rem;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.txn-settlement-cap-grid dt {
  margin: 0;
  font-size: 0.72rem;
  color: #6b7280;
  font-weight: 500;
}

.txn-settlement-cap-grid dd {
  margin: 0.1rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #111827;
}

.txn-settlement-cap-grid dd.is-emphasis {
  color: #1d4ed8;
}

.txn-settlement-cap-grid dd.is-capped {
  color: #15803d;
}

.txn-settlement-cap-grid dd.is-warning {
  color: #b45309;
}

.txn-settlement-cap-note {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.35;
}

.txn-esign-dialog__foot {
  flex-wrap: wrap;
}

#txn-close-recalc {
  margin-right: auto;
}

/* Edit dialog — Pending / Active + numbers breakout */
.txn-edit-field--full {
  grid-column: 1 / -1;
}

.txn-edit-status-hint {
  grid-column: 1 / -1;
  margin: -0.35rem 0 0.15rem;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.35;
}

.txn-edit-status-hint.is-pending {
  color: #b45309;
  font-weight: 600;
}

.txn-edit-numbers {
  margin-top: 0.25rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.txn-edit-numbers.is-pending {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #f9fafb 100%);
}

.txn-edit-numbers.is-active {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #f9fafb 100%);
}

.txn-edit-numbers__title {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: #111827;
}

.txn-edit-numbers__note {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.35;
  font-weight: 500;
}

.txn-edit-numbers__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 560px) {
  .txn-edit-numbers__grid {
    grid-template-columns: 1fr;
  }
}

.txn-edit-status--error {
  color: #b91c1c;
  font-weight: 600;
}

/* Closing date | Cap remaining (right) */
.txn-close-date-cap-row {
  display: grid;
  grid-template-columns: 1fr minmax(10rem, 14rem);
  gap: 0.75rem;
  align-items: stretch;
}

@media (max-width: 560px) {
  .txn-close-date-cap-row {
    grid-template-columns: 1fr;
  }
}

.txn-close-cap-remaining {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
  text-align: center;
}

.txn-close-cap-remaining.is-capped {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
}

.txn-close-cap-remaining.is-active-cap {
  border-color: #fbbf24;
}

.txn-close-cap-remaining__label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.25;
}

.txn-close-cap-remaining.is-capped .txn-close-cap-remaining__label {
  color: #166534;
}

.txn-close-cap-remaining__value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #c2410c;
  letter-spacing: -0.02em;
}

.txn-close-cap-remaining.is-capped .txn-close-cap-remaining__value {
  color: #15803d;
}

.txn-close-cap-remaining__meta {
  font-size: 0.7rem;
  color: #78350f;
  font-weight: 600;
}

.txn-close-cap-remaining__meta b {
  font-weight: 800;
  color: #111827;
}

.txn-close-cap-remaining__sub {
  font-size: 0.72rem;
  color: #78350f;
  font-weight: 600;
}

.txn-close-cap-remaining__note {
  margin-top: 0.15rem;
  font-size: 0.68rem;
  line-height: 1.3;
  color: #92400e;
  font-weight: 600;
}

.txn-close-cap-remaining.is-capped .txn-close-cap-remaining__note {
  color: #166534;
}

.txn-close-cap-remaining__input-wrap {
  display: block;
  margin: 0.15rem 0;
}

#txn-close-cap-paid-input {
  width: 100%;
  max-width: 9rem;
  margin: 0 auto;
  display: block;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #c2410c;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 0.25rem 0.4rem;
  background: #fff;
}

.txn-close-cap-remaining.is-capped #txn-close-cap-paid-input {
  color: #15803d;
  border-color: #86efac;
}

.txn-close-cap-remaining__meta #txn-close-agent-cap-owe {
  font-weight: 800;
  color: #c2410c;
}

.txn-close-cap-remaining.is-capped .txn-close-cap-remaining__meta #txn-close-agent-cap-owe {
  color: #15803d;
}

.txn-close-cap-amount-input {
  width: 4.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.1rem 0.25rem;
  text-align: right;
  background: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#txn-close-fmls-fee,
#txn-close-brokerage-applied {
  font-weight: 700;
}

.txn-close-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.txn-close-mode-row .txn-close-field--full,
.txn-close-mode-row .txn-close-commission-calc,
.txn-close-mode-row .txn-close-referral-calc {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .txn-close-mode-row {
    grid-template-columns: 1fr;
  }
}

/* Dual listing + buyer commission breakout */
.txn-close-dual-sides {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.txn-close-dual-note {
  margin: 0;
  font-size: 0.82rem;
}

/* Stack listing agent above buyer agent (not side-by-side) */
.txn-close-side-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.txn-close-side-card {
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.txn-close-side-card.is-outside {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #f5f3ff 0%, #faf5ff 100%);
}

.txn-close-represent-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.35;
}

.txn-close-side-card.is-collapsed {
  border-color: #e2e8f0;
  background: #f1f5f9;
  opacity: 0.88;
  padding: 0.4rem 0.7rem;
  min-height: 0;
  gap: 0;
}

/* Hard collapse — do not let display:flex on body fight this */
.txn-close-side-card.is-collapsed .txn-close-side-card__body,
.txn-close-side-card[data-expanded="0"] .txn-close-side-card__body,
.txn-close-side-card__body[hidden] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.txn-close-side-card.is-open .txn-close-side-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.txn-close-side-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
  text-align: left;
}

.txn-close-side-card__title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.txn-close-side-card__badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  white-space: nowrap;
}

.txn-close-side-card__badge.is-ms {
  background: #dbeafe;
  color: #1e3a8a;
}

.txn-close-side-card__badge.is-outside {
  background: #ede9fe;
  color: #5b21b6;
}

.txn-close-side-card.is-collapsed .txn-close-side-card__badge {
  background: #e2e8f0;
  color: #475569;
}

#txn-close-listing-broker.is-capped-zero,
#txn-close-buyer-broker.is-capped-zero,
#txn-close-brokerage-owed.is-capped-zero {
  color: #047857;
}

.txn-settlement-waterfall__waived dd,
.txn-settlement-waterfall__row.is-muted.txn-settlement-waterfall__waived dd {
  color: #047857 !important;
  font-weight: 800;
  text-decoration: none;
}

.txn-close-side-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.txn-close-side-outside {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.txn-close-side-ms {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.txn-close-side-fees {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.txn-close-side-breakout--wide {
  grid-template-columns: 1fr 1fr;
}

.txn-close-side-breakout--wide div:last-child {
  grid-column: 1 / -1;
  background: #ecfdf5;
  border-color: #86efac;
}

.txn-close-side-card .txn-close-mode-row {
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.45rem;
}

.txn-close-side-gross {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e3a5f;
}

.txn-close-side-cap-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.3rem 0.45rem;
}

.txn-close-side-breakout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  font-size: 0.78rem;
}

.txn-close-side-breakout div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.35rem 0.45rem;
}

.txn-close-side-breakout span {
  color: #64748b;
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.txn-close-side-breakout b {
  color: #0f172a;
  font-weight: 800;
}

.txn-close-dual-totals {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  padding: 0.45rem 0.55rem;
  background: #ecfdf5;
  border: 1px solid #86efac;
  border-radius: 8px;
}

.txn-close-breakout__rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.txn-close-breakout__line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  font-size: 0.88rem;
}

.txn-close-breakout__line span {
  color: #4b5563;
  font-weight: 600;
}

.txn-close-breakout__line b {
  color: #111827;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.txn-close-breakout__line.is-sub {
  background: #f9fafb;
}

.txn-close-breakout__line.is-sub span {
  color: #6b7280;
  font-weight: 500;
}

.txn-close-breakout__line.is-total {
  border-color: #86efac;
  background: #f0fdf4;
}

.txn-close-breakout__line.is-total span,
.txn-close-breakout__line.is-total b {
  color: #15803d;
}

.txn-close-breakout__line.is-check {
  border-style: dashed;
}

.txn-close-breakout__line.is-check.is-ok {
  border-color: #86efac;
  background: #f0fdf4;
}

.txn-close-breakout__line.is-check.is-bad {
  border-color: #fca5a5;
  background: #fef2f2;
}

.txn-close-breakout__proof {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #6b7280;
  font-weight: 600;
}

.txn-close-breakout__proof.is-ok {
  color: #15803d;
}

.txn-close-breakout__proof.is-bad {
  color: #b91c1c;
}

.txn-close-referral {
  margin-top: 0.25rem;
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.txn-close-referral__title {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  color: #111827;
}

.txn-close-referral__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

@media (max-width: 560px) {
  .txn-close-referral__grid {
    grid-template-columns: 1fr;
  }
}

.txn-close-referral-calc {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e3a5f;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #3b82f6;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn.ghost {
  background: #fff;
  border-color: #e5e7eb;
  color: #111827;
}

@media (max-width: 560px) {
  .txn-close-fields,
  .txn-close-sale-fields {
    grid-template-columns: 1fr;
  }
}

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

@media (max-width: 520px) {
  .dash-quick {
    grid-template-columns: 1fr;
  }
}

.dash-quick__item {
  display: block;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.dash-quick__item:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
  text-decoration: none;
}

.dash-quick__item strong {
  display: block;
  font-size: 0.88rem;
  color: #111827;
  margin-bottom: 0.15rem;
}

.dash-quick__item span {
  font-size: 0.75rem;
  color: #6b7280;
}

.dash-deal-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-deal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  text-decoration: none;
  color: inherit;
}

.dash-deal:hover {
  border-color: #93c5fd;
  text-decoration: none;
}

/* Admin team view: highlight the signed-in admin's own closings */
.dash-deal.is-mine {
  background: #dbeafe;
  border-color: #93c5fd;
  box-shadow: inset 3px 0 0 #3b82f6;
}

.dash-deal.is-mine:hover {
  border-color: #60a5fa;
  background: #bfdbfe;
}

.dash-mine-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.32rem;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.15;
}

.dash-mine-legend {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  color: #6b7280;
  white-space: nowrap;
  overflow-x: auto;
  line-height: 1.2;
}

.dash-mine-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 4px;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  flex-shrink: 0;
}

.dash-table tbody tr.dash-closing-mine {
  background: #dbeafe;
}

.dash-table tbody tr.dash-closing-mine:hover {
  background: #bfdbfe;
}

.dash-table tbody tr.dash-closing-mine td:first-child {
  box-shadow: inset 3px 0 0 #3b82f6;
}

/* Closing urgency — closing date cell only (keeps the row clean) */
.dash-table td.dash-closing-cell--soon {
  background: #fef9c3; /* light yellow — closes within 7 days */
  color: #713f12;
  font-weight: 700;
  white-space: nowrap;
}

.dash-table td.dash-closing-cell--overdue {
  background: #fecaca; /* light red — past closing date */
  color: #7f1d1d;
  font-weight: 700;
  white-space: nowrap;
}

.dash-table tbody tr.dash-closing-mine td.dash-closing-cell--soon {
  background: #fef9c3;
  color: #713f12;
}

.dash-table tbody tr.dash-closing-mine td.dash-closing-cell--overdue {
  background: #fecaca;
  color: #7f1d1d;
}

.dash-urgency-swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 4px;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 0.15rem;
}

.dash-urgency-swatch--soon {
  background: #fef9c3;
  border: 1px solid #ca8a04;
}

.dash-urgency-swatch--overdue {
  background: #fecaca;
  border: 1px solid #dc2626;
}

.dash-legend-sep {
  margin: 0 0.55rem;
  color: #9ca3af;
}

.dash-mine-legend {
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

.dash-deal__title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #111827;
  min-width: 0;
}

.dash-deal__meta {
  font-size: 0.75rem;
  color: #6b7280;
  grid-column: 1 / -1;
}

.dash-deal__date {
  font-size: 0.78rem;
  font-weight: 600;
  color: #3b82f6;
  white-space: nowrap;
}

.dash-empty {
  margin: 0;
  padding: 0.75rem 0;
  font-size: 0.88rem;
  color: #6b7280;
}

.dash-table-wrap {
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
  /* auto so Actions (Edit / Pay / Compliance / Close) is not crushed into overlapping buttons */
  table-layout: auto;
  min-width: 52rem;
}

.dash-table th,
.dash-table td {
  text-align: left;
  padding: 0.32rem 0.4rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  line-height: 1.2;
}

.dash-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  font-weight: 600;
  white-space: nowrap;
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
}

/* Column widths: keep every data row on one line */
.dash-table th:nth-child(1),
.dash-table td.dash-prop-cell {
  width: 28%;
}
.dash-table th:nth-child(2),
.dash-table td.dash-closing-cell {
  width: 7.5%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dash-table th:nth-child(3),
.dash-table td.dash-status-cell {
  width: 7%;
  white-space: nowrap;
}
.dash-table th:nth-child(4),
.dash-table td.dash-side-cell {
  width: 7%;
  white-space: nowrap;
}
.dash-table th:nth-child(5),
.dash-table td.dash-agent-cell {
  width: 16%;
}
.dash-table th:nth-child(6),
.dash-table td.dash-price-cell {
  width: 10%;
  white-space: nowrap;
}
.dash-table th:nth-child(7),
.dash-table td.dash-txn-actions {
  width: 26%;
  min-width: 12.5rem;
}

.dash-prop-cell,
.dash-agent-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-prop-cell a {
  display: inline;
  max-width: 100%;
}

.dash-price-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.dash-table a {
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
}

.dash-table a:hover {
  text-decoration: underline;
}

/* Single-line rows on Pending / Active / Closed lists */
.dash--list-only .dash-table th,
.dash--list-only .dash-table td {
  padding-top: 0.26rem;
  padding-bottom: 0.26rem;
}

.dash--list-only .dash-table tbody tr {
  height: 1.95rem;
}

/* Tools grid */
/* Compact tools grid — more columns, less page height */
.dash-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.4rem;
}

.dash-tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 8px;
}

.dash-tool-card.is-draggable {
  cursor: grab;
}

.dash-tool-card.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.dash-tool-card.is-drag-over .dash-tool {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.dash-tool-card .dash-ms-link-drag {
  top: 0.28rem;
  left: 0.28rem;
}

.dash-tool-card .dash-bt-delete {
  top: 0.2rem;
  right: 0.2rem;
}

.dash-tool-card.is-draggable .dash-tool {
  padding: 0.55rem 1.2rem 0.45rem 1.15rem;
  height: 100%;
}

.dash-tool {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
  min-height: 0;
}

.dash-tool:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.06);
  text-decoration: none;
}

.dash-tool--featured {
  border-color: #93c5fd;
  background: #eff6ff;
}

.dash-tool__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-tool__desc {
  font-size: 0.68rem;
  color: #6b7280;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tools tab: Brokerage tools first, Main Street Links below */
.dash-card--brokerage-tools,
.dash-card--ms-links {
  padding: 0.85rem 1rem;
}

.dash-card--brokerage-tools {
  margin-bottom: 0.65rem;
}

.dash-card--ms-links {
  margin-bottom: 0;
  margin-top: 0;
}

.dash-card--brokerage-tools .dash-card__head,
.dash-card--ms-links .dash-card__head {
  align-items: center;
  margin-bottom: 0.35rem;
}

.dash-card--brokerage-tools .dash-card__head h2,
.dash-card--ms-links .dash-card__head h2 {
  font-size: 0.95rem;
}

.dash-card--brokerage-tools .dash-panel-meta {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
}

.dash-ms-add-btn {
  border: none;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #2563eb;
  cursor: pointer;
}

.dash-ms-add-btn:hover {
  filter: brightness(1.05);
}

.dash-ms-add-panel {
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fafc;
}

.dash-ms-add-form {
  display: grid;
  gap: 0.4rem;
  max-width: 28rem;
}

.dash-ms-add-field {
  display: grid;
  gap: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.dash-ms-add-field em {
  font-style: normal;
  font-weight: 500;
  color: #94a3b8;
}

.dash-ms-add-field input {
  font: inherit;
  font-weight: 400;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  background: #fff;
}

.dash-ms-add-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.dash-ms-add-status {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

.dash-ms-add-status.is-error {
  color: #dc2626;
}

/* Tools tab — compact light Main Street Links cards */
.dash-card--ms-links .dash-ms-links {
  margin-top: 0.1rem;
}

.dash-ms-links__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.4rem;
}

.dash-ms-link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.dash-ms-link-card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.dash-card--ms-links .dash-ms-link,
.dash-ms-link-card .dash-ms-link {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  flex: 1;
  padding: 0.45rem 1.35rem 0.4rem 0.6rem;
  border: none;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  color: #111827;
  transition: none;
}

.dash-card--ms-links .dash-ms-link:hover,
.dash-ms-link-card .dash-ms-link:hover {
  background: transparent;
  border: none;
  text-decoration: none;
  color: #111827;
}

.dash-card--ms-links .dash-ms-link__label,
.dash-ms-link-card .dash-ms-link__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e3a5f;
  padding-right: 0.1rem;
  letter-spacing: normal;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-ms-link__desc {
  font-size: 0.68rem;
  color: #6b7280;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-ms-link-delete {
  position: absolute;
  top: 0.18rem;
  right: 0.18rem;
  z-index: 2;
  width: 1.15rem;
  height: 1.15rem;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dash-ms-link-delete:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.dash-ms-link-delete:disabled {
  opacity: 0.55;
  cursor: wait;
}

.dash-ms-links__grid--sortable .dash-ms-link-card.is-draggable {
  cursor: grab;
}

.dash-ms-links__grid--sortable .dash-ms-link-card.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  border-color: #93c5fd;
}

.dash-ms-links__grid--sortable .dash-ms-link-card.is-drag-over {
  border-color: #2563eb;
  background: #eff6ff;
}

.dash-ms-link-drag {
  position: absolute;
  top: 0.22rem;
  left: 0.22rem;
  z-index: 2;
  font-size: 0.65rem;
  letter-spacing: -0.08em;
  color: #94a3b8;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

.dash-ms-links__grid--sortable .dash-ms-link {
  padding-left: 1.1rem;
  padding-top: 0.5rem;
}

.dash-ms-reorder-hint {
  margin: 0.3rem 0 0;
  font-size: 0.68rem;
  color: #94a3b8;
}

/* On wider screens fit more tiles per row */
@media (min-width: 900px) {
  .dash-tools {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }

  .dash-ms-links__grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  }
}

/* Vault open+fill helper (GSCCCA etc.) */
.dash-vault-fill-popover {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.dash-vault-fill-popover__card {
  position: relative;
  width: min(100%, 420px);
  padding: 1.15rem 1.2rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
}

.dash-vault-fill-popover__close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.dash-vault-fill-popover__title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: #0f172a;
}

.dash-vault-fill-popover__hint {
  margin: 0 0 0.9rem;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.dash-vault-fill-popover__field {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.dash-vault-fill-popover__input-row {
  display: flex;
  gap: 0.4rem;
}

.dash-vault-fill-popover__input-row input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0f172a;
  background: #f8fafc;
}

.dash-vault-fill-popover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.dash-footer {
  padding: 1rem 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
}

.dash-footer p {
  margin: 0;
}

/* When rail is present, dash still centered in content column */
body.has-site-rail .dash {
  width: min(1120px, calc(100% - 2rem));
}

/* Per-transaction compliance report dialog */
.txn-audit-dialog,
.txn-compliance-report-dialog {
  width: min(860px, calc(100vw - 1.25rem));
  max-width: 860px;
}
.txn-compliance-report-panel {
  max-height: min(92vh, 920px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.txn-compliance-report-panel .txn-esign-dialog__body {
  overflow: auto;
  flex: 1;
}
.txn-compliance-loading {
  padding: 1rem 0.25rem 1.25rem;
}
.txn-compliance-loading__title {
  margin: 0 0 0.65rem;
  font-weight: 700;
  color: #1e3a8a;
}
.txn-compliance-loading__steps {
  margin: 0;
  padding-left: 1.2rem;
  color: #64748b;
  font-size: 0.9rem;
}
.txn-compliance-loading__steps li {
  margin: 0.25rem 0;
}
.txn-compliance-loading__steps li.is-active {
  color: #1d4ed8;
  font-weight: 700;
}
.txn-compliance-loading__steps li.is-done {
  color: #15803d;
}
.txn-compliance-summary {
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  border: 1px solid #c7d2fe;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 70%);
}
.txn-compliance-summary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.55rem 0.75rem;
}
.txn-compliance-summary__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 0.1rem;
}
.txn-compliance-summary__value {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}
.txn-compliance-split__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.txn-compliance-split__group {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.82rem;
}
.txn-compliance-split__group strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #4338ca;
}
.txn-compliance-split__group ul {
  margin: 0;
  padding-left: 1rem;
  color: #334155;
}
.txn-compliance-split__bucket {
  margin: 0.75rem 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
}
.txn-compliance-split__bucket-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}
.txn-compliance-split__bucket:first-of-type {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.txn-compliance-split__bucket:nth-of-type(2) {
  border-color: #fde68a;
  background: #fffbeb;
}
.txn-split-doc-link,
.txn-compliance-doc-link {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.txn-split-doc-link:hover,
.txn-compliance-doc-link:hover {
  color: #1e3a8a;
}
.txn-split-doc-link--dead {
  color: #64748b;
  font-weight: 500;
  text-decoration: none;
  cursor: default;
}
.txn-compliance-doc-link--open {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(29, 78, 216, 0.35);
  background: rgba(219, 234, 254, 0.75);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  vertical-align: middle;
}
.txn-compliance-doc-link--open:hover {
  background: #dbeafe;
  text-decoration: none;
}
.txn-compliance-issue__matched {
  color: #64748b;
  font-weight: 500;
}
.txn-compliance-issue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.txn-compliance-issue {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
}
.txn-compliance-issue__msg {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.9rem;
  color: #1e293b;
}
.txn-compliance-issue__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
.txn-compliance-issue__done {
  margin: 0.4rem 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: #475569;
}
.btn-sm {
  padding: 0.28rem 0.55rem !important;
  font-size: 0.8rem !important;
}
.txn-compliance-issue__note-row {
  margin-top: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}
.txn-compliance-note-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 0.35rem;
}
.txn-compliance-note-input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  font: inherit;
  font-size: 0.88rem;
  resize: vertical;
  min-height: 4.5rem;
  box-sizing: border-box;
}
.txn-audit-section-title {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.92rem;
  color: #0f172a;
}
.txn-audit-section-title small {
  font-weight: 500;
  color: #64748b;
}
.txn-audit-summary-card {
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.txn-audit-issue-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.txn-audit-issue {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  font-size: 0.84rem;
  color: #7f1d1d;
}
.txn-audit-issue--warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}
.txn-audit-issue--info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}
.txn-audit-issue__cat {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.txn-audit-ok {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
  font-weight: 600;
}
.txn-audit-present-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.84rem;
  color: #334155;
}
.txn-audit-na {
  margin-top: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  font-size: 0.84rem;
  color: #334155;
}
.txn-audit-na summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
}
.txn-audit-na-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

/* Closed-deal document recommendations */
.compliance-recommend-heading {
  margin: 0.75rem 0 0.4rem;
  font-size: 0.95rem;
  color: #0f172a;
}
.compliance-recommend-occasional {
  margin-top: 0.85rem;
  font-size: 0.85rem;
}
.compliance-recommend-occasional summary {
  cursor: pointer;
  font-weight: 700;
  color: #475569;
}
.compliance-recommend-occasional ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}
.compliance-recommend-trail {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.compliance-recommend-trail__title {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
}
.compliance-recommend-trail__ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
}
.compliance-recommend-trail__ul li {
  margin-bottom: 0.45rem;
}

/* ── Mobile dashboard polish (pairs with css/mobile.css) ── */
@media (max-width: 900px) {
  .dash {
    width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .dash-crumbs {
    padding-left: 2.75rem;
    margin-top: 0.15rem;
  }

  .dash-profile {
    border-radius: 12px;
  }

  /* Pending / Active action buttons need room so they never overlap */
  .dash-txn-actions {
    gap: 0.4rem;
    min-width: 11rem;
  }

  .dash-txn-btn {
    padding: 0.3rem 0.5rem;
    min-height: 1.85rem;
  }
}

@media (max-width: 640px) {
  .dash-ms-add-form {
    grid-template-columns: 1fr;
  }

  .dash-ms-add-field input,
  .dash-bt-add-form input {
    font-size: 16px;
  }

  .dash-tool-card .dash-tool {
    min-height: 4.5rem;
  }

  /* Hint that transaction tables can scroll sideways */
  .dash-table-wrap {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin: 0 -0.15rem;
  }

  .dash-table-wrap::after {
    content: "Swipe →";
    position: sticky;
    left: 100%;
    bottom: 0.35rem;
    float: right;
    margin: -1.6rem 0.35rem 0 0;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    pointer-events: none;
    z-index: 2;
  }
}
