```css
/* Global CRM styles */

body {
  background-color: #6eb8f9;
}

body.app-bg {
  position: relative;
  min-height: 100vh;
  background: url("/static/backgrounds/house-bg.jpg") no-repeat center center fixed;
  background-size: cover;
}

/* Overlay ABOVE the image but BELOW all content */
body.app-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(210, 220, 235, 0.62);
  pointer-events: none;
  z-index: 0;
}

/* Keep app content above overlay */
.navbar,
.container,
.container-fluid,
.content-panel,
footer {
  position: relative;
  z-index: 1;
}

/* Do NOT create stacking contexts for layout wrappers */
.container,
.container-fluid,
.content-panel {
  position: relative;
  z-index: auto;
}

/* Login page polish */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 440px;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.login-card-header {
  background: rgba(255,255,255,0.95);
  padding: 22px 22px 10px 22px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-align: center;
}

.login-logo {
  max-height: 72px;
}

.login-subtitle {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 0.95rem;
  color: rgba(0,0,0,0.65);
}

.login-card-body {
  background: rgba(255,255,255,0.97);
  padding: 22px;
}

.legal-links {
  margin-top: 14px;
  font-size: 0.875rem;
  text-align: center;
}

.legal-links a {
  color: rgba(0,0,0,0.7);
  text-decoration: none;
}

.legal-links a:hover {
  text-decoration: underline;
}

.tiny-note {
  margin-top: 6px;
  font-size: 0.8rem;
  color: rgba(0,0,0,0.5);
  text-align: center;
}

.login-card .form-control {
  border-radius: 12px;
  padding: 12px 12px;
}

.login-card .btn {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
}

/* Login page version badge */

.login-version {
  position: fixed;
  top: 12px;
  right: 18px;
  font-size: 0.85rem;
  color: rgba(0,0,0,0.55);
  z-index: 2;
  font-weight: 500;
}

/* Card tweaks */

.card-header {
  font-weight: 600;
}

/* Form spacing */

.form-section {
  margin-bottom: 1.5rem;
}

/* Buttons */

.btn-primary {
  font-weight: 500;
}

.btn-micro {
  padding: 0.12rem 0.40rem;
  font-size: 0.78rem;
  line-height: 1.1;
  border-radius: 0.40rem;
}

/* Placeholder text styling */

.placeholder-box {
  padding: 2rem;
  background: #ffffff;
  border: 1px dashed #ccc;
  border-radius: 6px;
  text-align: center;
  color: #777;
}

/* Open House legal footer */

.openhouse-footer-legal {
  margin-top: 14px;
}

.openhouse-legal-link {
  font-size: 14px;
  text-decoration: underline;
}

.openhouse-sothebys-disclosure {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.85;
}

/* Row Highlighting */

tr.tx-selected td {
  background-color: #f4f8fb !important;
}

tr.tx-selected {
  border-left: 5px solid #000dfc;
}

/* Table layout control */

.tx-table {
  table-layout: fixed;
  width: 100%;
}

.tx-col-actions {
  width: 92px;
  white-space: nowrap;
}

/* Prevent action button wrapping */

.actions-col {
  white-space: nowrap;
  width: 1%;
}

.actions-col .btn-group,
.actions-col .d-inline-flex {
  flex-wrap: nowrap;
}

.actions-col .btn {
  white-space: nowrap;
}

/* Engagement table */

.engagement-log-table {
  --eng-row-bg: #f5f6f8;
  --eng-border: #dfe3e8;
  table-layout: fixed;
  width: 100%;
}

.engagement-log-table > tbody > tr.engagement-row > td {
  background: var(--eng-row-bg);
  vertical-align: middle;
  border-top: 1px solid var(--eng-border);
}

/* Follow-ups button */

.engagement-log-table .btn-followups-active {
  --bs-btn-color: #b45309;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: #f59e0b;

  --bs-btn-hover-color: #92400e;
  --bs-btn-hover-bg: rgba(245,158,11,0.08);
  --bs-btn-hover-border-color: #f59e0b;

  --bs-btn-active-color: #92400e;
  --bs-btn-active-bg: rgba(245,158,11,0.12);
  --bs-btn-active-border-color: #f59e0b;

  min-width: 132px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(245,158,11,0.25);
}

.engagement-log-table .btn-followups-active .badge {
  background: rgba(245,158,11,0.18) !important;
  color: #92400e !important;
  font-weight: 700;
  font-size: .72rem;
}

/* ---------------------------------------------------- */
/* Phase 11 – Follow-up History (clean unified rules) */
/* ---------------------------------------------------- */

.followup-list-card .card-header {
  background: #f8f9fa;
}

.followup-list-card .card-body {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.followup-history-item {
  padding: 0.45rem 0.25rem;
  border-top: 1px solid var(--eng-border, #dfe3e8);
  transition: background-color 0.12s ease;
}

.followup-history-item:first-child {
  border-top: none;
  padding-top: 0;
}

.followup-history-item:last-child {
  padding-bottom: 0;
}

.followup-history-item:hover {
  background-color: #f8f9fb;
}

.followup-history-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.followup-history-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  overflow: hidden;
}

.followup-history-meta {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 600;
}

.followup-history-summary {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #6c757d;
}

.followup-history-actions {
  flex: 0 0 auto;
  min-width: 170px;
}

.followup-history-actions .btn {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.followup-complete-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3em 0.5em;
  line-height: 1.1;
}

.followup-complete-time {
  margin-top: 0.2rem;
  line-height: 1.1;
}

.followup-due-date {
  font-weight: 600;
  color: #1f2d3d;
}

.env-banner {
  position: relative;
  z-index: 2;
  background: #ffe8a1;
  color: #7a5300;
  border-bottom: 1px solid #e0b200;
  font-weight: 600;
  text-align: center;
  padding: 6px 0;
  letter-spacing: .03em;
}

.task-desc {
  white-space: normal;
  word-break: break-word;
}

.task-desc.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-snap-item {
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.dash-snap-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.eng-outcome-clamp {
  white-space: normal;
  word-break: break-word;
}

.eng-outcome-clamp.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}